mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2026-11-20 18:39:49 -05:00
Driver commit for release SD W8997 MM6X18540.p34 2026-07-23_13:06:28
Firmware version for commit:
SD-UART W8997-16.92.21.p153.12
SD-UART W8997-16.92.21.p153.10
Signed-off-by: Yuvraj Singh <yuvraj.singh@nxp.com>
This commit is contained in:
parent
84ca65c9ff
commit
ab38d45e44
66 changed files with 2688 additions and 43321 deletions
424
Makefile
424
Makefile
|
|
@ -30,33 +30,7 @@ YMD= `date +%Y%m%d%H%M`
|
|||
# Configuration Options
|
||||
#############################################################################
|
||||
# Multi-chipsets
|
||||
CONFIG_SD8887=n
|
||||
CONFIG_SD8897=n
|
||||
CONFIG_USB8897=n
|
||||
CONFIG_PCIE8897=n
|
||||
CONFIG_SD8977=n
|
||||
CONFIG_SD8978=y
|
||||
CONFIG_USB8978=n
|
||||
CONFIG_SD8997=y
|
||||
CONFIG_USB8997=n
|
||||
CONFIG_PCIE8997=y
|
||||
CONFIG_SD8987=y
|
||||
CONFIG_SD9097=n
|
||||
CONFIG_SD9177=y
|
||||
CONFIG_SD8801=n
|
||||
CONFIG_USB8801=n
|
||||
CONFIG_USB9097=n
|
||||
CONFIG_PCIE9097=n
|
||||
CONFIG_SD9098=y
|
||||
CONFIG_USB9098=n
|
||||
CONFIG_PCIE9098=y
|
||||
CONFIG_SDIW610=y
|
||||
CONFIG_USBIW610=y
|
||||
CONFIG_SDIW624=n
|
||||
CONFIG_SDAW693=n
|
||||
CONFIG_PCIEIW624=n
|
||||
CONFIG_USBIW624=n
|
||||
CONFIG_PCIEAW693=y
|
||||
|
||||
|
||||
# Debug Option
|
||||
|
|
@ -92,29 +66,30 @@ CONFIG_BIG_ENDIAN=n
|
|||
|
||||
|
||||
|
||||
|
||||
# SDIO suspend/resume
|
||||
CONFIG_SDIO_SUSPEND_RESUME=y
|
||||
|
||||
# DFS testing support
|
||||
CONFIG_DFS_TESTING_SUPPORT=y
|
||||
|
||||
# Multi-channel support
|
||||
CONFIG_MULTI_CHAN_SUPPORT=y
|
||||
|
||||
|
||||
# Enable Android kernel
|
||||
CONFIG_ANDROID_KERNEL=n
|
||||
|
||||
# Enable driver/FW dump to proc
|
||||
CONFIG_DUMP_TO_PROC=y
|
||||
|
||||
CONFIG_TASKLET_SUPPORT=n
|
||||
|
||||
|
||||
|
||||
#32bit app over 64bit kernel support
|
||||
CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n
|
||||
|
||||
ifeq ($(ANDROID),)
|
||||
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
|
||||
ccflags-y += -Wno-packed-bitfield-compat
|
||||
endif
|
||||
WimpGCC_VERSION := $(shell echo `gcc -dumpversion | cut -f1 -d.`| bc )
|
||||
ifeq ($(shell test $(WimpGCC_VERSION) -ge 7; echo $$?),0)
|
||||
|
|
@ -133,12 +108,87 @@ endif
|
|||
#ccflags-y += -Wstringop-truncation
|
||||
#ccflags-y += -Wmisleading-indentation
|
||||
#ccflags-y += -Wunused-const-variable
|
||||
endif
|
||||
|
||||
#############################################################################
|
||||
# Enable Feature Config
|
||||
#############################################################################
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
ifeq ($(CONFIG_WIRELESS_EXT),y)
|
||||
ifeq ($(CONFIG_WEXT_PRIV),y)
|
||||
# Enable WEXT for STA
|
||||
CONFIG_STA_WEXT=y
|
||||
# Enable WEXT for uAP
|
||||
CONFIG_UAP_WEXT=y
|
||||
else
|
||||
# Disable WEXT for STA
|
||||
CONFIG_STA_WEXT=n
|
||||
# Disable WEXT for uAP
|
||||
CONFIG_UAP_WEXT=n
|
||||
endif
|
||||
endif
|
||||
# Enable CFG80211 for STA
|
||||
ifeq ($(CONFIG_CFG80211),y)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else ifeq ($(CONFIG_CFG80211),m)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
# OpenWrt
|
||||
ifeq ($(CONFIG_OPENWRT_SUPPORT), y)
|
||||
ifeq ($(CPTCFG_CFG80211),y)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else ifeq ($(CPTCFG_CFG80211),m)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
endif
|
||||
# Enable CFG80211 for uAP
|
||||
ifeq ($(CONFIG_CFG80211),y)
|
||||
CONFIG_UAP_CFG80211=y
|
||||
else ifeq ($(CONFIG_CFG80211),m)
|
||||
CONFIG_UAP_CFG80211=y
|
||||
else
|
||||
CONFIG_UAP_CFG80211=n
|
||||
endif
|
||||
# OpenWrt
|
||||
ifeq ($(CONFIG_OPENWRT_SUPPORT), y)
|
||||
ifeq ($(CPTCFG_CFG80211),y)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else ifeq ($(CPTCFG_CFG80211),m)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
endif
|
||||
#--------------------------------------------------
|
||||
# Disable Feature if STA and UAP is not supported
|
||||
#--------------------------------------------------
|
||||
ifneq ($(CONFIG_STA_SUPPORT),y)
|
||||
CONFIG_WIFI_DIRECT_SUPPORT=n
|
||||
CONFIG_STA_WEXT=n
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
ifneq ($(CONFIG_UAP_SUPPORT),y)
|
||||
CONFIG_WIFI_DIRECT_SUPPORT=n
|
||||
CONFIG_UAP_WEXT=n
|
||||
CONFIG_UAP_CFG80211=n
|
||||
endif
|
||||
endif
|
||||
#############################################################################
|
||||
# Select Platform Tools
|
||||
#############################################################################
|
||||
|
||||
ifeq ($(ANDROID_BUILD), 1)
|
||||
ifeq ($(ANDROID), yes)
|
||||
# Set target Android SDK version.
|
||||
# ANDROID_SDK_VERSION 29 corresponds to Android 10 Android 10
|
||||
# ANDROID_SDK_VERSION 30 corresponds to Android 11 (Red Velvet Cake)
|
||||
# ANDROID_SDK_VERSION 31 corresponds to Android 12 (Snow Cone)
|
||||
# ANDROID_SDK_VERSION 33 corresponds to Android 13 (Tiramisu)
|
||||
# ANDROID_SDK_VERSION 34 corresponds to Android 14 (Upside Down Cake)
|
||||
# ANDROID_SDK_VERSION 35 corresponds to Android 15 (Vanilla Ice Cream)
|
||||
# ANDROID_SDK_VERSION 36 corresponds to Android 16
|
||||
KERNEL_CFLAGS += -DANDROID
|
||||
PWD := $(shell pwd)
|
||||
KERNELDIR ?= $(KERNEL_SRC)
|
||||
|
|
@ -154,20 +204,14 @@ ccflags-y += -DLINUX
|
|||
|
||||
|
||||
|
||||
ARCH ?= arm64
|
||||
CONFIG_IMX_SUPPORT=y
|
||||
ifeq ($(CONFIG_IMX_SUPPORT),y)
|
||||
ccflags-y += -DIMX_SUPPORT
|
||||
ifneq ($(ANDROID_PRODUCT_OUT),)
|
||||
ccflags-y += -DIMX_ANDROID
|
||||
ccflags-y += -Wno-implicit-fallthrough
|
||||
CONFIG_ANDROID_KERNEL=y
|
||||
endif
|
||||
endif
|
||||
|
||||
KERNELVERSION_X86 := $(shell uname -r)
|
||||
KERNELDIR ?= /lib/modules/$(KERNELVERSION_X86)/build
|
||||
LD += -S
|
||||
|
||||
BINDIR = bin_wlan
|
||||
|
||||
|
||||
APPDIR= $(shell if test -d "mapp"; then echo mapp; fi)
|
||||
|
||||
#############################################################################
|
||||
|
|
@ -175,7 +219,7 @@ APPDIR= $(shell if test -d "mapp"; then echo mapp; fi)
|
|||
#############################################################################
|
||||
|
||||
ccflags-y += -I$(KERNELDIR)/include
|
||||
ccflags-y += -DMLAN_RELEASE_VERSION='"540.p33"'
|
||||
ccflags-y += -DMLAN_RELEASE_VERSION='"540.p34"'
|
||||
|
||||
ccflags-y += -DFPNUM='"92"'
|
||||
|
||||
|
|
@ -198,18 +242,11 @@ ifeq ($(CONFIG_STA_SUPPORT),y)
|
|||
ifeq ($(CONFIG_REASSOCIATION),y)
|
||||
ccflags-y += -DREASSOCIATION
|
||||
endif
|
||||
else
|
||||
CONFIG_WIFI_DIRECT_SUPPORT=n
|
||||
CONFIG_STA_WEXT=n
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_UAP_SUPPORT),y)
|
||||
ccflags-y += -DUAP_SUPPORT
|
||||
else
|
||||
CONFIG_WIFI_DIRECT_SUPPORT=n
|
||||
CONFIG_UAP_WEXT=n
|
||||
CONFIG_UAP_CFG80211=n
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y)
|
||||
|
|
@ -232,10 +269,6 @@ ifeq ($(CONFIG_SDIO_SUSPEND_RESUME),y)
|
|||
ccflags-y += -DSDIO_SUSPEND_RESUME
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MULTI_CHAN_SUPPORT),y)
|
||||
ccflags-y += -DMULTI_CHAN_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DFS_TESTING_SUPPORT),y)
|
||||
ccflags-y += -DDFS_TESTING_SUPPORT
|
||||
endif
|
||||
|
|
@ -250,229 +283,29 @@ ifeq ($(CONFIG_DUMP_TO_PROC), y)
|
|||
ccflags-y += -DDUMP_TO_PROC
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TASKLET_SUPPORT), y)
|
||||
ccflags-y += -DTASKLET_SUPPORT
|
||||
ifeq ($(CONFIG_FWDUMP_VIA_PRINT), y)
|
||||
ccflags-y += -DFWDUMP_VIA_PRINT
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(CONFIG_OPENWRT_SUPPORT), y)
|
||||
ccflags-y += -DOPENWRT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_T50), y)
|
||||
ccflags-y += -DT50
|
||||
ccflags-y += -DT40
|
||||
ccflags-y += -DT3T
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SD8887),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD8887
|
||||
endif
|
||||
ifeq ($(CONFIG_SD8897),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD8897
|
||||
endif
|
||||
ifeq ($(CONFIG_SD8977),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD8977
|
||||
endif
|
||||
ifeq ($(CONFIG_SD8978),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD8978
|
||||
endif
|
||||
ifeq ($(CONFIG_SD8997),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD8997
|
||||
endif
|
||||
ifeq ($(CONFIG_SD8987),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD8987
|
||||
endif
|
||||
ifeq ($(CONFIG_SD9097),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD9097
|
||||
endif
|
||||
ifeq ($(CONFIG_SDIW610),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSDIW610
|
||||
endif
|
||||
ifeq ($(CONFIG_SDIW624),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSDIW624
|
||||
endif
|
||||
ifeq ($(CONFIG_SDAW693),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSDAW693
|
||||
endif
|
||||
ifeq ($(CONFIG_SD9177),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD9177
|
||||
endif
|
||||
ifeq ($(CONFIG_SD8801),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD8801
|
||||
endif
|
||||
ifeq ($(CONFIG_SD9098),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD9098
|
||||
endif
|
||||
ifeq ($(CONFIG_USB8801),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB8801
|
||||
endif
|
||||
ifeq ($(CONFIG_USB8897),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB8897
|
||||
endif
|
||||
ifeq ($(CONFIG_USB8997),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB8997
|
||||
endif
|
||||
ifeq ($(CONFIG_USB8978),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB8978
|
||||
endif
|
||||
ifeq ($(CONFIG_USB9097),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB9097
|
||||
endif
|
||||
ifeq ($(CONFIG_USBIW610),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSBIW610
|
||||
endif
|
||||
ifeq ($(CONFIG_USBIW624),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSBIW624
|
||||
endif
|
||||
ifeq ($(CONFIG_USB9098),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB9098
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIE8897),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIE8897
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIE8997),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIE8997
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIE9097),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIE9097
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIE9098),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIE9098
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIEIW624),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIEIW624
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIEAW693),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIEAW693
|
||||
endif
|
||||
ifeq ($(CONFIG_SDIO),y)
|
||||
ccflags-y += -DSDIO
|
||||
ccflags-y += -DSDIO_MMC
|
||||
endif
|
||||
ifeq ($(CONFIG_MUSB),y)
|
||||
ccflags-y += -DUSB
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIE),y)
|
||||
ccflags-y += -DPCIE
|
||||
ccflags-y += -DSD8997
|
||||
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
|
||||
|
||||
#############################################################################
|
||||
# Make Targets
|
||||
#############################################################################
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
ifeq ($(CONFIG_WIRELESS_EXT),y)
|
||||
ifeq ($(CONFIG_WEXT_PRIV),y)
|
||||
# Enable WEXT for STA
|
||||
CONFIG_STA_WEXT=y
|
||||
# Enable WEXT for uAP
|
||||
CONFIG_UAP_WEXT=y
|
||||
else
|
||||
# Disable WEXT for STA
|
||||
CONFIG_STA_WEXT=n
|
||||
# Disable WEXT for uAP
|
||||
CONFIG_UAP_WEXT=n
|
||||
endif
|
||||
endif
|
||||
|
||||
# Enable CFG80211 for STA
|
||||
ifeq ($(CONFIG_CFG80211),y)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
ifeq ($(CONFIG_CFG80211),m)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
endif
|
||||
|
||||
# OpenWrt
|
||||
ifeq ($(CONFIG_OPENWRT_SUPPORT), y)
|
||||
ifeq ($(CPTCFG_CFG80211),y)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
ifeq ($(CPTCFG_CFG80211),m)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Enable CFG80211 for uAP
|
||||
ifeq ($(CONFIG_CFG80211),y)
|
||||
CONFIG_UAP_CFG80211=y
|
||||
else
|
||||
ifeq ($(CONFIG_CFG80211),m)
|
||||
CONFIG_UAP_CFG80211=y
|
||||
else
|
||||
CONFIG_UAP_CFG80211=n
|
||||
endif
|
||||
endif
|
||||
|
||||
# OpenWrt
|
||||
ifeq ($(CONFIG_OPENWRT_SUPPORT), y)
|
||||
ifeq ($(CPTCFG_CFG80211),y)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
ifeq ($(CPTCFG_CFG80211),m)
|
||||
CONFIG_STA_CFG80211=y
|
||||
else
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_STA_SUPPORT),y)
|
||||
CONFIG_WIFI_DIRECT_SUPPORT=n
|
||||
CONFIG_STA_WEXT=n
|
||||
CONFIG_STA_CFG80211=n
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_UAP_SUPPORT),y)
|
||||
CONFIG_WIFI_DIRECT_SUPPORT=n
|
||||
CONFIG_UAP_WEXT=n
|
||||
CONFIG_UAP_CFG80211=n
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
ifeq ($(CONFIG_STA_WEXT),y)
|
||||
ccflags-y += -DSTA_WEXT
|
||||
|
|
@ -511,6 +344,7 @@ endif
|
|||
|
||||
|
||||
|
||||
|
||||
# Default for out-of-tree builds
|
||||
CONFIG_NXP_WLAN_DRIVER ?= m
|
||||
|
||||
|
|
@ -527,20 +361,11 @@ MLANOBJS = mlan/mlan_shim.o mlan/mlan_init.o \
|
|||
mlan/mlan_module.o
|
||||
|
||||
MLANOBJS += mlan/mlan_wmm.o
|
||||
ifeq ($(CONFIG_MUSB),y)
|
||||
MLANOBJS += mlan/mlan_usb.o
|
||||
endif
|
||||
ifeq ($(CONFIG_SDIO),y)
|
||||
MLANOBJS += mlan/mlan_sdio.o
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIE),y)
|
||||
MLANOBJS += mlan/mlan_pcie.o
|
||||
endif
|
||||
MLANOBJS += mlan/mlan_11n_aggr.o
|
||||
MLANOBJS += mlan/mlan_11n_rxreorder.o
|
||||
MLANOBJS += mlan/mlan_11n.o
|
||||
MLANOBJS += mlan/mlan_11ac.o
|
||||
MLANOBJS += mlan/mlan_11ax.o
|
||||
MLANOBJS += mlan/mlan_11d.o
|
||||
MLANOBJS += mlan/mlan_11h.o
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
|
|
@ -584,34 +409,19 @@ MOALOBJS += mlinux/moal_proc.o
|
|||
MOALOBJS += mlinux/moal_debug.o
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MAC80211_SUPPORT),y)
|
||||
MOALOBJS += mlinux/moal_mac80211.o
|
||||
MLANOBJS += mlan/mlan_mac80211.o
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
obj-$(CONFIG_NXP_WLAN_DRIVER) := mlan.o
|
||||
mlan-objs := $(MLANOBJS)
|
||||
|
||||
ifeq ($(CONFIG_MUSB),y)
|
||||
MOALOBJS += mlinux/moal_usb.o
|
||||
endif
|
||||
ifeq ($(CONFIG_SDIO),y)
|
||||
MOALOBJS += mlinux/moal_sdio_mmc.o
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIE),y)
|
||||
MOALOBJS += mlinux/moal_pcie.o
|
||||
endif
|
||||
obj-$(CONFIG_NXP_WLAN_DRIVER) += moal.o
|
||||
moal-objs := $(MOALOBJS)
|
||||
obj-$(CONFIG_NXP_WLAN_DRIVER) += sdxxx.o
|
||||
sdxxx-objs := $(MOALOBJS)
|
||||
|
||||
# Otherwise we were called directly from the command line; invoke the kernel build system.
|
||||
else
|
||||
|
||||
default:
|
||||
$(MAKE) -C $(KERNELDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
|
||||
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
|
||||
|
||||
endif
|
||||
|
||||
|
|
@ -619,25 +429,17 @@ endif
|
|||
|
||||
export CC LD ccflags-y KERNELDIR
|
||||
|
||||
.PHONY: mapp/mlanutl clean distclean
|
||||
.PHONY: clean distclean
|
||||
@echo "Finished Making NXP Wlan Linux Driver"
|
||||
|
||||
mapp/mlanutl:
|
||||
$(MAKE) -C $@
|
||||
|
||||
echo:
|
||||
|
||||
appsbuild:
|
||||
|
||||
@if [ ! -d $(BINDIR) ]; then \
|
||||
mkdir $(BINDIR); \
|
||||
fi
|
||||
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
cp -f README $(BINDIR)
|
||||
|
||||
ifneq ($(APPDIR),)
|
||||
cp -rf mapp/mlanconfig/config $(BINDIR)
|
||||
$(MAKE) -C mapp/mlanutl $@ INSTALLDIR=$(BINDIR)
|
||||
endif
|
||||
|
||||
build: echo default
|
||||
|
|
@ -648,14 +450,8 @@ build: echo default
|
|||
|
||||
cp -f mlan.$(MODEXT) $(BINDIR)/mlan$(DBG).$(MODEXT)
|
||||
|
||||
cp -f moal.$(MODEXT) $(BINDIR)/moal$(DBG).$(MODEXT)
|
||||
|
||||
cp -f README $(BINDIR)
|
||||
|
||||
ifneq ($(APPDIR),)
|
||||
cp -rf mapp/mlanconfig/config $(BINDIR)
|
||||
$(MAKE) -C mapp/mlanutl $@ INSTALLDIR=$(BINDIR)
|
||||
endif
|
||||
cp -f sdxxx.$(MODEXT) $(BINDIR)/sd8997$(DBG).$(MODEXT)
|
||||
cp -rpf script/sdio_mmc/* $(BINDIR)/
|
||||
|
||||
clean:
|
||||
-find . -name "*.o" -exec rm {} \;
|
||||
|
|
@ -667,19 +463,16 @@ clean:
|
|||
-find . -name "modules.order" -exec rm {} \;
|
||||
-find . -name ".*.dwo" -exec rm {} \;
|
||||
-find . -name "*dwo" -exec rm {} \;
|
||||
-find . -name "*.mod" -exec rm {} \;
|
||||
-find . -name ".*.o.d" -exec rm {} \;
|
||||
-rm -rf .tmp_versions
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/mlanutl $@
|
||||
endif
|
||||
#ifdef SDIO
|
||||
#endif // SDIO
|
||||
|
||||
install: default
|
||||
|
||||
cp -f mlan.$(MODEXT) $(INSTALLDIR)/mlan$(DBG).$(MODEXT)
|
||||
cp -f moal.$(MODEXT) $(INSTALLDIR)/moal$(DBG).$(MODEXT)
|
||||
echo $(INSTALLDIR)
|
||||
echo "MX Driver Installed"
|
||||
cp -f ../io/sdio/$(PLATFORM)/sdio.$(MODEXT) $(INSTALLDIR)
|
||||
cp -f sdxxx.$(MODEXT) $(INSTALLDIR)/sd8997$(DBG).$(MODEXT)
|
||||
echo "sd8997 Driver Installed"
|
||||
|
||||
distclean:
|
||||
-find . -name "*.o" -exec rm {} \;
|
||||
|
|
@ -696,9 +489,8 @@ distclean:
|
|||
-find . -name "*.mod.c" -exec rm {} \;
|
||||
-find . -name ".*.dwo" -exec rm {} \;
|
||||
-find . -name "*dwo" -exec rm {} \;
|
||||
-find . -name "*.mod" -exec rm {} \;
|
||||
-find . -name ".*.o.d" -exec rm {} \;
|
||||
-rm -rf .tmp_versions
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/mlanutl $@
|
||||
endif
|
||||
|
||||
# End of file
|
||||
|
|
|
|||
174
mlan/mlan_11ac.c
174
mlan/mlan_11ac.c
|
|
@ -61,9 +61,6 @@ t_u8 wlan_get_center_freq_idx(mlan_private *pmpriv, t_u16 band, t_u32 pri_chan,
|
|||
if (band == BAND_5GHZ)
|
||||
map = center_freq_idx_map_5g;
|
||||
|
||||
if (band == BAND_6GHZ)
|
||||
map = center_freq_idx_map_6g;
|
||||
|
||||
for (; map != MNULL; map++) {
|
||||
/* reached end of map, return default value for that map */
|
||||
if (map->pri_chan == 0)
|
||||
|
|
@ -166,13 +163,6 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
t_u32 cfg_value = 0;
|
||||
t_u32 hw_value = 0;
|
||||
t_u8 nss = 0;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
t_u16 rx_nss = 0;
|
||||
t_u16 tx_nss = 0;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -251,32 +241,6 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
|
||||
/** update the RX MCS map */
|
||||
if (cfg->param.vht_cfg.txrx & MLAN_RADIO_RX) {
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type)) {
|
||||
if (cfg->param.vht_cfg.band == BAND_SELECT_A) {
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
pmadapter->user_htstream >> 8);
|
||||
tx_nss =
|
||||
GET_TXMCSSUPP(
|
||||
pmadapter->user_htstream >>
|
||||
8) &
|
||||
0x0f;
|
||||
} else {
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
pmadapter->user_htstream);
|
||||
tx_nss =
|
||||
GET_TXMCSSUPP(
|
||||
pmadapter->user_htstream) &
|
||||
0x0f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* use the previous user value */
|
||||
if (cfg->param.vht_cfg.vht_rx_mcs == 0xffffffff)
|
||||
cfg->param.vht_cfg.vht_rx_mcs = GET_VHTMCS(
|
||||
|
|
@ -287,13 +251,6 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
hw_value = GET_DEVNSSRXMCS(
|
||||
pmadapter->hw_dot_11ac_mcs_support,
|
||||
nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT))
|
||||
SET_VHTNSSMCS(
|
||||
|
|
@ -316,13 +273,6 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
hw_value = GET_DEVNSSTXMCS(
|
||||
pmadapter->hw_dot_11ac_mcs_support,
|
||||
nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if ((tx_nss != 0) && (nss > tx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT))
|
||||
SET_VHTNSSMCS(
|
||||
|
|
@ -743,12 +693,6 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
|||
t_u16 mcs_user = 0;
|
||||
t_u16 mcs_resp = 0;
|
||||
t_u16 nss;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
t_u16 rx_nss = 0, tx_nss = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
/* Fill VHT cap info */
|
||||
|
|
@ -766,41 +710,10 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
|||
if (flag)
|
||||
mcs_map_resp =
|
||||
wlan_le16_to_cpu(pvht_cap->vht_cap.mcs_sets.rx_mcs_map);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if (IS_CARD9098(priv->adapter->card_type) ||
|
||||
IS_CARDIW624(priv->adapter->card_type) ||
|
||||
IS_CARD9097(priv->adapter->card_type) ||
|
||||
IS_CARDAW693(priv->adapter->card_type)) {
|
||||
if (bands & BAND_A) {
|
||||
rx_nss = GET_RXMCSSUPP(priv->adapter->user_htstream >>
|
||||
8);
|
||||
tx_nss = GET_TXMCSSUPP(priv->adapter->user_htstream >>
|
||||
8) &
|
||||
0x0f;
|
||||
} else {
|
||||
rx_nss = GET_RXMCSSUPP(priv->adapter->user_htstream);
|
||||
tx_nss = GET_TXMCSSUPP(priv->adapter->user_htstream) &
|
||||
0x0f;
|
||||
}
|
||||
/** force 1x1 when enable 80P80 */
|
||||
if (bw_80p80)
|
||||
rx_nss = tx_nss = 1;
|
||||
}
|
||||
#endif
|
||||
mcs_map_result = 0;
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
mcs_user = GET_VHTNSSMCS(mcs_map_user, nss);
|
||||
mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
mcs_user = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((mcs_user == NO_NSS_SUPPORT) ||
|
||||
(mcs_resp == NO_NSS_SUPPORT))
|
||||
SET_VHTNSSMCS(mcs_map_result, nss, NO_NSS_SUPPORT);
|
||||
|
|
@ -828,13 +741,6 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
|||
for (nss = 1; nss <= 8; nss++) {
|
||||
mcs_user = GET_VHTNSSMCS(mcs_map_user, nss);
|
||||
mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if ((tx_nss != 0) && (nss > tx_nss))
|
||||
mcs_user = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((mcs_user == NO_NSS_SUPPORT) ||
|
||||
(mcs_resp == NO_NSS_SUPPORT))
|
||||
SET_VHTNSSMCS(mcs_map_result, nss, NO_NSS_SUPPORT);
|
||||
|
|
@ -1046,52 +952,9 @@ void wlan_fill_tdls_vht_oprat_ie(mlan_private *priv,
|
|||
t_u8 wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
||||
{
|
||||
t_u8 ret = MFALSE;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
t_u16 rx_nss = 0, tx_nss = 0;
|
||||
IEEEtypes_VHTCap_t *pvht_cap = pbss_desc->pvht_cap;
|
||||
MrvlIEtypes_He_cap_t *phecap = MNULL;
|
||||
IEEEtypes_HECap_t *pBsshecap = MNULL;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if (!IS_CARD9098(pmpriv->adapter->card_type) &&
|
||||
!IS_CARDIW624(pmpriv->adapter->card_type) &&
|
||||
!IS_CARD9097(pmpriv->adapter->card_type) &&
|
||||
!IS_CARDAW693(pmpriv->adapter->card_type))
|
||||
return ret;
|
||||
/** check band A */
|
||||
if (!(pbss_desc->bss_band & BAND_A))
|
||||
return ret;
|
||||
|
||||
/** check band A antenna setting */
|
||||
rx_nss = GET_RXMCSSUPP(pmpriv->adapter->user_htstream >> 8);
|
||||
tx_nss = GET_TXMCSSUPP(pmpriv->adapter->user_htstream >> 8) & 0x0f;
|
||||
/** check if support 2*2 */
|
||||
if (rx_nss != 2 || tx_nss != 2)
|
||||
return ret;
|
||||
/** check if AP support AC 80P80 */
|
||||
if (ISSUPP_11ACBW8080(pmpriv->usr_dot_11ac_dev_cap_a) && pvht_cap &&
|
||||
ISSUPP_11ACBW8080(pvht_cap->vht_cap.vht_cap_info))
|
||||
ret = MTRUE;
|
||||
/** check if AP support AX 80P80 */
|
||||
if (pbss_desc->phe_cap) {
|
||||
pBsshecap = (IEEEtypes_HECap_t *)pbss_desc->phe_cap;
|
||||
phecap = (MrvlIEtypes_He_cap_t *)pmpriv->user_he_cap;
|
||||
if (ret && (phecap->he_phy_cap[0] & MBIT(4)) &&
|
||||
(pBsshecap->he_phy_cap[0] & MBIT(4)))
|
||||
ret = MTRUE;
|
||||
else
|
||||
ret = MFALSE;
|
||||
}
|
||||
#endif
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1115,12 +978,6 @@ int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
t_u16 nss;
|
||||
int ret_len = 0;
|
||||
t_u8 bw_80p80 = MFALSE;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
t_u16 rx_nss = 0;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -1188,39 +1045,10 @@ int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
} else {
|
||||
/** set default bandwidth:80M*/
|
||||
SET_OPER_MODE_80M(pmrvl_oper_mode->oper_mode);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type)) {
|
||||
if (pbss_desc->bss_band & BAND_A)
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
pmadapter->user_htstream >> 8);
|
||||
else
|
||||
rx_nss =
|
||||
GET_RXMCSSUPP(pmadapter->user_htstream);
|
||||
}
|
||||
#endif
|
||||
mcs_map_user =
|
||||
GET_DEVRXMCSMAP(pmpriv->usr_dot_11ac_mcs_support);
|
||||
nss = wlan_get_nss_num_vht_mcs(mcs_map_user);
|
||||
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type)) {
|
||||
PRINTM(MCMND, "rx_nss=%d nss=%d\n", rx_nss, nss);
|
||||
nss = MIN(rx_nss, nss);
|
||||
}
|
||||
#endif
|
||||
|
||||
pmrvl_oper_mode->oper_mode |= (nss - 1) << 4;
|
||||
|
||||
switch (pbss_desc->curr_bandwidth) {
|
||||
|
|
@ -1408,8 +1236,6 @@ void wlan_update_11ac_cap(mlan_private *pmpriv)
|
|||
*/
|
||||
t_u8 wlan_11ac_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
||||
{
|
||||
if (bss_band & BAND_6G)
|
||||
return 0;
|
||||
{
|
||||
if (bss_band & BAND_G)
|
||||
return (pmpriv->config_bands & BAND_GAC);
|
||||
|
|
|
|||
122
mlan/mlan_11d.c
122
mlan/mlan_11d.c
|
|
@ -112,77 +112,13 @@ static chan_freq_power_t channel_freq_power_UN_AJ[] = {
|
|||
{153, 5765, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{157, 5785, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{161, 5805, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{165, 5825, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{169, 5845, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{173, 5865, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{177, 5885, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}
|
||||
{165, 5825, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}
|
||||
/* {240, 4920, TX_PWR_DEFAULT},
|
||||
{244, 4940, TX_PWR_DEFAULT},
|
||||
{248, 4960, TX_PWR_DEFAULT},
|
||||
{252, 4980, TX_PWR_DEFAULT},
|
||||
channels for 11J JP 10M channel gap */
|
||||
};
|
||||
/** Channels for 802.116G */
|
||||
static chan_freq_power_t channel_freq_power_UN_6G[] = {
|
||||
{1, 5955, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{5, 5975, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{9, 5995, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{13, 6015, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{17, 6035, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{21, 6055, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{25, 6075, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{29, 6095, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{33, 6115, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{37, 6135, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{41, 6155, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{45, 6175, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{49, 6195, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{53, 6215, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{57, 6235, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{61, 6255, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{65, 6275, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{69, 6295, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{73, 6315, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{77, 6335, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{81, 6355, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{85, 6375, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{89, 6395, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{94, 6415, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{97, 6435, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{101, 6455, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{105, 6475, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{109, 6495, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{113, 6515, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{117, 6535, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{121, 6555, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{125, 6575, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{129, 6595, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{133, 6615, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{137, 6635, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{141, 6655, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{145, 6675, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{149, 6695, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{153, 6715, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{157, 6735, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{161, 6755, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{165, 6775, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{169, 6795, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{173, 6815, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{177, 6835, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{181, 6855, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{185, 6875, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{189, 6895, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{193, 6915, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{197, 6935, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{201, 6955, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{205, 6975, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{209, 6995, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{213, 7015, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{217, 7035, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{221, 7055, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{225, 7075, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{229, 7095, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{233, 7115, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}};
|
||||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
|
|
@ -498,9 +434,6 @@ static t_u8 wlan_11d_get_chan(pmlan_adapter pmadapter, t_u16 band,
|
|||
} else if (band & (BAND_A | BAND_AN | BAND_AAC)) {
|
||||
cfp = channel_freq_power_UN_AJ;
|
||||
cfp_no = NELEMENTS(channel_freq_power_UN_AJ);
|
||||
} else if (band & BAND_6G) {
|
||||
cfp = channel_freq_power_UN_6G;
|
||||
cfp_no = NELEMENTS(channel_freq_power_UN_6G);
|
||||
} else {
|
||||
PRINTM(MERROR, "11D: Wrong Band[%d]\n", band);
|
||||
LEAVE();
|
||||
|
|
@ -919,7 +852,6 @@ mlan_status wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
|||
t_u8 no_of_sub_band = pmadapter->domain_reg.no_of_sub_band;
|
||||
MrvlIEtypes_Rgn_dom_code_t *rgn = MNULL;
|
||||
t_u8 *tlv = MNULL;
|
||||
MrvlIEtypes_channel_band_t *tlv_chan_band = MNULL;
|
||||
|
||||
t_u8 i;
|
||||
|
||||
|
|
@ -985,15 +917,6 @@ mlan_status wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
|||
tlv += sizeof(MrvlIEtypes_Rgn_dom_code_t);
|
||||
}
|
||||
|
||||
tlv_chan_band = (MrvlIEtypes_channel_band_t *)tlv;
|
||||
tlv_chan_band->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_UAP_CHAN_BAND_CONFIG);
|
||||
tlv_chan_band->header.len =
|
||||
wlan_cpu_to_le16(sizeof(MrvlIEtypes_channel_band_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
tlv_chan_band->bandcfg.chanBand = pmadapter->domain_reg.band;
|
||||
tlv_chan_band->channel = 0;
|
||||
pcmd->size += sizeof(MrvlIEtypes_channel_band_t);
|
||||
} else {
|
||||
pcmd->size = sizeof(pdomain_info->action) + S_DS_GEN;
|
||||
}
|
||||
|
|
@ -1029,9 +952,9 @@ mlan_status wlan_ret_802_11d_domain_info(mlan_private *pmpriv,
|
|||
/* Dump domain info response data */
|
||||
HEXDUMP("11D: DOMAIN Info Rsp Data", (t_u8 *)resp, resp->size);
|
||||
|
||||
no_of_sub_band = (t_u8)((wlan_le16_to_cpu(domain->header.len) -
|
||||
COUNTRY_CODE_LEN) /
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
no_of_sub_band = (t_u8)(
|
||||
(wlan_le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) /
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
|
||||
PRINTM(MINFO, "11D Domain Info Resp: number of sub-band=%d\n",
|
||||
no_of_sub_band);
|
||||
|
|
@ -1171,9 +1094,9 @@ wlan_ret_802_11d_custom_bcn_country_ie_info(mlan_private *pmpriv,
|
|||
/* Dump domain info response data */
|
||||
HEXDUMP("BCN Country ie: Info Rsp Data", (t_u8 *)resp, resp->size);
|
||||
|
||||
no_of_sub_band = (t_u8)((wlan_le16_to_cpu(domain->header.len) -
|
||||
COUNTRY_CODE_LEN) /
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
no_of_sub_band = (t_u8)(
|
||||
(wlan_le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) /
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
|
||||
PRINTM(MINFO, "BCN Country ie Resp: number of sub-band=%d\n",
|
||||
no_of_sub_band);
|
||||
|
|
@ -1215,9 +1138,6 @@ t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u16 band)
|
|||
else if (band & (BAND_A | BAND_AN | BAND_AAC)) {
|
||||
cf = channel_freq_power_UN_AJ;
|
||||
cnt = NELEMENTS(channel_freq_power_UN_AJ);
|
||||
} else if (band & BAND_6G) {
|
||||
cf = channel_freq_power_UN_6G;
|
||||
cnt = NELEMENTS(channel_freq_power_UN_6G);
|
||||
} else {
|
||||
PRINTM(MERROR, "11D: Wrong Band [%d]\n", band);
|
||||
LEAVE();
|
||||
|
|
@ -1388,26 +1308,6 @@ mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u16 band)
|
|||
pmadapter->universal_channel[i].band = BAND_A;
|
||||
i++;
|
||||
}
|
||||
if (band & BAND_6G) {
|
||||
/* If band 6G */
|
||||
|
||||
/* Set channel-frequency-power */
|
||||
pmadapter->universal_channel[i].num_cfp =
|
||||
NELEMENTS(channel_freq_power_UN_6G);
|
||||
PRINTM(MINFO, "11D: 6G-band num_cfp=%d\n",
|
||||
pmadapter->universal_channel[i].num_cfp);
|
||||
|
||||
pmadapter->universal_channel[i].pcfp = channel_freq_power_UN_6G;
|
||||
|
||||
pmadapter->universal_channel[i].valid = MTRUE;
|
||||
|
||||
/* Set region code */
|
||||
pmadapter->universal_channel[i].region = UNIVERSAL_REGION_CODE;
|
||||
|
||||
/* Set band */
|
||||
pmadapter->universal_channel[i].band = BAND_6G;
|
||||
i++;
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
|
@ -1514,14 +1414,6 @@ mlan_status wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u16 band)
|
|||
continue;
|
||||
}
|
||||
break;
|
||||
case BAND_6G:
|
||||
switch (band) {
|
||||
case BAND_6G:
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case BAND_B:
|
||||
case BAND_G:
|
||||
switch (band) {
|
||||
|
|
|
|||
|
|
@ -118,8 +118,6 @@ static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_mid_upper_band_1 = {
|
|||
/** U-NII sub-band config : Start Channel = 149, NumChans = 5 */
|
||||
static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_upper_band = {149,
|
||||
5};
|
||||
/** U-NII sub-band config : Start Channel = 169, NumChans = 3 */
|
||||
static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_4_band = {169, 3};
|
||||
|
||||
/** Internally passed structure used to send a CMD_802_11_TPC_INFO command */
|
||||
typedef struct {
|
||||
|
|
@ -339,17 +337,6 @@ wlan_11h_set_supp_channels_ie(mlan_private *priv, t_u16 band,
|
|||
*/
|
||||
switch (cfp_a) {
|
||||
case 0x10: /* USA FCC */
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_lower_band;
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_middle_band;
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_mid_upper_band;
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_upper_band;
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_4_band;
|
||||
break;
|
||||
case 0x20: /* Canada IC */
|
||||
case 0x30: /* Europe ETSI */
|
||||
default:
|
||||
|
|
@ -1287,8 +1274,6 @@ static t_bool wlan_11h_is_band_valid(mlan_private *priv, t_u8 start_chn,
|
|||
* return MFALSE, 165 is not allowed in bands other than 20MHZ
|
||||
*/
|
||||
if (start_chn == 165) {
|
||||
if (priv->adapter->region_code == COUNTRY_CODE_US)
|
||||
return MTRUE;
|
||||
if (uap_band_cfg.chanWidth != CHAN_BW_20MHZ)
|
||||
return MFALSE;
|
||||
}
|
||||
|
|
@ -2751,10 +2736,7 @@ mlan_status wlan_11h_handle_event_chanswann(mlan_private *priv)
|
|||
|
||||
ENTER();
|
||||
#ifdef UAP_SUPPORT
|
||||
/** No need handle AP if mc_policy is disabled, FW will move the AP to
|
||||
* client's new channel */
|
||||
if (pmadapter->mc_policy &&
|
||||
priv->adapter->state_11h.is_master_radar_det_active) {
|
||||
if (priv->adapter->state_11h.is_master_radar_det_active) {
|
||||
for (i = 0; i < MIN(pmadapter->priv_num, MLAN_MAX_BSS_NUM);
|
||||
i++) {
|
||||
if (pmadapter->priv[i] &&
|
||||
|
|
|
|||
119
mlan/mlan_11n.c
119
mlan/mlan_11n.c
|
|
@ -33,7 +33,6 @@ Change log:
|
|||
#include "mlan_wmm.h"
|
||||
#include "mlan_11n.h"
|
||||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
|
|
@ -62,24 +61,9 @@ static mlan_status wlan_11n_ioctl_max_tx_buf_size(pmlan_adapter pmadapter,
|
|||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_ds_11n_cfg *cfg = MNULL;
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
|
||||
ENTER();
|
||||
cfg = (mlan_ds_11n_cfg *)pioctl_req->pbuf;
|
||||
if (pioctl_req->action == MLAN_ACT_SET) {
|
||||
if (cfg->param.tx_buf_size == 0xffff) {
|
||||
PRINTM(MIOCTL, "Send reconfigure tx buf to FW\n");
|
||||
ret = wlan_prepare_cmd(pmpriv,
|
||||
HostCmd_CMD_RECONFIGURE_TX_BUFF,
|
||||
HostCmd_ACT_GEN_SET, 0,
|
||||
(t_void *)pioctl_req,
|
||||
&cfg->param.tx_buf_size);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
cfg->param.tx_buf_size = (t_u32)pmadapter->max_tx_buf_size;
|
||||
pioctl_req->data_read_written = sizeof(t_u32) + MLAN_SUB_COMMAND_SIZE;
|
||||
|
||||
|
|
@ -511,14 +495,7 @@ static mlan_status wlan_11n_ioctl_addba_param(pmlan_adapter pmadapter,
|
|||
cfg->param.addba_param.rxamsdu = pmpriv->add_ba_param.rx_amsdu;
|
||||
} else {
|
||||
timeout = pmpriv->add_ba_param.timeout;
|
||||
/* WACP supports the MAX TX ba timeout */
|
||||
if (pmadapter->tx_ba_timeout_support ||
|
||||
pmadapter->init_para.wacp_mode) {
|
||||
pmpriv->add_ba_param.timeout =
|
||||
cfg->param.addba_param.timeout;
|
||||
} else {
|
||||
pmpriv->add_ba_param.timeout = 0;
|
||||
}
|
||||
pmpriv->add_ba_param.timeout = cfg->param.addba_param.timeout;
|
||||
pmpriv->add_ba_param.tx_win_size =
|
||||
cfg->param.addba_param.txwinsize;
|
||||
|
||||
|
|
@ -1010,7 +987,7 @@ static void wlan_update_all_stations_ampdu(mlan_private *priv)
|
|||
}
|
||||
while (sta_ptr != (sta_node *)&priv->sta_list) {
|
||||
for (i = 0; i < MAX_NUM_TID; i++) {
|
||||
if (sta_ptr->is_11n_enabled || sta_ptr->is_11ax_enabled)
|
||||
if (sta_ptr->is_11n_enabled)
|
||||
sta_ptr->ampdu_sta[i] =
|
||||
priv->aggr_prio_tbl[i].ampdu_user;
|
||||
}
|
||||
|
|
@ -1475,24 +1452,6 @@ void wlan_fill_ht_cap_tlv(mlan_private *priv, MrvlIETypes_HTCap_t *pht_cap,
|
|||
pmadapter->hw_mpdu_density);
|
||||
|
||||
rx_mcs_supp = GET_RXMCSSUPP(priv->usr_dev_mcs_support);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type)) {
|
||||
if (bands & BAND_A)
|
||||
rx_mcs_supp = MIN(
|
||||
rx_mcs_supp,
|
||||
GET_RXMCSSUPP(pmadapter->user_htstream >> 8));
|
||||
else
|
||||
rx_mcs_supp =
|
||||
MIN(rx_mcs_supp,
|
||||
GET_RXMCSSUPP(pmadapter->user_htstream));
|
||||
}
|
||||
#endif
|
||||
memset(pmadapter, (t_u8 *)pht_cap->ht_cap.supported_mcs_set, 0xff,
|
||||
rx_mcs_supp);
|
||||
/* Clear all the other values to get the minimum mcs set btw STA and AP
|
||||
|
|
@ -1554,24 +1513,6 @@ void wlan_fill_ht_cap_ie(mlan_private *priv, IEEEtypes_HTCap_t *pht_cap,
|
|||
SETAMPDU_SPACING(pht_cap->ht_cap.ampdu_param, 0);
|
||||
|
||||
rx_mcs_supp = GET_RXMCSSUPP(priv->usr_dev_mcs_support);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDIW624(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type) ||
|
||||
IS_CARDAW693(pmadapter->card_type)) {
|
||||
if (bands & BAND_A)
|
||||
rx_mcs_supp = MIN(
|
||||
rx_mcs_supp,
|
||||
GET_RXMCSSUPP(pmadapter->user_htstream >> 8));
|
||||
else
|
||||
rx_mcs_supp =
|
||||
MIN(rx_mcs_supp,
|
||||
GET_RXMCSSUPP(pmadapter->user_htstream));
|
||||
}
|
||||
#endif
|
||||
memset(pmadapter, (t_u8 *)pht_cap->ht_cap.supported_mcs_set, 0xff,
|
||||
rx_mcs_supp);
|
||||
/* Clear all the other values to get the minimum mcs set btw STA and AP
|
||||
|
|
@ -2112,6 +2053,8 @@ mlan_status wlan_cmd_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
HostCmd_DS_TX_BF_CFG *txbfcfg = &cmd->params.tx_bf_cfg;
|
||||
mlan_ds_11n_tx_bf_cfg *txbf = (mlan_ds_11n_tx_bf_cfg *)pdata_buf;
|
||||
mlan_tx_sounding_cfg_args *mlan_tx_sounding_cfg = MNULL;
|
||||
tx_sounding_cfg_args_t *tx_sounding_cfg = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -2170,11 +2113,30 @@ mlan_status wlan_cmd_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
txbfcfg->body.bf_snr.snr = txbf->body.bf_snr[0].snr;
|
||||
break;
|
||||
case TX_SOUNDING_CFG:
|
||||
mlan_tx_sounding_cfg = &txbf->body.tx_sounding_cfg;
|
||||
tx_sounding_cfg = &txbfcfg->body.tx_sounding_cfg;
|
||||
tx_sounding_cfg->tx_sounding_enbl =
|
||||
mlan_tx_sounding_cfg->tx_sounding_enbl;
|
||||
tx_sounding_cfg->sounding_type =
|
||||
mlan_tx_sounding_cfg->sounding_type;
|
||||
tx_sounding_cfg->sounding_interval = wlan_cpu_to_le16(
|
||||
mlan_tx_sounding_cfg->sounding_interval);
|
||||
break;
|
||||
default:
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
switch (txbf->bf_action) {
|
||||
case TX_SOUNDING_CFG:
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(tx_sounding_cfg_args_t) +
|
||||
4 + S_DS_GEN);
|
||||
break;
|
||||
default:
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(HostCmd_DS_TX_BF_CFG) +
|
||||
S_DS_GEN);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
|
@ -2200,6 +2162,8 @@ mlan_status wlan_ret_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
bf_peer_args *tx_bf_peer;
|
||||
bf_snr_thr_t *bf_snr;
|
||||
int i;
|
||||
mlan_tx_sounding_cfg_args *mlan_tx_sounding_cfg = MNULL;
|
||||
tx_sounding_cfg_args_t *tx_sounding_cfg = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -2271,6 +2235,17 @@ mlan_status wlan_ret_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
bf_snr++;
|
||||
}
|
||||
break;
|
||||
case TX_SOUNDING_CFG:
|
||||
mlan_tx_sounding_cfg = &txbf->body.tx_sounding_cfg;
|
||||
tx_sounding_cfg = &txbfcfg->body.tx_sounding_cfg;
|
||||
mlan_tx_sounding_cfg->tx_sounding_enbl =
|
||||
tx_sounding_cfg->tx_sounding_enbl;
|
||||
mlan_tx_sounding_cfg->sounding_type =
|
||||
tx_sounding_cfg->sounding_type;
|
||||
mlan_tx_sounding_cfg->sounding_interval =
|
||||
wlan_le16_to_cpu(
|
||||
tx_sounding_cfg->sounding_interval);
|
||||
break;
|
||||
default:
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
|
|
@ -2292,7 +2267,7 @@ t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
|
|||
t_u8 chan2Offset = SEC_CHAN_NONE;
|
||||
|
||||
/* Special Case: 20Mhz-only Channel */
|
||||
if (priv->adapter->region_code != COUNTRY_CODE_US && chan == 165)
|
||||
if (chan == 165)
|
||||
return chan2Offset;
|
||||
|
||||
switch (chan) {
|
||||
|
|
@ -2308,8 +2283,6 @@ t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
|
|||
case 140:
|
||||
case 149:
|
||||
case 157:
|
||||
case 165:
|
||||
case 173:
|
||||
chan2Offset = SEC_CHAN_ABOVE;
|
||||
break;
|
||||
case 40:
|
||||
|
|
@ -2324,8 +2297,6 @@ t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
|
|||
case 144:
|
||||
case 153:
|
||||
case 161:
|
||||
case 169:
|
||||
case 177:
|
||||
chan2Offset = SEC_CHAN_BELOW;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2628,14 +2599,10 @@ int wlan_cmd_append_11n_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
(t_u8 *)pext_cap + sizeof(MrvlIEtypesHeader_t),
|
||||
(t_u8 *)&pmpriv->ext_cap, sizeof(ExtCap_t),
|
||||
pext_cap->header.len);
|
||||
if (pbss_desc && pbss_desc->multi_bssid_ap)
|
||||
SET_EXTCAP_MULTI_BSSID(pext_cap->ext_cap);
|
||||
if (!pmadapter->ecsa_enable)
|
||||
RESET_EXTCAP_EXT_CHANNEL_SWITCH(pext_cap->ext_cap);
|
||||
else
|
||||
SET_EXTCAP_EXT_CHANNEL_SWITCH(pext_cap->ext_cap);
|
||||
if (wlan_check_11ax_twt_supported(pmpriv, pbss_desc))
|
||||
SET_EXTCAP_TWT_REQ(pext_cap->ext_cap);
|
||||
|
||||
HEXDUMP("Extended Capabilities IE", (t_u8 *)pext_cap,
|
||||
sizeof(MrvlIETypes_ExtCap_t));
|
||||
|
|
@ -2980,11 +2947,10 @@ int wlan_send_addba(mlan_private *priv, int tid, t_u8 *peer_mac)
|
|||
PRINTM(MCMND, "Send addba: TID %d, " MACSTR "\n", tid,
|
||||
MAC2STR(peer_mac));
|
||||
|
||||
add_ba_req.block_ack_param_set =
|
||||
(t_u16)((tid << BLOCKACKPARAM_TID_POS) |
|
||||
(priv->add_ba_param.tx_win_size
|
||||
<< BLOCKACKPARAM_WINSIZE_POS) |
|
||||
IMMEDIATE_BLOCK_ACK);
|
||||
add_ba_req.block_ack_param_set = (t_u16)(
|
||||
(tid << BLOCKACKPARAM_TID_POS) |
|
||||
(priv->add_ba_param.tx_win_size << BLOCKACKPARAM_WINSIZE_POS) |
|
||||
IMMEDIATE_BLOCK_ACK);
|
||||
/** enable AMSDU inside AMPDU */
|
||||
if (priv->add_ba_param.tx_amsdu &&
|
||||
(priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED))
|
||||
|
|
@ -3191,9 +3157,6 @@ int wlan_get_txbastream_tbl(mlan_private *priv, tx_ba_stream_tbl *buf)
|
|||
*/
|
||||
t_u8 wlan_11n_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
||||
{
|
||||
if (bss_band & BAND_6G)
|
||||
return 0;
|
||||
|
||||
{
|
||||
if (bss_band & BAND_G)
|
||||
return (pmpriv->config_bands & BAND_GN);
|
||||
|
|
|
|||
|
|
@ -339,9 +339,6 @@ static INLINE t_u32 wlan_get_bastream_limit(mlan_adapter *pmadapter)
|
|||
{
|
||||
t_u32 bastreams = ISSUPP_GETTXBASTREAM(pmadapter->hw_dot_11n_dev_cap);
|
||||
|
||||
if (pmadapter->mclient_tx_supported)
|
||||
return pmadapter->tx_ba_stream_limit;
|
||||
|
||||
return bastreams;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,11 +129,6 @@ static void wlan_11n_form_amsdu_txpd(mlan_private *priv, mlan_buffer *mbuf)
|
|||
if (mbuf->flags & MLAN_BUF_FLAG_TDLS)
|
||||
ptx_pd->flags = MRVDRV_TxPD_FLAGS_TDLS_PACKET;
|
||||
|
||||
if (mbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
ptx_pd->flags |= MRVDRV_TxPD_FLAGS_EASYMESH;
|
||||
memcpy_ext(priv->adapter, ptx_pd->ra_mac, mbuf->mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
if (ptx_pd->tx_control == 0)
|
||||
/* TxCtrl set by user or default */
|
||||
ptx_pd->tx_control = priv->pkt_tx_ctrl;
|
||||
|
|
@ -143,166 +138,6 @@ static void wlan_11n_form_amsdu_txpd(mlan_private *priv, mlan_buffer *mbuf)
|
|||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief free pkts in amsdu_txq
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static INLINE void wlan_free_amsdu_txq(pmlan_adapter pmadapter)
|
||||
{
|
||||
pmlan_buffer pmbuf;
|
||||
|
||||
ENTER();
|
||||
while ((pmbuf = (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle,
|
||||
&pmadapter->amsdu_txq,
|
||||
MNULL, MNULL))) {
|
||||
util_unlink_list(pmadapter->pmoal_handle, &pmadapter->amsdu_txq,
|
||||
(pmlan_linked_list)pmbuf, MNULL, MNULL);
|
||||
wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE);
|
||||
}
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
#ifdef PCIEAW693
|
||||
/**
|
||||
* @brief Add TxPD to AMSDU header
|
||||
*
|
||||
* @param priv A pointer to mlan_private structure
|
||||
* @param pmbuf A pointer to buffer where the TxPD will be formed
|
||||
* @param amsdu_pkt_len amsdu packet length
|
||||
*
|
||||
* @return increased length (TxPD + intf_hr_len + padding for DMA
|
||||
* alignment)
|
||||
*/
|
||||
static t_u16 wlan_form_amsdu_txpd(mlan_private *priv, mlan_buffer *pmbuf,
|
||||
t_u16 amsdu_pkt_len)
|
||||
{
|
||||
mlan_adapter *pmadapter = priv->adapter;
|
||||
TxPD *ptx_pd;
|
||||
t_u8 *head_ptr = MNULL;
|
||||
t_u32 data_len = pmbuf->data_len;
|
||||
t_u16 len = 0;
|
||||
t_s32 offset = 0;
|
||||
ENTER();
|
||||
|
||||
head_ptr = pmbuf->pbuf + pmbuf->data_offset - Tx_PD_SIZEOF(pmadapter) -
|
||||
priv->intf_hr_len;
|
||||
/*making data buffer 8 ytes aligned for increasing TP with PCIE Scatter
|
||||
* Gather*/
|
||||
head_ptr = (t_u8 *)((t_ptr)head_ptr & ~((t_ptr)(7)));
|
||||
ptx_pd = (TxPD *)(head_ptr + priv->intf_hr_len);
|
||||
_memset(pmadapter, ptx_pd, 0, Tx_PD_SIZEOF(pmadapter));
|
||||
|
||||
/* Set the BSS number to TxPD */
|
||||
ptx_pd->bss_num = GET_BSS_NUM(priv);
|
||||
ptx_pd->bss_type = priv->bss_type;
|
||||
ptx_pd->priority = (t_u8)pmbuf->priority;
|
||||
ptx_pd->tx_pkt_type = PKT_TYPE_AMSDU;
|
||||
ptx_pd->tx_pkt_length = amsdu_pkt_len;
|
||||
|
||||
ptx_pd->tx_pkt_offset = (t_u16)((t_ptr)pmbuf->pbuf +
|
||||
pmbuf->data_offset - (t_ptr)ptx_pd);
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_TDLS)
|
||||
ptx_pd->flags = MRVDRV_TxPD_FLAGS_TDLS_PACKET;
|
||||
if (ptx_pd->tx_control == 0)
|
||||
/* TxCtrl set by user or default */
|
||||
ptx_pd->tx_control = priv->pkt_tx_ctrl;
|
||||
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
ptx_pd->flags |= MRVDRV_TxPD_FLAGS_EASYMESH;
|
||||
memcpy_ext(priv->adapter, ptx_pd->ra_mac, pmbuf->mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
|
||||
endian_convert_TxPD(ptx_pd);
|
||||
|
||||
/* Adjust the data offset and length to include TxPD in pmbuf */
|
||||
pmbuf->data_len += pmbuf->data_offset;
|
||||
offset = head_ptr - pmbuf->pbuf;
|
||||
pmbuf->data_offset = (t_u32)offset;
|
||||
if (pmbuf->data_len > pmbuf->data_offset)
|
||||
pmbuf->data_len -= pmbuf->data_offset;
|
||||
if (pmbuf->data_len > data_len)
|
||||
len = (t_u16)(pmbuf->data_len - data_len);
|
||||
PRINTM(MDATA, "amsdu_pkt_len=%d, extra_len=%d\n", amsdu_pkt_len, len);
|
||||
DBG_HEXDUMP(MDAT_D, "AMSDU TxPD", ptx_pd, Tx_PD_SIZEOF(pmadapter));
|
||||
|
||||
LEAVE();
|
||||
return len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Form amsdu subframe
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to mlan_buffer
|
||||
* @param pad Pad
|
||||
*
|
||||
* @return Final packet size
|
||||
*/
|
||||
static int wlan_form_amsdu_subframe(pmlan_adapter pmadapter, mlan_buffer *pmbuf,
|
||||
int *pad)
|
||||
{
|
||||
int dt_offset, amsdu_buf_offset;
|
||||
Rfc1042Hdr_t snap = {
|
||||
0xaa, /* LLC DSAP */
|
||||
0xaa, /* LLC SSAP */
|
||||
0x03, /* LLC CTRL */
|
||||
{0x00, 0x00, 0x00}, /* SNAP OUI */
|
||||
0x0000 /* SNAP type */
|
||||
/*
|
||||
* This field will be overwritten
|
||||
* later with ethertype
|
||||
*/
|
||||
};
|
||||
t_u8 *amsdu_buf = MNULL;
|
||||
t_u8 *data = pmbuf->pbuf + pmbuf->data_offset;
|
||||
int pkt_len = pmbuf->data_len;
|
||||
t_u16 total_len;
|
||||
|
||||
ENTER();
|
||||
if (pmbuf->data_offset >= sizeof(Rfc1042Hdr_t))
|
||||
pmbuf->data_offset -= sizeof(Rfc1042Hdr_t);
|
||||
else
|
||||
PRINTM(MERROR,
|
||||
"Truncated value assigned to pmbuf->data_offset");
|
||||
pmbuf->data_len += sizeof(Rfc1042Hdr_t);
|
||||
|
||||
amsdu_buf = pmbuf->pbuf + pmbuf->data_offset;
|
||||
|
||||
memcpy_ext(pmadapter, amsdu_buf, data, (MLAN_MAC_ADDR_LENGTH)*2,
|
||||
(MLAN_MAC_ADDR_LENGTH)*2);
|
||||
dt_offset = amsdu_buf_offset = (MLAN_MAC_ADDR_LENGTH)*2;
|
||||
|
||||
snap.snap_type = read_u16_unaligned(pmadapter, data + dt_offset);
|
||||
dt_offset += sizeof(t_u16);
|
||||
total_len = (t_u16)(pkt_len + LLC_SNAP_LEN -
|
||||
((2 * MLAN_MAC_ADDR_LENGTH) + sizeof(t_u16)));
|
||||
|
||||
write_u16_unaligned(pmadapter, amsdu_buf + amsdu_buf_offset,
|
||||
mlan_htons(total_len));
|
||||
|
||||
amsdu_buf_offset += sizeof(t_u16);
|
||||
memcpy_ext(pmadapter, amsdu_buf + amsdu_buf_offset, &snap, LLC_SNAP_LEN,
|
||||
LLC_SNAP_LEN);
|
||||
amsdu_buf_offset += LLC_SNAP_LEN;
|
||||
*pad = (((pkt_len + LLC_SNAP_LEN) & 3)) ?
|
||||
(4 - (((pkt_len + LLC_SNAP_LEN)) & 3)) :
|
||||
0;
|
||||
pmbuf->data_len += *pad;
|
||||
|
||||
DBG_HEXDUMP(MDAT_D, "AMSDU subframe", pmbuf->pbuf + pmbuf->data_offset,
|
||||
MIN(pmbuf->data_len, MAX_DATA_DUMP_LEN));
|
||||
PRINTM(MDATA, "AMSDU subframe len=%d\n", pkt_len + LLC_SNAP_LEN + *pad);
|
||||
LEAVE();
|
||||
/* pkt_len is limited by MLAN_TX_DATA_BUF_SIZE */
|
||||
// coverity[overflow_sink:SUPPRESS]
|
||||
return pkt_len + LLC_SNAP_LEN + *pad;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Update the TxPktLength field in TxPD after the complete AMSDU
|
||||
* packet is formed
|
||||
|
|
@ -434,12 +269,6 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
t_u8 forward = MFALSE;
|
||||
t_u8 eapol_type[2] = {0x88, 0x8e};
|
||||
t_u8 tdls_action_type[2] = {0x89, 0x0d};
|
||||
t_u32 in_ts_sec, in_ts_usec;
|
||||
t_u32 out_ts_sec, out_ts_usec;
|
||||
t_u32 in_copy_ts_sec, in_copy_ts_usec;
|
||||
t_u32 out_copy_ts_sec, out_copy_ts_usec;
|
||||
t_u32 copy_delay = 0;
|
||||
t_u32 delay = 0;
|
||||
t_u8 num_subframes = 0;
|
||||
|
||||
ENTER();
|
||||
|
|
@ -452,22 +281,6 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
total_pkt_len = pmbuf->data_len;
|
||||
|
||||
/* Sanity test */
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type) &&
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable) {
|
||||
max_rx_data_size =
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.aggr_max;
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.aggr_mode ==
|
||||
MLAN_USB_AGGR_MODE_NUM) {
|
||||
max_rx_data_size *=
|
||||
MAX(MLAN_USB_MAX_PKT_SIZE,
|
||||
pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align);
|
||||
max_rx_data_size =
|
||||
MAX(max_rx_data_size, MLAN_RX_DATA_BUF_SIZE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (total_pkt_len > (int)max_rx_data_size) {
|
||||
PRINTM(MERROR,
|
||||
"Total packet length greater than tx buffer"
|
||||
|
|
@ -475,21 +288,9 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
total_pkt_len);
|
||||
goto done;
|
||||
}
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &in_ts_sec, &in_ts_usec);
|
||||
num_subframes = pmbuf->use_count =
|
||||
wlan_11n_get_num_aggrpkts(priv, data, total_pkt_len, &forward);
|
||||
|
||||
// rx_trace 7
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_tp_accounting(
|
||||
pmadapter->pmoal_handle, pmbuf, 7 /*RX_DROP_P3*/);
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 4, pmbuf->use_count);
|
||||
}
|
||||
if (pmadapter->tp_state_drop_point == 7 /*RX_DROP_P3*/)
|
||||
goto done;
|
||||
prx_pkt = (RxPacketHdr_t *)data;
|
||||
/** check if packet need send to host only */
|
||||
if (pmbuf->pdesc && !forward) {
|
||||
|
|
@ -497,12 +298,6 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
ret = pmadapter->callbacks.moal_recv_amsdu_packet(
|
||||
pmadapter->pmoal_handle, pmbuf);
|
||||
if (ret == MLAN_STATUS_PENDING) {
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
pmadapter->callbacks.moal_recv_complete(
|
||||
pmadapter->pmoal_handle, MNULL,
|
||||
pmadapter->rx_data_ep, ret);
|
||||
#endif
|
||||
priv->msdu_in_rx_amsdu_cnt += num_subframes;
|
||||
priv->amsdu_rx_cnt++;
|
||||
return ret;
|
||||
|
|
@ -563,33 +358,13 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
daggr_mbuf->in_ts_sec = pmbuf->in_ts_sec;
|
||||
daggr_mbuf->in_ts_usec = pmbuf->in_ts_usec;
|
||||
daggr_mbuf->flags = pmbuf->flags;
|
||||
daggr_mbuf->extra_ts_sec = pmbuf->extra_ts_sec;
|
||||
daggr_mbuf->extra_ts_usec = pmbuf->extra_ts_usec;
|
||||
daggr_mbuf->pparent = pmbuf;
|
||||
daggr_mbuf->priority = pmbuf->priority;
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &in_copy_ts_sec,
|
||||
&in_copy_ts_usec);
|
||||
memcpy_ext(pmadapter,
|
||||
daggr_mbuf->pbuf + daggr_mbuf->data_offset, data,
|
||||
pkt_len, daggr_mbuf->data_len);
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &out_copy_ts_sec,
|
||||
&out_copy_ts_usec);
|
||||
copy_delay +=
|
||||
(t_u32)(out_copy_ts_sec - in_copy_ts_sec) *
|
||||
1000000;
|
||||
copy_delay +=
|
||||
(t_u32)(out_copy_ts_usec - in_copy_ts_usec);
|
||||
}
|
||||
#ifdef UAP_SUPPORT
|
||||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) {
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH)
|
||||
memcpy_ext(priv->adapter, daggr_mbuf->mac,
|
||||
pmbuf->mac, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
ret = wlan_uap_recv_packet(priv, daggr_mbuf);
|
||||
} else {
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
|
@ -658,17 +433,6 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &out_ts_sec, &out_ts_usec);
|
||||
delay += (t_u32)(out_ts_sec - in_ts_sec) * 1000000;
|
||||
delay += (t_u32)(out_ts_usec - in_ts_usec);
|
||||
// input values are internally generated and controlled, not
|
||||
// externally sourced
|
||||
// coverity[misra_c_2012_directive_4_14_violation:SUPPRESS]
|
||||
pmadapter->callbacks.moal_amsdu_tp_accounting(
|
||||
pmadapter->pmoal_handle, delay, copy_delay);
|
||||
}
|
||||
|
||||
done:
|
||||
priv->msdu_in_rx_amsdu_cnt += pmbuf->use_count;
|
||||
|
|
@ -679,161 +443,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef PCIEAW693
|
||||
/**
|
||||
* @brief Send amsdu subframe list to interface
|
||||
*
|
||||
* @param priv A pointer to mlan_private structure
|
||||
* @param pra_list Pointer to the RA List table containing the pointers
|
||||
* to packets.
|
||||
* @param headroom Any interface specific headroom that may be need. TxPD
|
||||
* will be formed leaving this headroom.
|
||||
* @param ptrindex Pointer index
|
||||
*
|
||||
* @return Final packet size or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static int wlan_send_amsdu_subframe_list(mlan_private *priv,
|
||||
raListTbl *pra_list, int headroom,
|
||||
int ptrindex)
|
||||
{
|
||||
int pkt_size = 0;
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
mlan_buffer *pmbuf_src;
|
||||
mlan_buffer *pmbuf_last = MNULL;
|
||||
mlan_buffer *pmbuf_first = MNULL;
|
||||
int pad = 0;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef DEBUG_LEVEL1
|
||||
t_u32 sec = 0, usec = 0;
|
||||
#endif
|
||||
t_u32 max_amsdu_size = MIN(pra_list->max_amsdu, pmadapter->tx_buf_size);
|
||||
t_u32 max_msdu_count = 0;
|
||||
t_u32 msdu_in_tx_amsdu_cnt = 0;
|
||||
ENTER();
|
||||
|
||||
if (ptrindex < 0) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
max_msdu_count = pmadapter->ops.get_max_msdu_cnt(pmadapter);
|
||||
pmbuf_src = (pmlan_buffer)util_peek_list(
|
||||
pmadapter->pmoal_handle, &pra_list->buf_head, MNULL, MNULL);
|
||||
if (pmbuf_src) {
|
||||
pmbuf_first = pmbuf_src;
|
||||
} else {
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
wlan_wmm_consume_mpdu_budget(pra_list);
|
||||
|
||||
while (pmbuf_src &&
|
||||
((pkt_size + (pmbuf_src->data_len + LLC_SNAP_LEN) + headroom) <=
|
||||
max_amsdu_size) &&
|
||||
(msdu_in_tx_amsdu_cnt < max_msdu_count)) {
|
||||
pmbuf_src =
|
||||
(pmlan_buffer)util_dequeue_list(pmadapter->pmoal_handle,
|
||||
&pra_list->buf_head,
|
||||
MNULL, MNULL);
|
||||
wlan_wmm_consume_byte_budget(pra_list, pmbuf_src);
|
||||
/* Collects TP statistics */
|
||||
if (pmadapter->tp_state_on &&
|
||||
(pkt_size > Tx_PD_SIZEOF(pmadapter)))
|
||||
pmadapter->callbacks.moal_tp_accounting(
|
||||
pmadapter->pmoal_handle, pmbuf_src, 3);
|
||||
pra_list->total_pkts--;
|
||||
|
||||
/* decrement for every PDU taken from the list */
|
||||
priv->wmm.pkts_queued[ptrindex]--;
|
||||
util_scalar_decrement(pmadapter->pmoal_handle,
|
||||
&priv->wmm.tx_pkts_queued, MNULL, MNULL);
|
||||
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock);
|
||||
|
||||
if (pmbuf_src) {
|
||||
pkt_size += wlan_form_amsdu_subframe(pmadapter,
|
||||
pmbuf_src, &pad);
|
||||
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||
&pmadapter->amsdu_txq,
|
||||
(pmlan_linked_list)pmbuf_src,
|
||||
MNULL, MNULL);
|
||||
pmbuf_last = pmbuf_src;
|
||||
priv->msdu_in_tx_amsdu_cnt++;
|
||||
msdu_in_tx_amsdu_cnt++;
|
||||
}
|
||||
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||
priv->wmm.ra_list_spinlock);
|
||||
|
||||
if (!wlan_is_ralist_valid(priv, pra_list, ptrindex)) {
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
priv->wmm.ra_list_spinlock);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
pmbuf_src =
|
||||
(pmlan_buffer)util_peek_list(pmadapter->pmoal_handle,
|
||||
&pra_list->buf_head, MNULL,
|
||||
MNULL);
|
||||
}
|
||||
|
||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
priv->wmm.ra_list_spinlock);
|
||||
if (!pmbuf_last) {
|
||||
PRINTM(MERROR,
|
||||
"SG_AGGR ERROR: pkt_size=%d max_msdu_count=%d max_amsdu_size=%d msdu_in_tx_amsdu_cnt=%d\n",
|
||||
pkt_size, max_msdu_count, max_amsdu_size,
|
||||
msdu_in_tx_amsdu_cnt);
|
||||
goto exit;
|
||||
}
|
||||
/* Last AMSDU packet does not need padding */
|
||||
pkt_size -= pad;
|
||||
pmbuf_last->data_len -= pad;
|
||||
|
||||
pkt_size += wlan_form_amsdu_txpd(priv, pmbuf_first, pkt_size);
|
||||
/* Collects TP statistics */
|
||||
if (pmadapter->tp_state_on) {
|
||||
mlan_buffer mbuf;
|
||||
mbuf.data_len = pkt_size;
|
||||
pmadapter->callbacks.moal_tp_accounting(pmadapter->pmoal_handle,
|
||||
&mbuf, 4);
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 5, msdu_in_tx_amsdu_cnt);
|
||||
}
|
||||
/* Drop Tx packets at drop point 4 */
|
||||
if (pmadapter->tp_state_drop_point == 4) {
|
||||
wlan_free_amsdu_txq(pmadapter);
|
||||
goto exit;
|
||||
}
|
||||
ret = pmadapter->ops.send_data_list(pmadapter, MLAN_TYPE_DATA,
|
||||
msdu_in_tx_amsdu_cnt, pkt_size);
|
||||
|
||||
if (ret != MLAN_STATUS_RESOURCE) {
|
||||
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||
priv->wmm.ra_list_spinlock);
|
||||
if (wlan_is_ralist_valid(priv, pra_list, ptrindex)) {
|
||||
priv->wmm.packets_out[ptrindex]++;
|
||||
priv->wmm.tid_tbl_ptr[ptrindex].ra_list_curr = pra_list;
|
||||
}
|
||||
wlan_advance_bss_on_pkt_push(
|
||||
pmadapter, &pmadapter->bssprio_tbl[priv->bss_priority]);
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle, priv->wmm.ra_list_spinlock);
|
||||
}
|
||||
|
||||
PRINTM_GET_SYS_TIME(MDATA, &sec, &usec);
|
||||
PRINTM_NETINTF(MDATA, priv);
|
||||
PRINTM(MDATA, "%lu.%06lu : Data => FW\n", sec, usec);
|
||||
priv->amsdu_tx_cnt++;
|
||||
exit:
|
||||
LEAVE();
|
||||
return pkt_size;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* @brief Aggregate multiple packets into one single AMSDU packet
|
||||
*
|
||||
|
|
@ -871,13 +480,6 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
PRINTM(MDAT_D, "Handling Aggr packet\n");
|
||||
#ifdef PCIEAW693
|
||||
if (!wlan_copy_on_tx_enabled(pmadapter) &&
|
||||
IS_PCIEAW693(pmadapter->card_type)) {
|
||||
return wlan_send_amsdu_subframe_list(priv, pra_list, headroom,
|
||||
ptrindex);
|
||||
}
|
||||
#endif
|
||||
pmbuf_src = (pmlan_buffer)util_peek_list(
|
||||
pmadapter->pmoal_handle, &pra_list->buf_head, MNULL, MNULL);
|
||||
if (pmbuf_src) {
|
||||
|
|
@ -902,19 +504,11 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
pmbuf_aggr->data_offset = 0;
|
||||
pmbuf_aggr->in_ts_sec = pmbuf_src->in_ts_sec;
|
||||
pmbuf_aggr->in_ts_usec = pmbuf_src->in_ts_usec;
|
||||
pmbuf_aggr->extra_ts_sec = pmbuf_src->extra_ts_sec;
|
||||
pmbuf_aggr->extra_ts_usec = pmbuf_src->extra_ts_usec;
|
||||
if (pmbuf_src->flags & MLAN_BUF_FLAG_TDLS)
|
||||
pmbuf_aggr->flags |= MLAN_BUF_FLAG_TDLS;
|
||||
if (pmbuf_src->flags & MLAN_BUF_FLAG_TCP_ACK)
|
||||
pmbuf_aggr->flags |= MLAN_BUF_FLAG_TCP_ACK;
|
||||
|
||||
if (pmbuf_src->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
pmbuf_aggr->flags |= MLAN_BUF_FLAG_EASYMESH;
|
||||
memcpy_ext(priv->adapter, pmbuf_aggr->mac,
|
||||
pmbuf_src->mac, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
/* Form AMSDU */
|
||||
wlan_11n_form_amsdu_txpd(priv, pmbuf_aggr);
|
||||
pkt_size = Tx_PD_SIZEOF(pmadapter);
|
||||
|
|
@ -938,11 +532,6 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
&pra_list->buf_head,
|
||||
MNULL, MNULL);
|
||||
wlan_wmm_consume_byte_budget(pra_list, pmbuf_src);
|
||||
/* Collects TP statistics */
|
||||
if (pmadapter->tp_state_on &&
|
||||
(pkt_size > Tx_PD_SIZEOF(pmadapter)))
|
||||
pmadapter->callbacks.moal_tp_accounting(
|
||||
pmadapter->pmoal_handle, pmbuf_src, 3);
|
||||
pra_list->total_pkts--;
|
||||
|
||||
/* decrement for every PDU taken from the list */
|
||||
|
|
@ -996,27 +585,9 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
|||
tx_param.next_pkt_len =
|
||||
((pmbuf_src) ? pmbuf_src->data_len + Tx_PD_SIZEOF(pmadapter) :
|
||||
0);
|
||||
/* Collects TP statistics */
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_tp_accounting(pmadapter->pmoal_handle,
|
||||
pmbuf_aggr, 4);
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 5, msdu_in_tx_amsdu_cnt);
|
||||
}
|
||||
|
||||
/* Drop Tx packets at drop point 4 */
|
||||
if (pmadapter->tp_state_drop_point == 4) {
|
||||
wlan_write_data_complete(pmadapter, pmbuf_aggr, ret);
|
||||
goto exit;
|
||||
} else
|
||||
ret = pmadapter->ops.host_to_card(priv, MLAN_TYPE_DATA,
|
||||
pmbuf_aggr, &tx_param);
|
||||
ret = pmadapter->ops.host_to_card(priv, MLAN_TYPE_DATA, pmbuf_aggr,
|
||||
&tx_param);
|
||||
switch (ret) {
|
||||
#ifdef USB
|
||||
case MLAN_STATUS_PRESOURCE:
|
||||
PRINTM(MINFO, "MLAN_STATUS_PRESOURCE is returned\n");
|
||||
break;
|
||||
#endif
|
||||
case MLAN_STATUS_RESOURCE:
|
||||
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||
priv->wmm.ra_list_spinlock);
|
||||
|
|
|
|||
|
|
@ -1564,9 +1564,6 @@ static void wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag)
|
|||
priv->add_ba_param.rx_win_size =
|
||||
MLAN_WFD_COEX_AMPDU_DEF_RXWINSIZE;
|
||||
#endif
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_NAN)
|
||||
priv->add_ba_param.rx_win_size =
|
||||
MLAN_NAN_COEX_AMPDU_DEF_RXWINSIZE;
|
||||
#ifdef UAP_SUPPORT
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_UAP)
|
||||
priv->add_ba_param.rx_win_size =
|
||||
|
|
|
|||
1092
mlan/mlan_cfp.c
1092
mlan/mlan_cfp.c
File diff suppressed because it is too large
Load diff
2858
mlan/mlan_cmdevt.c
2858
mlan/mlan_cmdevt.c
File diff suppressed because it is too large
Load diff
859
mlan/mlan_decl.h
859
mlan/mlan_decl.h
File diff suppressed because it is too large
Load diff
|
|
@ -171,29 +171,18 @@ ENUM_ELEMENT(EVENT_DUMMY_HOST_WAKEUP_SIGNAL, 0x0001),
|
|||
/** Event ID: SAD Report */
|
||||
ENUM_ELEMENT(EVENT_SAD_REPORT, 0x0066),
|
||||
|
||||
/** Event ID: Multi Chan Info*/
|
||||
ENUM_ELEMENT(EVENT_MULTI_CHAN_INFO, 0x006a),
|
||||
|
||||
ENUM_ELEMENT(EVENT_FW_DUMP_INFO, 0x0073),
|
||||
/** Event ID: Tx status */
|
||||
ENUM_ELEMENT(EVENT_TX_STATUS_REPORT, 0x0074),
|
||||
|
||||
ENUM_ELEMENT(EVENT_NAN_GENERIC, 0x0075),
|
||||
|
||||
ENUM_ELEMENT(EVENT_BT_COEX_WLAN_PARA_CHANGE, 0x0076),
|
||||
|
||||
ENUM_ELEMENT(EVENT_VDLL_IND, 0x0081),
|
||||
|
||||
ENUM_ELEMENT(EVENT_ROAM_OFFLOAD, 0x0083),
|
||||
|
||||
ENUM_ELEMENT(EVENT_WLS_FTM_COMPLETE, 0x0086),
|
||||
|
||||
ENUM_ELEMENT(EVENT_EXCEED_MAX_P2P_CONN, 0x0089),
|
||||
|
||||
#if defined(PCIE)
|
||||
ENUM_ELEMENT(EVENT_SSU_DUMP_DMA, 0x008C),
|
||||
#endif
|
||||
|
||||
ENUM_ELEMENT(EVENT_CSI, 0x008D), ENUM_ELEMENT(EVENT_CSI_STATUS, 0x00A7),
|
||||
ENUM_ELEMENT(EVENT_FW_HANG_REPORT, 0x008F),
|
||||
ENUM_ELEMENT(EVENT_DPD_LOG, 0x0091),
|
||||
|
|
@ -203,9 +192,6 @@ ENUM_ELEMENT(EVENT_DUMMY_HOST_WAKEUP_SIGNAL, 0x0001),
|
|||
|
||||
ENUM_ELEMENT(EVENT_CHAN_LOAD, 0x0099),
|
||||
|
||||
ENUM_ELEMENT(EVENT_IMD3_CAL_START, 0x00A0),
|
||||
ENUM_ELEMENT(EVENT_IMD3_CAL_END, 0x00A1),
|
||||
|
||||
ENUM_ELEMENT(EVENT_DPD_CAL, 0x00A8),
|
||||
|
||||
/** Event ID: Bulk Tx status */
|
||||
|
|
@ -216,11 +202,6 @@ ENUM_ELEMENT(EVENT_DUMMY_HOST_WAKEUP_SIGNAL, 0x0001),
|
|||
|
||||
ENUM_ELEMENT(EVENT_CHAN_SWITCH_TO_6G_BLOCK, 0x00A4),
|
||||
|
||||
#if defined(STA_SUPPORT)
|
||||
/** Event ID: Ex-AP 6E Reg mode */
|
||||
ENUM_ELEMENT(EVENT_CHANNEL_SWITCH_REGINFO, 0x00A5),
|
||||
#endif
|
||||
|
||||
ENUM_ELEMENT(EVENT_EMERGENCY_TEMP_REACHED, 0x00A9),
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
|
|
@ -230,13 +211,8 @@ ENUM_ELEMENT(EVENT_DUMMY_HOST_WAKEUP_SIGNAL, 0x0001),
|
|||
|
||||
ENUM_ELEMENT(EVENT_TSP_CONFIG, 0x00AB),
|
||||
|
||||
#if defined(PCIE) || defined(SDIO)
|
||||
/** Card Event definition : In Band reset triggered by FW */
|
||||
ENUM_ELEMENT(EVENT_FW_IN_BAND_RESET, 0x00AD),
|
||||
#endif
|
||||
|
||||
/** Event ID: WiFi uAP Channel Avoidance */
|
||||
ENUM_ELEMENT(EVENT_WIFI_CHANNEL_AVOID_LIST, 0x00AF),
|
||||
|
||||
/* Always keep this last */
|
||||
ENUM_ELEMENT_LAST(__HostEvent_Last)
|
||||
|
|
|
|||
1124
mlan/mlan_fw.h
1124
mlan/mlan_fw.h
File diff suppressed because it is too large
Load diff
|
|
@ -30,9 +30,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
/** Host Command ID : 802.11 get log */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_GET_LOG, 0x000b),
|
||||
|
||||
/** Host Command id: GET_TX_RX_PKT_STATS */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TX_RX_PKT_STATS, 0x008d),
|
||||
|
||||
/** Host Command ID : 802.11 get/set link layer statistic */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_LINK_STATS, 0x0256),
|
||||
|
||||
|
|
@ -145,10 +142,8 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
/** Host Command ID : Memory access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MEM_ACCESS, 0x0086),
|
||||
|
||||
#if defined(SDIO)
|
||||
/** Host Command ID : SDIO GPIO interrupt configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SDIO_GPIO_INT_CONFIG, 0x0088),
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Mfg command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MFG_COMMAND, 0x0089),
|
||||
|
|
@ -186,9 +181,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
ENUM_ELEMENT(HostCmd_CMD_OPCHAN_CHANGROUP_CONFIG, 0x00f9),
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Robustcoex */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_ROBUSTCOEX, 0x00e0),
|
||||
|
||||
/** Host Command ID :EAPOL PKT */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_EAPOL_PKT, 0x012e),
|
||||
|
||||
|
|
@ -202,13 +194,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
/** Host Command ID : ROAMING OFFLOAD TO FW*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_ROAM_OFFLOAD, 0x0245),
|
||||
|
||||
/** Host Command ID: Multi chan config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MULTI_CHAN_CONFIG, 0x011e),
|
||||
/** Host Command ID: Multi chan policy */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MULTI_CHAN_POLICY, 0x0121),
|
||||
/** Host Command ID: DRCS config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_DRCS_CONFIG, 0x024a),
|
||||
|
||||
/** Host Command ID : Channel report request */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CHAN_REPORT_REQUEST, 0x00dd),
|
||||
|
||||
|
|
@ -256,28 +241,18 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
ENUM_ELEMENT(HostCmd_CMD_MGMT_IE_LIST, 0x00f2),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_BAND_STEERING, 0x026f),
|
||||
/*** Host Command ID " MC_AGGR_CFG */
|
||||
ENUM_ELEMENT(HostCmd_CMD_MC_AGGR_CFG, 0x027a),
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_STATS, 0x0014),
|
||||
ENUM_ELEMENT(HostCmd_CMD_GET_CH_LOAD, 0x027b),
|
||||
|
||||
/** Host Command ID: CROSS CHIP SYNCH */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CROSS_CHIP_SYNCH, 0x027d),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_TSP_CFG, 0x0280),
|
||||
|
||||
/** Host Command ID : TDLS configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TDLS_CONFIG, 0x0100),
|
||||
/** Host Command ID : TDLS operation */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TDLS_OPERATION, 0x0122),
|
||||
|
||||
/** Host Command ID : Packet aggregation over host interface */
|
||||
ENUM_ELEMENT(HostCmd_CMD_PACKET_AGGR_OVER_HOST_INTERFACE, 0x0117),
|
||||
|
||||
#ifdef SDIO
|
||||
/** Host Command ID : SDIO single port RX aggr */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SDIO_SP_RX_AGGR_CFG, 0x0223),
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Extended scan support */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_SCAN_EXT, 0x0107),
|
||||
|
|
@ -285,11 +260,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
/** Host Command ID : Forward mgmt frame */
|
||||
ENUM_ELEMENT(HostCmd_CMD_RX_MGMT_IND, 0x010c),
|
||||
|
||||
#ifdef PCIE
|
||||
/** Host Command ID: Host buffer description */
|
||||
ENUM_ELEMENT(HostCmd_CMD_PCIE_HOST_BUF_DETAILS, 0x00fa),
|
||||
#endif
|
||||
|
||||
/** Host Command ID : Set BSS_MODE */
|
||||
ENUM_ELEMENT(HostCmd_CMD_SET_BSS_MODE, 0x00f7),
|
||||
|
||||
|
|
@ -318,9 +288,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
/** Host Command id: PMIC CONFIGURE*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_PMIC_CONFIGURE, 0x23E),
|
||||
|
||||
/** Host Command ID: 802.11 Network Monitor */
|
||||
ENUM_ELEMENT(HostCmd_CMD_802_11_NET_MONITOR, 0x0102),
|
||||
|
||||
/** Host Command ID: Tx data pause */
|
||||
ENUM_ELEMENT(HostCmd_CMD_CFG_TX_DATA_PAUSE, 0x0103),
|
||||
|
||||
|
|
@ -355,8 +322,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
|
||||
ENUM_ELEMENT(HostCmd_CMD_FW_DUMP_EVENT, 0x0125),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_CONFIG_LOW_POWER_MODE, 0x0128),
|
||||
|
||||
/** Host Command ID : Target device access */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TARGET_ACCESS, 0x012a),
|
||||
|
||||
|
|
@ -368,23 +333,9 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
/** Host Command ID: DFS repeater mode */
|
||||
ENUM_ELEMENT(HostCmd_CMD_DFS_REPEATER_MODE, 0x012b),
|
||||
|
||||
/** Host Command ID: ACS scan */
|
||||
ENUM_ELEMENT(HostCmd_CMD_APCMD_ACS_SCAN, 0x0224),
|
||||
|
||||
/** Host Command ID: Get sensor temp*/
|
||||
ENUM_ELEMENT(HostCmd_CMD_DS_GET_SENSOR_TEMP, 0x0227),
|
||||
|
||||
/** Host Command ID: NAN Parameters cofiguration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_NAN_PARAMS_CONFIG, 0x0228),
|
||||
/** Host Command ID: NAN mode cofiguration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_NAN_MODE_CONFIG, 0x0229),
|
||||
/** Host Command ID: NAN service discovery functionality */
|
||||
ENUM_ELEMENT(HostCmd_CMD_NAN_SDF, 0x022a),
|
||||
/** Host Command ID: NAN service hash */
|
||||
ENUM_ELEMENT(HostCmd_CMD_NAN_SERVICE_HASH, 0x022b),
|
||||
/** Host Command ID: NAN service state info (get/set) */
|
||||
ENUM_ELEMENT(HostCmd_CMD_NAN_STATE_INFO, 0x022c),
|
||||
|
||||
/** Host Command ID : Configure ADHOC_OVER_IP parameters */
|
||||
ENUM_ELEMENT(HostCmd_CMD_WMM_PARAM_CONFIG, 0x023a),
|
||||
|
||||
|
|
@ -403,9 +354,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
/** used in hostcmd to download region power cfg setting to firmware */
|
||||
ENUM_ELEMENT(HostCmd_CMD_REGION_POWER_CFG, 0x0249),
|
||||
|
||||
/** Host Command ID : Packet aggregation CTRL */
|
||||
ENUM_ELEMENT(HostCmd_CMD_PACKET_AGGR_CTRL, 0x0251),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_DYN_BW, 0x0252),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_BOOT_SLEEP, 0x0258),
|
||||
|
|
@ -416,17 +364,7 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
ENUM_ELEMENT(HostCmd_CMD_RATE_ADAPT_CFG, 0x0264),
|
||||
ENUM_ELEMENT(HostCmd_CMD_CCK_DESENSE_CFG, 0x0265),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_FTM_CONFIG_SESSION_PARAMS, 0x024d),
|
||||
ENUM_ELEMENT(HostCmd_CMD_FTM_SESSION_CTRL, 0x024e),
|
||||
ENUM_ELEMENT(HostCmd_CMD_FTM_FEATURE_CTRL, 0x024f),
|
||||
ENUM_ELEMENT(HostCmd_CMD_WLS_REQ_FTM_RANGE, 0x0250),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_FTM_CONFIG_RESPONDER, 0x0255),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_VDLL, 0x0240),
|
||||
#if defined(PCIE)
|
||||
ENUM_ELEMENT(HostCmd_CMD_SSU, 0x0259),
|
||||
#endif
|
||||
ENUM_ELEMENT(HostCmd_CMD_CSI, 0x025b),
|
||||
|
||||
#if defined(UAP_SUPPORT)
|
||||
|
|
@ -434,17 +372,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
ENUM_ELEMENT(HostCmd_CMD_ADD_NEW_STATION, 0x025f),
|
||||
#endif
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_DMCS_CONFIG, 0x0260),
|
||||
|
||||
/** Host Command ID: 11AX config */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11AX_CFG, 0x0266),
|
||||
/** Host Command ID: 11AX command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_11AX_CMD, 0x026d),
|
||||
/** Host Command ID: Range ext command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_RANGE_EXT, 0x0274),
|
||||
/** Host Command ID: TWT cfg command */
|
||||
ENUM_ELEMENT(HostCmd_CMD_TWT_CFG, 0x0270),
|
||||
|
||||
ENUM_ELEMENT(HostCmd_CMD_LOW_POWER_MODE_CFG, 0x026e),
|
||||
ENUM_ELEMENT(HostCmd_CMD_UAP_BEACON_STUCK_CFG, 0x0271),
|
||||
ENUM_ELEMENT(HostCmd_CMD_ARB_CONFIG, 0x0273),
|
||||
|
|
@ -481,8 +408,6 @@ ENUM_ELEMENT(HostCmd_CMD_GET_HW_SPEC, 0x0003),
|
|||
|
||||
/** Host Command ID : HS Event masking configuration */
|
||||
ENUM_ELEMENT(HostCmd_CMD_HS_EVENT_MASK, 0x028a),
|
||||
/** Host Command ID : Get foundry type */
|
||||
ENUM_ELEMENT(HostCmd_CMD_DS_GET_FOUNDRY_TYPE, 0X028c),
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Host Command ID : Agiled channel switch configuration */
|
||||
|
|
|
|||
549
mlan/mlan_ieee.h
549
mlan/mlan_ieee.h
|
|
@ -81,69 +81,6 @@ static const struct center_freq_desc center_freq_idx_map_5g[] = {
|
|||
{.pri_chan = 196, .ch_40 = 194, .ch_80 = 190, .ch_160 = 0},
|
||||
{.pri_chan = 0, .ch_40 = 42 /* terminator with default cfreq */}};
|
||||
|
||||
/* List of 6GHZ channels */
|
||||
static const struct center_freq_desc center_freq_idx_map_6g[] = {
|
||||
{.pri_chan = 1, .ch_40 = 3, .ch_80 = 7, .ch_160 = 15},
|
||||
{.pri_chan = 5, .ch_40 = 3, .ch_80 = 7, .ch_160 = 15},
|
||||
{.pri_chan = 9, .ch_40 = 11, .ch_80 = 7, .ch_160 = 15},
|
||||
{.pri_chan = 13, .ch_40 = 11, .ch_80 = 7, .ch_160 = 15},
|
||||
{.pri_chan = 17, .ch_40 = 19, .ch_80 = 23, .ch_160 = 15},
|
||||
{.pri_chan = 21, .ch_40 = 19, .ch_80 = 23, .ch_160 = 15},
|
||||
{.pri_chan = 25, .ch_40 = 27, .ch_80 = 23, .ch_160 = 15},
|
||||
{.pri_chan = 29, .ch_40 = 27, .ch_80 = 23, .ch_160 = 15},
|
||||
{.pri_chan = 33, .ch_40 = 35, .ch_80 = 39, .ch_160 = 47},
|
||||
{.pri_chan = 37, .ch_40 = 35, .ch_80 = 39, .ch_160 = 47},
|
||||
{.pri_chan = 41, .ch_40 = 43, .ch_80 = 39, .ch_160 = 47},
|
||||
{.pri_chan = 45, .ch_40 = 43, .ch_80 = 39, .ch_160 = 47},
|
||||
{.pri_chan = 49, .ch_40 = 51, .ch_80 = 55, .ch_160 = 47},
|
||||
{.pri_chan = 53, .ch_40 = 51, .ch_80 = 55, .ch_160 = 47},
|
||||
{.pri_chan = 57, .ch_40 = 59, .ch_80 = 55, .ch_160 = 47},
|
||||
{.pri_chan = 61, .ch_40 = 59, .ch_80 = 55, .ch_160 = 47},
|
||||
{.pri_chan = 65, .ch_40 = 67, .ch_80 = 71, .ch_160 = 79},
|
||||
{.pri_chan = 69, .ch_40 = 67, .ch_80 = 71, .ch_160 = 79},
|
||||
{.pri_chan = 73, .ch_40 = 75, .ch_80 = 71, .ch_160 = 79},
|
||||
{.pri_chan = 77, .ch_40 = 75, .ch_80 = 71, .ch_160 = 79},
|
||||
{.pri_chan = 81, .ch_40 = 83, .ch_80 = 87, .ch_160 = 79},
|
||||
{.pri_chan = 85, .ch_40 = 83, .ch_80 = 87, .ch_160 = 79},
|
||||
{.pri_chan = 89, .ch_40 = 91, .ch_80 = 87, .ch_160 = 79},
|
||||
{.pri_chan = 93, .ch_40 = 91, .ch_80 = 87, .ch_160 = 79},
|
||||
{.pri_chan = 97, .ch_40 = 99, .ch_80 = 103, .ch_160 = 111},
|
||||
{.pri_chan = 101, .ch_40 = 99, .ch_80 = 103, .ch_160 = 111},
|
||||
{.pri_chan = 105, .ch_40 = 107, .ch_80 = 103, .ch_160 = 111},
|
||||
{.pri_chan = 109, .ch_40 = 107, .ch_80 = 103, .ch_160 = 111},
|
||||
{.pri_chan = 113, .ch_40 = 115, .ch_80 = 119, .ch_160 = 111},
|
||||
{.pri_chan = 117, .ch_40 = 115, .ch_80 = 119, .ch_160 = 111},
|
||||
{.pri_chan = 121, .ch_40 = 123, .ch_80 = 119, .ch_160 = 111},
|
||||
{.pri_chan = 125, .ch_40 = 123, .ch_80 = 119, .ch_160 = 111},
|
||||
{.pri_chan = 129, .ch_40 = 131, .ch_80 = 135, .ch_160 = 143},
|
||||
{.pri_chan = 133, .ch_40 = 131, .ch_80 = 135, .ch_160 = 143},
|
||||
{.pri_chan = 137, .ch_40 = 139, .ch_80 = 135, .ch_160 = 143},
|
||||
{.pri_chan = 141, .ch_40 = 139, .ch_80 = 135, .ch_160 = 143},
|
||||
{.pri_chan = 145, .ch_40 = 147, .ch_80 = 151, .ch_160 = 143},
|
||||
{.pri_chan = 149, .ch_40 = 147, .ch_80 = 151, .ch_160 = 143},
|
||||
{.pri_chan = 153, .ch_40 = 155, .ch_80 = 151, .ch_160 = 143},
|
||||
{.pri_chan = 157, .ch_40 = 155, .ch_80 = 151, .ch_160 = 143},
|
||||
{.pri_chan = 161, .ch_40 = 163, .ch_80 = 167, .ch_160 = 175},
|
||||
{.pri_chan = 165, .ch_40 = 163, .ch_80 = 167, .ch_160 = 175},
|
||||
{.pri_chan = 169, .ch_40 = 171, .ch_80 = 167, .ch_160 = 175},
|
||||
{.pri_chan = 173, .ch_40 = 171, .ch_80 = 167, .ch_160 = 175},
|
||||
{.pri_chan = 177, .ch_40 = 179, .ch_80 = 183, .ch_160 = 175},
|
||||
{.pri_chan = 181, .ch_40 = 179, .ch_80 = 183, .ch_160 = 175},
|
||||
{.pri_chan = 185, .ch_40 = 187, .ch_80 = 183, .ch_160 = 175},
|
||||
{.pri_chan = 189, .ch_40 = 187, .ch_80 = 183, .ch_160 = 175},
|
||||
{.pri_chan = 193, .ch_40 = 195, .ch_80 = 199, .ch_160 = 207},
|
||||
{.pri_chan = 197, .ch_40 = 195, .ch_80 = 199, .ch_160 = 207},
|
||||
{.pri_chan = 201, .ch_40 = 203, .ch_80 = 199, .ch_160 = 207},
|
||||
{.pri_chan = 205, .ch_40 = 203, .ch_80 = 199, .ch_160 = 207},
|
||||
{.pri_chan = 209, .ch_40 = 211, .ch_80 = 215, .ch_160 = 207},
|
||||
{.pri_chan = 213, .ch_40 = 211, .ch_80 = 215, .ch_160 = 207},
|
||||
{.pri_chan = 217, .ch_40 = 219, .ch_80 = 215, .ch_160 = 207},
|
||||
{.pri_chan = 221, .ch_40 = 219, .ch_80 = 215, .ch_160 = 207},
|
||||
{.pri_chan = 225, .ch_40 = 227, .ch_80 = 0, .ch_160 = 0},
|
||||
{.pri_chan = 229, .ch_40 = 227, .ch_80 = 0, .ch_160 = 0},
|
||||
{.pri_chan = 233, .ch_40 = 0, .ch_80 = 0, .ch_160 = 0},
|
||||
{.pri_chan = 0, .ch_40 = 37 /* terminator with default cfreq */}};
|
||||
|
||||
/** WLAN header size */
|
||||
#define IEEE80211_HEADER_SIZE 24
|
||||
|
||||
|
|
@ -183,15 +120,6 @@ typedef enum _WLAN_802_11_NETWORK_TYPE {
|
|||
/* Reason codes */
|
||||
#define IEEE_80211_REASONCODE_UNSPECIFIED 1
|
||||
|
||||
typedef enum _IEEEtypes_Ext_ElementId_e {
|
||||
HE_CAPABILITY = 35,
|
||||
HE_OPERATION = 36,
|
||||
MU_EDCA_PARAM_SET = 38,
|
||||
MBSSID_CONFIG = 55,
|
||||
NON_INHERITANCE = 56,
|
||||
HE_6G_CAPABILITY = 59
|
||||
} IEEEtypes_Ext_ElementId_e;
|
||||
|
||||
/** IEEE Type definitions */
|
||||
typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e {
|
||||
SSID = 0,
|
||||
|
|
@ -209,8 +137,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e {
|
|||
CHANNEL_SWITCH_ANN = 37,
|
||||
EXTEND_CHANNEL_SWITCH_ANN = 60,
|
||||
QUIET = 40,
|
||||
MEASUREMENT_REQUEST = 38,
|
||||
MEASUREMENT_REPORT = 39,
|
||||
SUPPORTED_CHANNELS = 36,
|
||||
REGULATORY_CLASS = 59,
|
||||
HT_CAPABILITY = 45,
|
||||
|
|
@ -238,14 +164,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e {
|
|||
AID_INFO = 197,
|
||||
QUIET_CHAN = 198,
|
||||
OPER_MODE_NTF = 199,
|
||||
RNR = 201,
|
||||
FILS_SESSION = 210,
|
||||
FILS_PMKID_LIST = 211,
|
||||
FILS_IP_REQ = 212,
|
||||
FILS_IP_RESP = 213,
|
||||
FILS_KEY_AUTH = 214,
|
||||
FILS_KEY_DELIVERY = 215,
|
||||
FILS_INDICATION = 240,
|
||||
|
||||
ERP_INFO = 42,
|
||||
|
||||
|
|
@ -306,33 +224,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t {
|
|||
t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_Header_t)];
|
||||
} MLAN_PACK_END IEEEtypes_Generic_t, *pIEEEtypes_Generic_t;
|
||||
|
||||
#define MEASURE_TYPE_CLI 8
|
||||
#define MEASURE_TYPE_LOCATION_CIVIC 9
|
||||
|
||||
/** Measurement Report IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MeasurementReport_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Measurement Token */
|
||||
t_u8 ms_token;
|
||||
/** Measurement Report Mode */
|
||||
t_u8 ms_rp_mode;
|
||||
/** Measurement Type, value in MEASURE_TYPE_XXX */
|
||||
t_u8 ms_type;
|
||||
/** variable */
|
||||
t_u8 variable[];
|
||||
} MLAN_PACK_END IEEEtypes_MeasurementReport_t;
|
||||
|
||||
/** Report */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_Report_t {
|
||||
/** Subelement ID */
|
||||
t_u8 subelement_id;
|
||||
/** length */
|
||||
t_u8 length;
|
||||
/** variable */
|
||||
t_u8 variable[];
|
||||
} MLAN_PACK_END IEEEtypes_Report_t;
|
||||
|
||||
/**ft capability policy*/
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_FtCapPolicy_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
|
|
@ -1013,28 +904,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_Tspec_Action_e {
|
|||
|
||||
} MLAN_PACK_END IEEEtypes_WMM_Tspec_Action_e;
|
||||
|
||||
/** NAN SDF vendor oui size */
|
||||
#define NAN_SDF_VENDOR_SIZE 4
|
||||
/** NAN service descriptor attribute offset */
|
||||
#define NAN_SDA_OFFSET 5
|
||||
/** NAN service control type offset */
|
||||
#define NAN_SRVC_CTRL_OFFSET 11
|
||||
/** Service control field */
|
||||
#define NAN_SRV_CTRL_TYPE_MASK (BIT(0) | BIT(1))
|
||||
/** NAN service control type */
|
||||
#define NAN_PUBLISH 0
|
||||
#define NAN_FOLLOW_UP 2
|
||||
|
||||
/** NAN Attribute ID list */
|
||||
typedef MLAN_PACK_START enum _Nan_AttrId_e {
|
||||
NAN_ATTR_SDA = 0x03
|
||||
} MLAN_PACK_END Nan_AttrId_e;
|
||||
|
||||
/** Public Action Codes */
|
||||
typedef MLAN_PACK_START enum _IEEEtypes_Public_ActionCategory_e {
|
||||
IEEE_PUBLIC_ACTION_CATEGORY_VENDOR_SPECIFIC = 9
|
||||
} MLAN_PACK_END IEEEtypes_Public_ActionCategory_e;
|
||||
|
||||
/** WMM TSPEC Category Action Base */
|
||||
typedef MLAN_PACK_START struct {
|
||||
IEEEtypes_ActionCategory_e category;
|
||||
|
|
@ -1230,65 +1099,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_HTInfo_t {
|
|||
HTInfo_t ht_info;
|
||||
} MLAN_PACK_END IEEEtypes_HTInfo_t, *pIEEEtypes_HTInfo_t;
|
||||
|
||||
/** the AP which send the multi_bssid IE */
|
||||
#define MULTI_BSSID_AP 1
|
||||
/** the AP which don't send beacon */
|
||||
#define MULTI_BSSID_SUB_AP 2
|
||||
/** IEEEtypes_NotxBssCap_t */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_NotxBssCap_t {
|
||||
/** Nontransmitted BSSID Capability: Element ID */
|
||||
t_u8 element_id;
|
||||
/** Nontransmitted BSSID Capability : Length */
|
||||
t_u8 len;
|
||||
/** capability */
|
||||
t_u16 cap;
|
||||
} MLAN_PACK_END IEEEtypes_NotxBssCap_t, *pIEEEtypes_NotxBssCap_t;
|
||||
|
||||
/** Multi BSSID IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MultiBSSIDIndex_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** BSSID Index */
|
||||
t_u8 bssid_index;
|
||||
/** DTIM Period (Optional, not Present in ProbeRsp) */
|
||||
t_u8 dtim_period;
|
||||
/** DTIM Count (Optional, not Present in ProbeRsp) */
|
||||
t_u8 dtim_count;
|
||||
} MLAN_PACK_END IEEEtypes_MultiBSSIDIndex_t, *pIEEEtypes_MultiBSSIDIndex_t;
|
||||
|
||||
/** NonTransmitted BSSID Profile Subelement IE */
|
||||
/** SUBID for IEEEtypes_NonTransBSSIDCap_t */
|
||||
#define NONTRANS_BSSID_PROFILE_SUBELEM_ID 0
|
||||
|
||||
/** NonTransmitted BSSID Capability IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_NonTransBSSIDProfile_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
t_u8 profile_data[];
|
||||
} MLAN_PACK_END IEEEtypes_NonTransBSSIDProfile_t,
|
||||
*pIEEEtypes_NonTransBSSIDProfile_t;
|
||||
|
||||
/** Multi BSSID IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MultiBSSID_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Max BSSID Indicator */
|
||||
t_u8 max_bssid_indicator;
|
||||
/** Optional Subelement data*/
|
||||
t_u8 sub_elem_data[];
|
||||
} MLAN_PACK_END IEEEtypes_MultiBSSID_t, *pIEEEtypes_MultiBSSID_t;
|
||||
|
||||
/** Multi BSSID Configuration IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MBSSID_Config_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** BSSID Count */
|
||||
t_u8 bssid_cnt;
|
||||
/** Full Set Rx Periodicity */
|
||||
t_u8 fs_rx_periodicity;
|
||||
} MLAN_PACK_END IEEEtypes_MBSSID_Config_t, *pIEEEtypes_MBSSID_Config_t;
|
||||
/** 20/40 BSS Coexistence IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_2040BSSCo_t {
|
||||
/** Generic IE header */
|
||||
|
|
@ -1462,220 +1272,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_OperModeNtf_t {
|
|||
t_u8 oper_mode;
|
||||
} MLAN_PACK_END IEEEtypes_OperModeNtf_t, *pIEEEtypes_OperModeNtf_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_Extension_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** payload */
|
||||
t_u8 data[];
|
||||
} MLAN_PACK_END IEEEtypes_Extension_t, *pIEEEtypes_Extension_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsMap_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Max HE-MAC for 8 SS */
|
||||
t_u8 max_mcs_8ss : 2;
|
||||
/** Max HE-MAC for 7 SS */
|
||||
t_u8 max_mcs_7ss : 2;
|
||||
/** Max HE-MAC for 6 SS */
|
||||
t_u8 max_mcs_6ss : 2;
|
||||
/** Max HE-MAC for 5 SS */
|
||||
t_u8 max_mcs_5ss : 2;
|
||||
/** Max HE-MAC for 4 SS */
|
||||
t_u8 max_mcs_4ss : 2;
|
||||
/** Max HE-MAC for 3 SS */
|
||||
t_u8 max_mcs_3ss : 2;
|
||||
/** Max HE-MAC for 2 SS */
|
||||
t_u8 max_mcs_2ss : 2;
|
||||
/** Max HE-MAC for 1 SS */
|
||||
t_u8 max_mcs_1ss : 2;
|
||||
#else
|
||||
/** Max HE-MAC for 1 SS */
|
||||
t_u8 max_mcs_1ss : 2;
|
||||
/** Max HE-MAC for 2 SS */
|
||||
t_u8 max_mcs_2ss : 2;
|
||||
/** Max HE-MAC for 3 SS */
|
||||
t_u8 max_mcs_3ss : 2;
|
||||
/** Max HE-MAC for 4 SS */
|
||||
t_u8 max_mcs_4ss : 2;
|
||||
/** Max HE-MAC for 5 SS */
|
||||
t_u8 max_mcs_5ss : 2;
|
||||
/** Max HE-MAC for 6 SS */
|
||||
t_u8 max_mcs_6ss : 2;
|
||||
/** Max HE-MAC for 7 SS */
|
||||
t_u8 max_mcs_7ss : 2;
|
||||
/** Max HE-MAC for 8 SS */
|
||||
t_u8 max_mcs_8ss : 2;
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_HeMcsMap_t, *pIEEEtypes_HeMcsMap_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsNss_t {
|
||||
/** HE Rx MCS and NSS Set */
|
||||
t_u16 rx_mcs;
|
||||
/** HE Tx MCS and NSS Set*/
|
||||
t_u16 tx_mcs;
|
||||
} MLAN_PACK_END IEEEtypes_HeMcsNss_t, *pIEEEtypes_HeMcsNss_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** he mac capability info */
|
||||
t_u8 he_mac_cap[6];
|
||||
/** he phy capability info */
|
||||
t_u8 he_phy_cap[11];
|
||||
/** he txrx mcs support (for 80 MHz) */
|
||||
t_u8 he_txrx_mcs_support[4];
|
||||
/** Optional Field, including he_txrx_mcs_support for 160 and 80+80 MHz,
|
||||
* and PPE Thresholds */
|
||||
t_u8 option[28];
|
||||
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeOpParam_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Reserved, including 6G Operation Info Pressent (bit17) */
|
||||
t_u8 reserved : 6; /* bit 18-23 */
|
||||
/* 6g operation info present */
|
||||
t_u8 he_6g_op_info_present : 1; /* bit 17 */
|
||||
/** ER SU Disable */
|
||||
t_u8 er_su_disable : 1; /* bit 16 */
|
||||
/** Co-Hosted BSS */
|
||||
t_u16 co_located_bss : 1; /* bit 15 */
|
||||
/** VHT Operation Info Present */
|
||||
t_u16 vht_op_info_present : 1; /* bit 14 */
|
||||
/** TXOP Duration RTS Threshold */
|
||||
t_u16 txop_dur_rts_threshold : 10; /* bit 4-13 */
|
||||
/** TWT Required */
|
||||
t_u16 twt_req : 1; /* bit 3 */
|
||||
/** Default PE Duration */
|
||||
t_u16 default_pe_dur : 3; /* bit 0-2 */
|
||||
#else
|
||||
/** Default PE Duration */
|
||||
t_u16 default_pe_dur : 3; /* bit 0-2 */
|
||||
/** TWT Required */
|
||||
t_u16 twt_req : 1; /* bit 3 */
|
||||
/** TXOP Duration RTS Threshold */
|
||||
t_u16 txop_dur_rts_threshold : 10; /* bit 4-13 */
|
||||
/** VHT Operation Info Present */
|
||||
t_u16 vht_op_info_present : 1; /* bit 14 */
|
||||
/** Co-Hosted BSS */
|
||||
t_u16 co_located_bss : 1; /* bit 15 */
|
||||
/** ER SU Disable */
|
||||
t_u8 er_su_disable : 1; /* bit 16 */
|
||||
/* 6g operation info present */
|
||||
t_u8 he_6g_op_info_present : 1; /* bit 17 */
|
||||
/** Reserved bit 18-23 */
|
||||
t_u8 reserved : 6; /* bit 18-23 */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_HeOpParam_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeBssColorInfo_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** BSS Color Disabled */
|
||||
t_u8 bss_color_disabled : 1; /* bit 7 */
|
||||
/** Partial BSS Color */
|
||||
t_u8 partial_bss_color : 1; /* bit 6 */
|
||||
/** BSS Color */
|
||||
t_u8 bss_color : 6; /* bit 0-5 */
|
||||
#else
|
||||
/** BSS Color */
|
||||
t_u8 bss_color : 6; /* bit 0-5 */
|
||||
/** Partial BSS Color */
|
||||
t_u8 partial_bss_color : 1; /* bit 6 */
|
||||
/** BSS Color Disabled */
|
||||
t_u8 bss_color_disabled : 1; /* bit 7 */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_HeBssColorInfo_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeOp_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** HE Operation Parameters */
|
||||
IEEEtypes_HeOpParam_t he_op_param;
|
||||
/** BSS Color Info */
|
||||
IEEEtypes_HeBssColorInfo_t bss_color_info;
|
||||
/** Basic HE-MCS and NSS Set */
|
||||
IEEEtypes_HeMcsMap_t basic_he_mcs_nss;
|
||||
/** Optional Field, including VHT Operation Info Max Co-Hosted BSSID
|
||||
* Indicator, and 6Ghz Operation Info */
|
||||
t_u8 option[9];
|
||||
} MLAN_PACK_END IEEEtypes_HeOp_t;
|
||||
|
||||
/** MU EDCA Parameter Set */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MUEDCAParamSet_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Extended Tag */
|
||||
t_u8 ext_tag;
|
||||
/** QOS Information */
|
||||
t_u8 qos_info;
|
||||
/** MUAC BE Paramter Record */
|
||||
t_u8 muac_be[3];
|
||||
/** MUAC BK Paramter Record */
|
||||
t_u8 muac_bk[3];
|
||||
/** MUAC VI Paramter Record */
|
||||
t_u8 muac_vi[3];
|
||||
/** MUAC VO Paramter Record */
|
||||
t_u8 muac_vo[3];
|
||||
} MLAN_PACK_END IEEEtypes_MUEDCAParamSet_t, *pIEEEtypes_MUEDCAParamSet_t;
|
||||
|
||||
/** IEEE format IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_Element_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** IE data */
|
||||
t_u8 data[];
|
||||
} MLAN_PACK_END IEEEtypes_Element_t, *pIEEEtypes_Element_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_6G_control_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** reserved */
|
||||
t_u8 reserved : 2; /* bit 6-7 */
|
||||
/** regulatory info */
|
||||
t_u8 regulatory_info : 3; /* bit 3-5 */
|
||||
/** duplicate_beacon */
|
||||
t_u8 duplicate_beacon : 1; /* bit 2 */
|
||||
/** channel width */
|
||||
t_u8 channel_width : 2; /* bit 0-1 */
|
||||
#else
|
||||
/** channel width */
|
||||
t_u8 channel_width : 2; /* bit 0-1 */
|
||||
/** duplicate_beacon */
|
||||
t_u8 duplicate_beacon : 1; /* bit 2 */
|
||||
/** regulatory info */
|
||||
t_u8 regulatory_info : 3; /* bit 3-5 */
|
||||
/** reserved */
|
||||
t_u8 reserved : 2; /* bit 6-7 */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_6G_control_t;
|
||||
|
||||
/* IEEEtypes_He6GOpInfo_t */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_He6GOpInfo_t {
|
||||
/** primary channel */
|
||||
t_u8 primary_channel;
|
||||
/** control */
|
||||
IEEEtypes_6G_control_t control;
|
||||
/** center freq0 */
|
||||
t_u8 channel_center_freq0;
|
||||
/** center freq1 */
|
||||
t_u8 channel_center_freq1;
|
||||
/** minimum rate */
|
||||
t_u8 minimum_rate;
|
||||
} MLAN_PACK_END IEEEtypes_He6GOpInfo_t, *pIEEEtypes_He6GOpInfo_t;
|
||||
|
||||
/* IEEEtypes_HE6GCap_t */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HE6GCap_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** he 6g capability */
|
||||
t_u16 capa;
|
||||
} MLAN_PACK_END IEEEtypes_HE6GCap_t, *pIEEEtypes_HE6GCap_t;
|
||||
|
||||
/** default channel switch count */
|
||||
#define DEF_CHAN_SWITCH_COUNT 5
|
||||
|
||||
|
|
@ -1711,7 +1307,7 @@ typedef MLAN_PACK_START struct {
|
|||
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
|
||||
|
||||
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
|
||||
#define WLAN_11H_MAX_SUBBANDS 6
|
||||
#define WLAN_11H_MAX_SUBBANDS 5
|
||||
|
||||
/** IEEE Power Constraint element (7.3.2.15) */
|
||||
typedef MLAN_PACK_START struct {
|
||||
|
|
@ -1931,7 +1527,7 @@ typedef MLAN_PACK_START struct {
|
|||
#define MAX_SCAN_RSP_BUF (16 * 1024)
|
||||
|
||||
/** Maximum number of channels that can be sent in user scan config */
|
||||
#define WLAN_USER_SCAN_CHAN_MAX 109
|
||||
#define WLAN_USER_SCAN_CHAN_MAX 50
|
||||
/** Maximum length of SSID list */
|
||||
#define MRVDRV_MAX_SSID_LIST_LENGTH 10
|
||||
|
||||
|
|
@ -1995,105 +1591,6 @@ typedef MLAN_PACK_START struct _ChanStatistics_t {
|
|||
t_u8 max_rss;
|
||||
} MLAN_PACK_END ChanStatistics_t;
|
||||
|
||||
#define MLAN_6G_CHAN_MAX 59
|
||||
#define MLAN_RNR_COLOC_AP_MAX MLAN_6G_CHAN_MAX
|
||||
#define WLAN_MAX_6G_SCAN_PARAMS_LIST 20
|
||||
#define SHORT_SSID_VALID MBIT(0)
|
||||
#define UNSOLICITED_PROBE MBIT(1)
|
||||
|
||||
/**
|
||||
* IOCTL 6g scan params List sub-structure sent in wlan_ioctl_user_scan_cfg
|
||||
*/
|
||||
typedef MLAN_PACK_START struct _wlan_6g_scan_params {
|
||||
/** scan channel */
|
||||
t_u8 channel;
|
||||
/** bit0: short_ssid_valid, bit1: unsolicited_probe */
|
||||
t_u16 flags;
|
||||
/** short ssid */
|
||||
t_u32 short_ssid;
|
||||
/** bssid */
|
||||
t_u8 bssid[6];
|
||||
} MLAN_PACK_END wlan_6g_scan_params;
|
||||
|
||||
/*
|
||||
* Reduced Neighbor Report(RNR), based on 802.11ax-2021,
|
||||
* section 9.4.2.170.
|
||||
*/
|
||||
#define IEEE80211_RNR_TBTT_INFO_OFFSET_BSSID_BSSPARAMS 9
|
||||
#define IEEE80211_RNR_TBTT_INFO_OFFSET_BSSID_SSSID_BSSPARAMS 13
|
||||
|
||||
/** Get count of TBTT Information (bit 7:4) */
|
||||
#define GET_RNR_TBTT_INFO_HDR_COUNT(hdr) ((hdr >> 4) & 0x0f)
|
||||
#define GET_RNR_TBTT_INFO_BSSPARAMS_BIT(bss_params, bit) \
|
||||
(bss_params >> bit) & 0x01
|
||||
|
||||
/** RNR BSS parameters */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_RnrBssParams_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Reserved */
|
||||
t_u8 rsrvd : 1;
|
||||
/** Co-Located AP */
|
||||
t_u8 colocated : 1;
|
||||
/** Unsolicited Probe Responses Active */
|
||||
t_u8 unsolicited_probe : 1;
|
||||
/** Member Of ESS With 2.4/5 GHz Co-Located AP */
|
||||
t_u8 colocated_ess : 1;
|
||||
/** Transmitted BSSID */
|
||||
t_u8 transmitted_bssid : 1;
|
||||
/** Multiple BSSID */
|
||||
t_u8 multi_bss : 1;
|
||||
/** Same SSID */
|
||||
t_u8 same_ssid : 1;
|
||||
/** OCT Recommended */
|
||||
t_u8 oct_recommended : 1;
|
||||
#else
|
||||
/** OCT Recommended */
|
||||
t_u8 oct_recommended : 1;
|
||||
/** Same SSID */
|
||||
t_u8 same_ssid : 1;
|
||||
/** Multiple BSSID */
|
||||
t_u8 multi_bss : 1;
|
||||
/** Transmitted BSSID */
|
||||
t_u8 transmitted_bssid : 1;
|
||||
/** Member Of ESS With 2.4/5 GHz Co-Located AP */
|
||||
t_u8 colocated_ess : 1;
|
||||
/** Unsolicited Probe Responses Active */
|
||||
t_u8 unsolicited_probe : 1;
|
||||
/** Co-Located AP */
|
||||
t_u8 colocated : 1;
|
||||
/** Reserved */
|
||||
t_u8 rsrvd : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} MLAN_PACK_END IEEEtypes_RnrBssParams_t, *pIEEEtypes_RnrBssParams_t;
|
||||
|
||||
/** structure for RNR Neighbor AP Information */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_RnrNeighborApInfo_t {
|
||||
/* TBTT Information Header */
|
||||
t_u8 tbtt_info_hdr;
|
||||
/* TBTT Information Length */
|
||||
t_u8 tbtt_info_len;
|
||||
/** Operating Class */
|
||||
t_u8 oper_class;
|
||||
/** Channel Number */
|
||||
t_u8 chan_number;
|
||||
} MLAN_PACK_END IEEEtypes_RnrNeighborApInfo_t, *pIEEEtypes_RnrNeighborApInfo_t;
|
||||
|
||||
/** structure for RNR colocated ap */
|
||||
typedef MLAN_PACK_START struct _RnrColocatedAp_t {
|
||||
/** BSSID */
|
||||
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||
/** SSID */
|
||||
mlan_802_11_ssid ssid;
|
||||
/** Short-SSID */
|
||||
t_u32 short_ssid;
|
||||
/** Operating Class */
|
||||
t_u8 oper_class;
|
||||
/** Channel Number */
|
||||
t_u8 chan_number;
|
||||
/** BSS parameters */
|
||||
IEEEtypes_RnrBssParams_t bss_params;
|
||||
} MLAN_PACK_END RnrColocatedAp_t, *pRnrColocatedAp_t;
|
||||
|
||||
/** Enhance ext scan type defination */
|
||||
typedef enum _MLAN_EXT_SCAN_TYPE {
|
||||
EXT_SCAN_DEFAULT,
|
||||
|
|
@ -2161,10 +1658,6 @@ typedef MLAN_PACK_START struct {
|
|||
mlan_802_11_mac_addr bssid_list[MAX_BSSID_FILTER_LIST];
|
||||
/** use scan setting from scan_cfg only */
|
||||
t_u8 scan_cfg_only;
|
||||
/**num of 6g scan params for OOB scan */
|
||||
t_u8 num_6g_scan_params;
|
||||
/** 6g scan params for OOB scan */
|
||||
wlan_6g_scan_params scan_param_list[WLAN_MAX_6G_SCAN_PARAMS_LIST];
|
||||
} MLAN_PACK_END wlan_user_scan_cfg;
|
||||
|
||||
/** Default scan interval in millisecond*/
|
||||
|
|
@ -2187,17 +1680,11 @@ typedef MLAN_PACK_START struct {
|
|||
/**wait for all channel scan to complete to report scan result*/
|
||||
#define BG_SCAN_WAIT_ALL_CHAN_DONE 0x80000000
|
||||
|
||||
#define CHAN_MAX_6G 59 // reference from cfg80211_channels_6ghz table
|
||||
#define CHAN_MAX_6G 0
|
||||
|
||||
/** max bgscan chan number */
|
||||
#define WLAN_BG_SCAN_CHAN_MAX 38
|
||||
|
||||
/** max bgscan chan number, include UNII_4 channel */
|
||||
#define WLAN_BG_SCAN_CHAN_MAX_UNII_4 41
|
||||
|
||||
/** max bgscan chan number, 3 + 38 + 59 */
|
||||
#define WLAN_BG_SCAN_CHAN_MAX_6E 100
|
||||
|
||||
/** Enumeration definition */
|
||||
/** EES MODE */
|
||||
typedef enum {
|
||||
|
|
@ -2294,8 +1781,6 @@ typedef MLAN_PACK_START struct {
|
|||
/** Array of ees config struct */
|
||||
ees_ssid_config ees_ssid_cfg[EES_MAX_SSIDS];
|
||||
t_u8 random_mac[MLAN_MAC_ADDR_LENGTH];
|
||||
/** 11ai indication */
|
||||
t_u8 dot11ai;
|
||||
} MLAN_PACK_END wlan_bgscan_cfg;
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
|
|
@ -2411,14 +1896,6 @@ typedef struct _BSSDescriptor_t {
|
|||
IEEEtypes_HTInfo_t *pht_info;
|
||||
/** HT Information Offset */
|
||||
t_u16 ht_info_offset;
|
||||
/** Flag to indicate this is multi_bssid_ap */
|
||||
t_u8 multi_bssid_ap;
|
||||
/** the mac address of multi-bssid AP */
|
||||
mlan_802_11_mac_addr multi_bssid_ap_addr;
|
||||
/** Multi BSSID Configuration IE */
|
||||
IEEEtypes_MBSSID_Config_t *pmbssid_config;
|
||||
/** Multi BSSID Configuration IE offset */
|
||||
t_u16 mbssid_config_offset;
|
||||
/** 20/40 BSS Coexistence IE */
|
||||
IEEEtypes_2040BSSCo_t *pbss_co_2040;
|
||||
/** 20/40 BSS Coexistence Offset */
|
||||
|
|
@ -2460,22 +1937,6 @@ typedef struct _BSSDescriptor_t {
|
|||
IEEEtypes_OperModeNtf_t *poper_mode;
|
||||
/** Operating Mode Notification IE offset */
|
||||
t_u16 oper_mode_offset;
|
||||
/** HE Capability IE */
|
||||
IEEEtypes_HECap_t *phe_cap;
|
||||
/** HE Capability IE offset */
|
||||
t_u16 he_cap_offset;
|
||||
/** HE operation IE */
|
||||
IEEEtypes_Extension_t *phe_oprat;
|
||||
/** HE operation IE offset */
|
||||
t_u16 he_oprat_offset;
|
||||
/** HE 6G Capability IE */
|
||||
IEEEtypes_HE6GCap_t *phe_6g_cap;
|
||||
/** HE 6G Capability IE offset */
|
||||
t_u16 he_6g_cap_offset;
|
||||
/** RNR IE */
|
||||
IEEEtypes_Generic_t *prnr_ie;
|
||||
/** RNR IE offset in the beacon buffer */
|
||||
t_u16 rnr_offset;
|
||||
#ifdef STA_SUPPORT
|
||||
/** Country information set */
|
||||
IEEEtypes_CountryInfoFullSet_t country_info;
|
||||
|
|
@ -2507,10 +1968,6 @@ typedef struct _BSSDescriptor_t {
|
|||
IEEEtypes_MobilityDomain_t *pmd_ie;
|
||||
/** Mobility domain IE offset in the beacon buffer */
|
||||
t_u16 md_offset;
|
||||
/** MU EDCA Parameter IE */
|
||||
IEEEtypes_MUEDCAParamSet_t *pmuedca_ie;
|
||||
/** MU EDCA Parameter IE offset */
|
||||
t_u16 muedca_offset;
|
||||
/** Pointer to the returned scan response */
|
||||
t_u8 *pbeacon_buf;
|
||||
/** Length of the stored scan response */
|
||||
|
|
|
|||
489
mlan/mlan_init.c
489
mlan/mlan_init.c
|
|
@ -39,13 +39,7 @@ Change log:
|
|||
#include "mlan_11ac.h"
|
||||
#include "mlan_11h.h"
|
||||
#include "mlan_meas.h"
|
||||
#ifdef SDIO
|
||||
#include "mlan_sdio.h"
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
#include "mlan_pcie.h"
|
||||
#endif /* PCIE */
|
||||
#include "mlan_11ax.h"
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
|
|
@ -169,7 +163,6 @@ static mlan_status vdll_init(pmlan_adapter pmadapter)
|
|||
|
||||
ENTER();
|
||||
memset(pmadapter, ctrl, 0, sizeof(vdll_dnld_ctrl));
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type)) {
|
||||
ctrl->cmd_buf =
|
||||
wlan_alloc_mlan_buffer(pmadapter,
|
||||
|
|
@ -181,7 +174,6 @@ static mlan_status vdll_init(pmlan_adapter pmadapter)
|
|||
status = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
|
@ -207,13 +199,11 @@ static t_void vdll_deinit(pmlan_adapter pmadapter)
|
|||
pmadapter->vdll_ctrl.vdll_mem = MNULL;
|
||||
pmadapter->vdll_ctrl.vdll_len = 0;
|
||||
}
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type) &&
|
||||
pmadapter->vdll_ctrl.cmd_buf != MNULL) {
|
||||
wlan_free_mlan_buffer(pmadapter, pmadapter->vdll_ctrl.cmd_buf);
|
||||
pmadapter->vdll_ctrl.cmd_buf = MNULL;
|
||||
}
|
||||
#endif
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
|
|
@ -237,20 +227,16 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
t_u32 buf_size;
|
||||
BSSDescriptor_t *ptemp_scan_table = MNULL;
|
||||
t_u8 chan_2g[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
|
||||
t_u8 chan_5g[] = {12, 16, 34, 38, 42, 46, 36, 40, 44,
|
||||
48, 52, 56, 60, 64, 100, 104, 108, 112,
|
||||
116, 120, 124, 128, 132, 136, 140, 144, 149,
|
||||
153, 157, 161, 165, 169, 173, 177};
|
||||
t_u8 chan_5g[] = {12, 16, 34, 38, 42, 46, 36, 40, 44, 48, 52,
|
||||
56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128,
|
||||
132, 136, 140, 144, 149, 153, 157, 161, 165};
|
||||
#endif
|
||||
#ifdef SDIO
|
||||
t_u32 max_mp_regs = 0;
|
||||
t_u32 mp_tx_aggr_buf_size = 0;
|
||||
t_u32 mp_rx_aggr_buf_size = 0;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
max_mp_regs = pmadapter->pcard_sd->reg->max_mp_regs;
|
||||
mp_tx_aggr_buf_size = pmadapter->pcard_sd->mp_tx_aggr_buf_size;
|
||||
|
|
@ -260,7 +246,6 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
mp_tx_aggr_buf_size = MIN(pmadapter->pcard_sd->max_seg_size,
|
||||
mp_tx_aggr_buf_size);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/* Allocate buffer to store the BSSID list */
|
||||
|
|
@ -303,7 +288,6 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
|
||||
pmadapter->num_in_chan_stats = sizeof(chan_2g);
|
||||
pmadapter->num_in_chan_stats += sizeof(chan_5g);
|
||||
pmadapter->num_in_chan_stats += MLAN_6G_CHAN_MAX;
|
||||
buf_size = sizeof(ChanStatistics_t) * pmadapter->num_in_chan_stats;
|
||||
if (pmadapter->callbacks.moal_vmalloc &&
|
||||
pmadapter->callbacks.moal_vfree)
|
||||
|
|
@ -329,7 +313,6 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
ret = pmadapter->callbacks.moal_malloc(
|
||||
pmadapter->pmoal_handle, max_mp_regs + DMA_ALIGNMENT,
|
||||
|
|
@ -395,26 +378,12 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
pmadapter->psleep_cfm =
|
||||
wlan_alloc_mlan_buffer(pmadapter,
|
||||
sizeof(opt_sleep_confirm_buffer), 0,
|
||||
MOAL_MALLOC_BUFFER);
|
||||
|
||||
#ifdef PCIE
|
||||
/* Initialize PCIE ring buffer */
|
||||
if (IS_PCIE(pmadapter->card_type)) {
|
||||
ret = wlan_alloc_pcie_ring_buf(pmadapter);
|
||||
if (MLAN_STATUS_SUCCESS != ret) {
|
||||
PRINTM(MERROR,
|
||||
"Failed to allocate PCIE host buffers\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
#endif /* PCIE */
|
||||
|
||||
vdll_init(pmadapter);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
|
@ -433,9 +402,6 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
t_u32 i;
|
||||
pmlan_adapter pmadapter = priv->adapter;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef USB
|
||||
pusb_tx_aggr_params pusb_tx_aggr = MNULL;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -488,7 +454,6 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
#ifdef UAP_SUPPORT
|
||||
priv->is_11n_enabled = MFALSE;
|
||||
priv->is_11ac_enabled = MFALSE;
|
||||
priv->is_11ax_enabled = MFALSE;
|
||||
priv->uap_bss_started = MFALSE;
|
||||
priv->uap_host_based = MFALSE;
|
||||
memset(pmadapter, &priv->uap_state_chan_cb, 0,
|
||||
|
|
@ -563,8 +528,6 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
SET_EXTCAP_OPERMODENTF(priv->ext_cap);
|
||||
SET_EXTCAP_TDLS(priv->ext_cap);
|
||||
SET_EXTCAP_QOS_MAP(priv->ext_cap);
|
||||
/* Set FILS Capability */
|
||||
SET_EXTCAP_FILS(priv->ext_cap);
|
||||
/* Save default Extended Capability */
|
||||
memcpy_ext(priv->adapter, &priv->def_ext_cap, &priv->ext_cap,
|
||||
sizeof(priv->ext_cap), sizeof(priv->def_ext_cap));
|
||||
|
|
@ -609,20 +572,7 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
priv->hotspot_cfg = 0;
|
||||
|
||||
priv->intf_hr_len = pmadapter->ops.intf_header_len;
|
||||
priv->multi_ap_flag = 0;
|
||||
memset(pmadapter, &priv->chan_rep_req, 0, sizeof(priv->chan_rep_req));
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
pusb_tx_aggr =
|
||||
wlan_get_usb_tx_aggr_params(pmadapter, priv->port);
|
||||
if (pusb_tx_aggr && pusb_tx_aggr->aggr_ctrl.aggr_mode ==
|
||||
MLAN_USB_AGGR_MODE_LEN_V2) {
|
||||
priv->intf_hr_len = MLAN_USB_TX_AGGR_HEADER;
|
||||
}
|
||||
priv->port = pmadapter->tx_data_ep;
|
||||
priv->port_index = 0;
|
||||
}
|
||||
#endif
|
||||
ret = wlan_add_bsspriotbl(priv);
|
||||
|
||||
LEAVE();
|
||||
|
|
@ -640,9 +590,6 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||
{
|
||||
opt_sleep_confirm_buffer *sleep_cfm_buf = MNULL;
|
||||
#ifdef USB
|
||||
t_s32 i = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
if (pmadapter->psleep_cfm) {
|
||||
|
|
@ -671,7 +618,6 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->data_sent = MFALSE;
|
||||
pmadapter->data_sent_cnt = 0;
|
||||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
pmadapter->pcard_sd->int_mode = pmadapter->init_para.int_mode;
|
||||
pmadapter->pcard_sd->gpio_pin = pmadapter->init_para.gpio_pin;
|
||||
|
|
@ -717,7 +663,6 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_sd->mpa_rx.pkt_aggr_limit =
|
||||
pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||
}
|
||||
#endif
|
||||
|
||||
pmadapter->rx_pkts_queued = 0;
|
||||
pmadapter->cmd_resp_received = MFALSE;
|
||||
|
|
@ -759,10 +704,6 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->specific_scan_time = MRVDRV_SPECIFIC_SCAN_CHAN_TIME;
|
||||
pmadapter->active_scan_time = MRVDRV_ACTIVE_SCAN_CHAN_TIME;
|
||||
pmadapter->passive_scan_time = MRVDRV_PASSIVE_SCAN_CHAN_TIME;
|
||||
pmadapter->wifi_6g_scan_time = MRVDRV_6G_SCAN_CHAN_TIME;
|
||||
pmadapter->wifi_6g_scan_split = MFALSE;
|
||||
pmadapter->wifi_6g_scan_coloc_ap = MFALSE; /* configurable */
|
||||
pmadapter->scan_6g = MFALSE;
|
||||
if (!pmadapter->init_para.passive_to_active_scan)
|
||||
pmadapter->passive_to_active_scan = MLAN_PASS_TO_ACT_SCAN_EN;
|
||||
else if (pmadapter->init_para.passive_to_active_scan ==
|
||||
|
|
@ -831,58 +772,10 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K;
|
||||
pmadapter->curr_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K;
|
||||
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
pmadapter->pcard_usb->usb_port_status[i] = MFALSE;
|
||||
}
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.enable =
|
||||
MFALSE;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_mode =
|
||||
MLAN_USB_AGGR_MODE_LEN_V2;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_align =
|
||||
MLAN_USB_TX_AGGR_V2_ALIGN;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.aggr_max =
|
||||
MLAN_USB_TX_AGGR_MAX_LEN;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.aggr_tmo =
|
||||
MLAN_USB_TX_AGGR_TIMEOUT_MSEC * 1000;
|
||||
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].pmbuf_aggr = MNULL;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_len = 0;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].hold_timeout_msec =
|
||||
MLAN_USB_TX_AGGR_TIMEOUT_MSEC;
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].port =
|
||||
pmadapter->usb_tx_ports[i];
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].phandle =
|
||||
(t_void *)pmadapter;
|
||||
}
|
||||
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable = MFALSE;
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.aggr_mode =
|
||||
MLAN_USB_AGGR_MODE_NUM;
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.aggr_align =
|
||||
MLAN_USB_RX_ALIGN_SIZE;
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.aggr_max =
|
||||
MLAN_USB_RX_MAX_AGGR_NUM;
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.aggr_tmo =
|
||||
MLAN_USB_RX_DEAGGR_TIMEOUT_USEC;
|
||||
|
||||
pmadapter->pcard_usb->fw_usb_aggr = MTRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
pmadapter->is_hs_configured = MFALSE;
|
||||
pmadapter->hs_cfg.conditions = HOST_SLEEP_DEF_COND;
|
||||
pmadapter->hs_cfg.gpio = HOST_SLEEP_DEF_GPIO;
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type))
|
||||
pmadapter->hs_cfg.gap = HOST_SLEEP_GAP_SPECIAL;
|
||||
else
|
||||
#endif
|
||||
pmadapter->hs_cfg.gap = HOST_SLEEP_DEF_GAP;
|
||||
pmadapter->hs_cfg.gap = HOST_SLEEP_DEF_GAP;
|
||||
pmadapter->hs_activated = MFALSE;
|
||||
pmadapter->min_wake_holdoff = HOST_SLEEP_DEF_WAKE_HOLDOFF;
|
||||
pmadapter->hs_inactivity_timeout = HOST_SLEEP_DEF_INACTIVITY_TIMEOUT;
|
||||
|
|
@ -923,13 +816,6 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
wlan_cpu_to_le16(SLEEP_CONFIRM);
|
||||
sleep_cfm_buf->ps_cfm_sleep.sleep_cfm.resp_ctrl =
|
||||
wlan_cpu_to_le16(RESP_NEEDED);
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
sleep_cfm_buf->hdr =
|
||||
wlan_cpu_to_le32(MLAN_USB_TYPE_CMD);
|
||||
pmadapter->psleep_cfm->data_len += MLAN_TYPE_LEN;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
memset(pmadapter, &pmadapter->sleep_params, 0,
|
||||
sizeof(pmadapter->sleep_params));
|
||||
|
|
@ -966,36 +852,6 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->arp_filter_size = 0;
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
pmadapter->mc_status = MFALSE;
|
||||
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type)) {
|
||||
pmadapter->pcard_pcie->txbd_wrptr = 0;
|
||||
pmadapter->pcard_pcie->txbd_rdptr = 0;
|
||||
pmadapter->pcard_pcie->rxbd_rdptr = 0;
|
||||
pmadapter->pcard_pcie->evtbd_rdptr = 0;
|
||||
pmadapter->pcard_pcie->txbd_pending = 0;
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
if (!pmadapter->pcard_pcie->reg->use_adma) {
|
||||
pmadapter->pcard_pcie->rxbd_wrptr =
|
||||
pmadapter->pcard_pcie->reg
|
||||
->txrx_rw_ptr_rollover_ind;
|
||||
pmadapter->pcard_pcie->evtbd_wrptr =
|
||||
EVT_RW_PTR_ROLLOVER_IND;
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIEAW693) || \
|
||||
defined(PCIEIW624)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
pmadapter->pcard_pcie->rxbd_wrptr =
|
||||
pmadapter->pcard_pcie->txrx_bd_size;
|
||||
pmadapter->pcard_pcie->evtbd_wrptr = MLAN_MAX_EVT_BD;
|
||||
pmadapter->pcard_pcie->last_write_index_with_irq =
|
||||
0xffffffff;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
|
@ -1060,28 +916,6 @@ mlan_status wlan_init_priv_lock_list(pmlan_adapter pmadapter, t_u8 start_index)
|
|||
MTRUE,
|
||||
priv->adapter->callbacks.moal_init_lock);
|
||||
}
|
||||
util_init_list_head(
|
||||
pmadapter->pmoal_handle, &priv->wmm.all_stas,
|
||||
MTRUE, pmadapter->callbacks.moal_init_lock);
|
||||
util_init_list_head(
|
||||
pmadapter->pmoal_handle,
|
||||
&priv->wmm.pending_stas, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
util_init_list_head(
|
||||
pmadapter->pmoal_handle,
|
||||
&priv->wmm.active_stas.list, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
for (j = 0; j < NELEMENTS(priv->wmm.pending_txq); ++j) {
|
||||
util_init_list_head(
|
||||
pmadapter->pmoal_handle,
|
||||
&priv->wmm.pending_txq[j], MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
}
|
||||
priv->wmm.selected_ra_list = MNULL;
|
||||
pcb->moal_get_host_time_ns(
|
||||
&priv->wmm.active_stas.next_update);
|
||||
pcb->moal_get_host_time_ns(&priv->wmm.next_rate_update);
|
||||
priv->wmm.is_rate_update_pending = MFALSE;
|
||||
util_init_list_head(
|
||||
(t_void *)pmadapter->pmoal_handle,
|
||||
&priv->tx_ba_stream_tbl_ptr, MTRUE,
|
||||
|
|
@ -1134,9 +968,6 @@ mlan_status wlan_init_lock_list(pmlan_adapter pmadapter)
|
|||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
#if defined(USB)
|
||||
t_s32 i = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
|
|
@ -1145,7 +976,6 @@ mlan_status wlan_init_lock_list(pmlan_adapter pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type)) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pint_lock) !=
|
||||
|
|
@ -1154,7 +984,6 @@ mlan_status wlan_init_lock_list(pmlan_adapter pmadapter)
|
|||
goto error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmain_proc_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
|
|
@ -1173,64 +1002,10 @@ mlan_status wlan_init_lock_list(pmlan_adapter pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#ifdef PCIE
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_rx_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_tx_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_event_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_pcie_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pmlan_usb_event_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pcb->moal_init_lock(pmadapter->pmoal_handle,
|
||||
&pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_lock) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_data_queue, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->amsdu_txq, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
util_scalar_init((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->bypass_pkt_count, 0, MNULL,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
|
|
@ -1258,16 +1033,6 @@ mlan_status wlan_init_lock_list(pmlan_adapter pmadapter)
|
|||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->ioctl_pending_q, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
/* Initialize coloc_ap_list */
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->coloc_ap_list, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
#ifdef PCIE
|
||||
util_scalar_init((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_refill_start_index,
|
||||
MLAN_INVALID_TXRX_INDEX_VAL, MNULL,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
#endif
|
||||
error:
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
|
@ -1293,11 +1058,9 @@ t_void wlan_free_lock_list(pmlan_adapter pmadapter)
|
|||
if (pmadapter->pmlan_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_lock);
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type) && pmadapter->pint_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pint_lock);
|
||||
#endif
|
||||
if (pmadapter->prx_proc_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->prx_proc_lock);
|
||||
|
|
@ -1307,36 +1070,6 @@ t_void wlan_free_lock_list(pmlan_adapter pmadapter)
|
|||
if (pmadapter->pmlan_cmd_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_cmd_lock);
|
||||
#ifdef PCIE
|
||||
if (pmadapter->pmlan_rx_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
if (pmadapter->pmlan_tx_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_tx_lock);
|
||||
if (pmadapter->pmlan_event_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_event_lock);
|
||||
if (pmadapter->pmlan_pcie_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_pcie_lock);
|
||||
#endif
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type) && pmadapter->pmlan_usb_event_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_usb_event_lock);
|
||||
#endif
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i].paggr_lock)
|
||||
pcb->moal_free_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_lock);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < pmadapter->priv_num; i++) {
|
||||
if (pmadapter->priv[i]) {
|
||||
|
|
@ -1358,8 +1091,6 @@ t_void wlan_free_lock_list(pmlan_adapter pmadapter)
|
|||
/* Free lists */
|
||||
util_free_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_data_queue, pcb->moal_free_lock);
|
||||
util_free_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->amsdu_txq, pcb->moal_free_lock);
|
||||
|
||||
util_scalar_free((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->bypass_pkt_count, pcb->moal_free_lock);
|
||||
|
|
@ -1386,14 +1117,6 @@ t_void wlan_free_lock_list(pmlan_adapter pmadapter)
|
|||
&pmadapter->ioctl_pending_q,
|
||||
pmadapter->callbacks.moal_free_lock);
|
||||
|
||||
util_free_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->coloc_ap_list,
|
||||
pmadapter->callbacks.moal_free_lock);
|
||||
#ifdef PCIE
|
||||
util_scalar_free((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_refill_start_index,
|
||||
pcb->moal_free_lock);
|
||||
#endif
|
||||
for (i = 0; i < pmadapter->priv_num; i++)
|
||||
util_free_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->bssprio_tbl[i].bssprio_head,
|
||||
|
|
@ -1419,24 +1142,6 @@ t_void wlan_free_lock_list(pmlan_adapter pmadapter)
|
|||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->wmm.tid_tbl_ptr[j].ra_list,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
util_free_list_head(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->wmm.all_stas,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
util_free_list_head(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->wmm.pending_stas,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
util_free_list_head(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->wmm.active_stas.list,
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
for (j = 0; j < NELEMENTS(priv->wmm.pending_txq); ++j) {
|
||||
util_free_list_head(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->wmm.pending_txq[j],
|
||||
priv->adapter->callbacks.moal_free_lock);
|
||||
}
|
||||
util_free_list_head(
|
||||
(t_void *)priv->adapter->pmoal_handle,
|
||||
&priv->tx_ba_stream_tbl_ptr,
|
||||
|
|
@ -1473,9 +1178,6 @@ mlan_status wlan_init_timer(pmlan_adapter pmadapter)
|
|||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
#if defined(USB)
|
||||
t_s32 i = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
if (pcb->moal_init_timer(
|
||||
|
|
@ -1484,22 +1186,6 @@ mlan_status wlan_init_timer(pmlan_adapter pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pcb->moal_init_timer(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.paggr_hold_timer,
|
||||
wlan_usb_tx_aggr_timeout_func,
|
||||
&pmadapter->pcard_usb->usb_tx_aggr[i]) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (pcb->moal_init_timer(pmadapter->pmoal_handle,
|
||||
&pmadapter->pwakeup_fw_timer,
|
||||
wlan_wakeup_card_timeout_func,
|
||||
|
|
@ -1524,26 +1210,11 @@ error:
|
|||
t_void wlan_free_timer(pmlan_adapter pmadapter)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
#if defined(USB)
|
||||
t_s32 i = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
if (pmadapter->pmlan_cmd_timer)
|
||||
pcb->moal_free_timer(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_cmd_timer);
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.paggr_hold_timer)
|
||||
pcb->moal_free_timer(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_hold_timer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pmadapter->pwakeup_fw_timer)
|
||||
pcb->moal_free_timer(pmadapter->pmoal_handle,
|
||||
|
|
@ -1564,36 +1235,15 @@ t_void wlan_free_timer(pmlan_adapter pmadapter)
|
|||
mlan_status wlan_init_fw(pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
#ifdef PCIE
|
||||
pmlan_private priv = pmadapter->priv[0];
|
||||
#endif
|
||||
ENTER();
|
||||
/* Initialize adapter structure */
|
||||
wlan_init_adapter(pmadapter);
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
if (pmadapter->mfg_mode != MTRUE) {
|
||||
#endif
|
||||
wlan_adapter_get_hw_spec(pmadapter);
|
||||
wlan_adapter_get_hw_spec(pmadapter);
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
}
|
||||
#ifdef PCIE
|
||||
else if (IS_PCIE(pmadapter->card_type)) {
|
||||
if (MLAN_STATUS_SUCCESS != wlan_set_pcie_buf_config(priv)) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (((pmadapter->card_type) & 0xff) == CARD_TYPE_AW693
|
||||
) {
|
||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_FUNC_INIT,
|
||||
HostCmd_ACT_GEN_SET, 0, MNULL, MNULL);
|
||||
if (ret) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#endif /* PCIE */
|
||||
#endif /* MFG_CMD_SUPPORT */
|
||||
if (wlan_is_cmd_pending(pmadapter)) {
|
||||
/* Send the first command in queue and return */
|
||||
|
|
@ -1601,15 +1251,7 @@ mlan_status wlan_init_fw(pmlan_adapter pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
else
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
#if defined(MFG_CMD_SUPPORT) && defined(PCIE)
|
||||
if (IS_PCIE(pmadapter->card_type) && pmadapter->mfg_mode) {
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef PCIE
|
||||
done:
|
||||
#endif
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
if (pmadapter->mfg_mode == MTRUE) {
|
||||
pmadapter->hw_status = WlanHardwareStatusInitializing;
|
||||
|
|
@ -1631,7 +1273,6 @@ done:
|
|||
static void wlan_update_hw_spec(pmlan_adapter pmadapter)
|
||||
{
|
||||
t_u32 i;
|
||||
MrvlIEtypes_He_cap_t *user_he_cap_tlv = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -1699,72 +1340,6 @@ static void wlan_update_hw_spec(pmlan_adapter pmadapter)
|
|||
if (pmadapter->priv[i])
|
||||
wlan_update_11ac_cap(pmadapter->priv[i]);
|
||||
}
|
||||
if (IS_FW_SUPPORT_11AX(pmadapter)) {
|
||||
if (pmadapter->hw_2g_hecap_len) {
|
||||
pmadapter->fw_bands |= BAND_GAX;
|
||||
pmadapter->config_bands |= BAND_GAX;
|
||||
}
|
||||
if ((pmadapter->fw_bands & BAND_A) && pmadapter->hw_hecap_len) {
|
||||
pmadapter->fw_bands |= BAND_AAX;
|
||||
pmadapter->config_bands |= BAND_AAX;
|
||||
}
|
||||
for (i = 0; i < pmadapter->priv_num; i++) {
|
||||
if (pmadapter->priv[i]) {
|
||||
pmadapter->priv[i]->config_bands =
|
||||
pmadapter->config_bands;
|
||||
pmadapter->priv[i]->user_2g_hecap_len =
|
||||
pmadapter->hw_2g_hecap_len;
|
||||
memcpy_ext(pmadapter,
|
||||
pmadapter->priv[i]->user_2g_he_cap,
|
||||
pmadapter->hw_2g_he_cap,
|
||||
pmadapter->hw_2g_hecap_len,
|
||||
sizeof(pmadapter->priv[i]
|
||||
->user_2g_he_cap));
|
||||
pmadapter->priv[i]->user_hecap_len =
|
||||
pmadapter->hw_hecap_len;
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
pmadapter->priv[i]->user_he_cap,
|
||||
pmadapter->hw_he_cap,
|
||||
pmadapter->hw_hecap_len,
|
||||
sizeof(pmadapter->priv[i]->user_he_cap));
|
||||
user_he_cap_tlv =
|
||||
(MrvlIEtypes_He_cap_t *)&pmadapter
|
||||
->priv[i]
|
||||
->user_2g_he_cap;
|
||||
if (pmadapter->priv[i]->bss_role ==
|
||||
MLAN_BSS_ROLE_STA)
|
||||
user_he_cap_tlv->he_mac_cap[0] &=
|
||||
~HE_MAC_CAP_TWT_RESP_SUPPORT;
|
||||
else
|
||||
user_he_cap_tlv->he_mac_cap[0] &=
|
||||
~HE_MAC_CAP_TWT_REQ_SUPPORT;
|
||||
user_he_cap_tlv =
|
||||
(MrvlIEtypes_He_cap_t *)&pmadapter
|
||||
->priv[i]
|
||||
->user_he_cap;
|
||||
if (pmadapter->priv[i]->bss_role ==
|
||||
MLAN_BSS_ROLE_STA)
|
||||
user_he_cap_tlv->he_mac_cap[0] &=
|
||||
~HE_MAC_CAP_TWT_RESP_SUPPORT;
|
||||
else
|
||||
user_he_cap_tlv->he_mac_cap[0] &=
|
||||
~HE_MAC_CAP_TWT_REQ_SUPPORT;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (IS_FW_SUPPORT_6G(pmadapter)) {
|
||||
pmadapter->fw_bands |= BAND_6G;
|
||||
pmadapter->config_bands |= BAND_6G;
|
||||
for (i = 0; i < pmadapter->priv_num; i++) {
|
||||
if (pmadapter->priv[i]) {
|
||||
pmadapter->priv[i]->config_bands =
|
||||
pmadapter->config_bands;
|
||||
}
|
||||
}
|
||||
pmadapter->wifi_6g_scan_split = MTRUE;
|
||||
pmadapter->wifi_6g_scan_coloc_ap = MTRUE;
|
||||
}
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
|
@ -1825,12 +1400,6 @@ static mlan_status wlan_init_priv_fw(pmlan_adapter pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
else
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
#if defined(MFG_CMD_SUPPORT) && defined(PCIE)
|
||||
if (IS_PCIE(pmadapter->card_type) && pmadapter->mfg_mode) {
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
pmadapter->hw_status = WlanHardwareStatusReady;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
pmadapter->hw_status = WlanHardwareStatusReady;
|
||||
}
|
||||
|
|
@ -1849,9 +1418,6 @@ done:
|
|||
t_void wlan_free_adapter(pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_callbacks *pcb;
|
||||
#if defined(USB)
|
||||
t_s32 i = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
||||
if (!pmadapter) {
|
||||
|
|
@ -1861,14 +1427,6 @@ t_void wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
}
|
||||
|
||||
pcb = (mlan_callbacks *)&pmadapter->callbacks;
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type)) {
|
||||
/* Free ssu dma buffer just in case */
|
||||
wlan_free_ssu_pcie_buf(pmadapter);
|
||||
/* Free PCIE ring buffers */
|
||||
wlan_free_pcie_ring_buf(pmadapter);
|
||||
}
|
||||
#endif
|
||||
wlan_cancel_all_pending_cmd(pmadapter, MTRUE);
|
||||
/* Free command buffer */
|
||||
PRINTM(MINFO, "Free Command buffer\n");
|
||||
|
|
@ -1880,22 +1438,6 @@ t_void wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->pmlan_cmd_timer);
|
||||
pmadapter->cmd_timer_is_set = MFALSE;
|
||||
}
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_hold_timer_is_set) {
|
||||
/* Cancel usb_tx_aggregation timeout timer */
|
||||
pcb->moal_stop_timer(pmadapter->pmoal_handle,
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.paggr_hold_timer);
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_hold_timer_is_set = MFALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (pmadapter->wakeup_fw_timer_is_set) {
|
||||
/* Cancel wakeup card timer */
|
||||
pcb->moal_stop_timer(pmadapter->pmoal_handle,
|
||||
|
|
@ -1903,7 +1445,6 @@ t_void wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->wakeup_fw_timer_is_set = MFALSE;
|
||||
}
|
||||
wlan_free_fw_cfp_tables(pmadapter);
|
||||
wlan_free_fw_6g_cfp_tables(pmadapter);
|
||||
#ifdef STA_SUPPORT
|
||||
PRINTM(MINFO, "Free ScanTable\n");
|
||||
if (pmadapter->pscan_table) {
|
||||
|
|
@ -1937,7 +1478,6 @@ t_void wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
|
||||
wlan_11h_cleanup(pmadapter);
|
||||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
if (pmadapter->pcard_sd->mp_regs_buf) {
|
||||
pcb->moal_mfree(
|
||||
|
|
@ -1968,40 +1508,21 @@ t_void wlan_free_adapter(pmlan_adapter pmadapter)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
wlan_free_mlan_buffer(pmadapter, pmadapter->psleep_cfm);
|
||||
pmadapter->psleep_cfm = MNULL;
|
||||
|
||||
wlan_free_rnr_coloc_ap(pmadapter);
|
||||
|
||||
/* Free timers */
|
||||
wlan_free_timer(pmadapter);
|
||||
|
||||
/* Free lock variables */
|
||||
wlan_free_lock_list(pmadapter);
|
||||
|
||||
#ifdef SDIO
|
||||
if (pmadapter->pcard_sd) {
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_sd);
|
||||
pmadapter->pcard_sd = MNULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
if (pmadapter->pcard_pcie) {
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_pcie);
|
||||
pmadapter->pcard_pcie = MNULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef USB
|
||||
if (pmadapter->pcard_usb) {
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||
(t_u8 *)pmadapter->pcard_usb);
|
||||
pmadapter->pcard_usb = MNULL;
|
||||
}
|
||||
#endif
|
||||
vdll_deinit(pmadapter);
|
||||
|
||||
LEAVE();
|
||||
|
|
|
|||
1019
mlan/mlan_ioctl.h
1019
mlan/mlan_ioctl.h
File diff suppressed because it is too large
Load diff
|
|
@ -37,7 +37,6 @@ Change log:
|
|||
#include "mlan_wmm.h"
|
||||
#include "mlan_11n.h"
|
||||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
#include "mlan_11h.h"
|
||||
/********************************************************
|
||||
Local Constants
|
||||
|
|
@ -689,7 +688,7 @@ static int wlan_update_rsn_ie(mlan_private *pmpriv,
|
|||
t_u8 preference_selected;
|
||||
t_u8 cipher_selected_id;
|
||||
#if 0 // defined(ENABLE_GCMP_SUPPORT)
|
||||
// embedded supplicant doesn't support GCMP yet
|
||||
// embedded supplicant doesn't support GCMP yet
|
||||
t_u8 cipher_preference[11] = {0, 0, 1, 0, 2, 0, 0, 0, 4, 5, 3};
|
||||
#else
|
||||
t_u8 cipher_preference[5] = {0, 0, 1, 0, 2};
|
||||
|
|
@ -1079,9 +1078,7 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
MrvlIEtypes_HostMlme_t *host_mlme_tlv = MNULL;
|
||||
MrvlIEtypes_PrevBssid_t *prev_bssid_tlv = MNULL;
|
||||
t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = {0};
|
||||
MrvlIEtypes_MultiAp_t *multi_ap_tlv = MNULL;
|
||||
MrvlIETypes_VHTCap_t *pvhtcap = MNULL;
|
||||
MrvlIEtypes_He_cap_t *phecap = MNULL;
|
||||
MrvlIEtypesHeader_t *papInfo_tlv = MNULL;
|
||||
MrvlIEtypesHeader_t *pvendorOUI_tlv;
|
||||
t_u8 ie_len = 0;
|
||||
|
|
@ -1195,10 +1192,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
MLAN_AUTH_MODE_FT)
|
||||
pauth_tlv->auth_type =
|
||||
wlan_cpu_to_le16(AssocAgentAuth_FastBss_Skip);
|
||||
else if (pmpriv->sec_info.authentication_mode ==
|
||||
MLAN_AUTH_MODE_FILS)
|
||||
pauth_tlv->auth_type =
|
||||
wlan_cpu_to_le16(AssocAgentAuth_FILS);
|
||||
else if (pmpriv->sec_info.authentication_mode ==
|
||||
MLAN_AUTH_MODE_SAE)
|
||||
pauth_tlv->auth_type =
|
||||
|
|
@ -1261,11 +1254,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
|
||||
pchan_tlv->chan_scan_param[0].bandcfg.chanBand =
|
||||
wlan_band_to_radio_type(pbss_desc->bss_band);
|
||||
if (pbss_desc->bss_band == BAND_6G)
|
||||
pchan_tlv->chan_scan_param[0].bandcfg.chanWidth =
|
||||
wlan_get_6g_ap_bandconfig(
|
||||
pbss_desc,
|
||||
&pchan_tlv->chan_scan_param[0].bandcfg);
|
||||
PRINTM(MINFO, "Assoc: TLV Bandcfg = %x\n",
|
||||
pchan_tlv->chan_scan_param[0].bandcfg);
|
||||
pos += sizeof(pchan_tlv->header) + sizeof(ChanScanParamSet_t);
|
||||
|
|
@ -1497,19 +1485,11 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
wlan_11ac_bandconfig_allowed(pmpriv, pbss_desc->bss_band))
|
||||
wlan_cmd_append_11ac_tlv(pmpriv, pbss_desc, &pos);
|
||||
|
||||
if ((IS_FW_SUPPORT_11AX(pmadapter)) &&
|
||||
wlan_11ax_bandconfig_allowed(pmpriv, pbss_desc))
|
||||
wlan_cmd_append_11ax_tlv(pmpriv, pbss_desc, &pos);
|
||||
|
||||
if ((!pbss_desc->disable_11n) &&
|
||||
(ISSUPP_11NENABLED(pmadapter->fw_cap_info) ||
|
||||
ISSUPP_11ACENABLED(pmadapter->fw_cap_info) ||
|
||||
IS_FW_SUPPORT_11AX(pmadapter))) {
|
||||
ISSUPP_11ACENABLED(pmadapter->fw_cap_info))) {
|
||||
PRINTM(MCMND, "STBC NOT supported, Will be disabled\n");
|
||||
}
|
||||
if ((IS_FW_SUPPORT_6G(pmadapter)) &&
|
||||
wlan_116e_bandconfig_allowed(pmpriv, pbss_desc))
|
||||
wlan_cmd_append_116e_tlv(pmpriv, pbss_desc, &pos);
|
||||
|
||||
wlan_wmm_process_association_req(pmpriv, &pos, &pbss_desc->wmm_ie);
|
||||
if (pmpriv->sec_info.wapi_enabled && pmpriv->wapi_ie_len)
|
||||
|
|
@ -1551,18 +1531,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
pos += sizeof(prev_bssid_tlv->header) + MLAN_MAC_ADDR_LENGTH;
|
||||
}
|
||||
|
||||
if (pmpriv->multi_ap_flag) {
|
||||
multi_ap_tlv = (MrvlIEtypes_MultiAp_t *)pos;
|
||||
multi_ap_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_MULTI_AP);
|
||||
multi_ap_tlv->header.len = sizeof(multi_ap_tlv->flag);
|
||||
multi_ap_tlv->flag = pmpriv->multi_ap_flag;
|
||||
PRINTM(MINFO, " TLV multi_ap_flag : 0x%x\n",
|
||||
multi_ap_tlv->flag);
|
||||
pos += sizeof(multi_ap_tlv->header) + multi_ap_tlv->header.len;
|
||||
multi_ap_tlv->header.len =
|
||||
wlan_cpu_to_le16(sizeof(multi_ap_tlv->flag));
|
||||
}
|
||||
|
||||
if (wlan_11d_create_dnld_countryinfo(pmpriv, pbss_desc->bss_band)) {
|
||||
PRINTM(MERROR, "Dnld_countryinfo_11d failed\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
|
@ -1600,24 +1568,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
wlan_cpu_to_le16(pvhtcap->header.len);
|
||||
}
|
||||
|
||||
/* append AP he cap tlv */
|
||||
if (pbss_desc->phe_cap) {
|
||||
ie_len = sizeof(MrvlIEtypesHeader_t) +
|
||||
pbss_desc->phe_cap->ieee_hdr.len;
|
||||
papInfo_tlv->len += ie_len;
|
||||
phecap = (MrvlIEtypes_He_cap_t *)pos;
|
||||
phecap->type = wlan_cpu_to_le16(EXTENSION);
|
||||
phecap->len = pbss_desc->phe_cap->ieee_hdr.len;
|
||||
memcpy_ext(pmadapter,
|
||||
(t_u8 *)phecap + sizeof(MrvlIEtypesHeader_t),
|
||||
(t_u8 *)pbss_desc->phe_cap +
|
||||
sizeof(IEEEtypes_Header_t),
|
||||
pbss_desc->phe_cap->ieee_hdr.len,
|
||||
pbss_desc->phe_cap->ieee_hdr.len);
|
||||
pos += ie_len;
|
||||
phecap->len = wlan_cpu_to_le16(phecap->len);
|
||||
}
|
||||
|
||||
/* append AP vendor oui list tlv */
|
||||
if (pbss_desc->vendor_oui_count) {
|
||||
ie_len = sizeof(MrvlIEtypesHeader_t) +
|
||||
|
|
@ -1662,9 +1612,6 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
if (pmpriv->config_bands == BAND_B)
|
||||
SHORT_SLOT_TIME_DISABLED(tmp_cap);
|
||||
|
||||
if (pmpriv->adapter->pcard_info->support_11mc)
|
||||
RADIO_MEASUREMENT_ENABLED(tmp_cap);
|
||||
|
||||
tmp_cap &= CAPINFO_MASK;
|
||||
PRINTM(MINFO, "ASSOC_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n", tmp_cap,
|
||||
CAPINFO_MASK);
|
||||
|
|
@ -1889,7 +1836,6 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
|
||||
/* Send a Media Connected event, according to the Spec */
|
||||
pmpriv->media_connected = MTRUE;
|
||||
pmpriv->multi_ap_flag = 0;
|
||||
pmpriv->adapter->pps_uapsd_mode = MFALSE;
|
||||
pmpriv->adapter->tx_lock_flag = MFALSE;
|
||||
pmpriv->adapter->delay_null_pkt = MFALSE;
|
||||
|
|
@ -1988,15 +1934,6 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_8K;
|
||||
else
|
||||
pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_4K;
|
||||
} else if (pbss_desc->phe_6g_cap) {
|
||||
if (GET_6G_BAND_CAP_MAXMPDULEN(pbss_desc->phe_6g_cap->capa) ==
|
||||
2)
|
||||
pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_12K;
|
||||
else if (GET_6G_BAND_CAP_MAXMPDULEN(
|
||||
pbss_desc->phe_6g_cap->capa) == 1)
|
||||
pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_8K;
|
||||
else
|
||||
pmpriv->max_amsdu = MLAN_TX_DATA_BUF_SIZE_4K;
|
||||
}
|
||||
|
||||
wlan_save_curr_bcn(pmpriv);
|
||||
|
|
@ -2211,9 +2148,6 @@ t_u8 wlan_band_to_radio_type(t_u16 band)
|
|||
case BAND_A | BAND_AN | BAND_AAC:
|
||||
ret_radio_type = BAND_5GHZ;
|
||||
break;
|
||||
case BAND_6G:
|
||||
ret_radio_type = BAND_6GHZ;
|
||||
break;
|
||||
case BAND_B:
|
||||
case BAND_G:
|
||||
case BAND_B | BAND_G:
|
||||
|
|
|
|||
952
mlan/mlan_main.h
952
mlan/mlan_main.h
File diff suppressed because it is too large
Load diff
1530
mlan/mlan_misc.c
1530
mlan/mlan_misc.c
File diff suppressed because it is too large
Load diff
|
|
@ -29,19 +29,12 @@ Change log:
|
|||
#include <linux/module.h>
|
||||
#include "mlan_decl.h"
|
||||
#include "mlan_ioctl.h"
|
||||
#ifdef PCIE
|
||||
EXPORT_SYMBOL(mlan_process_pcie_interrupt_cb);
|
||||
#endif
|
||||
EXPORT_SYMBOL(mlan_register);
|
||||
EXPORT_SYMBOL(mlan_unregister);
|
||||
EXPORT_SYMBOL(mlan_init_fw);
|
||||
EXPORT_SYMBOL(mlan_set_init_param);
|
||||
EXPORT_SYMBOL(mlan_dnld_fw);
|
||||
EXPORT_SYMBOL(mlan_shutdown_fw);
|
||||
#ifdef USB
|
||||
EXPORT_SYMBOL(mlan_write_data_async_complete);
|
||||
EXPORT_SYMBOL(mlan_recv);
|
||||
#endif
|
||||
EXPORT_SYMBOL(mlan_send_packet);
|
||||
EXPORT_SYMBOL(mlan_ioctl);
|
||||
EXPORT_SYMBOL(mlan_set_driver_status);
|
||||
|
|
@ -49,18 +42,13 @@ EXPORT_SYMBOL(mlan_main_process);
|
|||
EXPORT_SYMBOL(mlan_rx_process);
|
||||
EXPORT_SYMBOL(mlan_select_wmm_queue);
|
||||
EXPORT_SYMBOL(mlan_process_deaggr_pkt);
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
EXPORT_SYMBOL(mlan_interrupt);
|
||||
#if defined(SYSKT)
|
||||
EXPORT_SYMBOL(mlan_hs_callback);
|
||||
#endif /* SYSKT_MULTI || SYSKT */
|
||||
#endif /* SDIO || PCIE */
|
||||
|
||||
EXPORT_SYMBOL(mlan_pm_wakeup_card);
|
||||
EXPORT_SYMBOL(mlan_is_main_process_running);
|
||||
#ifdef PCIE
|
||||
EXPORT_SYMBOL(mlan_set_int_mode);
|
||||
#endif
|
||||
EXPORT_SYMBOL(mlan_disable_host_int);
|
||||
EXPORT_SYMBOL(mlan_enable_host_int);
|
||||
|
||||
|
|
|
|||
2653
mlan/mlan_scan.c
2653
mlan/mlan_scan.c
File diff suppressed because it is too large
Load diff
601
mlan/mlan_sdio.c
601
mlan/mlan_sdio.c
|
|
@ -40,152 +40,7 @@ Change log:
|
|||
/********************************************************
|
||||
Local Variables
|
||||
********************************************************/
|
||||
#ifdef SD8887
|
||||
static const struct _mlan_sdio_card_reg mlan_reg_sd8887 = {
|
||||
.start_rd_port = 0,
|
||||
.start_wr_port = 0,
|
||||
.base_0_reg = 0x6C,
|
||||
.base_1_reg = 0x6D,
|
||||
.poll_reg = 0x5C,
|
||||
.host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK |
|
||||
CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK,
|
||||
.host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS |
|
||||
DN_LD_CMD_PORT_HOST_INT_STATUS |
|
||||
UP_LD_CMD_PORT_HOST_INT_STATUS,
|
||||
.status_reg_0 = 0x90,
|
||||
.status_reg_1 = 0x91,
|
||||
.sdio_int_mask = 0xff,
|
||||
.data_port_mask = 0xffffffff,
|
||||
.max_mp_regs = 196,
|
||||
.rd_bitmap_l = 0x10,
|
||||
.rd_bitmap_u = 0x11,
|
||||
.rd_bitmap_1l = 0x12,
|
||||
.rd_bitmap_1u = 0x13,
|
||||
.wr_bitmap_l = 0x14,
|
||||
.wr_bitmap_u = 0x15,
|
||||
.wr_bitmap_1l = 0x16,
|
||||
.wr_bitmap_1u = 0x17,
|
||||
.rd_len_p0_l = 0x18,
|
||||
.rd_len_p0_u = 0x19,
|
||||
.card_config_2_1_reg = 0xD9,
|
||||
.cmd_config_0 = 0xC4,
|
||||
.cmd_config_1 = 0xC5,
|
||||
.cmd_config_2 = 0xC6,
|
||||
.cmd_config_3 = 0xC7,
|
||||
.cmd_rd_len_0 = 0xC0,
|
||||
.cmd_rd_len_1 = 0xC1,
|
||||
.cmd_rd_len_2 = 0xC2,
|
||||
.cmd_rd_len_3 = 0xC3,
|
||||
.io_port_0_reg = 0xE4,
|
||||
.io_port_1_reg = 0xE5,
|
||||
.io_port_2_reg = 0xE6,
|
||||
.host_int_rsr_reg = 0x04,
|
||||
.host_int_mask_reg = 0x08,
|
||||
.host_int_status_reg = 0x0C,
|
||||
.host_restart_reg = 0x58,
|
||||
.card_to_host_event_reg = 0x5C,
|
||||
.host_interrupt_mask_reg = 0x60,
|
||||
.card_interrupt_status_reg = 0x64,
|
||||
.card_interrupt_rsr_reg = 0x68,
|
||||
.card_revision_reg = 0xC8,
|
||||
.card_ocr_0_reg = 0xD4,
|
||||
.card_ocr_1_reg = 0xD5,
|
||||
.card_ocr_3_reg = 0xD6,
|
||||
.card_config_reg = 0xD7,
|
||||
.card_misc_cfg_reg = 0xD8,
|
||||
.debug_0_reg = 0xDC,
|
||||
.debug_1_reg = 0xDD,
|
||||
.debug_2_reg = 0xDE,
|
||||
.debug_3_reg = 0xDF,
|
||||
.fw_reset_reg = 0x0B6,
|
||||
.fw_reset_val = 1,
|
||||
.winner_check_reg = 0x90,
|
||||
};
|
||||
|
||||
static const struct _mlan_card_info mlan_card_info_sd8887 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K,
|
||||
.v16_fw_api = 0,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_1X1,
|
||||
.support_11mc = 0,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD8897
|
||||
static const struct _mlan_sdio_card_reg mlan_reg_sd8897 = {
|
||||
.start_rd_port = 0,
|
||||
.start_wr_port = 0,
|
||||
.base_0_reg = 0x60,
|
||||
.base_1_reg = 0x61,
|
||||
.poll_reg = 0x50,
|
||||
.host_int_enable = UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK |
|
||||
CMD_PORT_UPLD_INT_MASK | CMD_PORT_DNLD_INT_MASK,
|
||||
.host_int_status = DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS |
|
||||
DN_LD_CMD_PORT_HOST_INT_STATUS |
|
||||
UP_LD_CMD_PORT_HOST_INT_STATUS,
|
||||
.status_reg_0 = 0xC0,
|
||||
.status_reg_1 = 0xC1,
|
||||
.sdio_int_mask = 0xff,
|
||||
.data_port_mask = 0xffffffff,
|
||||
.max_mp_regs = 184,
|
||||
.rd_bitmap_l = 0x04,
|
||||
.rd_bitmap_u = 0x05,
|
||||
.rd_bitmap_1l = 0x06,
|
||||
.rd_bitmap_1u = 0x07,
|
||||
.wr_bitmap_l = 0x08,
|
||||
.wr_bitmap_u = 0x09,
|
||||
.wr_bitmap_1l = 0x0A,
|
||||
.wr_bitmap_1u = 0x0B,
|
||||
.rd_len_p0_l = 0x0C,
|
||||
.rd_len_p0_u = 0x0D,
|
||||
.card_config_2_1_reg = 0xCD,
|
||||
.cmd_config_0 = 0xB8,
|
||||
.cmd_config_1 = 0xB9,
|
||||
.cmd_config_2 = 0xBA,
|
||||
.cmd_config_3 = 0xBB,
|
||||
.cmd_rd_len_0 = 0xB4,
|
||||
.cmd_rd_len_1 = 0xB5,
|
||||
.cmd_rd_len_2 = 0xB6,
|
||||
.cmd_rd_len_3 = 0xB7,
|
||||
.io_port_0_reg = 0xD8,
|
||||
.io_port_1_reg = 0xD9,
|
||||
.io_port_2_reg = 0xDA,
|
||||
.host_int_rsr_reg = 0x01,
|
||||
.host_int_mask_reg = 0x02,
|
||||
.host_int_status_reg = 0x03,
|
||||
.host_restart_reg = 0x4C,
|
||||
.card_to_host_event_reg = 0x50,
|
||||
.host_interrupt_mask_reg = 0x54,
|
||||
.card_interrupt_status_reg = 0x58,
|
||||
.card_interrupt_rsr_reg = 0x5C,
|
||||
.card_revision_reg = 0xBC,
|
||||
.card_ocr_0_reg = 0xC8,
|
||||
.card_ocr_1_reg = 0xC9,
|
||||
.card_ocr_3_reg = 0xCA,
|
||||
.card_config_reg = 0xCB,
|
||||
.card_misc_cfg_reg = 0xCC,
|
||||
.debug_0_reg = 0xD0,
|
||||
.debug_1_reg = 0xD1,
|
||||
.debug_2_reg = 0xD2,
|
||||
.debug_3_reg = 0xD3,
|
||||
.fw_reset_reg = 0x0E8,
|
||||
.fw_reset_val = 1,
|
||||
.winner_check_reg = 0xC0,
|
||||
};
|
||||
|
||||
static const struct _mlan_card_info mlan_card_info_sd8897 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 0,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
.support_11mc = 0,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(SD8977) || defined(SD8997) || defined(SD8987) || \
|
||||
defined(SD9098) || defined(SD9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(SD8978) || defined(SD9177) || \
|
||||
defined(SDIW610)
|
||||
static const struct _mlan_sdio_card_reg mlan_reg_sd8977_sd8997 = {
|
||||
.start_rd_port = 0,
|
||||
.start_wr_port = 0,
|
||||
|
|
@ -256,102 +111,13 @@ static const struct _mlan_sdio_card_reg mlan_reg_sd8977_sd8997 = {
|
|||
.fw_heart_beat_2_reg = 0xEC,
|
||||
.fw_sleep_state_reg = 0xF0,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD8997
|
||||
static const struct _mlan_card_info mlan_card_info_sd8997 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD9097
|
||||
static const struct _mlan_card_info mlan_card_info_sd9097 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SDIW624
|
||||
static const struct _mlan_card_info mlan_card_info_sdiw624 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SDAW693
|
||||
static const struct _mlan_card_info mlan_card_info_sdaw693 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD9098
|
||||
static const struct _mlan_card_info mlan_card_info_sd9098 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
static const struct _mlan_card_info mlan_card_info_sd9177 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_1X1,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SDIW610
|
||||
static const struct _mlan_card_info mlan_card_info_sdiw610 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_1X1,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(SD8977) || defined(SD8978)
|
||||
static const struct _mlan_card_info mlan_card_info_sd8977 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K,
|
||||
.v16_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_1X1,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD8987
|
||||
static const struct _mlan_card_info mlan_card_info_sd8987 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_2K,
|
||||
.v16_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_1X1,
|
||||
.support_11mc = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
|
|
@ -425,18 +191,6 @@ static mlan_status wlan_sdio_init_ioport(mlan_adapter *pmadapter)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(SD8977) || defined(SD8978)
|
||||
if (IS_SD8977(pmadapter->card_type) ||
|
||||
IS_SD8978(pmadapter->card_type)) {
|
||||
if ((pmadapter->init_para.int_mode == INT_MODE_GPIO) &&
|
||||
(pmadapter->init_para.gpio_pin == GPIO_INT_NEW_MODE)) {
|
||||
PRINTM(MMSG, "Enable GPIO-1 int mode\n");
|
||||
pcb->moal_write_reg(pmadapter->pmoal_handle,
|
||||
SCRATCH_REG_32,
|
||||
ENABLE_GPIO_1_INT_MODE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Set Host interrupt reset to read to clear */
|
||||
if (MLAN_STATUS_SUCCESS == pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
host_int_rsr_reg, ®)) {
|
||||
|
|
@ -660,118 +414,6 @@ static mlan_status wlan_sdio_read_fw_status(mlan_adapter *pmadapter, t_u16 *dat)
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function reads firmware dnld offset registers
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param dat A pointer to keep returned data
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_sdio_read_fw_dnld_offset(mlan_adapter *pmadapter,
|
||||
t_u32 *dat)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u32 fw_dnld_offset_0 = 0;
|
||||
t_u32 fw_dnld_offset_1 = 0;
|
||||
t_u32 fw_dnld_offset_2 = 0;
|
||||
t_u32 fw_dnld_offset_3 = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
reg->fw_dnld_offset_0_reg, &fw_dnld_offset_0);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Dev fw_dnld_offset_0 reg read failed: reg(0x%04X)=0x%x. Terminating download\n",
|
||||
reg->fw_dnld_offset_0_reg, fw_dnld_offset_0);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
ret = pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
reg->fw_dnld_offset_1_reg, &fw_dnld_offset_1);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Dev fw_dnld_offset_1 reg read failed: reg(0x%04X)=0x%x. Terminating download\n",
|
||||
reg->fw_dnld_offset_1_reg, fw_dnld_offset_1);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
ret = pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
reg->fw_dnld_offset_2_reg, &fw_dnld_offset_2);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Dev fw_dnld_offset_2 reg read failed: reg(0x%04X)=0x%x. Terminating download\n",
|
||||
reg->fw_dnld_offset_2_reg, fw_dnld_offset_2);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
ret = pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
reg->fw_dnld_offset_3_reg, &fw_dnld_offset_3);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Dev fw_dnld_offset_3 reg read failed: reg(0x%04X)=0x%x. Terminating download\n",
|
||||
reg->fw_dnld_offset_3_reg, fw_dnld_offset_3);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
*dat = (t_u32)(((fw_dnld_offset_3 & 0xff) << 24) |
|
||||
((fw_dnld_offset_2 & 0xff) << 16) |
|
||||
((fw_dnld_offset_1 & 0xff) << 8) |
|
||||
(fw_dnld_offset_0 & 0xff));
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function reads firmware dnld status registers
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param dat A pointer to keep returned data
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_sdio_read_fw_dnld_status(mlan_adapter *pmadapter,
|
||||
t_u16 *dat)
|
||||
{
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u32 fw_dnld_status_0 = 0;
|
||||
t_u32 fw_dnld_status_1 = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
reg->fw_dnld_status_0_reg, &fw_dnld_status_0);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Dev fw_dnld_status_0 reg read failed: reg(0x%04X)=0x%x. Terminating download\n",
|
||||
reg->fw_dnld_status_0_reg, fw_dnld_status_0);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
ret = pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
reg->fw_dnld_status_1_reg, &fw_dnld_status_1);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Dev fw_dnld_status_1 reg read failed: reg(0x%04X)=0x%x. Terminating download\n",
|
||||
reg->fw_dnld_status_1_reg, fw_dnld_status_1);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
*dat = (t_u16)(((fw_dnld_status_1 & 0xff) << 8) |
|
||||
(fw_dnld_status_0 & 0xff));
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** @brief This function disables the host interrupts mask.
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
|
|
@ -936,14 +578,6 @@ static mlan_status wlan_sdio_prog_fw_w_helper(pmlan_adapter pmadapter,
|
|||
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
||||
t_u32 read_base_0_reg = reg->base_0_reg;
|
||||
t_u32 read_base_1_reg = reg->base_1_reg;
|
||||
#if defined(SD9098)
|
||||
t_u32 rev_id_reg = 0;
|
||||
t_u32 revision_id = 0;
|
||||
#endif
|
||||
t_u8 check_fw_status = MFALSE;
|
||||
t_u16 fw_dnld_status = 0;
|
||||
t_u32 fw_dnld_offset = 0;
|
||||
t_u8 mic_retry = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -966,31 +600,6 @@ static mlan_status wlan_sdio_prog_fw_w_helper(pmlan_adapter pmadapter,
|
|||
}
|
||||
/* Ensure 8-byte aligned firmware buffer */
|
||||
fwbuf = (t_u8 *)ALIGN_ADDR(tmpfwbuf, DMA_ALIGNMENT);
|
||||
#if defined(SD9098)
|
||||
if (IS_SD9098(pmadapter->card_type)) {
|
||||
rev_id_reg = pmadapter->pcard_sd->reg->card_revision_reg;
|
||||
ret = pcb->moal_read_reg(pmadapter->pmoal_handle, rev_id_reg,
|
||||
&revision_id);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"Card Revision register read failed:"
|
||||
"card_revision_reg=0x%x\n",
|
||||
rev_id_reg);
|
||||
goto done;
|
||||
}
|
||||
/* Skyhawk A0, need to check both CRC and MIC error */
|
||||
if (revision_id >= CHIP_9098_REV_A0)
|
||||
check_fw_status = MTRUE;
|
||||
}
|
||||
#endif
|
||||
#if defined(SD9097) || defined(SD9177) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(SDIW610)
|
||||
if (IS_SD9097(pmadapter->card_type) ||
|
||||
IS_SDIW624(pmadapter->card_type) ||
|
||||
IS_SDAW693(pmadapter->card_type) ||
|
||||
IS_SDIW610(pmadapter->card_type) || IS_SD9177(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
|
||||
/* Perform firmware data transfer */
|
||||
do {
|
||||
|
|
@ -1061,31 +670,6 @@ static mlan_status wlan_sdio_prog_fw_w_helper(pmlan_adapter pmadapter,
|
|||
txlen = len;
|
||||
|
||||
if (len & MBIT(0)) {
|
||||
/* New fw download process, check CRC and MIC error */
|
||||
if (check_fw_status) {
|
||||
/* Get offset from fw dnld offset Register */
|
||||
ret = wlan_sdio_read_fw_dnld_offset(
|
||||
pmadapter, &fw_dnld_offset);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MFATAL,
|
||||
"WLAN: FW download with helper read fw dnld offset failed @ %d\n",
|
||||
offset);
|
||||
goto done;
|
||||
}
|
||||
/* Get CRC MIC error from fw dnld status
|
||||
* Register */
|
||||
ret = wlan_sdio_read_fw_dnld_status(
|
||||
pmadapter, &fw_dnld_status);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MFATAL,
|
||||
"WLAN: FW download with helper read fw dnld status failed @ %d\n",
|
||||
offset);
|
||||
goto done;
|
||||
}
|
||||
PRINTM(MERROR,
|
||||
"WLAN: FW download error: status=0x%x offset = 0x%x fw offset = 0x%x\n",
|
||||
fw_dnld_status, offset, fw_dnld_offset);
|
||||
}
|
||||
i++;
|
||||
if (i > MAX_WRITE_IOMEM_RETRY) {
|
||||
PRINTM(MFATAL,
|
||||
|
|
@ -1100,17 +684,6 @@ static mlan_status wlan_sdio_prog_fw_w_helper(pmlan_adapter pmadapter,
|
|||
" len = 0x%04X, txlen = %d\n",
|
||||
len, txlen);
|
||||
len &= ~MBIT(0);
|
||||
if (fw_dnld_status & (MBIT(6) | MBIT(7))) {
|
||||
offset = 0;
|
||||
mic_retry++;
|
||||
if (mic_retry > MAX_FW_RETRY) {
|
||||
PRINTM(MFATAL,
|
||||
"WLAN: FW download failure @ %d, over max mic retry count\n",
|
||||
offset);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
PRINTM(MERROR, "WLAN: retry: %d, offset %d\n", i,
|
||||
offset);
|
||||
DBG_HEXDUMP(MERROR, "WLAN: FW block:", fwbuf, len);
|
||||
|
|
@ -1207,8 +780,6 @@ static mlan_status wlan_decode_rx_packet(mlan_adapter *pmadapter,
|
|||
t_u8 *cmd_buf;
|
||||
t_u32 event;
|
||||
t_u32 offset = 0;
|
||||
t_u32 in_ts_sec, in_ts_usec;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -1251,43 +822,19 @@ static mlan_status wlan_decode_rx_packet(mlan_adapter *pmadapter,
|
|||
pmbuf->data_len = (pmadapter->upld_len - SDIO_INTF_HEADER_LEN);
|
||||
pmbuf->data_offset += SDIO_INTF_HEADER_LEN;
|
||||
if (pmadapter->rx_work_flag) {
|
||||
// rx_trace 5
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_tp_accounting(
|
||||
pmadapter->pmoal_handle, pmbuf,
|
||||
5 /*RX_DROP_P1*/);
|
||||
pcb->moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &in_ts_sec,
|
||||
&in_ts_usec);
|
||||
pmbuf->in_ts_sec = in_ts_sec;
|
||||
pmbuf->in_ts_usec = in_ts_usec;
|
||||
}
|
||||
if (pmadapter->tp_state_drop_point ==
|
||||
5 /*RX_DROP_P1*/) {
|
||||
pmadapter->ops.data_complete(
|
||||
pmadapter, pmbuf, MLAN_STATUS_SUCCESS);
|
||||
} else {
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
util_enqueue_list_tail(
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_data_queue,
|
||||
(pmlan_linked_list)pmbuf, MNULL, MNULL);
|
||||
pmadapter->rx_pkts_queued++;
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks
|
||||
.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle,
|
||||
1,
|
||||
pmadapter
|
||||
->rx_pkts_queued);
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
}
|
||||
pmadapter->rx_data_queue.plock);
|
||||
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_data_queue,
|
||||
(pmlan_linked_list)pmbuf, MNULL,
|
||||
MNULL);
|
||||
pmadapter->rx_pkts_queued++;
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
} else {
|
||||
wlan_handle_rx_packet(pmadapter, pmbuf);
|
||||
}
|
||||
|
|
@ -2170,7 +1717,6 @@ static mlan_status wlan_sdio_dnld_fw(pmlan_adapter pmadapter,
|
|||
/* Check if firmware is already running */
|
||||
ret = wlan_sdio_check_fw_status(pmadapter, poll_num);
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
#if defined(SDIO)
|
||||
if (pmfw->fw_reload == FW_RELOAD_SDIO_INBAND_RESET) {
|
||||
PRINTM(MMSG, "Try reset fw in mlan\n");
|
||||
ret = wlan_reset_fw(pmadapter);
|
||||
|
|
@ -2180,16 +1726,11 @@ static mlan_status wlan_sdio_dnld_fw(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
PRINTM(MMSG,
|
||||
"WLAN FW already running! Skip FW download\n");
|
||||
#if defined(SDIO)
|
||||
pmadapter->ops.wakeup_card(pmadapter, MFALSE);
|
||||
#endif
|
||||
goto done;
|
||||
#if defined(SDIO)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
poll_num = MAX_FIRMWARE_POLL_TRIES;
|
||||
/* Check if other interface is downloading */
|
||||
|
|
@ -2296,73 +1837,10 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_sd->mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX;
|
||||
|
||||
switch (card_type) {
|
||||
#ifdef SD8887
|
||||
case CARD_TYPE_SD8887:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8887;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd8887;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD8897
|
||||
case CARD_TYPE_SD8897:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8897;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd8897;
|
||||
break;
|
||||
#endif
|
||||
#if defined(SD8977) || defined(SD8978)
|
||||
case CARD_TYPE_SD8977:
|
||||
case CARD_TYPE_SD8978:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd8977;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD8997
|
||||
case CARD_TYPE_SD8997:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd8997;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD8987
|
||||
case CARD_TYPE_SD8987:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd8987;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD9098
|
||||
case CARD_TYPE_SD9098:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd9098;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD9097
|
||||
case CARD_TYPE_SD9097:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd9097;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SDIW624
|
||||
case CARD_TYPE_SDIW624:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sdiw624;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SDAW693
|
||||
case CARD_TYPE_SDAW693:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sdaw693;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SDIW610
|
||||
case CARD_TYPE_SDIW610:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sdiw610;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
case CARD_TYPE_SD9177:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sd9177;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
PRINTM(MERROR, "can't get right card type \n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
|
@ -2758,8 +2236,6 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter,
|
|||
if (pmadapter->data_sent &&
|
||||
(pmadapter->pcard_sd->mp_wr_bitmap &
|
||||
(1 << pmadapter->pcard_sd->curr_wr_port))) {
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 3, 0);
|
||||
PRINTM(MINFO, " <--- Tx DONE Interrupt --->\n");
|
||||
pmadapter->data_sent = MFALSE;
|
||||
}
|
||||
|
|
@ -2786,8 +2262,6 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter,
|
|||
|
||||
PRINTM(MINTR, "UPLD: rd_bitmap=0x%08x\n",
|
||||
pmadapter->pcard_sd->mp_rd_bitmap);
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 0, 0);
|
||||
|
||||
while (MTRUE) {
|
||||
ret = wlan_get_rd_port(pmadapter, &port);
|
||||
|
|
@ -2970,9 +2444,6 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if defined(SD9098) || defined(SD9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(SD9177) || defined(SD8997) || \
|
||||
defined(SD8987) || defined(SD8978) || defined(SDIW610)
|
||||
/**
|
||||
* @brief This function sends vdll data to the card.
|
||||
*
|
||||
|
|
@ -3016,7 +2487,6 @@ static mlan_status wlan_sdio_send_vdll(mlan_adapter *pmadapter,
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function sends data to the card.
|
||||
|
|
@ -3035,12 +2505,8 @@ static mlan_status wlan_sdio_host_to_card_ext(pmlan_private pmpriv, t_u8 type,
|
|||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
||||
#if defined(SD9098) || defined(SD9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(SD9177) || defined(SD8997) || \
|
||||
defined(SD8987) || defined(SD8978) || defined(SDIW610)
|
||||
if (type == MLAN_TYPE_VDLL)
|
||||
return wlan_sdio_send_vdll(pmadapter, pmbuf);
|
||||
#endif
|
||||
ret = wlan_sdio_host_to_card(pmadapter, type, pmbuf, tx_param);
|
||||
|
||||
if (type == MLAN_TYPE_DATA && ret == MLAN_STATUS_FAILURE)
|
||||
|
|
@ -3371,10 +2837,7 @@ static mlan_status wlan_pm_sdio_wakeup_card(pmlan_adapter pmadapter,
|
|||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
if (pmadapter->second_mac)
|
||||
PRINTM(MEVENT, "#2 Wakeup device...\n");
|
||||
else
|
||||
PRINTM(MEVENT, "Wakeup device...\n");
|
||||
PRINTM(MEVENT, "Wakeup device...\n");
|
||||
pmadapter->callbacks.moal_get_system_time(pmadapter->pmoal_handle,
|
||||
&pmadapter->pm_wakeup_in_secs,
|
||||
&age_ts_usec);
|
||||
|
|
@ -3638,49 +3101,13 @@ mlan_status wlan_reset_fw(pmlan_adapter pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#if defined(SD8997) || defined(SD8977) || defined(SD8987) || \
|
||||
defined(SD9098) || defined(SD9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(SD8978) || defined(SD9177) || \
|
||||
defined(SDIW610)
|
||||
if (MFALSE
|
||||
#ifdef SD8997
|
||||
|| IS_SD8997(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SD8977
|
||||
|| IS_SD8977(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SD8978
|
||||
|| IS_SD8978(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SD8987
|
||||
|| IS_SD8987(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SD9098
|
||||
|| IS_SD9098(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SD9097
|
||||
|| IS_SD9097(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SDIW624
|
||||
|| IS_SDIW624(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SDAW693
|
||||
|| IS_SDAW693(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SDIW610
|
||||
|| IS_SDIW610(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
|| IS_SD9177(pmadapter->card_type)
|
||||
#endif
|
||||
) {
|
||||
if (MFALSE || IS_SD8997(pmadapter->card_type)) {
|
||||
pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||
HOST_TO_CARD_EVENT_REG, &value);
|
||||
pcb->moal_write_reg(pmadapter->pmoal_handle,
|
||||
HOST_TO_CARD_EVENT_REG,
|
||||
value | HOST_POWER_UP);
|
||||
}
|
||||
#endif
|
||||
/* Poll register around 100 ms */
|
||||
for (tries = 0; tries < MAX_POLL_TRIES; ++tries) {
|
||||
pcb->moal_read_reg(pmadapter->pmoal_handle, reset_reg, &value);
|
||||
|
|
|
|||
672
mlan/mlan_shim.c
672
mlan/mlan_shim.c
|
|
@ -34,12 +34,7 @@ Change log:
|
|||
#include "mlan_fw.h"
|
||||
#include "mlan_main.h"
|
||||
#include "mlan_wmm.h"
|
||||
#ifdef SDIO
|
||||
#include "mlan_sdio.h"
|
||||
#endif /* SDIO */
|
||||
#ifdef PCIE
|
||||
#include "mlan_pcie.h"
|
||||
#endif /* PCIE */
|
||||
#ifdef UAP_SUPPORT
|
||||
#include "mlan_uap.h"
|
||||
#endif
|
||||
|
|
@ -126,17 +121,9 @@ mlan_status (*get_sys_time_callback)(t_pvoid pmoal_handle, t_pu32 psec,
|
|||
t_u32 mlan_drvdbg = DEFAULT_DEBUG_MASK;
|
||||
#endif
|
||||
|
||||
#ifdef USB
|
||||
extern mlan_status wlan_get_usb_device(pmlan_adapter pmadapter);
|
||||
#endif
|
||||
|
||||
static INLINE t_bool wlan_is_adma_supported(mlan_adapter *pmadapter)
|
||||
{
|
||||
t_bool is_adma_supported = 0;
|
||||
#if defined(PCIE)
|
||||
is_adma_supported = IS_PCIE(pmadapter->card_type) &&
|
||||
pmadapter->pcard_pcie->reg->use_adma;
|
||||
#endif
|
||||
|
||||
return is_adma_supported;
|
||||
}
|
||||
|
|
@ -302,14 +289,12 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
MASSERT(pcb->moal_recv_event);
|
||||
MASSERT(pcb->moal_ioctl_complete);
|
||||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type)) {
|
||||
MASSERT(pcb->moal_write_reg);
|
||||
MASSERT(pcb->moal_read_reg);
|
||||
MASSERT(pcb->moal_alloc_mlan_buffer);
|
||||
MASSERT(pcb->moal_free_mlan_buffer);
|
||||
}
|
||||
#endif
|
||||
MASSERT(pcb->moal_get_vdll_data);
|
||||
MASSERT(pcb->moal_write_data_sync);
|
||||
MASSERT(pcb->moal_read_data_sync);
|
||||
|
|
@ -331,7 +316,6 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
MASSERT(pcb->moal_updata_peer_signal);
|
||||
MASSERT(pcb->moal_do_div);
|
||||
|
||||
MASSERT(pcb->moal_get_host_time_ns);
|
||||
MASSERT(pcb->moal_unaligned_access.moal_read_u16);
|
||||
MASSERT(pcb->moal_unaligned_access.moal_read_u32);
|
||||
MASSERT(pcb->moal_unaligned_access.moal_write_u16);
|
||||
|
|
@ -340,8 +324,6 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
/* Save pmoal_handle */
|
||||
pmadapter->pmoal_handle = pmdevice->pmoal_handle;
|
||||
|
||||
pmadapter->feature_control = pmdevice->feature_control;
|
||||
|
||||
pmadapter->card_type = pmdevice->card_type;
|
||||
pmadapter->card_rev = pmdevice->card_rev;
|
||||
pmadapter->init_para.uap_max_sta = pmdevice->uap_max_sta;
|
||||
|
|
@ -350,15 +332,12 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
pmadapter->init_para.mcs32 = pmdevice->mcs32;
|
||||
pmadapter->init_para.antcfg = pmdevice->antcfg;
|
||||
pmadapter->init_para.reject_addba_req = pmdevice->reject_addba_req;
|
||||
pmadapter->init_para.dmcs = pmdevice->dmcs;
|
||||
pmadapter->init_para.pref_dbc = pmdevice->pref_dbc;
|
||||
|
||||
if (pmadapter->callbacks.moal_memcpy_ext == MNULL) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
PRINTM(MMSG,
|
||||
"Attach mlan adapter operations.card_type is 0x%x.\n",
|
||||
|
|
@ -395,62 +374,6 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
pmadapter->pcard_sd->sdio_rx_aggr_enable =
|
||||
pmdevice->sdio_rx_aggr_enable;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* By default BA timeout is supported unless FW reports it as not
|
||||
* supported in multi-client capabilites */
|
||||
pmadapter->tx_ba_timeout_support = 1;
|
||||
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type)) {
|
||||
MASSERT(pcb->moal_malloc_consistent);
|
||||
MASSERT(pcb->moal_mfree_consistent);
|
||||
MASSERT(pcb->moal_map_memory);
|
||||
MASSERT(pcb->moal_unmap_memory);
|
||||
PRINTM(MMSG,
|
||||
"Attach mlan adapter operations.card_type is 0x%x.\n",
|
||||
pmdevice->card_type);
|
||||
memcpy_ext(pmadapter, &pmadapter->ops, &mlan_pcie_ops,
|
||||
sizeof(mlan_adapter_operations),
|
||||
sizeof(mlan_adapter_operations));
|
||||
pmadapter->init_para.ring_size = pmdevice->ring_size;
|
||||
pmadapter->init_para.max_tx_pending = pmdevice->max_tx_pending;
|
||||
pmadapter->init_para.tx_budget = pmdevice->tx_budget;
|
||||
pmadapter->init_para.mclient_scheduling =
|
||||
pmdevice->mclient_scheduling;
|
||||
|
||||
ret = wlan_get_pcie_device(pmadapter);
|
||||
if (MLAN_STATUS_SUCCESS != ret) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
||||
pmadapter->init_para.copy_on_rx =
|
||||
pmdevice->copy_on_rx &&
|
||||
wlan_is_adma_supported(pmadapter);
|
||||
pmadapter->init_para.copy_on_tx =
|
||||
pmdevice->copy_on_tx &&
|
||||
wlan_is_adma_supported(pmadapter);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
MASSERT(pcb->moal_write_data_async);
|
||||
MASSERT(pcb->moal_recv_complete);
|
||||
PRINTM(MMSG,
|
||||
"Attach mlan adapter operations.card_type is 0x%x.\n",
|
||||
pmdevice->card_type);
|
||||
memcpy_ext(pmadapter, &pmadapter->ops, &mlan_usb_ops,
|
||||
sizeof(mlan_adapter_operations),
|
||||
sizeof(mlan_adapter_operations));
|
||||
ret = wlan_get_usb_device(pmadapter);
|
||||
if (MLAN_STATUS_SUCCESS != ret) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
mlan_drvdbg = pmdevice->drvdbg;
|
||||
|
|
@ -473,9 +396,8 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
#else
|
||||
pmadapter->init_para.cfg_11d = 0;
|
||||
#endif
|
||||
if (IS_DFS_SUPPORT(pmadapter->feature_control))
|
||||
pmadapter->init_para.dfs_master_radar_det_en =
|
||||
DFS_MASTER_RADAR_DETECT_EN;
|
||||
pmadapter->init_para.dfs_master_radar_det_en =
|
||||
DFS_MASTER_RADAR_DETECT_EN;
|
||||
pmadapter->init_para.dfs_slave_radar_det_en = DFS_SLAVE_RADAR_DETECT_EN;
|
||||
pmadapter->init_para.dev_cap_mask = pmdevice->dev_cap_mask;
|
||||
pmadapter->init_para.indrstcfg = pmdevice->indrstcfg;
|
||||
|
|
@ -486,8 +408,6 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
|
||||
pmadapter->multiple_dtim = pmdevice->multi_dtim;
|
||||
pmadapter->inact_tmo = pmdevice->inact_tmo;
|
||||
pmadapter->init_para.drcs_chantime_mode = pmdevice->drcs_chantime_mode;
|
||||
pmadapter->second_mac = pmdevice->second_mac;
|
||||
pmadapter->napi = pmdevice->napi;
|
||||
pmadapter->hs_wake_interval = pmdevice->hs_wake_interval;
|
||||
if (pmdevice->indication_gpio != 0xff) {
|
||||
|
|
@ -499,21 +419,9 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
pmadapter->level = 0;
|
||||
}
|
||||
}
|
||||
pmadapter->hs_mimo_switch = pmdevice->hs_mimo_switch;
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
pmadapter->tx_cmd_ep = pmdevice->tx_cmd_ep;
|
||||
pmadapter->rx_cmd_ep = pmdevice->rx_cmd_ep;
|
||||
pmadapter->tx_data_ep = pmdevice->tx_data_ep;
|
||||
pmadapter->rx_data_ep = pmdevice->rx_data_ep;
|
||||
pmadapter->usb_tx_ports[0] = pmdevice->tx_data_ep;
|
||||
pmadapter->usb_tx_ports[1] = pmdevice->tx_data2_ep;
|
||||
}
|
||||
#endif
|
||||
pmadapter->init_para.dfs53cfg = pmdevice->dfs53cfg;
|
||||
pmadapter->init_para.dfs_offload = pmdevice->dfs_offload;
|
||||
pmadapter->init_para.disable_11h_tpc = pmdevice->disable_11h_tpc;
|
||||
pmadapter->init_para.tpe_ie_ignore = pmdevice->tpe_ie_ignore;
|
||||
pmadapter->init_para.amsdu_disable = pmdevice->amsdu_disable;
|
||||
pmadapter->priv_num = 0;
|
||||
pmadapter->priv[0] = MNULL;
|
||||
|
|
@ -533,7 +441,7 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
|
||||
pmadapter->priv_num++;
|
||||
// memset of pmadapter->priv[0] will not nullify pmadapter->pcard_pcie
|
||||
// coverity[overwrite_var:SUPPRESS]
|
||||
// coverity[overwrite_var:SUPPRESS]
|
||||
memset(pmadapter, pmadapter->priv[0], 0, sizeof(mlan_private));
|
||||
|
||||
pmadapter->priv[0]->adapter = pmadapter;
|
||||
|
|
@ -725,7 +633,7 @@ mlan_status mlan_read_meta_data(mlan_adapter *pmadapter, pmlan_fw_image pmfw)
|
|||
if (memcmp(pmadapter, magic,
|
||||
(pmfw->pfw_buf + pmfw->fw_len) - META_MAGIC_OFFSET,
|
||||
META_MAGIC_LEN)) {
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
|
@ -835,9 +743,8 @@ mlan_status mlan_dnld_fw(t_void *padapter, pmlan_fw_image pmfw)
|
|||
ENTER();
|
||||
MASSERT(padapter);
|
||||
|
||||
if (!pmadapter->second_mac)
|
||||
if (mlan_read_meta_data(pmadapter, pmfw) != MLAN_STATUS_SUCCESS)
|
||||
return ret;
|
||||
if (mlan_read_meta_data(pmadapter, pmfw) != MLAN_STATUS_SUCCESS)
|
||||
return ret;
|
||||
|
||||
/* Download helper/firmware */
|
||||
if (pmfw) {
|
||||
|
|
@ -1052,24 +959,10 @@ mlan_status mlan_shutdown_fw(t_void *padapter)
|
|||
while ((pmbuf = (pmlan_buffer)util_dequeue_list(
|
||||
pmadapter->pmoal_handle, &pmadapter->rx_data_queue,
|
||||
pcb->moal_spin_lock, pcb->moal_spin_unlock))) {
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
pcb->moal_recv_complete(pmadapter->pmoal_handle, pmbuf,
|
||||
pmadapter->rx_data_ep,
|
||||
MLAN_STATUS_FAILURE);
|
||||
#endif
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
if (!IS_USB(pmadapter->card_type))
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
#endif
|
||||
}
|
||||
pmadapter->rx_pkts_queued = 0;
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type) &&
|
||||
wlan_set_drv_ready_reg(pmadapter, 0)) {
|
||||
PRINTM(MERROR, "Failed to write driver not-ready signature\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Notify completion */
|
||||
ret = wlan_shutdown_fw_complete(pmadapter);
|
||||
|
|
@ -1217,7 +1110,6 @@ mlan_status mlan_rx_process(t_void *padapter, t_u8 *rx_pkts)
|
|||
pmlan_buffer pmbuf;
|
||||
t_u8 limit = 0;
|
||||
t_u8 rx_num = 0;
|
||||
t_u32 in_ts_sec, in_ts_usec;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -1264,21 +1156,6 @@ rx_process_start:
|
|||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
|
||||
// rx_trace 6
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_tp_accounting(
|
||||
pmadapter->pmoal_handle, pmbuf,
|
||||
6 /*RX_DROP_P2*/);
|
||||
pcb->moal_get_system_time(pmadapter->pmoal_handle,
|
||||
&in_ts_sec, &in_ts_usec);
|
||||
pmbuf->extra_ts_sec = in_ts_sec;
|
||||
pmbuf->extra_ts_usec = in_ts_usec;
|
||||
}
|
||||
if (pmadapter->tp_state_drop_point == 6 /*RX_DROP_P2*/) {
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
goto rx_process_start;
|
||||
}
|
||||
|
||||
if (!IS_PCIE(pmadapter->card_type) &&
|
||||
pmadapter->delay_task_flag &&
|
||||
(pmadapter->rx_pkts_queued < LOW_RX_PENDING)) {
|
||||
|
|
@ -1286,17 +1163,6 @@ rx_process_start:
|
|||
pmadapter->delay_task_flag = MFALSE;
|
||||
mlan_queue_main_work(pmadapter);
|
||||
}
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type) &&
|
||||
pmadapter->delay_rx_data_flag &&
|
||||
(pmadapter->rx_pkts_queued < LOW_RX_PENDING)) {
|
||||
PRINTM(MEVENT, "Run\n");
|
||||
pmadapter->delay_rx_data_flag = MFALSE;
|
||||
wlan_recv_event(wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_RX_DATA, MNULL);
|
||||
}
|
||||
#endif
|
||||
pmadapter->ops.handle_rx_packet(pmadapter, pmbuf);
|
||||
if (limit && rx_num >= limit)
|
||||
break;
|
||||
|
|
@ -1320,65 +1186,6 @@ exit_rx_proc:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef PCIE
|
||||
/**
|
||||
* @brief Re-fill PMBUF at pending RDs of PCIE Rx Ring
|
||||
* @param padapter A pointer to mlan_adapter structure
|
||||
*
|
||||
*/
|
||||
static void mlan_refill_rx_ring(t_void *padapter)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||
mlan_buffer *pmbuf;
|
||||
t_u32 reattach_fail = 0;
|
||||
/* Get 1st Failure RD index */
|
||||
t_s32 refill_index =
|
||||
util_scalar_read(pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_refill_start_index,
|
||||
pmadapter->callbacks.moal_spin_lock,
|
||||
pmadapter->callbacks.moal_spin_unlock);
|
||||
while (refill_index != MLAN_INVALID_TXRX_INDEX_VAL) {
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
wlan_pcie_reattach_pmbuf(pmadapter, refill_index, &pmbuf)) {
|
||||
reattach_fail = 0;
|
||||
/* Update WR PTR after Reattach success */
|
||||
wlan_pcie_rx_ring_move_rdwrptr(pmadapter, refill_index,
|
||||
RX_WR_UPDATE);
|
||||
/*Re-fill till the Last (current) RD-index*/
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_refill_start_index.plock);
|
||||
if (refill_index == pmadapter->rx_refill_last_index) {
|
||||
util_scalar_write(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_refill_start_index,
|
||||
MLAN_INVALID_TXRX_INDEX_VAL, MNULL,
|
||||
MNULL);
|
||||
refill_index = MLAN_INVALID_TXRX_INDEX_VAL;
|
||||
} else {
|
||||
if (refill_index ==
|
||||
(pmadapter->pcard_pcie->txrx_bd_size - 1))
|
||||
refill_index = 0;
|
||||
else
|
||||
refill_index = (refill_index + 1);
|
||||
}
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_refill_start_index.plock);
|
||||
} else {
|
||||
/* need to exit, if we just loop here - in extreme OOM
|
||||
* case need to free CPU for other works. re-fill work
|
||||
* can continue on next main wq schedule.
|
||||
*/
|
||||
reattach_fail++;
|
||||
if (reattach_fail > 1500)
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief clean up txrx
|
||||
*
|
||||
|
|
@ -1451,11 +1258,8 @@ process_start:
|
|||
wlan_free_txrx(pmadapter);
|
||||
pmadapter->pending_clean = MFALSE;
|
||||
}
|
||||
#if defined(SDIO)
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
if (pmadapter->rx_pkts_queued > HIGH_RX_PENDING) {
|
||||
pcb->moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 2, 0);
|
||||
PRINTM(MEVENT, "Pause\n");
|
||||
pmadapter->delay_task_flag = MTRUE;
|
||||
mlan_queue_rx_work(pmadapter);
|
||||
|
|
@ -1470,37 +1274,11 @@ process_start:
|
|||
mlan_queue_rx_work(pmadapter);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type) &&
|
||||
pmadapter->pcie_cmd_dnld_int) {
|
||||
pmadapter->pcie_cmd_dnld_int = MFALSE;
|
||||
mlan_process_pcie_interrupt_cb(pmadapter, RX_CMD_DNLD);
|
||||
}
|
||||
if (IS_PCIE(pmadapter->card_type) &&
|
||||
pmadapter->pcie_event_int) {
|
||||
pmadapter->pcie_event_int = MFALSE;
|
||||
mlan_process_pcie_interrupt_cb(pmadapter, RX_EVENT);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* wake up timeout happened */
|
||||
if ((pmadapter->ps_state == PS_STATE_SLEEP) &&
|
||||
pmadapter->pm_wakeup_flag) {
|
||||
pmadapter->pm_wakeup_flag = MFALSE;
|
||||
#if defined(SD9098) || defined(SD9177) || defined(SDAW693) || defined(SDIW610)
|
||||
if (IS_SD9098(pmadapter->card_type) ||
|
||||
IS_SD9177(pmadapter->card_type) ||
|
||||
IS_SDAW693(pmadapter->card_type) ||
|
||||
IS_SDIW610(pmadapter->card_type)) {
|
||||
if (pmadapter->pm_wakeup_timeout == 2) {
|
||||
if (!pmadapter->ops
|
||||
.wakeup_timeout_recovery(
|
||||
pmadapter))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (pmadapter->pm_wakeup_timeout > 2) {
|
||||
PRINTM(MERROR, "Wakeup card timeout!\n");
|
||||
wlan_recv_event(
|
||||
|
|
@ -1601,24 +1379,10 @@ process_start:
|
|||
}
|
||||
|
||||
/* Check for event */
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_request_event_lock(pmadapter);
|
||||
#endif
|
||||
if (pmadapter->event_received) {
|
||||
pmadapter->event_received = MFALSE;
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_release_event_lock(pmadapter);
|
||||
#endif
|
||||
wlan_process_event(pmadapter);
|
||||
}
|
||||
#ifdef USB
|
||||
else {
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_release_event_lock(pmadapter);
|
||||
}
|
||||
#endif
|
||||
if (pmadapter->driver_status)
|
||||
continue;
|
||||
/* Check if we need to confirm Sleep Request received previously
|
||||
|
|
@ -1698,21 +1462,6 @@ process_start:
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type)) {
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
if (wlan_is_tx_pending(pmadapter)) {
|
||||
wlan_recv_event(
|
||||
wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DELAY_TX_COMPLETE,
|
||||
MNULL);
|
||||
}
|
||||
}
|
||||
/* Re-fill pending RDs of RxRing*/
|
||||
mlan_refill_rx_ring(pmadapter);
|
||||
}
|
||||
#endif
|
||||
} while (MTRUE);
|
||||
|
||||
|
|
@ -1736,77 +1485,6 @@ exit_main_proc:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function to check if llde pkt type matches to defined pkt filter and
|
||||
* mark those pkts
|
||||
*
|
||||
* @param padapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to mlan_buffer structure
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
static void mlan_check_llde_pkt_filter(mlan_adapter *pmadapter,
|
||||
pmlan_buffer pmbuf, t_u8 ip_protocol)
|
||||
{
|
||||
t_u8 matched_filter = 0;
|
||||
t_u8 i = 0;
|
||||
|
||||
if (!(pmadapter->llde_enabled &&
|
||||
(pmadapter->llde_mode == MLAN_11AXCMD_LLDE_MODE_EVENT_DRIVEN))) {
|
||||
return;
|
||||
}
|
||||
/* match iphone mac addr */
|
||||
if (pmadapter->llde_device_filter) {
|
||||
for (i = 0; i < pmadapter->llde_totalIPhones; i++) {
|
||||
if (memcmp(pmadapter,
|
||||
&pmadapter->llde_iphonefilters
|
||||
[i * MLAN_MAC_ADDR_LENGTH],
|
||||
(pmbuf->pbuf + pmbuf->data_offset),
|
||||
MLAN_MAC_ADDR_LENGTH) == 0) {
|
||||
matched_filter = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (matched_filter == 0) {
|
||||
/* check mac filter if iphone device filter not matched */
|
||||
for (i = 0; i < pmadapter->llde_totalMacFilters; i++) {
|
||||
if (memcmp(pmadapter,
|
||||
&pmadapter->llde_macfilters
|
||||
[i * MLAN_MAC_ADDR_LENGTH],
|
||||
(pmbuf->pbuf + pmbuf->data_offset),
|
||||
MLAN_MAC_ADDR_LENGTH) == 0) {
|
||||
matched_filter = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* device address is matched, check packet type to mark it as special
|
||||
* llde packet */
|
||||
if (matched_filter) {
|
||||
if ((pmadapter->llde_packet_type == LLDE_FILTER_PKT_ALL) ||
|
||||
((pmadapter->llde_packet_type & LLDE_FILTER_PKT_UDP) &&
|
||||
(ip_protocol == MLAN_IP_PROTOCOL_UDP))) {
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_LLDE_PKT_FILTER;
|
||||
} else if ((pmadapter->llde_packet_type &
|
||||
(LLDE_FILTER_PKT_TCP_ACK |
|
||||
LLDE_FILTER_PKT_TCP_DATA)) &&
|
||||
(ip_protocol == MLAN_IP_PROTOCOL_TCP)) {
|
||||
/*TODO: identify TCP ACK and Data packets and set the
|
||||
* MLAN_BUF_FLAG_LLDE_PKT_FILTER flag accordingly */
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_LLDE_PKT_FILTER;
|
||||
|
||||
} else if ((pmadapter->llde_packet_type &
|
||||
LLDE_FILTER_PKT_ICMP_PING) &&
|
||||
(ip_protocol == MLAN_IP_PROTOCOL_ICMP)) {
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_LLDE_PKT_FILTER;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function to send packet
|
||||
*
|
||||
|
|
@ -1856,17 +1534,7 @@ mlan_status mlan_send_packet(t_void *padapter, pmlan_buffer pmbuf)
|
|||
MLAN_IP_PROTOCOL_OFFSET));
|
||||
if (ip_protocol == MLAN_IP_PROTOCOL_ICMP) {
|
||||
pmbuf->priority = WMM_HIGHEST_PRIORITY;
|
||||
/** If LLDE Enabled, change the ICMP Prio to 6
|
||||
*/
|
||||
if (pmadapter->llde_enabled &&
|
||||
(pmadapter->llde_mode ==
|
||||
MLAN_11AXCMD_LLDE_MODE_EVENT_DRIVEN))
|
||||
pmbuf->priority =
|
||||
WMM_SECOND_HIGHEST_PRIORITY;
|
||||
}
|
||||
|
||||
mlan_check_llde_pkt_filter(pmadapter, pmbuf,
|
||||
ip_protocol);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1878,10 +1546,7 @@ mlan_status mlan_send_packet(t_void *padapter, pmlan_buffer pmbuf)
|
|||
*/
|
||||
|| (ip_protocol == MLAN_IP_PROTOCOL_ICMP) ||
|
||||
(eth_type == MLAN_ETHER_PKT_TYPE_TDLS_ACTION) ||
|
||||
(eth_type == MLAN_ETHER_PKT_TYPE_1905) ||
|
||||
(pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA)
|
||||
/* Adding the Ucast/Mcast pkt to bypass queue when flag is set*/
|
||||
|| (pmbuf->flags & MLAN_BUF_FLAG_MC_AGGR_PKT)
|
||||
|
||||
) {
|
||||
if (eth_type == MLAN_ETHER_PKT_TYPE_TDLS_ACTION) {
|
||||
|
|
@ -1900,29 +1565,10 @@ mlan_status mlan_send_packet(t_void *padapter, pmlan_buffer pmbuf)
|
|||
MAC2STR(pmbuf->pbuf + pmbuf->data_offset));
|
||||
}
|
||||
|
||||
if (eth_type == MLAN_ETHER_PKT_TYPE_1905) {
|
||||
pmbuf->priority = 7;
|
||||
PRINTM_NETINTF(MINFO, pmpriv);
|
||||
PRINTM(MINFO, "wlan: Send 1905.1a pkt type: 0x%04x\n",
|
||||
eth_type);
|
||||
}
|
||||
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks.moal_tp_accounting(
|
||||
pmadapter->pmoal_handle, pmbuf->pdesc, 2);
|
||||
if (pmadapter->tp_state_drop_point == 2)
|
||||
return 0;
|
||||
else
|
||||
wlan_add_buf_bypass_txqueue(pmadapter, pmbuf);
|
||||
wlan_add_buf_bypass_txqueue(pmadapter, pmbuf);
|
||||
} else {
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks.moal_tp_accounting(
|
||||
pmadapter->pmoal_handle, pmbuf->pdesc, 2);
|
||||
if (pmadapter->tp_state_drop_point == 2)
|
||||
return 0;
|
||||
else
|
||||
/* Transmit the packet*/
|
||||
wlan_wmm_add_buf_txqueue(pmadapter, pmbuf);
|
||||
/* Transmit the packet*/
|
||||
wlan_wmm_add_buf_txqueue(pmadapter, pmbuf);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
|
|
@ -1946,6 +1592,11 @@ mlan_status mlan_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
|
||||
ENTER();
|
||||
|
||||
if (pmadapter == MNULL) {
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (pioctl_req == MNULL) {
|
||||
PRINTM(MMSG, "set pending clean\n");
|
||||
pmadapter->pending_clean = MTRUE;
|
||||
|
|
@ -1958,199 +1609,6 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef USB
|
||||
/**
|
||||
* @brief Packet send completion callback
|
||||
*
|
||||
* @param padapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to mlan_buffer structure
|
||||
* @param port Data port
|
||||
* @param status Callback status
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status mlan_write_data_async_complete(t_void *padapter, pmlan_buffer pmbuf,
|
||||
t_u32 port, mlan_status status)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (port == pmadapter->tx_cmd_ep) {
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
PRINTM(MCMND, "mlan_write_data_async_complete: CMD\n");
|
||||
/* pmbuf was allocated by MLAN */
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
} else {
|
||||
pmadapter->data_sent = MFALSE;
|
||||
wlan_update_port_status(pmadapter, port, MFALSE);
|
||||
PRINTM(MDATA, "mlan_write_data_async_complete: DATA(%d)\n",
|
||||
port);
|
||||
ret = wlan_write_data_complete(pmadapter, pmbuf, status);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Packet receive handler
|
||||
*
|
||||
* @param padapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to mlan_buffer structure
|
||||
* @param port Data port
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or
|
||||
* MLAN_STATUS_PENDING
|
||||
*/
|
||||
mlan_status mlan_recv(t_void *padapter, pmlan_buffer pmbuf, t_u32 port)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_PENDING;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||
t_u8 *pbuf;
|
||||
t_u32 len, recv_type;
|
||||
t_u32 event_cause = 0;
|
||||
#ifdef DEBUG_LEVEL1
|
||||
t_u32 sec = 0, usec = 0;
|
||||
#endif
|
||||
t_u32 max_rx_data_size = MLAN_RX_DATA_BUF_SIZE;
|
||||
|
||||
ENTER();
|
||||
|
||||
MASSERT(padapter && pmbuf);
|
||||
|
||||
if (pmadapter->hs_activated == MTRUE)
|
||||
wlan_process_hs_config(pmadapter);
|
||||
pbuf = pmbuf->pbuf + pmbuf->data_offset;
|
||||
len = pmbuf->data_len;
|
||||
|
||||
MASSERT(len >= MLAN_TYPE_LEN);
|
||||
recv_type = read_u32_unaligned(pmadapter, pbuf);
|
||||
;
|
||||
recv_type = wlan_le32_to_cpu(recv_type);
|
||||
pbuf += MLAN_TYPE_LEN;
|
||||
len -= MLAN_TYPE_LEN;
|
||||
|
||||
if (port == pmadapter->rx_cmd_ep) {
|
||||
switch (recv_type) {
|
||||
case MLAN_USB_TYPE_CMD:
|
||||
PRINTM_GET_SYS_TIME(MCMND, &sec, &usec);
|
||||
PRINTM(MCMND, "mlan_recv: CMD (%lu.%06lu)\n", sec,
|
||||
usec);
|
||||
if (len > MRVDRV_SIZE_OF_CMD_BUFFER) {
|
||||
pmbuf->status_code = MLAN_ERROR_CMD_RESP_FAIL;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
PRINTM(MERROR, "mlan_recv: CMD too large\n");
|
||||
} else if (!pmadapter->curr_cmd) {
|
||||
if (pmadapter->ps_state == PS_STATE_SLEEP_CFM) {
|
||||
pmbuf->data_offset += MLAN_TYPE_LEN;
|
||||
pmbuf->data_len -= MLAN_TYPE_LEN;
|
||||
wlan_process_sleep_confirm_resp(
|
||||
pmadapter,
|
||||
pmbuf->pbuf +
|
||||
pmbuf->data_offset,
|
||||
pmbuf->data_len);
|
||||
pmbuf->flags |=
|
||||
MLAN_BUF_FLAG_SLEEPCFM_RESP;
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
} else {
|
||||
pmbuf->status_code =
|
||||
MLAN_ERROR_CMD_RESP_FAIL;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
PRINTM(MINFO, "mlan_recv: no curr_cmd\n");
|
||||
} else {
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
pmadapter->upld_len = len;
|
||||
pmbuf->data_offset += MLAN_TYPE_LEN;
|
||||
pmbuf->data_len -= MLAN_TYPE_LEN;
|
||||
pmadapter->curr_cmd->respbuf = pmbuf;
|
||||
pmadapter->cmd_resp_received = MTRUE;
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
}
|
||||
break;
|
||||
case MLAN_USB_TYPE_EVENT:
|
||||
MASSERT(len >= sizeof(t_u32));
|
||||
memmove(pmadapter, &event_cause, pbuf, sizeof(t_u32));
|
||||
pmadapter->event_cause = wlan_le32_to_cpu(event_cause);
|
||||
PRINTM_GET_SYS_TIME(MEVENT, &sec, &usec);
|
||||
PRINTM(MEVENT, "mlan_recv: EVENT 0x%x (%lu.%06lu)\n",
|
||||
pmadapter->event_cause, sec, usec);
|
||||
pbuf += sizeof(t_u32);
|
||||
len -= sizeof(t_u32);
|
||||
if ((len > 0) && (len < MAX_EVENT_SIZE))
|
||||
memmove(pmadapter, pmadapter->event_body, pbuf,
|
||||
len);
|
||||
wlan_request_event_lock(pmadapter);
|
||||
/* remove 4 byte recv_type */
|
||||
pmbuf->data_offset += MLAN_TYPE_LEN;
|
||||
pmbuf->data_len -= MLAN_TYPE_LEN;
|
||||
pmadapter->event_received = MTRUE;
|
||||
pmadapter->pmlan_buffer_event = pmbuf;
|
||||
wlan_release_event_lock(pmadapter);
|
||||
/* MOAL to call mlan_main_process for processing */
|
||||
break;
|
||||
default:
|
||||
pmbuf->status_code = MLAN_ERROR_PKT_INVALID;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
PRINTM(MERROR, "mlan_recv: unknown recv_type 0x%x\n",
|
||||
recv_type);
|
||||
break;
|
||||
}
|
||||
} else if (port == pmadapter->rx_data_ep) {
|
||||
PRINTM_GET_SYS_TIME(MDATA, &sec, &usec);
|
||||
PRINTM(MDATA, "mlan_recv: DATA (%lu.%06lu)\n", sec, usec);
|
||||
#if defined(USB)
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable) {
|
||||
max_rx_data_size = pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_max;
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl
|
||||
.aggr_mode == MLAN_USB_AGGR_MODE_NUM) {
|
||||
max_rx_data_size *=
|
||||
MAX(MLAN_USB_MAX_PKT_SIZE,
|
||||
pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align);
|
||||
max_rx_data_size = MAX(max_rx_data_size,
|
||||
MLAN_RX_DATA_BUF_SIZE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (len > max_rx_data_size) {
|
||||
pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
PRINTM(MERROR, "mlan_recv: DATA too large\n");
|
||||
} else {
|
||||
pmadapter->upld_len = len;
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &pmbuf->in_ts_sec,
|
||||
&pmbuf->in_ts_usec);
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_data_queue,
|
||||
(pmlan_linked_list)pmbuf, MNULL,
|
||||
MNULL);
|
||||
pmadapter->rx_pkts_queued++;
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
pmadapter->data_received = MTRUE;
|
||||
mlan_queue_rx_work(pmadapter);
|
||||
}
|
||||
} else {
|
||||
pmbuf->status_code = MLAN_ERROR_PKT_INVALID;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
PRINTM(MERROR, "mlan_recv: unknown port number 0x%x\n", port);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif /* USB */
|
||||
|
||||
/**
|
||||
* @brief Packet receive completion callback handler
|
||||
*
|
||||
|
|
@ -2255,7 +1713,6 @@ t_void mlan_set_driver_status(t_void *adapter, t_u8 driver_status)
|
|||
LEAVE();
|
||||
}
|
||||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/**
|
||||
* @brief This function gets interrupt status.
|
||||
* @param msg_id only used for PCIE
|
||||
|
|
@ -2275,7 +1732,6 @@ mlan_status mlan_interrupt(t_u16 msg_id, t_void *adapter)
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function wakeup firmware.
|
||||
|
|
@ -2321,103 +1777,3 @@ t_u8 mlan_is_main_process_running(t_void *adapter)
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef PCIE
|
||||
/**
|
||||
* @brief This function sets the PCIE interrupt mode.
|
||||
*
|
||||
* @param adapter A pointer to mlan_adapter structure
|
||||
* @param int_mode PCIE interrupt type active
|
||||
* @param func_num PCIE function num
|
||||
* @return N/A
|
||||
*/
|
||||
t_void mlan_set_int_mode(t_void *adapter, t_u32 int_mode, t_u8 func_num)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)adapter;
|
||||
ENTER();
|
||||
pmadapter->pcard_pcie->pcie_int_mode = int_mode;
|
||||
pmadapter->pcard_pcie->func_num = func_num;
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handle RX/EVENT/CMDRESP/TX_COMPLETE interrupt.
|
||||
*
|
||||
* @param adapter A pointer to mlan_adapter structure
|
||||
* @param type interrupt type
|
||||
* @return N/A
|
||||
*/
|
||||
void mlan_process_pcie_interrupt_cb(t_void *padapter, int type)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (type == RX_DATA) {
|
||||
if ((pmadapter->ps_state == PS_STATE_SLEEP) ||
|
||||
(pmadapter->ps_state == PS_STATE_SLEEP_CFM)) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
if (pmadapter->rx_pkts_queued > HIGH_RX_PENDING) {
|
||||
pcb->moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 2, 0);
|
||||
PRINTM(MEVENT, "Pause\n");
|
||||
pmadapter->delay_rx_data_flag = MTRUE;
|
||||
if (pmadapter->napi)
|
||||
mlan_queue_rx_work(pmadapter);
|
||||
else
|
||||
mlan_rx_process(pmadapter, MNULL);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
} else if (type == TX_COMPLETE && !wlan_is_tx_pending(pmadapter)) {
|
||||
LEAVE();
|
||||
return;
|
||||
} else if (type == RX_DATA_DELAY) {
|
||||
PRINTM(MEVENT, "Delay Rx DATA\n");
|
||||
pcb->moal_spin_lock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
pmadapter->pcard_pcie->rx_pending = MFALSE;
|
||||
pcb->moal_spin_unlock(pmadapter->pmoal_handle,
|
||||
pmadapter->pmlan_rx_lock);
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
pmadapter->ops.process_int_status(pmadapter, type);
|
||||
switch (type) {
|
||||
case RX_DATA: // Rx Data
|
||||
if (pmadapter->rx_pkts_queued) {
|
||||
if (pmadapter->napi)
|
||||
mlan_queue_rx_work(pmadapter);
|
||||
else
|
||||
mlan_rx_process(pmadapter, MNULL);
|
||||
}
|
||||
break;
|
||||
case TX_COMPLETE: // Tx data complete
|
||||
wlan_recv_event(wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL);
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
if (wlan_is_tx_pending(pmadapter))
|
||||
wlan_recv_event(
|
||||
wlan_get_priv(pmadapter,
|
||||
MLAN_BSS_ROLE_ANY),
|
||||
MLAN_EVENT_ID_DRV_DELAY_TX_COMPLETE,
|
||||
MNULL);
|
||||
}
|
||||
break;
|
||||
case RX_CMD_RESP: // Rx CMD Resp
|
||||
if (mlan_main_process(pmadapter) == MLAN_STATUS_FAILURE)
|
||||
PRINTM(MERROR, "mlan_main_process failed.\n");
|
||||
break;
|
||||
case RX_CMD_DNLD:
|
||||
case RX_EVENT:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,15 +35,9 @@
|
|||
#include "mlan_wmm.h"
|
||||
#include "mlan_11n.h"
|
||||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
#include "mlan_11h.h"
|
||||
#ifdef SDIO
|
||||
#include "mlan_sdio.h"
|
||||
#endif /* SDIO */
|
||||
#include "mlan_meas.h"
|
||||
#ifdef PCIE
|
||||
#include "mlan_pcie.h"
|
||||
#endif /* PCIE */
|
||||
|
||||
/********************************************************
|
||||
* Local Variables
|
||||
|
|
@ -276,19 +270,6 @@ static mlan_status wlan_cmd_802_11_snmp_mib(pmlan_private pmpriv,
|
|||
cmd->size += sizeof(t_u16);
|
||||
}
|
||||
break;
|
||||
case Ignore_tpe_i:
|
||||
psnmp_mib->oid = wlan_cpu_to_le16((t_u16)Ignore_tpe_i);
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
psnmp_mib->query_type =
|
||||
wlan_cpu_to_le16(HostCmd_ACT_GEN_SET);
|
||||
psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u16));
|
||||
ul_temp =
|
||||
read_u32_unaligned(pmpriv->adapter, pdata_buf);
|
||||
write_u16_unaligned(pmpriv->adapter, psnmp_mib->value,
|
||||
wlan_cpu_to_le16((t_u16)ul_temp));
|
||||
cmd->size += sizeof(t_u16);
|
||||
}
|
||||
break;
|
||||
case User_band_config_i:
|
||||
psnmp_mib->oid = wlan_cpu_to_le16((t_u16)User_band_config_i);
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
|
|
@ -905,7 +886,6 @@ static mlan_status wlan_cmd_802_11_hs_cfg(pmlan_private pmpriv,
|
|||
MrvlIEtypes_WakeupSourceGPIO_t *gpio_tlv = MNULL;
|
||||
MrvlIEtypes_MgmtFrameFilter_t *mgmt_filter_tlv = MNULL;
|
||||
MrvlIEtypes_WakeupExtend_t *ext_tlv = MNULL;
|
||||
MrvlIEtypes_HS_Antmode_t *antmode_tlv = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -1041,23 +1021,6 @@ static mlan_status wlan_cmd_802_11_hs_cfg(pmlan_private pmpriv,
|
|||
cmd->size += i * sizeof(mgmt_frame_filter) +
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
}
|
||||
if (pmadapter->hs_mimo_switch) {
|
||||
cmd->size += sizeof(MrvlIEtypes_HS_Antmode_t);
|
||||
antmode_tlv = (MrvlIEtypes_HS_Antmode_t *)tlv;
|
||||
antmode_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_HS_ANTMODE);
|
||||
antmode_tlv->header.len = wlan_cpu_to_le16(
|
||||
sizeof(MrvlIEtypes_HS_Antmode_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
antmode_tlv->txpath_antmode = ANTMODE_FW_DECISION;
|
||||
antmode_tlv->rxpath_antmode = ANTMODE_FW_DECISION;
|
||||
tlv += sizeof(MrvlIEtypes_HS_Antmode_t);
|
||||
PRINTM(MCMND, "hs_mimo_switch=%d\n",
|
||||
pmadapter->hs_mimo_switch);
|
||||
PRINTM(MCMND, "txpath_antmode=%d, rxpath_antmode=%d\n",
|
||||
antmode_tlv->txpath_antmode,
|
||||
antmode_tlv->rxpath_antmode);
|
||||
}
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
PRINTM(MCMND, "HS_CFG_CMD: condition:0x%x gpio:0x%x\n",
|
||||
phs_cfg->params.hs_config.conditions,
|
||||
|
|
@ -2067,8 +2030,6 @@ static mlan_status wlan_cmd_tdls_oper(pmlan_private pmpriv,
|
|||
MrvlIETypes_VHTCap_t *VHTcap_tlv = MNULL;
|
||||
MrvlIETypes_VHTOprat_t *VHTOper_tlv = MNULL;
|
||||
MrvlIETypes_AID_t *AidInfo = MNULL;
|
||||
MrvlIEtypes_Extension_t *hecap_tlv = MNULL;
|
||||
MrvlIEtypes_He_Op_t *heop_tlv = MNULL;
|
||||
MrvlIEtypes_TDLS_Idle_Timeout_t *TdlsIdleTimeout = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
|
@ -2328,70 +2289,6 @@ static mlan_status wlan_cmd_tdls_oper(pmlan_private pmpriv,
|
|||
(t_u8 *)VHTOper_tlv,
|
||||
sizeof(MrvlIETypes_VHTOprat_t));
|
||||
}
|
||||
/* Check if we need enable the 11AX */
|
||||
if (sta_ptr &&
|
||||
(sta_ptr->he_op.ieee_hdr.element_id == EXTENSION) &&
|
||||
(sta_ptr->he_op.ext_id == HE_OPERATION)) {
|
||||
/* HE Capability */
|
||||
hecap_tlv =
|
||||
(MrvlIEtypes_Extension_t *)(pos +
|
||||
travel_len);
|
||||
/* fill the peer HE CAP IE */
|
||||
memcpy_ext(pmpriv->adapter, &hecap_tlv->ext_id,
|
||||
&sta_ptr->tdls_he_cap.ext_id,
|
||||
sta_ptr->tdls_he_cap.ieee_hdr.len,
|
||||
sizeof(MrvlIEtypes_He_cap_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
hecap_tlv->type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_EXTENSION_ID);
|
||||
hecap_tlv->len = MIN(
|
||||
sta_ptr->tdls_he_cap.ieee_hdr.len,
|
||||
sizeof(MrvlIEtypes_He_cap_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
hecap_tlv->len =
|
||||
wlan_cpu_to_le16(hecap_tlv->len);
|
||||
#if 0
|
||||
wlan_fill_he_cap_tlv(pmpriv,
|
||||
pmpriv->config_bands,
|
||||
hecap_tlv, MFALSE);
|
||||
#endif
|
||||
|
||||
travel_len += wlan_le16_to_cpu(hecap_tlv->len) +
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
|
||||
DBG_HEXDUMP(
|
||||
MCMD_D,
|
||||
"TDLS Config Link: HE Capability",
|
||||
(t_u8 *)hecap_tlv,
|
||||
wlan_le16_to_cpu(hecap_tlv->len) +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
|
||||
/* HE Operation */
|
||||
heop_tlv = (MrvlIEtypes_He_Op_t *)(pos +
|
||||
travel_len);
|
||||
heop_tlv->header.type =
|
||||
wlan_cpu_to_le16(EXTENSION);
|
||||
heop_tlv->header.len = wlan_cpu_to_le16(
|
||||
sta_ptr->he_op.ieee_hdr.len);
|
||||
memcpy_ext(pmpriv->adapter, &heop_tlv->ext_id,
|
||||
&sta_ptr->he_op.ext_id,
|
||||
sta_ptr->he_op.ieee_hdr.len,
|
||||
sizeof(MrvlIEtypes_He_Op_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
heop_tlv->he_op_param1 = wlan_cpu_to_le16(
|
||||
heop_tlv->he_op_param1);
|
||||
heop_tlv->basic_he_mcs_nss = wlan_cpu_to_le16(
|
||||
heop_tlv->basic_he_mcs_nss);
|
||||
travel_len +=
|
||||
wlan_le16_to_cpu(heop_tlv->header.len) +
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
DBG_HEXDUMP(
|
||||
MCMD_D,
|
||||
"TDLS Config Link: HE Operation",
|
||||
(t_u8 *)heop_tlv,
|
||||
wlan_le16_to_cpu(heop_tlv->header.len) +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
}
|
||||
|
||||
TdlsIdleTimeout =
|
||||
(MrvlIEtypes_TDLS_Idle_Timeout_t *)(pos +
|
||||
|
|
@ -2741,84 +2638,6 @@ static mlan_status wlan_cmd_fw_auto_reconnect(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef USB
|
||||
/**
|
||||
* @brief This function prepares command of packet aggragation
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action the action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_cmd_packet_aggr_over_host_interface(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE *packet_aggr =
|
||||
&cmd->params.packet_aggr;
|
||||
MrvlIETypes_USBAggrParam_t *usb_aggr_param_tlv = MNULL;
|
||||
mlan_ds_misc_usb_aggr_ctrl *usb_aggr_ctrl =
|
||||
(mlan_ds_misc_usb_aggr_ctrl *)pdata_buf;
|
||||
t_u8 *ptlv_buffer = (t_u8 *)packet_aggr->tlv_buf;
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
|
||||
ENTER();
|
||||
|
||||
usb_aggr_param_tlv = (MrvlIETypes_USBAggrParam_t *)ptlv_buffer;
|
||||
|
||||
cmd->command =
|
||||
wlan_cpu_to_le16(HostCmd_CMD_PACKET_AGGR_OVER_HOST_INTERFACE);
|
||||
packet_aggr->action = wlan_cpu_to_le16(cmd_action);
|
||||
memset(pmadapter, usb_aggr_param_tlv, 0,
|
||||
MRVL_USB_AGGR_PARAM_TLV_LEN + sizeof(MrvlIEtypesHeader_t));
|
||||
usb_aggr_param_tlv->header.type =
|
||||
wlan_cpu_to_le16(NXP_USB_AGGR_PARAM_TLV_ID);
|
||||
usb_aggr_param_tlv->header.len =
|
||||
wlan_cpu_to_le16(MRVL_USB_AGGR_PARAM_TLV_LEN);
|
||||
cmd->size = wlan_cpu_to_le16(
|
||||
sizeof(HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE) + S_DS_GEN +
|
||||
MRVL_USB_AGGR_PARAM_TLV_LEN + sizeof(MrvlIEtypesHeader_t) - 1);
|
||||
|
||||
if (pmadapter->data_sent || (!wlan_bypass_tx_list_empty(pmadapter)) ||
|
||||
(!wlan_wmm_lists_empty(pmadapter))) {
|
||||
/* Make sure this is not issued during traffic */
|
||||
PRINTM(MERROR,
|
||||
"USB aggregation parameters cannot be accessed during traffic.\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
usb_aggr_param_tlv->enable = 0;
|
||||
if (!usb_aggr_ctrl) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (usb_aggr_ctrl->tx_aggr_ctrl.enable)
|
||||
usb_aggr_param_tlv->enable |= MBIT(1);
|
||||
usb_aggr_param_tlv->tx_aggr_align = wlan_cpu_to_le16(
|
||||
usb_aggr_ctrl->tx_aggr_ctrl.aggr_align);
|
||||
if (usb_aggr_ctrl->rx_deaggr_ctrl.enable)
|
||||
usb_aggr_param_tlv->enable |= MBIT(0);
|
||||
usb_aggr_param_tlv->rx_aggr_mode = wlan_cpu_to_le16(
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_mode);
|
||||
usb_aggr_param_tlv->rx_aggr_align = wlan_cpu_to_le16(
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_align);
|
||||
usb_aggr_param_tlv->rx_aggr_max = wlan_cpu_to_le16(
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_max);
|
||||
usb_aggr_param_tlv->rx_aggr_tmo = wlan_cpu_to_le16(
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_tmo);
|
||||
usb_aggr_param_tlv->enable =
|
||||
wlan_cpu_to_le16(usb_aggr_param_tlv->enable);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function prepares inactivity timeout command
|
||||
*
|
||||
|
|
@ -2864,145 +2683,6 @@ static mlan_status wlan_cmd_inactivity_timeout(HostCmd_DS_COMMAND *cmd,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function find 6g secondary twenty channel offset
|
||||
*
|
||||
* @param channel 6g channel number
|
||||
* @return 6g secondary twenty channel offset
|
||||
*/
|
||||
static t_u8 wlan_get_6g_second_channel_offset(int channel)
|
||||
{
|
||||
const struct center_freq_desc *freq_map = center_freq_idx_map_6g;
|
||||
t_u8 sec_chan_offset = 0;
|
||||
|
||||
for (; freq_map != MNULL; freq_map++) {
|
||||
if (!freq_map->pri_chan)
|
||||
break;
|
||||
|
||||
if (channel == freq_map->pri_chan) {
|
||||
if (channel < freq_map->ch_40)
|
||||
sec_chan_offset = SEC_CHAN_ABOVE;
|
||||
else
|
||||
sec_chan_offset = SEC_CHAN_BELOW;
|
||||
}
|
||||
}
|
||||
|
||||
return sec_chan_offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares network monitor command
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action the action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_cmd_net_monitor(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf)
|
||||
{
|
||||
mlan_ds_misc_net_monitor *net_mon;
|
||||
HostCmd_DS_802_11_NET_MONITOR *cmd_net_mon = &cmd->params.net_mon;
|
||||
ChanBandParamSet_t *pchan_band = MNULL;
|
||||
t_u32 bw_offset = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
net_mon = (mlan_ds_misc_net_monitor *)pdata_buf;
|
||||
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN +
|
||||
sizeof(HostCmd_DS_802_11_NET_MONITOR) +
|
||||
sizeof(ChanBandParamSet_t));
|
||||
cmd->command = wlan_cpu_to_le16(cmd->command);
|
||||
cmd_net_mon->action = wlan_cpu_to_le16(cmd_action);
|
||||
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
if (!net_mon) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (net_mon->enable_net_mon) {
|
||||
cmd_net_mon->enable_net_mon =
|
||||
wlan_cpu_to_le16((t_u16)NET_MON_MODE3);
|
||||
cmd_net_mon->filter_flag =
|
||||
wlan_cpu_to_le16((t_u16)net_mon->filter_flag);
|
||||
}
|
||||
|
||||
if (net_mon->enable_net_mon && net_mon->channel) {
|
||||
pchan_band =
|
||||
&cmd_net_mon->monitor_chan.chan_band_param[0];
|
||||
cmd_net_mon->monitor_chan.header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_CHANNELBANDLIST);
|
||||
cmd_net_mon->monitor_chan.header.len =
|
||||
wlan_cpu_to_le16(sizeof(ChanBandParamSet_t));
|
||||
pchan_band->chan_number = (t_u8)net_mon->channel;
|
||||
pchan_band->bandcfg.chanBand = (t_u8)net_mon->band;
|
||||
|
||||
bw_offset = net_mon->chan_bandwidth;
|
||||
if (bw_offset == CHANNEL_BW_40MHZ_ABOVE) {
|
||||
pchan_band->bandcfg.chan2Offset =
|
||||
SEC_CHAN_ABOVE;
|
||||
pchan_band->bandcfg.chanWidth = CHAN_BW_40MHZ;
|
||||
} else if (bw_offset == CHANNEL_BW_40MHZ_BELOW) {
|
||||
pchan_band->bandcfg.chan2Offset =
|
||||
SEC_CHAN_BELOW;
|
||||
pchan_band->bandcfg.chanWidth = CHAN_BW_40MHZ;
|
||||
} else if (net_mon->band == BAND_5GHZ &&
|
||||
bw_offset == CHANNEL_BW_80MHZ) {
|
||||
pchan_band->bandcfg.chan2Offset =
|
||||
wlan_get_second_channel_offset(
|
||||
pmpriv, net_mon->channel);
|
||||
pchan_band->bandcfg.chanWidth = CHAN_BW_80MHZ;
|
||||
} else if (net_mon->band == BAND_6GHZ &&
|
||||
bw_offset == CHANNEL_BW_80MHZ) {
|
||||
pchan_band->bandcfg.chan2Offset =
|
||||
wlan_get_6g_second_channel_offset(
|
||||
net_mon->channel);
|
||||
pchan_band->bandcfg.chanWidth = CHAN_BW_80MHZ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares Low Power Mode
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action the action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status wlan_cmd_low_pwr_mode(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_void *pdata_buf)
|
||||
{
|
||||
HostCmd_CONFIG_LOW_PWR_MODE *cmd_lpm_cfg =
|
||||
&cmd->params.low_pwr_mode_cfg;
|
||||
t_u8 *enable;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!pdata_buf) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
cmd->size = S_DS_GEN + sizeof(HostCmd_CONFIG_LOW_PWR_MODE);
|
||||
|
||||
enable = (t_u8 *)pdata_buf;
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
cmd->command = wlan_cpu_to_le16(cmd->command);
|
||||
cmd_lpm_cfg->enable = *enable;
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares DFS repeater mode configuration
|
||||
*
|
||||
|
|
@ -3677,8 +3357,6 @@ static mlan_status wlan_cmd_auto_tx(pmlan_private pmpriv,
|
|||
MrvlIEtypes_Keep_Alive_Ctrl_t *ctrl_tlv = MNULL;
|
||||
MrvlIEtypes_Keep_Alive_Pkt_t *pkt_tlv = MNULL;
|
||||
mlan_ds_misc_keep_alive *misc_keep_alive = MNULL;
|
||||
MrvlIEtypes_Cloud_Keep_Alive_Rx_t *keep_alive_Rx_tlv = MNULL;
|
||||
mlan_ds_misc_keep_alive_rx *misc_keep_alive_rx = MNULL;
|
||||
t_u8 eth_ip[] = {0x08, 0x00};
|
||||
|
||||
ENTER();
|
||||
|
|
@ -3777,50 +3455,6 @@ static mlan_status wlan_cmd_auto_tx(pmlan_private pmpriv,
|
|||
}
|
||||
keep_alive_tlv->header.len = wlan_cpu_to_le16(len);
|
||||
|
||||
cmd->size = cmd->size + len + sizeof(MrvlIEtypesHeader_t);
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
break;
|
||||
case OID_CLOUD_KEEP_ALIVE_ACK:
|
||||
misc_keep_alive_rx = (mlan_ds_misc_keep_alive_rx *)pdata_buf;
|
||||
if (!misc_keep_alive_rx) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
keep_alive_Rx_tlv = (MrvlIEtypes_Cloud_Keep_Alive_Rx_t *)pos;
|
||||
keep_alive_Rx_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_CLOUD_KEEP_ALIVE_ACK);
|
||||
keep_alive_Rx_tlv->keep_alive_id =
|
||||
misc_keep_alive_rx->mkeep_alive_id;
|
||||
keep_alive_Rx_tlv->enable = misc_keep_alive_rx->enable;
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
keep_alive_Rx_tlv->eth_header.dest_addr,
|
||||
misc_keep_alive_rx->dst_mac, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
keep_alive_Rx_tlv->eth_header.src_addr,
|
||||
misc_keep_alive_rx->src_mac, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
(t_u8 *)&keep_alive_Rx_tlv->eth_header.h803_len,
|
||||
eth_ip, sizeof(t_u16), sizeof(t_u16));
|
||||
if (misc_keep_alive_rx->ether_type)
|
||||
keep_alive_Rx_tlv->eth_header.h803_len =
|
||||
mlan_htons(misc_keep_alive_rx->ether_type);
|
||||
else
|
||||
memcpy_ext(
|
||||
pmpriv->adapter,
|
||||
(t_u8 *)&keep_alive_Rx_tlv->eth_header.h803_len,
|
||||
eth_ip, sizeof(t_u16), sizeof(t_u16));
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
(t_u8 *)&keep_alive_Rx_tlv->ip_packet,
|
||||
misc_keep_alive_rx->packet,
|
||||
misc_keep_alive_rx->pkt_len,
|
||||
MKEEP_ALIVE_ACK_PKT_MAX);
|
||||
|
||||
len = sizeof(MrvlIEtypes_Cloud_Keep_Alive_Rx_t) +
|
||||
misc_keep_alive_rx->pkt_len - sizeof(MrvlIEtypesHeader_t);
|
||||
keep_alive_Rx_tlv->header.len = wlan_cpu_to_le16(len);
|
||||
|
||||
cmd->size = cmd->size + len + sizeof(MrvlIEtypesHeader_t);
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
break;
|
||||
|
|
@ -3933,11 +3567,9 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_GET_HW_SPEC:
|
||||
ret = wlan_cmd_get_hw_spec(pmpriv, cmd_ptr);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
ret = wlan_cmd_sdio_rx_aggr_cfg(cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CFG_DATA:
|
||||
ret = wlan_cmd_cfg_data(pmpriv, cmd_ptr, cmd_action, cmd_oid,
|
||||
pdata_buf);
|
||||
|
|
@ -3981,19 +3613,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_802_11_fw_wakeup_method(pmpriv, cmd_ptr,
|
||||
cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_ROBUSTCOEX:
|
||||
ret = wlan_cmd_robustcoex(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_DMCS_CONFIG:
|
||||
ret = wlan_cmd_dmcs_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#if defined(PCIE)
|
||||
case HostCmd_CMD_SSU:
|
||||
ret = wlan_cmd_ssu(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CSI:
|
||||
ret = wlan_cmd_csi(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
|
|
@ -4041,14 +3660,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_802_11_link_statistic(pmpriv, cmd_ptr,
|
||||
cmd_action, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_FTM_CONFIG_SESSION_PARAMS:
|
||||
ret = wlan_cmd_802_11_ftm_config_session_params(
|
||||
pmpriv, cmd_ptr, cmd_action, cmd_oid, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_FTM_CONFIG_RESPONDER:
|
||||
ret = wlan_cmd_802_11_ftm_config_responder(
|
||||
pmpriv, cmd_ptr, cmd_action, cmd_oid, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RSSI_INFO:
|
||||
ret = wlan_cmd_802_11_rssi_info(pmpriv, cmd_ptr, cmd_action);
|
||||
break;
|
||||
|
|
@ -4248,12 +3859,10 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_GET_TSF:
|
||||
ret = wlan_cmd_get_tsf(pmpriv, cmd_ptr, cmd_action);
|
||||
break;
|
||||
#if defined(SDIO)
|
||||
case HostCmd_CMD_SDIO_GPIO_INT_CONFIG:
|
||||
ret = wlan_cmd_sdio_gpio_int(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_SET_BSS_MODE:
|
||||
cmd_ptr->command = wlan_cpu_to_le16(cmd_no);
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
|
@ -4268,28 +3877,10 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
sizeof(HostCmd_DS_SET_BSS_MODE) + S_DS_GEN);
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
break;
|
||||
case HostCmd_CMD_802_11_NET_MONITOR:
|
||||
ret = wlan_cmd_net_monitor(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MEASUREMENT_REQUEST:
|
||||
case HostCmd_CMD_MEASUREMENT_REPORT:
|
||||
ret = wlan_meas_cmd_process(pmpriv, cmd_ptr, pdata_buf);
|
||||
break;
|
||||
#if defined(PCIE)
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
case HostCmd_CMD_PCIE_HOST_BUF_DETAILS:
|
||||
ret = wlan_cmd_pcie_host_buf_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(PCIE)
|
||||
case HostCmd_CMD_PCIE_ADMA_INIT:
|
||||
ret = wlan_cmd_pcie_adma_init(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL:
|
||||
ret = wlan_cmd_remain_on_channel(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
|
@ -4319,30 +3910,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_reject_addba_req(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_PACKET_AGGR_CTRL:
|
||||
ret = wlan_cmd_packet_aggr_ctrl(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
#ifdef USB
|
||||
case HostCmd_CMD_PACKET_AGGR_OVER_HOST_INTERFACE:
|
||||
ret = wlan_cmd_packet_aggr_over_host_interface(
|
||||
pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_MULTI_CHAN_CONFIG:
|
||||
ret = wlan_cmd_multi_chan_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MULTI_CHAN_POLICY:
|
||||
ret = wlan_cmd_multi_chan_policy(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_DRCS_CONFIG:
|
||||
ret = wlan_cmd_drcs_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_CONFIG_LOW_POWER_MODE:
|
||||
ret = wlan_cmd_low_pwr_mode(pmpriv, cmd_ptr, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_DFS_REPEATER_MODE:
|
||||
ret = wlan_cmd_dfs_repeater_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
|
@ -4394,11 +3961,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_auto_tx(pmpriv, cmd_ptr, cmd_action, cmd_oid,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_TX_RX_PKT_STATS:
|
||||
ret = wlan_cmd_tx_rx_pkt_stats(pmpriv, cmd_ptr,
|
||||
(pmlan_ioctl_req)pioctl_buf,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_DYN_BW:
|
||||
ret = wlan_cmd_config_dyn_bw(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
|
@ -4411,19 +3973,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_fw_dump_event(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_11AX_CFG:
|
||||
ret = wlan_cmd_11ax_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_11AX_CMD:
|
||||
ret = wlan_cmd_11ax_cmd(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RANGE_EXT:
|
||||
ret = wlan_cmd_range_ext(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_TWT_CFG:
|
||||
ret = wlan_cmd_twt_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_cmd_gpio_tsf_latch(pmpriv, cmd_ptr, cmd_action,
|
||||
pioctl_buf, pdata_buf);
|
||||
|
|
@ -4486,10 +4035,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_MFG_COMMAND:
|
||||
ret = wlan_cmd_mfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MC_AGGR_CFG:
|
||||
ret = wlan_cmd_mc_aggr_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GET_CH_LOAD:
|
||||
ret = wlan_cmd_get_ch_load(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
|
@ -4498,10 +4043,6 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_cross_chip_synch(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_TSP_CFG:
|
||||
ret = wlan_cmd_tsp_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_TX_FRAME:
|
||||
ret = wlan_cmd_tx_frame(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
|
|
@ -4521,9 +4062,7 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_auth_assoc_timeout_cfg(pmpriv, cmd_ptr,
|
||||
cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_DS_GET_FOUNDRY_TYPE:
|
||||
ret = wlan_cmd_get_foundry_type(pmpriv, cmd_ptr, cmd_action);
|
||||
break;
|
||||
|
||||
default:
|
||||
PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include "mlan_wmm.h"
|
||||
#include "mlan_11n.h"
|
||||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
#include "mlan_11h.h"
|
||||
#include "mlan_meas.h"
|
||||
|
||||
|
|
@ -101,8 +100,7 @@ wlan_process_cmdreps_error_tdls_operation(mlan_private *pmpriv,
|
|||
if (ISSUPP_EXTCAP_TDLS_CHAN_SWITCH(
|
||||
sta_ptr->ExtCap.ext_cap))
|
||||
wlan_tdls_config(pmpriv, MFALSE);
|
||||
if (sta_ptr->is_11n_enabled ||
|
||||
sta_ptr->is_11ax_enabled) {
|
||||
if (sta_ptr->is_11n_enabled) {
|
||||
wlan_cleanup_reorder_tbl(
|
||||
pmpriv, ptdls_oper_data->peer_mac);
|
||||
wlan_11n_cleanup_txbastream_tbl(
|
||||
|
|
@ -151,9 +149,6 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
|||
HostCmd_DS_TDLS_CONFIG *ptdls_config_data =
|
||||
&(resp->params.tdls_config_data);
|
||||
|
||||
#if defined(USB)
|
||||
t_s32 i = 0;
|
||||
#endif
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
|
||||
ENTER();
|
||||
|
|
@ -235,26 +230,6 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
|||
wlan_process_cmdreps_error_tdls_operation(pmpriv, resp,
|
||||
pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_PACKET_AGGR_CTRL:
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++)
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.enable = MFALSE;
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable =
|
||||
MFALSE;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
#ifdef USB
|
||||
case HostCmd_CMD_PACKET_AGGR_OVER_HOST_INTERFACE:
|
||||
pmadapter->pcard_usb->fw_usb_aggr = MFALSE;
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++)
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i].aggr_ctrl.enable =
|
||||
MFALSE;
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable = MFALSE;
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_802_11_ASSOCIATE:
|
||||
if (resp->result == HostCmd_RESULT_BUSY)
|
||||
pmadapter->dbg.num_assoc_err++;
|
||||
|
|
@ -264,12 +239,10 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
|||
if (resp->result == HostCmd_RESULT_BUSY)
|
||||
pmadapter->dbg.num_remain_chan_err++;
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
pmadapter->pcard_sd->sdio_rx_aggr_enable = MFALSE;
|
||||
PRINTM(MMSG, "FW don't support SDIO single port rx aggr\n");
|
||||
break;
|
||||
#endif
|
||||
|
||||
case HostCmd_CMD_MGMT_IE_LIST: {
|
||||
HostCmd_DS_MGMT_IE_LIST_CFG *pmgmt_ie_list =
|
||||
|
|
@ -668,14 +641,6 @@ static mlan_status wlan_ret_802_11_snmp_mib(pmlan_private pmpriv,
|
|||
PRINTM(MCMND, "SNMP_RESP: Dot11h_disable_tpc_i =%u\n",
|
||||
ul_temp);
|
||||
}
|
||||
/* Update state for Tpe Ie Ignore */
|
||||
if (oid == Ignore_tpe_i) {
|
||||
/* Set tpe ie ignore to private */
|
||||
ul_temp = wlan_le16_to_cpu(read_u16_unaligned(
|
||||
pmpriv->adapter, psmib->value));
|
||||
PRINTM(MCMND, "SNMP_RESP: Ignore_tpe_i = %u\n",
|
||||
ul_temp);
|
||||
}
|
||||
}
|
||||
|
||||
if (oid == User_band_config_i) {
|
||||
|
|
@ -1853,8 +1818,7 @@ static mlan_status wlan_ret_tdls_config(pmlan_private pmpriv,
|
|||
sta_ptr = wlan_get_station_entry(
|
||||
pmpriv, tdls_all_cfg->u.tdls_tear_down.peer_mac_addr);
|
||||
if (sta_ptr) {
|
||||
if (sta_ptr->is_11n_enabled ||
|
||||
sta_ptr->is_11ax_enabled) {
|
||||
if (sta_ptr->is_11n_enabled) {
|
||||
wlan_cleanup_reorder_tbl(
|
||||
pmpriv, tdls_all_cfg->u.tdls_tear_down
|
||||
.peer_mac_addr);
|
||||
|
|
@ -2026,8 +1990,7 @@ static mlan_status wlan_ret_tdls_oper(pmlan_private pmpriv,
|
|||
if (ISSUPP_EXTCAP_TDLS_CHAN_SWITCH(
|
||||
sta_ptr->ExtCap.ext_cap))
|
||||
wlan_tdls_config(pmpriv, MFALSE);
|
||||
if (sta_ptr->is_11n_enabled ||
|
||||
sta_ptr->is_11ax_enabled) {
|
||||
if (sta_ptr->is_11n_enabled) {
|
||||
wlan_cleanup_reorder_tbl(pmpriv,
|
||||
ptdls_oper->peer_mac);
|
||||
wlan_11n_cleanup_txbastream_tbl(
|
||||
|
|
@ -2134,48 +2097,6 @@ static mlan_status wlan_ret_inactivity_timeout(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of
|
||||
* network monitor
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to command buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_ret_net_monitor(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
mlan_ds_misc_cfg *pmisc = MNULL;
|
||||
mlan_ds_misc_net_monitor *net_mon = MNULL;
|
||||
HostCmd_DS_802_11_NET_MONITOR *cmd_net_mon =
|
||||
(HostCmd_DS_802_11_NET_MONITOR *)&resp->params.net_mon;
|
||||
ChanBandParamSet_t *pchan_band = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_buf && (pioctl_buf->action == MLAN_ACT_GET)) {
|
||||
pmisc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
net_mon = &pmisc->param.net_mon;
|
||||
net_mon->enable_net_mon =
|
||||
wlan_le16_to_cpu(cmd_net_mon->enable_net_mon);
|
||||
net_mon->filter_flag =
|
||||
wlan_le16_to_cpu(cmd_net_mon->filter_flag);
|
||||
pchan_band = &cmd_net_mon->monitor_chan.chan_band_param[0];
|
||||
/* Band information in the TLV is bits[1:0] */
|
||||
net_mon->band = pchan_band->bandcfg.chanBand;
|
||||
net_mon->channel = pchan_band->chan_number;
|
||||
net_mon->chan_bandwidth =
|
||||
GET_SECONDARYCHAN(pchan_band->bandcfg.chan2Offset);
|
||||
}
|
||||
pmpriv->adapter->enable_net_mon =
|
||||
wlan_le16_to_cpu(cmd_net_mon->enable_net_mon);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of
|
||||
* subscribe event
|
||||
|
|
@ -2278,210 +2199,6 @@ static mlan_status wlan_ret_fw_auto_reconnect(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef USB
|
||||
/**
|
||||
* @brief This function handles the command response of
|
||||
* packet aggregation
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to command buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_ret_packet_aggr_over_host_interface(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE *packet_aggr =
|
||||
(HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE *)&resp->params
|
||||
.packet_aggr;
|
||||
MrvlIETypes_USBAggrParam_t *usb_aggr_param_tlv = MNULL;
|
||||
mlan_ds_misc_usb_aggr_ctrl *usb_aggr_ctrl = MNULL;
|
||||
MrvlIEtypesHeader_t *head = MNULL;
|
||||
t_u8 *ptlv_buffer = (t_u8 *)packet_aggr->tlv_buf;
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
int tlv_buf_len = 0;
|
||||
t_u8 changed = 0;
|
||||
#if defined(USB)
|
||||
t_s32 i = 0;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
tlv_buf_len =
|
||||
resp->size -
|
||||
(sizeof(HostCmd_DS_PACKET_AGGR_OVER_HOST_INTERFACE) + S_DS_GEN);
|
||||
|
||||
if (!pioctl_buf) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
while (tlv_buf_len >= sizeof(MrvlIEtypesHeader_t)) {
|
||||
head = (MrvlIEtypesHeader_t *)ptlv_buffer;
|
||||
head->len = wlan_le16_to_cpu(head->len);
|
||||
head->type = wlan_le16_to_cpu(head->type);
|
||||
changed = 0;
|
||||
if (sizeof(MrvlIEtypesHeader_t) + head->len > tlv_buf_len) {
|
||||
PRINTM(MERROR,
|
||||
"packet aggr: incorrect tlv, tlv_len=%d tlv_buf_len=%d\n",
|
||||
head->len, tlv_buf_len);
|
||||
break;
|
||||
}
|
||||
switch (head->type) {
|
||||
case NXP_USB_AGGR_PARAM_TLV_ID:
|
||||
usb_aggr_param_tlv =
|
||||
(MrvlIETypes_USBAggrParam_t *)ptlv_buffer;
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
usb_aggr_ctrl = (mlan_ds_misc_usb_aggr_ctrl *)&(
|
||||
misc->param.usb_aggr_params);
|
||||
usb_aggr_param_tlv->header.len = wlan_le16_to_cpu(
|
||||
usb_aggr_param_tlv->header.len);
|
||||
usb_aggr_param_tlv->enable =
|
||||
wlan_le16_to_cpu(usb_aggr_param_tlv->enable);
|
||||
#if defined(USB)
|
||||
if (pioctl_buf->action == MLAN_ACT_SET) {
|
||||
/* Update the Tx aggregation values in
|
||||
* MLAN */
|
||||
for (i = 0; i < MAX_USB_TX_PORT_NUM; i++) {
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.enable =
|
||||
usb_aggr_ctrl->tx_aggr_ctrl
|
||||
.enable;
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_mode !=
|
||||
usb_aggr_ctrl->tx_aggr_ctrl
|
||||
.aggr_mode) {
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_mode =
|
||||
usb_aggr_ctrl
|
||||
->tx_aggr_ctrl
|
||||
.aggr_mode;
|
||||
changed = 1;
|
||||
}
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_align !=
|
||||
usb_aggr_ctrl->tx_aggr_ctrl
|
||||
.aggr_align) {
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_align =
|
||||
usb_aggr_ctrl
|
||||
->tx_aggr_ctrl
|
||||
.aggr_align;
|
||||
changed = 1;
|
||||
}
|
||||
if (pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_max !=
|
||||
usb_aggr_ctrl->tx_aggr_ctrl
|
||||
.aggr_max) {
|
||||
pmadapter->pcard_usb
|
||||
->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_max =
|
||||
usb_aggr_ctrl
|
||||
->tx_aggr_ctrl
|
||||
.aggr_max;
|
||||
changed = 1;
|
||||
}
|
||||
pmadapter->pcard_usb->usb_tx_aggr[i]
|
||||
.aggr_ctrl.aggr_tmo =
|
||||
usb_aggr_ctrl->tx_aggr_ctrl
|
||||
.aggr_tmo;
|
||||
}
|
||||
} else {
|
||||
if (usb_aggr_param_tlv->enable & MBIT(1))
|
||||
usb_aggr_ctrl->tx_aggr_ctrl.enable =
|
||||
MTRUE;
|
||||
else
|
||||
usb_aggr_ctrl->tx_aggr_ctrl.enable =
|
||||
MFALSE;
|
||||
usb_aggr_ctrl->tx_aggr_ctrl
|
||||
.aggr_align = wlan_le16_to_cpu(
|
||||
usb_aggr_param_tlv->tx_aggr_align);
|
||||
usb_aggr_ctrl->tx_aggr_ctrl.aggr_mode =
|
||||
pmadapter->pcard_usb->usb_tx_aggr[0]
|
||||
.aggr_ctrl.aggr_mode;
|
||||
usb_aggr_ctrl->tx_aggr_ctrl.aggr_max =
|
||||
pmadapter->pcard_usb->usb_tx_aggr[0]
|
||||
.aggr_ctrl.aggr_max;
|
||||
usb_aggr_ctrl->tx_aggr_ctrl.aggr_tmo =
|
||||
pmadapter->pcard_usb->usb_tx_aggr[0]
|
||||
.aggr_ctrl.aggr_tmo;
|
||||
}
|
||||
if (changed)
|
||||
wlan_reset_usb_tx_aggr(pmadapter);
|
||||
#endif
|
||||
|
||||
#if defined(USB)
|
||||
if (pioctl_buf->action == MLAN_ACT_SET) {
|
||||
/* Update the Rx deaggregation values in
|
||||
* MLAN */
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl
|
||||
.enable =
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.enable;
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_mode !=
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_mode)
|
||||
pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_mode =
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl
|
||||
.aggr_mode;
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align !=
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_align)
|
||||
pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_align =
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl
|
||||
.aggr_align;
|
||||
if (pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_max !=
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_max)
|
||||
pmadapter->pcard_usb->usb_rx_deaggr
|
||||
.aggr_ctrl.aggr_max =
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl
|
||||
.aggr_max;
|
||||
pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl
|
||||
.aggr_tmo =
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_tmo;
|
||||
} else {
|
||||
if (usb_aggr_param_tlv->enable & MBIT(0))
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.enable =
|
||||
MTRUE;
|
||||
else
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.enable =
|
||||
MFALSE;
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl
|
||||
.aggr_mode = wlan_le16_to_cpu(
|
||||
usb_aggr_param_tlv->rx_aggr_mode);
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl
|
||||
.aggr_align = wlan_le16_to_cpu(
|
||||
usb_aggr_param_tlv->rx_aggr_align);
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_max =
|
||||
wlan_le16_to_cpu(
|
||||
usb_aggr_param_tlv->rx_aggr_max);
|
||||
usb_aggr_ctrl->rx_deaggr_ctrl.aggr_tmo =
|
||||
wlan_le16_to_cpu(
|
||||
usb_aggr_param_tlv->rx_aggr_tmo);
|
||||
}
|
||||
#endif
|
||||
ptlv_buffer += usb_aggr_param_tlv->header.len +
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
tlv_buf_len -= (usb_aggr_param_tlv->header.len +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of
|
||||
* DFS Repeater mode configuration
|
||||
|
|
@ -2751,8 +2468,6 @@ static mlan_status wlan_ret_auto_tx(pmlan_private pmpriv,
|
|||
MrvlIEtypes_Cloud_Keep_Alive_t *keep_alive_tlv = MNULL;
|
||||
MrvlIEtypes_Keep_Alive_Pkt_t *pkt_tlv = MNULL;
|
||||
mlan_ds_misc_keep_alive *misc_keep_alive = MNULL;
|
||||
MrvlIEtypes_Cloud_Keep_Alive_Rx_t *keep_alive_Rx_tlv = MNULL;
|
||||
mlan_ds_misc_keep_alive_rx *misc_keep_alive_rx = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -2829,65 +2544,6 @@ static mlan_status wlan_ret_auto_tx(pmlan_private pmpriv,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (header->type == TLV_TYPE_CLOUD_KEEP_ALIVE_ACK) {
|
||||
keep_alive_Rx_tlv =
|
||||
(MrvlIEtypes_Cloud_Keep_Alive_Rx_t *)
|
||||
cmdrsp_auto_tx->tlv_buffer;
|
||||
misc_keep_alive_rx = (mlan_ds_misc_keep_alive_rx *)&misc
|
||||
->param.keep_alive_rx;
|
||||
misc_keep_alive_rx->mkeep_alive_id =
|
||||
keep_alive_Rx_tlv->keep_alive_id;
|
||||
misc_keep_alive_rx->enable = keep_alive_Rx_tlv->enable;
|
||||
if (((action == HostCmd_ACT_GEN_SET) ||
|
||||
(action == HostCmd_ACT_GEN_RESET)) &&
|
||||
!keep_alive_Rx_tlv->enable) {
|
||||
len = len -
|
||||
sizeof(keep_alive_Rx_tlv->keep_alive_id) -
|
||||
sizeof(keep_alive_Rx_tlv->enable);
|
||||
if (len > sizeof(MrvlIEtypesHeader_t)) {
|
||||
header = (MrvlIEtypesHeader_t *)
|
||||
keep_alive_Rx_tlv;
|
||||
header->type =
|
||||
wlan_le16_to_cpu(header->type);
|
||||
len = wlan_le16_to_cpu(header->len) -
|
||||
sizeof(Eth803Hdr_t);
|
||||
if (header->type ==
|
||||
TLV_TYPE_CLOUD_KEEP_ALIVE_ACK) {
|
||||
memcpy_ext(
|
||||
pmpriv->adapter,
|
||||
misc_keep_alive_rx
|
||||
->dst_mac,
|
||||
keep_alive_Rx_tlv
|
||||
->eth_header
|
||||
.dest_addr,
|
||||
MLAN_MAC_ADDR_LENGTH,
|
||||
sizeof(misc_keep_alive_rx
|
||||
->dst_mac));
|
||||
memcpy_ext(
|
||||
pmpriv->adapter,
|
||||
misc_keep_alive_rx
|
||||
->src_mac,
|
||||
keep_alive_Rx_tlv
|
||||
->eth_header
|
||||
.src_addr,
|
||||
MLAN_MAC_ADDR_LENGTH,
|
||||
sizeof(misc_keep_alive
|
||||
->src_mac));
|
||||
memcpy_ext(
|
||||
pmpriv->adapter,
|
||||
misc_keep_alive_rx
|
||||
->packet,
|
||||
keep_alive_Rx_tlv
|
||||
->ip_packet,
|
||||
len,
|
||||
sizeof(misc_keep_alive_rx
|
||||
->packet));
|
||||
misc_keep_alive_rx->pkt_len =
|
||||
len;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
|
|
@ -3230,39 +2886,6 @@ cmd_mfg_done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of TWT_REPORT
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to command buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_ret_twt_report(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
mlan_ds_misc_cfg *misc_cfg = MNULL;
|
||||
HostCmd_DS_TWT_CFG *twt_recfg = &resp->params.twtcfg;
|
||||
|
||||
ENTER();
|
||||
|
||||
if ((wlan_le16_to_cpu(twt_recfg->action) == HostCmd_ACT_GEN_GET) &&
|
||||
(wlan_le16_to_cpu(twt_recfg->sub_id) ==
|
||||
MLAN_11AX_TWT_REPORT_SUBID)) {
|
||||
if (pioctl_buf) {
|
||||
misc_cfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
&misc_cfg->param.twt_report_info,
|
||||
&resp->params.twtcfg.param.twt_report,
|
||||
sizeof(mlan_ds_twt_report),
|
||||
sizeof(mlan_ds_twt_report));
|
||||
}
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of auth assoc timeout cfg
|
||||
*
|
||||
|
|
@ -3323,9 +2946,7 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
mlan_ioctl_req *pioctl_buf = (mlan_ioctl_req *)pioctl;
|
||||
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
#ifdef SDIO
|
||||
int ctr;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -3340,11 +2961,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_GET_HW_SPEC:
|
||||
ret = wlan_ret_get_hw_spec(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
|
||||
ret = wlan_ret_sdio_rx_aggr_cfg(pmpriv, resp);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CFG_DATA:
|
||||
ret = wlan_ret_cfg_data(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
|
@ -3401,20 +3020,6 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_802_11_FW_WAKE_METHOD:
|
||||
ret = wlan_ret_fw_wakeup_method(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_ROBUSTCOEX:
|
||||
break;
|
||||
case HostCmd_CMD_DMCS_CONFIG:
|
||||
ret = wlan_ret_dmcs_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#if defined(PCIE)
|
||||
case HostCmd_CMD_SSU:
|
||||
PRINTM(MCMND,
|
||||
"SSU cmdresp:number_of_buffers %d, buffer_size %d rec_len %d\n",
|
||||
resp->params.ssu_params.number_of_buffers,
|
||||
resp->params.ssu_params.buffer_size,
|
||||
resp->params.ssu_params.rec_len);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CSI:
|
||||
if (resp->params.csi_params.action == CSI_CMD_ENABLE) {
|
||||
pmadapter->csi_enabled = 1;
|
||||
|
|
@ -3437,14 +3042,6 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_802_11_LINK_STATS:
|
||||
ret = wlan_ret_get_link_statistic(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_FTM_CONFIG_SESSION_PARAMS:
|
||||
ret = wlan_ret_802_11_ftm_config_session_params(pmpriv, resp,
|
||||
pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_FTM_CONFIG_RESPONDER:
|
||||
ret = wlan_ret_802_11_ftm_config_responder(pmpriv, resp,
|
||||
pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RSSI_INFO_EXT:
|
||||
ret = wlan_ret_802_11_rssi_info_ext(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
|
@ -3480,9 +3077,6 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
break;
|
||||
case HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG:
|
||||
break;
|
||||
case HostCmd_CMD_DS_GET_FOUNDRY_TYPE:
|
||||
ret = wlan_ret_foundry_type(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_SUPPLICANT_PMK:
|
||||
ret = wlan_ret_802_11_supplicant_pmk(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
|
@ -3512,14 +3106,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
break;
|
||||
case HostCmd_CMD_RECONFIGURE_TX_BUFF:
|
||||
wlan_set_tx_pause_flag(pmpriv, MFALSE);
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type))
|
||||
wlan_resync_usb_port(pmadapter);
|
||||
#endif
|
||||
|
||||
pmadapter->tx_buf_size =
|
||||
(t_u16)wlan_le16_to_cpu(resp->params.tx_buf.buff_size);
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
pmadapter->tx_buf_size =
|
||||
(pmadapter->tx_buf_size /
|
||||
|
|
@ -3549,7 +3138,6 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
resp->params.tx_buf.mp_end_port),
|
||||
pmadapter->pcard_sd->mp_data_port_mask);
|
||||
}
|
||||
#endif
|
||||
pmadapter->curr_tx_buf_size = pmadapter->tx_buf_size;
|
||||
PRINTM(MCMND, "max_tx_buf_size=%d, tx_buf_size=%d\n",
|
||||
pmadapter->max_tx_buf_size, pmadapter->tx_buf_size);
|
||||
|
|
@ -3634,32 +3222,14 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_INACTIVITY_TIMEOUT_EXT:
|
||||
ret = wlan_ret_inactivity_timeout(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#if defined(SDIO)
|
||||
case HostCmd_CMD_SDIO_GPIO_INT_CONFIG:
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_SET_BSS_MODE:
|
||||
break;
|
||||
case HostCmd_CMD_MEASUREMENT_REQUEST:
|
||||
case HostCmd_CMD_MEASUREMENT_REPORT:
|
||||
ret = wlan_meas_cmdresp_process(pmpriv, resp);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_NET_MONITOR:
|
||||
ret = wlan_ret_net_monitor(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#if defined(PCIE)
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
case HostCmd_CMD_PCIE_HOST_BUF_DETAILS:
|
||||
PRINTM(MINFO, "PCIE host buffer configuration successful.\n");
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(PCIE)
|
||||
case HostCmd_CMD_PCIE_ADMA_INIT:
|
||||
PRINTM(MINFO, "PCIE ADMA init successful.\n");
|
||||
wlan_pcie_init_fw(pmpriv->adapter);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL:
|
||||
ret = wlan_ret_remain_on_channel(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
|
@ -3683,26 +3253,6 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_REJECT_ADDBA_REQ:
|
||||
ret = wlan_ret_reject_addba_req(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_PACKET_AGGR_CTRL:
|
||||
ret = wlan_ret_packet_aggr_ctrl(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#ifdef USB
|
||||
case HostCmd_CMD_PACKET_AGGR_OVER_HOST_INTERFACE:
|
||||
ret = wlan_ret_packet_aggr_over_host_interface(pmpriv, resp,
|
||||
pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_MULTI_CHAN_CONFIG:
|
||||
ret = wlan_ret_multi_chan_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MULTI_CHAN_POLICY:
|
||||
ret = wlan_ret_multi_chan_policy(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_DRCS_CONFIG:
|
||||
ret = wlan_ret_drcs_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_CONFIG_LOW_POWER_MODE:
|
||||
break;
|
||||
case HostCmd_CMD_DFS_REPEATER_MODE:
|
||||
ret = wlan_ret_dfs_repeater_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
|
@ -3743,27 +3293,12 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_AUTO_TX:
|
||||
ret = wlan_ret_auto_tx(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_TX_RX_PKT_STATS:
|
||||
ret = wlan_ret_tx_rx_pkt_stats(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_DYN_BW:
|
||||
ret = wlan_ret_dyn_bw(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_BOOT_SLEEP:
|
||||
ret = wlan_ret_boot_sleep(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_11AX_CFG:
|
||||
ret = wlan_ret_11ax_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_11AX_CMD:
|
||||
ret = wlan_ret_11ax_cmd(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RANGE_EXT:
|
||||
ret = wlan_ret_range_ext(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_TWT_CFG:
|
||||
ret = wlan_ret_twt_report(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_ret_gpio_tsf_latch(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
|
@ -3820,18 +3355,12 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_MFG_COMMAND:
|
||||
ret = wlan_ret_mfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MC_AGGR_CFG:
|
||||
ret = wlan_ret_mc_aggr_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GET_CH_LOAD:
|
||||
ret = wlan_ret_ch_load(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_CROSS_CHIP_SYNCH:
|
||||
ret = wlan_ret_cross_chip_synch(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_TSP_CFG:
|
||||
ret = wlan_ret_tsp_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_TX_FRAME:
|
||||
break;
|
||||
case HostCmd_CMD_EDMAC_CFG:
|
||||
|
|
|
|||
|
|
@ -33,9 +33,6 @@ Change log:
|
|||
#include "mlan_wmm.h"
|
||||
#include "mlan_11n.h"
|
||||
#include "mlan_11h.h"
|
||||
#ifdef PCIE
|
||||
#include "mlan_pcie.h"
|
||||
#endif /* PCIE */
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
|
|
@ -136,8 +133,7 @@ static void wlan_parse_tdls_event(pmlan_private priv, pmlan_buffer pevent)
|
|||
}
|
||||
}
|
||||
for (i = 0; i < MAX_NUM_TID; i++) {
|
||||
if (sta_ptr->is_11n_enabled ||
|
||||
sta_ptr->is_11ax_enabled)
|
||||
if (sta_ptr->is_11n_enabled)
|
||||
sta_ptr->ampdu_sta[i] =
|
||||
priv->aggr_prio_tbl[i]
|
||||
.ampdu_user;
|
||||
|
|
@ -214,8 +210,7 @@ static void wlan_parse_tdls_event(pmlan_private priv, pmlan_buffer pevent)
|
|||
wlan_restore_tdls_packets(priv,
|
||||
tdls_event->peer_mac_addr,
|
||||
TDLS_TEAR_DOWN);
|
||||
if (sta_ptr->is_11n_enabled ||
|
||||
sta_ptr->is_11ax_enabled) {
|
||||
if (sta_ptr->is_11n_enabled) {
|
||||
wlan_cleanup_reorder_tbl(
|
||||
priv, tdls_event->peer_mac_addr);
|
||||
wlan_11n_cleanup_txbastream_tbl(
|
||||
|
|
@ -334,75 +329,6 @@ static void wlan_send_tdls_tear_down_request(pmlan_private priv)
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function will handle the generic NAN event for further wlan
|
||||
* action based on the Event subtypes
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private
|
||||
* @param evt_buf A pointer to mlan_event
|
||||
* @param pmbuf A pointer to mlan buffer
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void wlan_process_nan_event(pmlan_private pmpriv, pmlan_buffer pmbuf)
|
||||
{
|
||||
t_u8 *evt_buf = MNULL;
|
||||
mlan_event *pevent;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
event_nan_generic *nan_event =
|
||||
(event_nan_generic *)(pmbuf->pbuf + pmbuf->data_offset +
|
||||
sizeof(mlan_event_id));
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = pcb->moal_malloc(pmadapter->pmoal_handle, MAX_EVENT_SIZE,
|
||||
MLAN_MEM_DEF, &evt_buf);
|
||||
if (ret != MLAN_STATUS_SUCCESS || !evt_buf) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
pevent = (pmlan_event)evt_buf;
|
||||
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
if (wlan_le16_to_cpu(nan_event->event_sub_type) ==
|
||||
NAN_EVT_SUBTYPE_SD_EVENT ||
|
||||
wlan_le16_to_cpu(nan_event->event_sub_type) ==
|
||||
NAN_EVT_SUBTYPE_SDF_TX_DONE) {
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU;
|
||||
pevent->event_len = pmbuf->data_len;
|
||||
memcpy_ext(pmadapter, (t_u8 *)pevent->event_buf,
|
||||
pmbuf->pbuf + pmbuf->data_offset, pevent->event_len,
|
||||
pevent->event_len);
|
||||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf);
|
||||
} else {
|
||||
t_u8 test_mac[MLAN_MAC_ADDR_LENGTH] = {0x00, 0x11, 0x22,
|
||||
0x33, 0x44, 0x55};
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_CONNECTED;
|
||||
pevent->event_len = MLAN_MAC_ADDR_LENGTH;
|
||||
memcpy_ext(pmpriv->adapter, (t_u8 *)pevent->event_buf, test_mac,
|
||||
MLAN_MAC_ADDR_LENGTH, pevent->event_len);
|
||||
wlan_ralist_add(pmpriv, test_mac);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
pmpriv->curr_bss_params.bss_descriptor.mac_address,
|
||||
test_mac, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_CONNECTED, pevent);
|
||||
if (pmpriv->port_ctrl_mode == MTRUE)
|
||||
pmpriv->port_open = MTRUE;
|
||||
pmpriv->media_connected = MTRUE;
|
||||
PRINTM_NETINTF(MEVENT, pmpriv);
|
||||
PRINTM(MEVENT, "nan interface - opened\n");
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle, evt_buf);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
|
@ -471,7 +397,6 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
priv->rxpd_rate_info = 0;
|
||||
priv->max_amsdu = 0;
|
||||
priv->amsdu_disable = MFALSE;
|
||||
priv->multi_ap_flag = 0;
|
||||
wlan_coex_ampdu_rxwinsize(pmadapter);
|
||||
|
||||
priv->sec_info.ewpa_enabled = MFALSE;
|
||||
|
|
@ -728,12 +653,9 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
mlan_event *pevent = MNULL;
|
||||
t_u8 addr[MLAN_MAC_ADDR_LENGTH];
|
||||
Event_WLS_FTM_t *event_ftm = MNULL;
|
||||
chan_band_info *pchan_band_info = MNULL;
|
||||
t_u8 radar_chan;
|
||||
t_u8 bandwidth;
|
||||
chan_band_reginfo_t *psta_info = MNULL;
|
||||
chan_band_reginfo_t *psta_reg_info = MNULL;
|
||||
t_u16 enable = 0;
|
||||
Event_Link_Lost *link_lost_evt = MNULL;
|
||||
remain_on_channel_info *roc_info = MNULL;
|
||||
|
|
@ -883,10 +805,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
|
||||
case EVENT_PS_SLEEP:
|
||||
PRINTM(MINFO, "EVENT: SLEEP\n");
|
||||
if (pmadapter->second_mac)
|
||||
PRINTM(MEVENT, "__");
|
||||
else
|
||||
PRINTM(MEVENT, "_");
|
||||
PRINTM(MEVENT, "_");
|
||||
|
||||
/* Handle unexpected PS SLEEP event */
|
||||
if (pmadapter->ps_state == PS_STATE_SLEEP_CFM)
|
||||
|
|
@ -898,10 +817,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
|
||||
case EVENT_PS_AWAKE:
|
||||
PRINTM(MINFO, "EVENT: AWAKE\n");
|
||||
if (pmadapter->second_mac)
|
||||
PRINTM(MEVENT, "||");
|
||||
else
|
||||
PRINTM(MEVENT, "|");
|
||||
PRINTM(MEVENT, "|");
|
||||
if (!pmadapter->pps_uapsd_mode && pmpriv->media_connected &&
|
||||
(pmpriv->port_open || !pmpriv->port_ctrl_mode) &&
|
||||
pmadapter->sleep_period.period) {
|
||||
|
|
@ -915,12 +831,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
if (pmadapter->pps_uapsd_mode && pmadapter->gen_null_pkt) {
|
||||
if (MTRUE ==
|
||||
wlan_check_last_packet_indication(pmpriv)) {
|
||||
if (!pmadapter->data_sent
|
||||
#if defined(USB)
|
||||
&& wlan_is_port_ready(pmadapter,
|
||||
pmpriv->port_index)
|
||||
#endif
|
||||
) {
|
||||
if (!pmadapter->data_sent) {
|
||||
if (wlan_send_null_packet(
|
||||
pmpriv,
|
||||
MRVDRV_TxPD_POWER_MGMT_NULL_PACKET |
|
||||
|
|
@ -1390,10 +1301,6 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
eventcause, pevt_dat[0] + 1, pevt_dat[1] + 1,
|
||||
pevt_dat[2], pevt_dat[3]);
|
||||
} break;
|
||||
case EVENT_MULTI_CHAN_INFO:
|
||||
PRINTM(MEVENT, "EVENT: MULTI_CHAN_INFO\n");
|
||||
wlan_handle_event_multi_chan_info(pmpriv, pmbuf);
|
||||
break;
|
||||
|
||||
case EVENT_FW_DUMP_INFO:
|
||||
PRINTM(MINFO, "EVENT: Dump FW info\n");
|
||||
|
|
@ -1428,47 +1335,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
PRINTM(MEVENT, "EVENT: BT coex wlan param update\n");
|
||||
wlan_bt_coex_wlan_param_update_event(pmpriv, pmbuf);
|
||||
break;
|
||||
case EVENT_NAN_GENERIC:
|
||||
PRINTM(MEVENT, "EVENT: NAN_GENERIC_EVENT\n");
|
||||
wlan_process_nan_event(pmpriv, pmbuf);
|
||||
break;
|
||||
|
||||
#if defined(PCIE)
|
||||
case EVENT_SSU_DUMP_DMA:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_SSU_DUMP_DMA\n");
|
||||
if (!pmadapter->ssu_buf || !pmadapter->ssu_buf->pbuf)
|
||||
break;
|
||||
pcb->moal_unmap_memory(pmadapter->pmoal_handle,
|
||||
pmadapter->ssu_buf->pbuf +
|
||||
pmadapter->ssu_buf->data_offset,
|
||||
pmadapter->ssu_buf->buf_pa,
|
||||
MLAN_SSU_BUF_SIZE, PCI_DMA_FROMDEVICE);
|
||||
/* If ADMA is supported, SSU header could not be received with
|
||||
* SSU data. Instead, SSU header is received through this event.
|
||||
* So, copy the header into the buffer before passing the buffer
|
||||
* to upper layer for file writting
|
||||
*/
|
||||
memcpy_ext(pmadapter,
|
||||
(t_u8 *)pmadapter->ssu_buf->pbuf +
|
||||
pmadapter->ssu_buf->data_offset,
|
||||
pmbuf->pbuf + pmbuf->data_offset +
|
||||
sizeof(eventcause),
|
||||
(pmbuf->data_len - sizeof(eventcause)),
|
||||
(pmbuf->data_len - sizeof(eventcause)));
|
||||
|
||||
DBG_HEXDUMP(MEVT_D, "SSU data",
|
||||
(t_u8 *)pmadapter->ssu_buf->pbuf +
|
||||
pmadapter->ssu_buf->data_offset,
|
||||
512);
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_SSU_DUMP_FILE;
|
||||
pevent->event_len = MLAN_SSU_BUF_SIZE;
|
||||
*(t_ptr *)pevent->event_buf = (t_ptr)pmadapter->ssu_buf->pbuf +
|
||||
pmadapter->ssu_buf->data_offset;
|
||||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
wlan_free_ssu_pcie_buf(pmadapter);
|
||||
break;
|
||||
#endif
|
||||
case EVENT_CSI:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_CSI on STA\n");
|
||||
wlan_process_csi_event(pmpriv);
|
||||
|
|
@ -1527,25 +1394,6 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
break;
|
||||
case EVENT_CLOUD_KEEP_ALIVE_RETRY_FAIL:
|
||||
break;
|
||||
case EVENT_WLS_FTM_COMPLETE:
|
||||
PRINTM(MEVENT, "EVENT: FTM_GENERIC_EVENT\n");
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
event_ftm =
|
||||
(Event_WLS_FTM_t *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
if (event_ftm->sub_event_id == WLS_SUB_EVENT_RTT_RESULTS)
|
||||
wlan_fill_hal_rtt_results(pmpriv, event_ftm,
|
||||
pmbuf->data_len, pevent);
|
||||
else {
|
||||
pevent->event_id = MLAN_EVENT_ID_DRV_PASSTHRU;
|
||||
// Ensure event_len does not exceed buffer size
|
||||
pevent->event_len =
|
||||
MIN(pmbuf->data_len, MAX_EVENT_SIZE);
|
||||
memcpy_ext(pmadapter, (t_u8 *)pevent->event_buf,
|
||||
pmbuf->pbuf + pmbuf->data_offset,
|
||||
pevent->event_len, pevent->event_len);
|
||||
}
|
||||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
break;
|
||||
case EVENT_VDLL_IND:
|
||||
wlan_process_vdll_event(pmpriv, pmbuf);
|
||||
break;
|
||||
|
|
@ -1563,12 +1411,6 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
pmadapter->fw_hang_report = MTRUE;
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL);
|
||||
break;
|
||||
case EVENT_IMD3_CAL_START:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_IMD3_CAL_START\n");
|
||||
break;
|
||||
case EVENT_IMD3_CAL_END:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_IMD3_CAL_END\n");
|
||||
break;
|
||||
|
||||
case EVENT_TSP_CONFIG:
|
||||
evt_buf =
|
||||
|
|
@ -1624,52 +1466,11 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
pmpriv->rx_quality = wlan_le16_to_cpu(cfg_cmd->rx_quality);
|
||||
break;
|
||||
}
|
||||
#if defined(PCIE) || defined(SDIO)
|
||||
case EVENT_FW_IN_BAND_RESET:
|
||||
DBG_HEXDUMP(MCMD_D, "EVENT_FW_IN_BAND_RESET",
|
||||
pmbuf->pbuf + pmbuf->data_offset, pmbuf->data_len);
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_DBG_DUMP, MNULL);
|
||||
break;
|
||||
#endif
|
||||
case EVENT_CHANNEL_SWITCH_REGINFO:
|
||||
PRINTM(MEVENT, "EVENT: Channel Switch Reginfo (%#x)\n",
|
||||
eventcause);
|
||||
psta_info = (chan_band_reginfo_t *)(pmadapter->event_body);
|
||||
DBG_HEXDUMP(MCMD_D, "chan band reginfo", (t_u8 *)psta_info,
|
||||
sizeof(chan_band_reginfo_t));
|
||||
/* Setup event buffer */
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_FW_CHAN_SWITCH_REGINFO;
|
||||
pevent->event_len = sizeof(chan_band_reginfo_t);
|
||||
psta_reg_info = (chan_band_reginfo_t *)pevent->event_buf;
|
||||
/* Copy event data */
|
||||
if (psta_reg_info->bandcfg.chanBand == BAND_6GHZ) {
|
||||
memcpy_ext(pmadapter, (t_u8 *)&psta_reg_info->bandcfg,
|
||||
(t_u8 *)&psta_info->bandcfg,
|
||||
sizeof(psta_info->bandcfg),
|
||||
sizeof(psta_reg_info->bandcfg));
|
||||
psta_reg_info->channel = psta_info->channel;
|
||||
psta_reg_info->regInfo = psta_info->regInfo;
|
||||
wlan_recv_event(pmpriv,
|
||||
MLAN_EVENT_ID_FW_CHAN_SWITCH_REGINFO,
|
||||
pevent);
|
||||
} else
|
||||
PRINTM(MEVENT,
|
||||
"Ignoring the Channel Switch Reg Info Event\n");
|
||||
break;
|
||||
case EVENT_WIFI_CHANNEL_AVOID_LIST:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_WIFI_CHANNEL_AVOID_LIST (%#x)\n",
|
||||
eventcause);
|
||||
pevent->event_id = MLAN_EVENT_ID_FW_WIFI_CHANNEL_AVOID_LIST;
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_len = pmbuf->data_len;
|
||||
memcpy_ext(pmadapter, (t_u8 *)pevent->event_buf,
|
||||
pmbuf->pbuf + pmbuf->data_offset, pevent->event_len,
|
||||
pevent->event_len);
|
||||
DBG_HEXDUMP(MCMD_D, "WiFi channel avoid list",
|
||||
(t_u8 *)pevent->event_buf, pevent->event_len);
|
||||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MEVENT, "EVENT: unknown event id: %#x\n", eventcause);
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_UNKNOWN, MNULL);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ Change log:
|
|||
#include "mlan_wmm.h"
|
||||
#include "mlan_11n.h"
|
||||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
#include "mlan_11h.h"
|
||||
|
||||
/********************************************************
|
||||
|
|
@ -447,16 +446,6 @@ static mlan_status wlan_get_info_ioctl(pmlan_adapter pmadapter,
|
|||
pmpriv->usr_dot_11ac_dev_cap_a;
|
||||
pget_info->param.fw_info.uuid_lo = pmadapter->uuid_lo;
|
||||
pget_info->param.fw_info.uuid_hi = pmadapter->uuid_hi;
|
||||
pget_info->param.fw_info.hw_hecap_len = pmadapter->hw_hecap_len;
|
||||
pget_info->param.fw_info.hw_2g_hecap_len =
|
||||
pmadapter->hw_2g_hecap_len;
|
||||
memcpy_ext(pmadapter, pget_info->param.fw_info.hw_he_cap,
|
||||
pmadapter->hw_he_cap, pmadapter->hw_hecap_len,
|
||||
sizeof(pget_info->param.fw_info.hw_he_cap));
|
||||
memcpy_ext(pmadapter, pget_info->param.fw_info.hw_2g_he_cap,
|
||||
pmadapter->hw_2g_he_cap, pmadapter->hw_2g_hecap_len,
|
||||
sizeof(pget_info->param.fw_info.hw_2g_he_cap));
|
||||
pget_info->param.fw_info.hw_he_6g_cap = pmadapter->hw_he_6g_cap;
|
||||
pget_info->param.fw_info.fw_supplicant_support =
|
||||
IS_FW_SUPPORT_SUPPLICANT(pmadapter) ? 0x01 : 0x00;
|
||||
pget_info->param.fw_info.antinfo = pmadapter->antinfo;
|
||||
|
|
@ -467,10 +456,6 @@ static mlan_status wlan_get_info_ioctl(pmlan_adapter pmadapter,
|
|||
0x00;
|
||||
pget_info->param.fw_info.fw_beacon_prot =
|
||||
IS_FW_SUPPORT_BEACON_PROT(pmadapter) ? 0x01 : 0x00;
|
||||
pget_info->param.fw_info.rtt_support =
|
||||
IS_FW_SUPPORT_RTT(pmadapter) ? 0x01 : 0x00;
|
||||
pget_info->param.fw_info.he_6g_support =
|
||||
IS_FW_SUPPORT_6G(pmadapter) ? 0x01 : 0x00;
|
||||
pget_info->param.fw_info.cmd_tx_data =
|
||||
IS_FW_SUPPORT_CMD_TX_DATA(pmadapter) ? 0x01 : 0x00;
|
||||
pget_info->param.fw_info.sec_rgpower =
|
||||
|
|
@ -1607,8 +1592,6 @@ static mlan_status wlan_power_ioctl_set_power(pmlan_adapter pmadapter,
|
|||
pg_tlv->length = 4 * sizeof(Power_Group_t);
|
||||
/*Power Groups for VHTBW20, VHTBW40, VHTBW80 */
|
||||
pg_tlv->length += 3 * sizeof(Power_Group_t);
|
||||
/*Power Groups for HEBW20, HEBW40, HEBW80 */
|
||||
pg_tlv->length += 3 * sizeof(Power_Group_t);
|
||||
pg = (Power_Group_t *)(buf + sizeof(HostCmd_DS_TXPWR_CFG) +
|
||||
sizeof(MrvlTypes_Power_Group_t));
|
||||
/* Power group for modulation class HR/DSSS */
|
||||
|
|
@ -1671,33 +1654,6 @@ static mlan_status wlan_power_ioctl_set_power(pmlan_adapter pmadapter,
|
|||
pg->power_min = (t_s8)dbm;
|
||||
pg->power_max = (t_s8)dbm;
|
||||
pg->ht_bandwidth = BW_80;
|
||||
pg++;
|
||||
/* Power group for modulation class HEBW20 */
|
||||
pg->first_rate_code = 0x00;
|
||||
pg->last_rate_code = 0x1B;
|
||||
pg->modulation_class = MOD_CLASS_HE;
|
||||
pg->power_step = 0;
|
||||
pg->power_min = (t_s8)dbm;
|
||||
pg->power_max = (t_s8)dbm;
|
||||
pg->ht_bandwidth = BW_20;
|
||||
pg++;
|
||||
/* Power group for modulation class HEBW40 */
|
||||
pg->first_rate_code = 0x00;
|
||||
pg->last_rate_code = 0x1B;
|
||||
pg->modulation_class = MOD_CLASS_HE;
|
||||
pg->power_step = 0;
|
||||
pg->power_min = (t_s8)dbm;
|
||||
pg->power_max = (t_s8)dbm;
|
||||
pg->ht_bandwidth = BW_40;
|
||||
pg++;
|
||||
/* Power group for modulation class HEBW80 */
|
||||
pg->first_rate_code = 0x00;
|
||||
pg->last_rate_code = 0x1B;
|
||||
pg->modulation_class = MOD_CLASS_HE;
|
||||
pg->power_step = 0;
|
||||
pg->power_min = (t_s8)dbm;
|
||||
pg->power_max = (t_s8)dbm;
|
||||
pg->ht_bandwidth = BW_80;
|
||||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
|
|
@ -3034,7 +2990,6 @@ static mlan_status wlan_sec_ioctl_encrypt_key(pmlan_adapter pmadapter,
|
|||
ENTER();
|
||||
sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf;
|
||||
if ((pioctl_req->action == MLAN_ACT_SET) ||
|
||||
(pioctl_req->action == MLAN_ACT_PASN_KEY_DNLD) ||
|
||||
(pioctl_req->action == MLAN_ACT_CLEAR)) {
|
||||
if (sec->param.encrypt_key.is_wapi_key)
|
||||
status = wlan_sec_ioctl_set_wapi_key(pmadapter,
|
||||
|
|
@ -3316,93 +3271,76 @@ static mlan_status wlan_set_gen_ie_helper(mlan_private *priv, t_u8 *ie_data_ptr,
|
|||
(!memcmp(priv->adapter, pvendor_ie->oui, wpa_oui,
|
||||
sizeof(wpa_oui)))) ||
|
||||
(pvendor_ie->element_id == RSN_IE)) {
|
||||
/* IE is a WPA/WPA2 IE so call set_wpa function
|
||||
*/
|
||||
ret = wlan_set_wpa_ie_helper(priv, ie_data_ptr,
|
||||
ie_len);
|
||||
priv->wps.session_enable = MFALSE;
|
||||
} else if (pvendor_ie->element_id == WAPI_IE) {
|
||||
/* IE is a WAPI IE so call set_wapi function */
|
||||
ret = wlan_set_wapi_ie(priv, ie_data_ptr,
|
||||
ie_len);
|
||||
} else if ((pvendor_ie->element_id ==
|
||||
VENDOR_SPECIFIC_221) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui,
|
||||
osen_oui, sizeof(osen_oui)))) {
|
||||
/* IE is a OSEN IE so call set_osen function */
|
||||
ret = wlan_set_osen_ie(priv, ie_data_ptr,
|
||||
ie_len);
|
||||
/* IE is a WPA/WPA2 IE so call set_wpa function */
|
||||
ret = wlan_set_wpa_ie_helper(priv, ie_data_ptr, ie_len);
|
||||
priv->wps.session_enable = MFALSE;
|
||||
} else if (pvendor_ie->element_id == WAPI_IE) {
|
||||
/* IE is a WAPI IE so call set_wapi function */
|
||||
ret = wlan_set_wapi_ie(priv, ie_data_ptr, ie_len);
|
||||
} else if ((pvendor_ie->element_id == VENDOR_SPECIFIC_221) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui, osen_oui,
|
||||
sizeof(osen_oui)))) {
|
||||
/* IE is a OSEN IE so call set_osen function */
|
||||
ret = wlan_set_osen_ie(priv, ie_data_ptr, ie_len);
|
||||
|
||||
} else if ((pvendor_ie->element_id == WPS_IE) &&
|
||||
(priv->wps.session_enable == MFALSE) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui,
|
||||
wps_oui, sizeof(wps_oui)))) {
|
||||
/*
|
||||
* Discard first two byte (Element ID and
|
||||
* Length) because they are not needed in the
|
||||
* case of setting WPS_IE
|
||||
*/
|
||||
if (pvendor_ie->len > 4) {
|
||||
memcpy_ext(
|
||||
priv->adapter,
|
||||
(t_u8 *)&priv->wps.wps_ie,
|
||||
ie_data_ptr, ie_len,
|
||||
sizeof(IEEEtypes_VendorSpecific_t));
|
||||
HEXDUMP("wps_ie",
|
||||
(t_u8 *)&priv->wps.wps_ie,
|
||||
priv->wps.wps_ie.vend_hdr.len +
|
||||
2);
|
||||
} else {
|
||||
/* Only wps oui exist, reset driver wps
|
||||
* buffer
|
||||
*/
|
||||
memset(priv->adapter,
|
||||
(t_u8 *)&priv->wps.wps_ie, 0x00,
|
||||
sizeof(priv->wps.wps_ie));
|
||||
PRINTM(MINFO, "wps_ie cleared\n");
|
||||
}
|
||||
} else if ((pvendor_ie->element_id == WPS_IE) &&
|
||||
(priv->wps.session_enable == MFALSE) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui, wps_oui,
|
||||
sizeof(wps_oui)))) {
|
||||
/*
|
||||
* Discard first two byte (Element ID and Length)
|
||||
* because they are not needed in the case of setting
|
||||
* WPS_IE
|
||||
*/
|
||||
if (pvendor_ie->len > 4) {
|
||||
memcpy_ext(priv->adapter,
|
||||
(t_u8 *)&priv->wps.wps_ie,
|
||||
ie_data_ptr, ie_len,
|
||||
sizeof(IEEEtypes_VendorSpecific_t));
|
||||
HEXDUMP("wps_ie", (t_u8 *)&priv->wps.wps_ie,
|
||||
priv->wps.wps_ie.vend_hdr.len + 2);
|
||||
} else {
|
||||
/*
|
||||
* Verify that the passed length is not larger
|
||||
* than the available space remaining in the
|
||||
* buffer
|
||||
/* Only wps oui exist, reset driver wps buffer
|
||||
*/
|
||||
if (ie_len < (sizeof(priv->gen_ie_buf) -
|
||||
priv->gen_ie_buf_len)) {
|
||||
/* Test to see if it is a WPS IE, if so,
|
||||
* enable wps session flag */
|
||||
pvendor_ie =
|
||||
(IEEEtypes_VendorHeader_t *)
|
||||
ie_data_ptr;
|
||||
if ((pvendor_ie->element_id ==
|
||||
WPS_IE) &&
|
||||
(!memcmp(priv->adapter,
|
||||
pvendor_ie->oui, wps_oui,
|
||||
sizeof(wps_oui)))) {
|
||||
priv->wps.session_enable =
|
||||
MTRUE;
|
||||
PRINTM(MINFO,
|
||||
"WPS Session Enabled.\n");
|
||||
}
|
||||
|
||||
/* Append the passed data to the end of
|
||||
* the genIeBuffer */
|
||||
memcpy_ext(
|
||||
priv->adapter,
|
||||
priv->gen_ie_buf +
|
||||
priv->gen_ie_buf_len,
|
||||
ie_data_ptr, ie_len,
|
||||
MRVDRV_GENIE_BUF_SIZE -
|
||||
priv->gen_ie_buf_len);
|
||||
/* Increment the stored buffer length by
|
||||
* the size passed */
|
||||
priv->gen_ie_buf_len += ie_len;
|
||||
} else {
|
||||
/* Passed data does not fit in the
|
||||
* remaining buffer space */
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
memset(priv->adapter, (t_u8 *)&priv->wps.wps_ie,
|
||||
0x00, sizeof(priv->wps.wps_ie));
|
||||
PRINTM(MINFO, "wps_ie cleared\n");
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Verify that the passed length is not larger than
|
||||
* the available space remaining in the buffer
|
||||
*/
|
||||
if (ie_len <
|
||||
(sizeof(priv->gen_ie_buf) - priv->gen_ie_buf_len)) {
|
||||
/* Test to see if it is a WPS IE, if so, enable
|
||||
* wps session flag */
|
||||
pvendor_ie =
|
||||
(IEEEtypes_VendorHeader_t *)ie_data_ptr;
|
||||
if ((pvendor_ie->element_id == WPS_IE) &&
|
||||
(!memcmp(priv->adapter, pvendor_ie->oui,
|
||||
wps_oui, sizeof(wps_oui)))) {
|
||||
priv->wps.session_enable = MTRUE;
|
||||
PRINTM(MINFO, "WPS Session Enabled.\n");
|
||||
}
|
||||
|
||||
/* Append the passed data to the end of
|
||||
* the genIeBuffer */
|
||||
memcpy_ext(priv->adapter,
|
||||
priv->gen_ie_buf +
|
||||
priv->gen_ie_buf_len,
|
||||
ie_data_ptr, ie_len,
|
||||
MRVDRV_GENIE_BUF_SIZE -
|
||||
priv->gen_ie_buf_len);
|
||||
/* Increment the stored buffer length by
|
||||
* the size passed */
|
||||
priv->gen_ie_buf_len += ie_len;
|
||||
} else {
|
||||
/* Passed data does not fit in the
|
||||
* remaining buffer space */
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Return MLAN_STATUS_SUCCESS, or MLAN_STATUS_FAILURE for error case */
|
||||
|
|
@ -3864,7 +3802,6 @@ static mlan_status wlan_misc_ioctl_gen_ie(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef SDIO
|
||||
/**
|
||||
* @brief Reconfigure SDIO multiport aggregation parameters
|
||||
*
|
||||
|
|
@ -3980,7 +3917,6 @@ exit:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set/Get system clock configuration
|
||||
|
|
@ -4665,29 +4601,6 @@ mlan_status wlan_misc_ioctl_arb_cfg(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Save tp accounting command configurations.
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
mlan_status wlan_misc_ioctl_tp_state(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_ds_misc_cfg *pmisc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
pmadapter->tp_state_on = pmisc->param.tp_state.on;
|
||||
pmadapter->tp_state_drop_point = pmisc->param.tp_state.drop_point;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static mlan_status wlan_misc_ioctl_ips_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
|
|
@ -4934,48 +4847,6 @@ static mlan_status wlan_misc_cloud_keep_alive(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief cloud keep alive rx
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req Pointer to the IOCTL request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_misc_cloud_keep_alive_rx(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
t_u16 cmd_action = 0;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else if (pioctl_req->action == MLAN_ACT_GET) {
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
} else if (pioctl_req->action == MLAN_ACT_RESET) {
|
||||
cmd_action = HostCmd_ACT_GEN_RESET;
|
||||
} else {
|
||||
cmd_action = HostCmd_ACT_GEN_REMOVE;
|
||||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_AUTO_TX, cmd_action,
|
||||
OID_CLOUD_KEEP_ALIVE_ACK, (t_void *)pioctl_req,
|
||||
&misc->param.keep_alive_rx);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief configure auth,assoc timeout parameter
|
||||
*
|
||||
|
|
@ -5056,11 +4927,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
pmadapter->pending_ioctl = MTRUE;
|
||||
status = MLAN_STATUS_PENDING;
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case MLAN_OID_MISC_SDIO_MPA_CTRL:
|
||||
status = wlan_misc_ioctl_sdio_mpa_ctrl(pmadapter, pioctl_req);
|
||||
break;
|
||||
#endif
|
||||
case MLAN_OID_MISC_HOST_CMD:
|
||||
status = wlan_misc_ioctl_host_cmd(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5106,9 +4975,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
status = wlan_misc_ioctl_tdls_idle_time(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
||||
case MLAN_OID_MISC_NET_MONITOR:
|
||||
status = wlan_misc_ioctl_net_monitor(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_MAC_CONTROL:
|
||||
status = wlan_misc_ioctl_mac_control(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5141,9 +5007,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_HOTSPOT_CFG:
|
||||
status = wlan_misc_hotspot_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_MULTI_AP_CFG:
|
||||
status = wlan_misc_multi_ap_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_OTP_USER_DATA:
|
||||
status = wlan_misc_otp_user_data(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5151,14 +5014,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
status = wlan_misc_ioctl_fw_auto_reconnect(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
#ifdef USB
|
||||
case MLAN_OID_MISC_USB_AGGR_CTRL:
|
||||
status = wlan_misc_ioctl_usb_aggr_ctrl(pmadapter, pioctl_req);
|
||||
break;
|
||||
#endif
|
||||
case MLAN_OID_MISC_AGGR_CTRL:
|
||||
status = wlan_misc_ioctl_aggr_ctrl(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_TXCONTROL:
|
||||
status = wlan_misc_ioctl_txcontrol(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5168,20 +5023,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_PMFCFG:
|
||||
status = wlan_misc_pmfcfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_MULTI_CHAN_CFG:
|
||||
status = wlan_misc_ioctl_multi_chan_config(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_MULTI_CHAN_POLICY:
|
||||
status = wlan_misc_ioctl_multi_chan_policy(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_DRCS_CFG:
|
||||
status = wlan_misc_ioctl_drcs_config(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_LOW_PWR_MODE:
|
||||
status = wlan_misc_ioctl_low_pwr_mode(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_PMIC_CFG:
|
||||
status = wlan_misc_ioctl_pmic_configure(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5215,9 +5056,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_IND_RST_CFG:
|
||||
status = wlan_misc_ioctl_ind_rst_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_MC_AGGR_CFG:
|
||||
status = wlan_misc_ioctl_mc_aggr_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_CH_LOAD:
|
||||
status = wlan_misc_ioctl_ch_load(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5231,9 +5069,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
status =
|
||||
wlan_misc_ioctl_cross_chip_synch(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_TSP_CFG:
|
||||
status = wlan_misc_ioctl_tsp_config(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_ROAM_OFFLOAD:
|
||||
status = wlan_misc_roam_offload(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5249,9 +5084,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_CLOUD_KEEP_ALIVE:
|
||||
status = wlan_misc_cloud_keep_alive(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_CLOUD_KEEP_ALIVE_RX:
|
||||
status = wlan_misc_cloud_keep_alive_rx(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_DYN_BW:
|
||||
status = wlan_misc_ioctl_dyn_bw(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5261,24 +5093,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_PER_PKT_CFG:
|
||||
status = wlan_misc_per_pkt_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_ROBUSTCOEX:
|
||||
status = wlan_misc_robustcoex(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_DMCS_CONFIG:
|
||||
status = wlan_misc_dmcs_config(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_CONFIG_RTT:
|
||||
status = wlan_config_rtt(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_CANCEL_RTT:
|
||||
status = wlan_cancel_rtt(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_RTT_RESPONDER_CFG:
|
||||
status = wlan_rtt_responder_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_GET_TX_RX_HISTOGRAM:
|
||||
status = wlan_get_tx_rx_histogram(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_GPIO_CFG:
|
||||
status = wlan_misc_gpiocfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5288,14 +5102,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_CFP_INFO:
|
||||
status = wlan_get_cfpinfo(pmadapter, pioctl_req);
|
||||
break;
|
||||
#if defined(PCIE)
|
||||
case MLAN_OID_MISC_SSU:
|
||||
if (pmadapter->ssu_buf)
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
else
|
||||
status = wlan_misc_ssu(pmadapter, pioctl_req);
|
||||
break;
|
||||
#endif
|
||||
case MLAN_OID_MISC_CSI:
|
||||
status = wlan_misc_csi(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5363,15 +5169,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_ARB_CONFIG:
|
||||
status = wlan_misc_ioctl_arb_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_RANGE_EXT:
|
||||
status = wlan_misc_ioctl_range_ext(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_11AX_TWT_CFG:
|
||||
status = wlan_misc_ioctl_twt_report(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_TP_STATE:
|
||||
status = wlan_misc_ioctl_tp_state(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_IPS_CFG:
|
||||
status = wlan_misc_ioctl_ips_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
|
@ -5389,9 +5186,6 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
status =
|
||||
wlan_misc_auth_assoc_timeout_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_FOUNDRY_TYPE:
|
||||
status = wlan_misc_ioctl_foundry_type(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_PER_BAND_TXPWR_CAP:
|
||||
status = wlan_misc_ioctl_per_band_txpwr_cap(pmadapter,
|
||||
pioctl_req);
|
||||
|
|
@ -5471,51 +5265,6 @@ static mlan_status wlan_set_get_scan_cfg(pmlan_adapter pmadapter,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get scan 6 GHz configuration parameter
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
* @param action Set/Get
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS --success
|
||||
*/
|
||||
static mlan_status wlan_set_get_scan_6g_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req,
|
||||
t_u32 action)
|
||||
{
|
||||
mlan_ds_scan *scan = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!IS_FW_SUPPORT_6G(pmadapter)) {
|
||||
PRINTM(MERROR, "Set/Get scan 6G configuration parameter failed "
|
||||
"(6 GHz band is not supported).\n");
|
||||
pioctl_req->data_read_written = 0;
|
||||
pioctl_req->buf_len_needed = sizeof(mlan_ds_scan);
|
||||
pioctl_req->status_code = MLAN_ERROR_CMD_INVALID;
|
||||
LEAVE();
|
||||
return MLAN_STATUS_RESOURCE;
|
||||
}
|
||||
|
||||
scan = (mlan_ds_scan *)pioctl_req->pbuf;
|
||||
|
||||
if (action == MLAN_ACT_SET) {
|
||||
if (scan->param.scan_6g_cfg.scan_coloc_ap)
|
||||
pmadapter->wifi_6g_scan_coloc_ap = MTRUE;
|
||||
else
|
||||
pmadapter->wifi_6g_scan_coloc_ap = MFALSE;
|
||||
}
|
||||
scan->param.scan_6g_cfg.scan_coloc_ap =
|
||||
pmadapter->wifi_6g_scan_coloc_ap;
|
||||
|
||||
pioctl_req->data_read_written =
|
||||
sizeof(mlan_scan_6g_cfg) + MLAN_SUB_COMMAND_SIZE;
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get scan
|
||||
*
|
||||
|
|
@ -5535,8 +5284,7 @@ mlan_status wlan_scan_ioctl(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req)
|
|||
|
||||
pscan = (mlan_ds_scan *)pioctl_req->pbuf;
|
||||
if (pscan->sub_command == MLAN_OID_SCAN_CONFIG ||
|
||||
pscan->sub_command == MLAN_OID_SCAN_BGSCAN_CONFIG ||
|
||||
pscan->sub_command == MLAN_OID_SCAN_6G_CONFIG)
|
||||
pscan->sub_command == MLAN_OID_SCAN_BGSCAN_CONFIG)
|
||||
goto start_config;
|
||||
if (pmadapter->scan_processing && pioctl_req->action == MLAN_ACT_SET &&
|
||||
pscan->sub_command != MLAN_OID_SCAN_CANCEL) {
|
||||
|
|
@ -5564,17 +5312,14 @@ start_config:
|
|||
if (pioctl_req->action == MLAN_ACT_SET) {
|
||||
switch (pscan->sub_command) {
|
||||
case MLAN_OID_SCAN_NORMAL:
|
||||
pmadapter->scan_6g = MFALSE;
|
||||
status = wlan_scan_networks(pmpriv, pioctl_req, MNULL);
|
||||
break;
|
||||
case MLAN_OID_SCAN_SPECIFIC_SSID:
|
||||
pmadapter->scan_6g = MFALSE;
|
||||
status = wlan_scan_specific_ssid(
|
||||
pmpriv, pioctl_req,
|
||||
&pscan->param.scan_req.scan_ssid);
|
||||
break;
|
||||
case MLAN_OID_SCAN_USER_CONFIG:
|
||||
pmadapter->scan_6g = MFALSE;
|
||||
status = wlan_scan_networks(
|
||||
pmpriv, pioctl_req,
|
||||
(wlan_user_scan_cfg *)
|
||||
|
|
@ -5584,10 +5329,6 @@ start_config:
|
|||
status = wlan_set_get_scan_cfg(pmadapter, pioctl_req,
|
||||
MLAN_ACT_SET);
|
||||
break;
|
||||
case MLAN_OID_SCAN_6G_CONFIG:
|
||||
status = wlan_set_get_scan_6g_cfg(pmadapter, pioctl_req,
|
||||
MLAN_ACT_SET);
|
||||
break;
|
||||
case MLAN_OID_SCAN_CANCEL:
|
||||
status = wlan_cancel_pending_scan_cmd(pmadapter,
|
||||
pioctl_req);
|
||||
|
|
@ -5618,8 +5359,7 @@ start_config:
|
|||
(pscan->sub_command !=
|
||||
MLAN_OID_SCAN_TABLE_FLUSH_WITH_BAND) &&
|
||||
(pscan->sub_command != MLAN_OID_SCAN_CANCEL) &&
|
||||
(pscan->sub_command != MLAN_OID_SCAN_CONFIG) &&
|
||||
(pscan->sub_command != MLAN_OID_SCAN_6G_CONFIG)) {
|
||||
(pscan->sub_command != MLAN_OID_SCAN_CONFIG)) {
|
||||
PRINTM(MINFO,
|
||||
"wlan_scan_ioctl: return MLAN_STATUS_PENDING\n");
|
||||
status = MLAN_STATUS_PENDING;
|
||||
|
|
@ -5630,9 +5370,6 @@ start_config:
|
|||
if (pscan->sub_command == MLAN_OID_SCAN_CONFIG) {
|
||||
status = wlan_set_get_scan_cfg(pmadapter, pioctl_req,
|
||||
MLAN_ACT_GET);
|
||||
} else if (pscan->sub_command == MLAN_OID_SCAN_6G_CONFIG) {
|
||||
status = wlan_set_get_scan_6g_cfg(pmadapter, pioctl_req,
|
||||
MLAN_ACT_GET);
|
||||
} else if (pscan->sub_command ==
|
||||
MLAN_OID_SCAN_GET_CURRENT_BSS) {
|
||||
pscan->param.scan_resp.num_in_scan_table =
|
||||
|
|
@ -5883,9 +5620,6 @@ mlan_status wlan_ops_sta_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
case MLAN_IOCTL_11AC_CFG:
|
||||
status = wlan_11ac_cfg_ioctl(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_IOCTL_11AX_CFG:
|
||||
status = wlan_11ax_cfg_ioctl(pmadapter, pioctl_req);
|
||||
break;
|
||||
default:
|
||||
pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID;
|
||||
status = MLAN_STATUS_FAILURE;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ Change log:
|
|||
#include "mlan_main.h"
|
||||
#include "mlan_11n_aggr.h"
|
||||
#include "mlan_11n_rxreorder.h"
|
||||
#include "mlan_11ax.h"
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
|
|
@ -111,7 +110,6 @@ void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
|||
int ie_len = 0;
|
||||
t_u8 i;
|
||||
int rate_len;
|
||||
IEEEtypes_Extension_t *ext_ie;
|
||||
|
||||
#define TDLS_PAYLOAD_TYPE 2
|
||||
#define TDLS_CATEGORY 0x0c
|
||||
|
|
@ -292,42 +290,6 @@ void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
|||
MIN(sizeof(IEEEtypes_AID_t),
|
||||
MAX_DATA_DUMP_LEN));
|
||||
break;
|
||||
case EXTENSION:
|
||||
ext_ie = (IEEEtypes_Extension_t *)pos;
|
||||
if (ext_ie->ext_id == HE_CAPABILITY) {
|
||||
memcpy_ext(priv->adapter,
|
||||
(t_u8 *)&sta_ptr->tdls_he_cap, pos,
|
||||
ext_ie->ieee_hdr.len +
|
||||
sizeof(IEEEtypes_Header_t),
|
||||
sizeof(IEEEtypes_HECap_t));
|
||||
sta_ptr->tdls_he_cap.ieee_hdr.len =
|
||||
MIN(ext_ie->ieee_hdr.len,
|
||||
sizeof(IEEEtypes_HECap_t) -
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
sta_ptr->is_11ax_enabled = 1;
|
||||
DBG_HEXDUMP(MCMD_D, "Rx TDLS HE Capability",
|
||||
(t_u8 *)(&sta_ptr->tdls_he_cap),
|
||||
MIN(sizeof(IEEEtypes_Header_t) +
|
||||
sta_ptr->tdls_he_cap
|
||||
.ieee_hdr.len,
|
||||
sizeof(IEEEtypes_HECap_t)));
|
||||
} else if (ext_ie->ext_id == HE_OPERATION) {
|
||||
memcpy_ext(priv->adapter,
|
||||
(t_u8 *)&sta_ptr->he_op, pos,
|
||||
ext_ie->ieee_hdr.len +
|
||||
sizeof(IEEEtypes_Header_t),
|
||||
sizeof(IEEEtypes_HeOp_t));
|
||||
ext_ie->ieee_hdr.len =
|
||||
MIN(ext_ie->ieee_hdr.len,
|
||||
sizeof(IEEEtypes_HeOp_t) -
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
DBG_HEXDUMP(MCMD_D, "Rx TDLS HE Operation",
|
||||
(t_u8 *)(&sta_ptr->he_op),
|
||||
MIN(sizeof(IEEEtypes_Header_t) +
|
||||
ext_ie->ieee_hdr.len,
|
||||
MAX_DATA_DUMP_LEN));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -335,106 +297,6 @@ void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function get pxpd info for radiotap info
|
||||
*
|
||||
* @param priv A pointer to pmlan_private
|
||||
* @param prx_pd A pointer to RxPD
|
||||
* @param prt_info A pointer to radiotap_info
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void wlan_rxpdinfo_to_radiotapinfo(pmlan_private priv, RxPD *prx_pd,
|
||||
radiotap_info *prt_info)
|
||||
{
|
||||
radiotap_info rt_info_tmp;
|
||||
t_u8 rx_rate_info = 0;
|
||||
t_u8 mcs_index = 0;
|
||||
t_u8 format = 0;
|
||||
t_u8 bw = 0;
|
||||
t_u8 gi = 0;
|
||||
t_u8 ldpc = 0;
|
||||
t_u8 ext_rate_info = 0;
|
||||
t_u8 nss = 0;
|
||||
t_u8 dcm = 0;
|
||||
|
||||
memset(priv->adapter, &rt_info_tmp, 0x00, sizeof(rt_info_tmp));
|
||||
rt_info_tmp.snr = prx_pd->snr;
|
||||
rt_info_tmp.nf = prx_pd->nf;
|
||||
rt_info_tmp.band_config = (prx_pd->rx_info & 0xf);
|
||||
rt_info_tmp.chan_num = (prx_pd->rx_info & RXPD_CHAN_MASK) >> 5;
|
||||
ext_rate_info = (t_u8)(prx_pd->rx_info >> 16);
|
||||
rt_info_tmp.antenna = prx_pd->antenna;
|
||||
rx_rate_info = prx_pd->rate_info;
|
||||
if ((rx_rate_info & 0x3) == MLAN_RATE_FORMAT_HE) {
|
||||
t_u8 gi_he = 0;
|
||||
/* HE rate */
|
||||
format = MLAN_RATE_FORMAT_HE;
|
||||
mcs_index = MIN(prx_pd->rx_rate & 0xF, 0xb);
|
||||
nss = ((prx_pd->rx_rate & 0xF0) >> 4);
|
||||
nss = MIN(nss + 1, 2);
|
||||
/* 20M: bw=0, 40M: bw=1, 80M: bw=2, 160M: bw=3 */
|
||||
bw = (rx_rate_info & 0xC) >> 2;
|
||||
gi = (rx_rate_info & 0x10) >> 4;
|
||||
gi_he = (rx_rate_info & 0x80) >> 7;
|
||||
gi = gi | gi_he;
|
||||
dcm = (prx_pd->rx_info & RXPD_DCM_MASK) >> 16;
|
||||
} else if ((rx_rate_info & 0x3) == MLAN_RATE_FORMAT_VHT) {
|
||||
/* VHT rate */
|
||||
format = MLAN_RATE_FORMAT_VHT;
|
||||
mcs_index = MIN(prx_pd->rx_rate & 0xF, 9);
|
||||
nss = ((prx_pd->rx_rate & 0xF0) >> 4);
|
||||
nss = MIN(nss + 1, 2);
|
||||
/* 20M: bw=0, 40M: bw=1, 80M: bw=2, 160M: bw=3 */
|
||||
bw = (rx_rate_info & 0xC) >> 2;
|
||||
/* LGI: gi =0, SGI: gi = 1 */
|
||||
gi = (rx_rate_info & 0x10) >> 4;
|
||||
} else if ((rx_rate_info & 0x3) == MLAN_RATE_FORMAT_HT) {
|
||||
/* HT rate */
|
||||
format = MLAN_RATE_FORMAT_HT;
|
||||
mcs_index = prx_pd->rx_rate;
|
||||
/* 20M: bw=0, 40M: bw=1 */
|
||||
bw = (rx_rate_info & 0xC) >> 2;
|
||||
/* LGI: gi =0, SGI: gi = 1 */
|
||||
gi = (rx_rate_info & 0x10) >> 4;
|
||||
} else {
|
||||
/* LG rate */
|
||||
format = MLAN_RATE_FORMAT_LG;
|
||||
mcs_index = (prx_pd->rx_rate > MLAN_RATE_INDEX_OFDM0) ?
|
||||
prx_pd->rx_rate - 1 :
|
||||
prx_pd->rx_rate;
|
||||
}
|
||||
ldpc = rx_rate_info & 0x40;
|
||||
|
||||
rt_info_tmp.rate_info.mcs_index = mcs_index;
|
||||
rt_info_tmp.rate_info.nss_index = nss;
|
||||
rt_info_tmp.rate_info.dcm = dcm;
|
||||
if (format == MLAN_RATE_FORMAT_HE) {
|
||||
rt_info_tmp.rate_info.rate_info =
|
||||
(ldpc << 5) | (format << 3) | (bw << 1) | (gi << 6);
|
||||
} else
|
||||
rt_info_tmp.rate_info.rate_info =
|
||||
(ldpc << 5) | (format << 3) | (bw << 1) | gi;
|
||||
rt_info_tmp.rate_info.bitrate =
|
||||
wlan_index_to_data_rate(priv->adapter, prx_pd->rx_rate,
|
||||
prx_pd->rate_info, ext_rate_info);
|
||||
|
||||
if (prx_pd->flags & RXPD_FLAG_EXTRA_HEADER)
|
||||
memcpy_ext(priv->adapter, &rt_info_tmp.extra_info,
|
||||
(t_u8 *)prx_pd + Rx_PD_SIZEOF(priv->adapter),
|
||||
sizeof(rt_info_tmp.extra_info),
|
||||
sizeof(rt_info_tmp.extra_info));
|
||||
|
||||
if (prx_pd->flags & RXPD_FLAG_RADIOTAP_HEADER_EXTRA)
|
||||
rt_info_tmp.radiotap_extra = 1;
|
||||
|
||||
memset(priv->adapter, prt_info, 0x00, sizeof(radiotap_info));
|
||||
memcpy_ext(priv->adapter, prt_info, &rt_info_tmp, sizeof(rt_info_tmp),
|
||||
sizeof(radiotap_info));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function processes received packet and forwards it
|
||||
* to kernel/upper layer
|
||||
|
|
@ -593,22 +455,6 @@ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
pmbuf->out_ts_sec, pmbuf->out_ts_usec, prx_pd->seq_num,
|
||||
prx_pd->priority);
|
||||
pmbuf->priority = prx_pd->priority;
|
||||
if (pmadapter->enable_net_mon) {
|
||||
if (prx_pd->rx_pkt_type == PKT_TYPE_802DOT11) {
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_NET_MONITOR;
|
||||
goto mon_process;
|
||||
}
|
||||
}
|
||||
|
||||
mon_process:
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_NET_MONITOR) {
|
||||
// Use some rxpd space to save rxpd info for radiotap header
|
||||
// We should insure radiotap_info is not bigger than RxPD
|
||||
wlan_rxpdinfo_to_radiotapinfo(
|
||||
priv, prx_pd,
|
||||
(radiotap_info *)(pmbuf->pbuf + pmbuf->data_offset -
|
||||
sizeof(radiotap_info)));
|
||||
}
|
||||
|
||||
if (MFALSE || priv->rx_pkt_info) {
|
||||
ext_rate_info = (t_u8)(prx_pd->rx_info >> 16);
|
||||
|
|
@ -632,13 +478,6 @@ mon_process:
|
|||
done:
|
||||
if (ret != MLAN_STATUS_PENDING)
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
#ifdef USB
|
||||
else if (IS_USB(pmadapter->card_type))
|
||||
pmadapter->callbacks.moal_recv_complete(pmadapter->pmoal_handle,
|
||||
MNULL,
|
||||
pmadapter->rx_data_ep,
|
||||
MLAN_STATUS_SUCCESS);
|
||||
#endif
|
||||
LEAVE();
|
||||
|
||||
return ret;
|
||||
|
|
@ -658,15 +497,6 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
RxPD *prx_pd;
|
||||
RxPacketHdr_t *prx_pkt;
|
||||
RxPD *prx_pd2;
|
||||
EthII_Hdr_t *peth_hdr2;
|
||||
wlan_802_11_header *pwlan_hdr;
|
||||
IEEEtypes_FrameCtl_t *frmctl;
|
||||
pmlan_buffer pmbuf2 = MNULL;
|
||||
mlan_802_11_mac_addr dest_addr = {0x00};
|
||||
mlan_802_11_mac_addr src_addr = {0x00};
|
||||
t_u16 hdr_len;
|
||||
t_u8 snap_eth_hdr[5] = {0xaa, 0xaa, 0x03, 0x00, 0x00};
|
||||
pmlan_private priv = pmadapter->priv[pmbuf->bss_index];
|
||||
t_u8 ta[MLAN_MAC_ADDR_LENGTH];
|
||||
t_u16 rx_pkt_type = 0;
|
||||
|
|
@ -685,19 +515,7 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
/* Endian conversion */
|
||||
endian_convert_RxPD(prx_pd);
|
||||
if (prx_pd->flags & RXPD_FLAG_EXTRA_HEADER) {
|
||||
endian_convert_RxPD_extra_header(
|
||||
(rxpd_extra_info *)((t_u8 *)prx_pd +
|
||||
Rx_PD_SIZEOF(pmadapter)));
|
||||
}
|
||||
rx_pkt_type = prx_pd->rx_pkt_type;
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH) {
|
||||
PRINTM_NETINTF(MDAT_D, priv);
|
||||
PRINTM(MDAT_D, "Easymesh flags : 0x%x\n", prx_pd->flags);
|
||||
ret = wlan_check_easymesh_pkt(priv, pmbuf, prx_pd);
|
||||
if (ret != MLAN_STATUS_SUCCESS)
|
||||
goto done;
|
||||
}
|
||||
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset);
|
||||
|
||||
if ((prx_pd->rx_pkt_offset + prx_pd->rx_pkt_length) !=
|
||||
|
|
@ -749,124 +567,14 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
}
|
||||
|
||||
if (pmadapter->enable_net_mon &&
|
||||
(prx_pd->flags & RXPD_FLAG_UCAST_PKT)) {
|
||||
pwlan_hdr = (wlan_802_11_header *)((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset);
|
||||
frmctl = (IEEEtypes_FrameCtl_t *)pwlan_hdr;
|
||||
if (frmctl->type == 0x02) {
|
||||
/* This is a valid unicast destined data packet, with
|
||||
* 802.11 and rtap headers attached. Duplicate this
|
||||
* packet and process this copy as a sniffed packet,
|
||||
* meant for monitor iface
|
||||
*/
|
||||
pmbuf2 = wlan_alloc_mlan_buffer(pmadapter,
|
||||
pmbuf->data_len,
|
||||
MLAN_RX_HEADER_LEN,
|
||||
MOAL_ALLOC_MLAN_BUFFER);
|
||||
if (!pmbuf2) {
|
||||
PRINTM(MERROR,
|
||||
"Unable to allocate mlan_buffer for Rx");
|
||||
PRINTM(MERROR, "sniffed packet\n");
|
||||
} else {
|
||||
pmbuf2->bss_index = pmbuf->bss_index;
|
||||
pmbuf2->buf_type = pmbuf->buf_type;
|
||||
pmbuf2->priority = pmbuf->priority;
|
||||
pmbuf2->in_ts_sec = pmbuf->in_ts_sec;
|
||||
pmbuf2->in_ts_usec = pmbuf->in_ts_usec;
|
||||
pmbuf2->data_len = pmbuf->data_len;
|
||||
memcpy(pmadapter,
|
||||
pmbuf2->pbuf + pmbuf2->data_offset,
|
||||
pmbuf->pbuf + pmbuf->data_offset,
|
||||
pmbuf->data_len);
|
||||
|
||||
prx_pd2 = (RxPD *)(pmbuf2->pbuf +
|
||||
pmbuf2->data_offset);
|
||||
/* set pkt type of duplicated pkt to 802.11 */
|
||||
prx_pd2->rx_pkt_type = PKT_TYPE_802DOT11;
|
||||
wlan_process_rx_packet(pmadapter, pmbuf2);
|
||||
}
|
||||
|
||||
/* Now, process this pkt as a normal data packet.
|
||||
* rx_pkt_offset points to the 802.11 hdr. Construct
|
||||
* 802.3 header from 802.11 hdr fields and attach it
|
||||
* just before the payload.
|
||||
*/
|
||||
memcpy(pmadapter, (t_u8 *)&dest_addr, pwlan_hdr->addr1,
|
||||
sizeof(pwlan_hdr->addr1));
|
||||
memcpy(pmadapter, (t_u8 *)&src_addr, pwlan_hdr->addr2,
|
||||
sizeof(pwlan_hdr->addr2));
|
||||
|
||||
hdr_len = sizeof(wlan_802_11_header);
|
||||
|
||||
/* subtract mac addr field size for 3 address mac80211
|
||||
* header */
|
||||
if (!(frmctl->from_ds && frmctl->to_ds))
|
||||
hdr_len -= sizeof(mlan_802_11_mac_addr);
|
||||
|
||||
/* add 2 bytes of qos ctrl flags */
|
||||
if (frmctl->sub_type & QOS_DATA)
|
||||
hdr_len += 2;
|
||||
|
||||
if (prx_pd->rx_pkt_type == PKT_TYPE_AMSDU) {
|
||||
/* no need to generate 802.3 hdr, update pkt
|
||||
* offset */
|
||||
prx_pd->rx_pkt_offset += hdr_len;
|
||||
prx_pd->rx_pkt_length -= hdr_len;
|
||||
} else {
|
||||
/* skip 6-byte snap and 2-byte type */
|
||||
if (memcmp(pmadapter,
|
||||
(t_u8 *)pwlan_hdr + hdr_len,
|
||||
snap_eth_hdr,
|
||||
sizeof(snap_eth_hdr)) == 0)
|
||||
hdr_len += 8;
|
||||
|
||||
peth_hdr2 =
|
||||
(EthII_Hdr_t *)((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset +
|
||||
hdr_len -
|
||||
sizeof(EthII_Hdr_t));
|
||||
memcpy(pmadapter, peth_hdr2->dest_addr,
|
||||
(t_u8 *)&dest_addr,
|
||||
sizeof(peth_hdr2->dest_addr));
|
||||
memcpy(pmadapter, peth_hdr2->src_addr,
|
||||
(t_u8 *)&src_addr,
|
||||
sizeof(peth_hdr2->src_addr));
|
||||
|
||||
/* Update the rx_pkt_offset to point the 802.3
|
||||
* hdr */
|
||||
prx_pd->rx_pkt_offset +=
|
||||
(hdr_len - sizeof(EthII_Hdr_t));
|
||||
prx_pd->rx_pkt_length -=
|
||||
(hdr_len - sizeof(EthII_Hdr_t));
|
||||
}
|
||||
/* update the prx_pkt pointer */
|
||||
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset);
|
||||
} else {
|
||||
pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
PRINTM(MERROR,
|
||||
"Drop invalid unicast sniffer pkt, subType=0x%x, flag=0x%x, pkt_type=%d\n",
|
||||
frmctl->sub_type, prx_pd->flags,
|
||||
prx_pd->rx_pkt_type);
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If the packet is not an unicast packet then send the packet
|
||||
* directly to os. Don't pass thru rx reordering
|
||||
*/
|
||||
if ((!IS_11N_ENABLED(priv) && !IS_116E_ENABLED(priv) &&
|
||||
if ((!IS_11N_ENABLED(priv) &&
|
||||
!(prx_pd->flags & RXPD_FLAG_PKT_DIRECT_LINK)) ||
|
||||
(memcmp(priv->adapter, priv->curr_addr,
|
||||
prx_pkt->eth803_hdr.dest_addr, MLAN_MAC_ADDR_LENGTH) &&
|
||||
!(prx_pd->flags & RXPD_FLAG_PKT_EASYMESH)) ||
|
||||
((prx_pd->flags & RXPD_FLAG_PKT_EASYMESH) &&
|
||||
(is_bcast_addr(prx_pkt->eth803_hdr.dest_addr) ||
|
||||
is_mcast_addr(prx_pkt->eth803_hdr.dest_addr)))) {
|
||||
prx_pkt->eth803_hdr.dest_addr, MLAN_MAC_ADDR_LENGTH))) {
|
||||
priv->snr = prx_pd->snr;
|
||||
priv->nf = prx_pd->nf;
|
||||
wlan_process_rx_packet(pmadapter, pmbuf);
|
||||
|
|
@ -895,8 +603,7 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
prx_pd->nf);
|
||||
}
|
||||
}
|
||||
if (!sta_ptr || (!sta_ptr->is_11n_enabled &&
|
||||
!sta_ptr->is_11ax_enabled)) {
|
||||
if (!sta_ptr || (!sta_ptr->is_11n_enabled)) {
|
||||
wlan_process_rx_packet(pmadapter, pmbuf);
|
||||
goto done;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,15 +130,9 @@ t_void *wlan_ops_sta_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_TDLS)
|
||||
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TDLS_PACKET;
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_EASYMESH;
|
||||
memcpy_ext(pmpriv->adapter, plocal_tx_pd->ra_mac, pmbuf->mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
/* Offset of actual data */
|
||||
plocal_tx_pd->tx_pkt_offset =
|
||||
(t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset -
|
||||
(t_ptr)plocal_tx_pd);
|
||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||
|
||||
if (!plocal_tx_pd->tx_control) {
|
||||
/* TxCtrl set by user or default */
|
||||
|
|
@ -177,37 +171,6 @@ t_void *wlan_ops_sta_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_control |= TXPD_RETRY_ENABLE;
|
||||
}
|
||||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MC_AGGR_PKT) {
|
||||
tx_ctrl *ctrl = (tx_ctrl *)&plocal_tx_pd->tx_control;
|
||||
mc_tx_ctrl *mc_ctrl =
|
||||
(mc_tx_ctrl *)&plocal_tx_pd->pkt_delay_2ms;
|
||||
plocal_tx_pd->tx_pkt_type = PKT_TYPE_802DOT11_MC_AGGR;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_START_CYCLE)
|
||||
ctrl->mc_cycle_start = MTRUE;
|
||||
else
|
||||
ctrl->mc_cycle_start = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_END_CYCLE)
|
||||
ctrl->mc_cycle_end = MTRUE;
|
||||
else
|
||||
ctrl->mc_cycle_end = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_START_AMPDU)
|
||||
ctrl->mc_ampdu_start = MTRUE;
|
||||
else
|
||||
ctrl->mc_ampdu_start = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_END_AMPDU)
|
||||
ctrl->mc_ampdu_end = MTRUE;
|
||||
else
|
||||
ctrl->mc_ampdu_end = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_RETRY)
|
||||
ctrl->mc_pkt_retry = MTRUE;
|
||||
else
|
||||
ctrl->mc_pkt_retry = MFALSE;
|
||||
ctrl->bw = pmbuf->u.mc_tx_info.bandwidth & 0x7;
|
||||
ctrl->tx_rate = pmbuf->u.mc_tx_info.mcs_index & 0x1f;
|
||||
mc_ctrl->abs_tsf_expirytime =
|
||||
wlan_cpu_to_le32(pmbuf->u.mc_tx_info.pkt_expiry);
|
||||
mc_ctrl->mc_seq = wlan_cpu_to_le16(pmbuf->u.mc_tx_info.seq_num);
|
||||
}
|
||||
endian_convert_TxPD(plocal_tx_pd);
|
||||
|
||||
/* Adjust the data offset and length to include TxPD in pmbuf */
|
||||
|
|
@ -266,12 +229,6 @@ mlan_status wlan_send_null_packet(pmlan_private priv, t_u8 flags)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#if defined(USB)
|
||||
if (!wlan_is_port_ready(pmadapter, priv->port_index)) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
||||
pmbuf = wlan_alloc_mlan_buffer(pmadapter, data_len, 0,
|
||||
MOAL_MALLOC_BUFFER);
|
||||
|
|
@ -300,11 +257,6 @@ mlan_status wlan_send_null_packet(pmlan_private priv, t_u8 flags)
|
|||
ret = pmadapter->ops.host_to_card(priv, MLAN_TYPE_DATA, pmbuf, MNULL);
|
||||
|
||||
switch (ret) {
|
||||
#ifdef USB
|
||||
case MLAN_STATUS_PRESOURCE:
|
||||
PRINTM(MINFO, "MLAN_STATUS_PRESOURCE is returned\n");
|
||||
break;
|
||||
#endif
|
||||
case MLAN_STATUS_RESOURCE:
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
PRINTM(MERROR, "STA Tx Error: Failed to send NULL packet!\n");
|
||||
|
|
|
|||
|
|
@ -315,19 +315,10 @@
|
|||
*/
|
||||
/** TLV type: BG scan repeat count */
|
||||
#define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 176) /* 0x01b0 */
|
||||
#ifdef USB
|
||||
/** TLV ID : USB Aggregation parameters */
|
||||
#define NXP_USB_AGGR_PARAM_TLV_ID (PROPRIETARY_TLV_BASE_ID + 177) /* 0x01b1 */
|
||||
#endif /* USB */
|
||||
/** TLV type: ps params in hs */
|
||||
#define TLV_TYPE_PS_PARAMS_IN_HS (PROPRIETARY_TLV_BASE_ID + 181) /* 0x01b5 */
|
||||
/** TLV type: hs wake hold off */
|
||||
#define TLV_TYPE_HS_WAKE_HOLDOFF (PROPRIETARY_TLV_BASE_ID + 182) /* 0x01b6 */
|
||||
/** TLV ID for multi chan info */
|
||||
#define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 183) /* 0x01b7 */
|
||||
/** TLV ID for multi chan group info */
|
||||
#define TLV_TYPE_MULTI_CHAN_GROUP_INFO_TLV_ID \
|
||||
(PROPRIETARY_TLV_BASE_ID + 184) /* 0x01b8 */
|
||||
/** TLV type : TDLS IDLE TIMEOUT */
|
||||
#define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194) /* 0x01c2 \
|
||||
*/
|
||||
|
|
@ -360,8 +351,6 @@
|
|||
/** TLV rssi info */
|
||||
#define TLV_TYPE_RSSI_INFO (PROPRIETARY_TLV_BASE_ID + 229) /* 0x01e5 */
|
||||
#define TLV_TYPE_IPV6_RA_OFFLOAD (PROPRIETARY_TLV_BASE_ID + 230) /* 0x01e6 */
|
||||
/** TLV type : FILS IP config params */
|
||||
#define TLV_TYPE_AP_FILS_IP_CFG (PROPRIETARY_TLV_BASE_ID + 231) /* 0x01e7 */
|
||||
/** TLV to indicate firmware only keep probe response while scan */
|
||||
#define TLV_TYPE_ONLYPROBERESP (PROPRIETARY_TLV_BASE_ID + 233) /* 0x01e9 */
|
||||
#define TLV_TYPE_RANDOM_MAC (PROPRIETARY_TLV_BASE_ID + 236) /* 0x01ec */
|
||||
|
|
@ -385,9 +374,6 @@
|
|||
#define TLV_TYPE_HS_WAKEUP_SOURCE_GPIO \
|
||||
(PROPRIETARY_TLV_BASE_ID + 261) /* 0x0205 */
|
||||
#define TLV_TYPE_POWER_TABLE (PROPRIETARY_TLV_BASE_ID + 262) /* 0x0206 */
|
||||
/** TLV ID for DRCS TimeSlice */
|
||||
#define NXP_DRCS_TIME_SLICE_TLV_ID (PROPRIETARY_TLV_BASE_ID + 263) /* 0x0207 \
|
||||
*/
|
||||
/** TLV type : TRIGGER CONDITION*/
|
||||
#define TLV_TYPE_ROM_TRIGGER (PROPRIETARY_TLV_BASE_ID + 264) /* 0x0208 */
|
||||
/** TLV type : RETRY_COUNT*/
|
||||
|
|
@ -403,10 +389,6 @@
|
|||
#define TLV_TYPE_MAX_CONN (PROPRIETARY_TLV_BASE_ID + 279) /* 0x0217 */
|
||||
/** TLV type: extend wakeup source */
|
||||
#define TLV_TYPE_WAKEUP_EXTEND (PROPRIETARY_TLV_BASE_ID + 280) /* 0x0218 */
|
||||
/** TLV type: HS antenna mode */
|
||||
#define TLV_TYPE_HS_ANTMODE (PROPRIETARY_TLV_BASE_ID + 281) /* 0x0219 */
|
||||
/** TLV type: robustcoex mode */
|
||||
#define TLV_TYPE_ROBUSTCOEX (PROPRIETARY_TLV_BASE_ID + 283) /* 0x021b */
|
||||
/** TLV type : BSSID blacklist*/
|
||||
#define TLV_TYPE_BLACKLIST_BSSID (PROPRIETARY_TLV_BASE_ID + 285) /* 0x021d */
|
||||
/** TLV type : BAND & RSSI*/
|
||||
|
|
@ -421,23 +403,6 @@
|
|||
/** TLV type : KEY params*/
|
||||
#define TLV_TYPE_ROAM_OFFLOAD_USER_SET_PMK \
|
||||
(PROPRIETARY_TLV_BASE_ID + 291) /* 0x0223 */
|
||||
/** TLV for RTT Range Request */
|
||||
#define TLV_TYPE_RTT_RANGE_REQUEST (PROPRIETARY_TLV_BASE_ID + 293) /* 0x0225 \
|
||||
*/
|
||||
/** TLV for RTT Range Cancel */
|
||||
#define TLV_TYPE_RTT_RANGE_CANCEL (PROPRIETARY_TLV_BASE_ID + 294) /* 0x0226 */
|
||||
/** TLV for RTT Result */
|
||||
#define TLV_TYPE_RTT_RESULT (PROPRIETARY_TLV_BASE_ID + 295) /* 0x0227 */
|
||||
/** TLV for RTTResponderInfo */
|
||||
#define TLV_TYPE_RTT_RESPONDER_INFO (PROPRIETARY_TLV_BASE_ID + 296) /* 0x0228 \
|
||||
*/
|
||||
/** TLV for RTTResponderEnCfg */
|
||||
#define TLV_TYPE_RTT_RESPONDER_EN_CFG \
|
||||
(PROPRIETARY_TLV_BASE_ID + 297) /* 0x0229 */
|
||||
/** TLV for RTTLCICfg */
|
||||
#define TLV_TYPE_RTT_LCI_CFG (PROPRIETARY_TLV_BASE_ID + 298) /* 0x022a */
|
||||
/** TLV for RTTLCRCfg */
|
||||
#define TLV_TYPE_RTT_LCR_CFG (PROPRIETARY_TLV_BASE_ID + 299) /* 0x022b */
|
||||
#define TLV_TYPE_LL_STAT_IFACE (PROPRIETARY_TLV_BASE_ID + 300) /* 0x022c */
|
||||
#define TLV_TYPE_LL_STAT_RADIO (PROPRIETARY_TLV_BASE_ID + 301) /* 0x022d */
|
||||
/**TLV type : Host MLME Flag*/
|
||||
|
|
@ -446,17 +411,9 @@
|
|||
/** TLV id: station flag */
|
||||
#define TLV_TYPE_UAP_STA_FLAGS (PROPRIETARY_TLV_BASE_ID + 313) /* 0x0239 */
|
||||
#endif /* UAP_SUPPORT */
|
||||
#define TLV_TYPE_DMCS_STATUS (PROPRIETARY_TLV_BASE_ID + 314) /* 0x023a */
|
||||
/** TLV type : ZERO DFS Operation */
|
||||
#define TLV_TYPE_ZERO_DFS_OPERATION (PROPRIETARY_TLV_BASE_ID + 315) /* 0x023b \
|
||||
*/
|
||||
#if defined(PCIE9098) || defined(SDAW693) || defined(SD9098) || \
|
||||
defined(USB9098) || defined(PCIE9097) || defined(USB9097) || \
|
||||
defined(SDIW624) || defined(PCIEAW693) || defined(PCIEIW624) || \
|
||||
defined(USBIW624) || defined(SD9097)
|
||||
/* TLV type: reg type */
|
||||
#define TLV_TYPE_REG_ACCESS_CTRL (PROPRIETARY_TLV_BASE_ID + 316) /* 0x023c*/
|
||||
#endif
|
||||
#define TLV_TYPE_POWER_TABLE_ATTR (PROPRIETARY_TLV_BASE_ID + 317) /* 0x023d */
|
||||
/** TLV type: fw cap info */
|
||||
#define TLV_TYPE_FW_CAP_INFO (PROPRIETARY_TLV_BASE_ID + 318) /* 0x023e */
|
||||
|
|
@ -471,8 +428,6 @@
|
|||
#define TLV_TYPE_SAE_PASSWORD (PROPRIETARY_TLV_BASE_ID + 321) /* 0x0241 */
|
||||
/** TLV type : DFS W53 Configuration */
|
||||
#define TLV_TYPE_DFS_W53_CFG (PROPRIETARY_TLV_BASE_ID + 325) /* 0x0245 */
|
||||
/** TLV type: MULTI AP Flag */
|
||||
#define TLV_TYPE_MULTI_AP (PROPRIETARY_TLV_BASE_ID + 326) /* 0x0246 */
|
||||
/** TLV type : AP wacp mode */
|
||||
#define TLV_TYPE_UAP_WACP_MODE (PROPRIETARY_TLV_BASE_ID + 327) /* 0x0247 */
|
||||
#define TLV_TYPE_PREV_BSSID (PROPRIETARY_TLV_BASE_ID + 330) /* 0x024a */
|
||||
|
|
@ -488,16 +443,9 @@
|
|||
#define NXP_ACTION_CHAN_SWITCH_ANNOUNCE \
|
||||
(PROPRIETARY_TLV_BASE_ID + 342) /* 0x0256 */
|
||||
#ifdef UAP_SUPPORT
|
||||
#define NXP_802_11_PER_PEER_STATS_CFG_TLV_ID \
|
||||
(PROPRIETARY_TLV_BASE_ID + 346) /* 0x025a */
|
||||
#define NXP_802_11_PER_PEER_STATS_ENTRY_TLV_ID \
|
||||
(PROPRIETARY_TLV_BASE_ID + 347) /* 0x025b */
|
||||
#endif /* UAP_SUPPORT */
|
||||
/** TLV type: secure boot uuid */
|
||||
#define TLV_TYPE_SECURE_BOOT_UUID (PROPRIETARY_TLV_BASE_ID + 348) /* 0x025c */
|
||||
#define TLV_TYPE_CLOUD_KEEP_ALIVE_ACK \
|
||||
(PROPRIETARY_TLV_BASE_ID + 349) /* 0x025d */
|
||||
#define TLV_TYPE_6G_SCAN_PARAMS (PROPRIETARY_TLV_BASE_ID + 350) /* 0x025e */
|
||||
/** TLV type: ps_ext_param */
|
||||
#define TLV_TYPE_PS_EXT_PARAM (PROPRIETARY_TLV_BASE_ID + 351) /* 0x025f */
|
||||
#define TLV_TYPE_MCLIENT_FW_CAPS (PROPRIETARY_TLV_BASE_ID + 352) /* 0x0260 */
|
||||
|
|
|
|||
216
mlan/mlan_txrx.c
216
mlan/mlan_txrx.c
|
|
@ -91,86 +91,6 @@ done:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
Stats_mcast_drv_t gmcast_stats = {0};
|
||||
/* This flag is used to protect the mcast drv stat update
|
||||
* when it's value is copied to provide to mlanutl
|
||||
* MTRUE = Update is allowed
|
||||
* MFALSE = Update is not allowed
|
||||
*/
|
||||
t_u8 mcast_drv_update_allow_flag = MTRUE;
|
||||
#define DEST_MAC_OFFSET 10
|
||||
#define CYCLE_START 1
|
||||
#define FIVE_SEC 5000000 /* 1000000 usec = 1sec*/
|
||||
/**
|
||||
* @brief This function calculates the cycle delta and driver time delta
|
||||
* for Mcast packets
|
||||
*
|
||||
* @param pmadapter A pointer to pmlan_adapter structure
|
||||
* @param pmbuf A pointer to the mlan_buffer for process
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
static void wlan_drv_mcast_cycle_delay_calulation(pmlan_adapter pmadapter,
|
||||
pmlan_buffer pmbuf)
|
||||
{
|
||||
static t_u32 prev_mcast_sec = 0;
|
||||
static t_u32 prev_mcast_usec = 0;
|
||||
t_u32 curr_ts_sec = 0;
|
||||
t_u32 curr_ts_usec = 0;
|
||||
t_s64 cycle_delta = 0;
|
||||
t_s64 profile_delta = 0;
|
||||
|
||||
if (mcast_drv_update_allow_flag == MFALSE)
|
||||
return;
|
||||
/* Take current time */
|
||||
if (pmadapter && pmadapter->pmoal_handle)
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &curr_ts_sec, &curr_ts_usec);
|
||||
else
|
||||
PRINTM(MERROR, "ERR: pmadapter or pmoal_handle NULL\n",
|
||||
__func__);
|
||||
|
||||
if (curr_ts_sec || curr_ts_usec) {
|
||||
/* Calculate profile delta */
|
||||
profile_delta = (curr_ts_sec - pmbuf->in_ts_sec) * 1000000;
|
||||
profile_delta += curr_ts_usec - pmbuf->in_ts_usec;
|
||||
|
||||
if ((profile_delta >= 0) && (profile_delta <= 1000))
|
||||
gmcast_stats.spent_time_under_1000usec++;
|
||||
else if ((profile_delta > 1000) && (profile_delta <= 2000))
|
||||
gmcast_stats.spent_time_over_1000usec++;
|
||||
else if ((profile_delta > 2000) && (profile_delta <= 3000))
|
||||
gmcast_stats.spent_time_over_2000usec++;
|
||||
else if (profile_delta > 3000)
|
||||
gmcast_stats.spent_time_over_3000usec++;
|
||||
}
|
||||
/* Process the start cycle data */
|
||||
cycle_delta = ((t_s64)pmbuf->in_ts_sec - (t_s64)prev_mcast_sec) *
|
||||
(t_s64)1000000;
|
||||
cycle_delta += pmbuf->in_ts_usec - prev_mcast_usec;
|
||||
|
||||
/* If start cycle delta is more than 5 sec ignore*/
|
||||
if ((pmbuf->u.mc_tx_info.mc_pkt_flags & (1 << CYCLE_START)) &&
|
||||
(cycle_delta < FIVE_SEC)) {
|
||||
if ((cycle_delta >= 0) && (cycle_delta <= 2300))
|
||||
gmcast_stats.cycle_recv_under_2300usec++;
|
||||
if ((cycle_delta > 2300) && (cycle_delta <= 2900))
|
||||
gmcast_stats.cycle_recv_in_time++;
|
||||
if ((cycle_delta > 2900) && (cycle_delta <= 3500))
|
||||
gmcast_stats.cycle_recv_over_2900usec++;
|
||||
if ((cycle_delta > 3500) && (cycle_delta <= 5000))
|
||||
gmcast_stats.cycle_recv_over_3500usec++;
|
||||
if ((cycle_delta > 5000) && (cycle_delta <= 10000))
|
||||
gmcast_stats.cycle_recv_over_5000usec++;
|
||||
if ((cycle_delta > 10000) && (cycle_delta <= 15000))
|
||||
gmcast_stats.cycle_recv_over_10000usec++;
|
||||
if (cycle_delta > 15000)
|
||||
gmcast_stats.cycle_recv_over_15000usec++;
|
||||
}
|
||||
/* Update the last received mcast cycle value */
|
||||
prev_mcast_sec = pmbuf->in_ts_sec;
|
||||
prev_mcast_usec = pmbuf->in_ts_usec;
|
||||
}
|
||||
/**
|
||||
* @brief This function checks the conditions and sends packet to device
|
||||
*
|
||||
|
|
@ -193,7 +113,6 @@ mlan_status wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf,
|
|||
#ifdef STA_SUPPORT
|
||||
PTxPD plocal_tx_pd = MNULL;
|
||||
#endif
|
||||
t_u8 dest_mac_first_octet = 0;
|
||||
|
||||
ENTER();
|
||||
head_ptr = (t_u8 *)priv->ops.process_txpd(priv, pmbuf);
|
||||
|
|
@ -206,30 +125,11 @@ mlan_status wlan_process_tx(pmlan_private priv, pmlan_buffer pmbuf,
|
|||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA)
|
||||
plocal_tx_pd = (TxPD *)(head_ptr + priv->intf_hr_len);
|
||||
#endif
|
||||
dest_mac_first_octet = *(head_ptr + priv->intf_hr_len +
|
||||
Tx_PD_SIZEOF(pmadapter) + DEST_MAC_OFFSET);
|
||||
|
||||
if (dest_mac_first_octet & 0x01)
|
||||
wlan_drv_mcast_cycle_delay_calulation(pmadapter, pmbuf);
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks.moal_tp_accounting(pmadapter->pmoal_handle,
|
||||
pmbuf, 4);
|
||||
if (pmadapter->tp_state_drop_point == 4)
|
||||
goto done;
|
||||
else {
|
||||
ret = pmadapter->ops.host_to_card(priv, MLAN_TYPE_DATA, pmbuf,
|
||||
tx_param);
|
||||
}
|
||||
ret = pmadapter->ops.host_to_card(priv, MLAN_TYPE_DATA, pmbuf,
|
||||
tx_param);
|
||||
done:
|
||||
switch (ret) {
|
||||
#ifdef USB
|
||||
case MLAN_STATUS_PRESOURCE:
|
||||
PRINTM(MINFO, "MLAN_STATUS_PRESOURCE is returned\n");
|
||||
DBG_HEXDUMP(MDAT_D, "Tx", head_ptr + priv->intf_hr_len,
|
||||
MIN(pmbuf->data_len + Tx_PD_SIZEOF(pmadapter),
|
||||
MAX_DATA_DUMP_LEN));
|
||||
break;
|
||||
#endif
|
||||
case MLAN_STATUS_RESOURCE:
|
||||
#ifdef STA_SUPPORT
|
||||
if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) &&
|
||||
|
|
@ -299,34 +199,14 @@ mlan_status wlan_write_data_complete(pmlan_adapter pmadapter,
|
|||
if ((pmbuf->buf_type == MLAN_BUF_TYPE_DATA) ||
|
||||
(pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA)) {
|
||||
PRINTM(MINFO, "wlan_write_data_complete: DATA %p\n", pmbuf);
|
||||
#if defined(USB)
|
||||
if ((pmbuf->flags & MLAN_BUF_FLAG_USB_TX_AGGR) &&
|
||||
pmbuf->use_count) {
|
||||
pmlan_buffer pmbuf_next;
|
||||
t_u32 i, use_count = pmbuf->use_count;
|
||||
for (i = 0; i <= use_count; i++) {
|
||||
pmbuf_next = pmbuf->pnext;
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MOAL_TX_BUF)
|
||||
pcb->moal_send_packet_complete(
|
||||
pmadapter->pmoal_handle, pmbuf,
|
||||
status);
|
||||
else
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
pmbuf = pmbuf_next;
|
||||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MOAL_TX_BUF) {
|
||||
/* pmbuf was allocated by MOAL */
|
||||
pcb->moal_send_packet_complete(pmadapter->pmoal_handle,
|
||||
pmbuf, status);
|
||||
} else {
|
||||
#endif
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MOAL_TX_BUF) {
|
||||
/* pmbuf was allocated by MOAL */
|
||||
pcb->moal_send_packet_complete(
|
||||
pmadapter->pmoal_handle, pmbuf, status);
|
||||
} else {
|
||||
/* pmbuf was allocated by MLAN */
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
}
|
||||
#if defined(USB)
|
||||
/* pmbuf was allocated by MLAN */
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
|
|
@ -404,27 +284,6 @@ t_void wlan_add_buf_bypass_txqueue(mlan_adapter *pmadapter, pmlan_buffer pmbuf)
|
|||
INLINE t_u8 wlan_bypass_tx_list_empty(mlan_adapter *pmadapter)
|
||||
{
|
||||
t_u32 bypass_pkt_count;
|
||||
#if defined(USB)
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
pmlan_private priv;
|
||||
int j = 0;
|
||||
for (j = 0; j < pmadapter->priv_num; ++j) {
|
||||
priv = pmadapter->priv[j];
|
||||
if (priv) {
|
||||
if (!wlan_is_port_ready(pmadapter,
|
||||
priv->port_index))
|
||||
continue;
|
||||
if (util_peek_list(pmadapter->pmoal_handle,
|
||||
&priv->bypass_txq,
|
||||
pcb->moal_spin_lock,
|
||||
pcb->moal_spin_unlock))
|
||||
return MFALSE;
|
||||
}
|
||||
}
|
||||
return MTRUE;
|
||||
}
|
||||
#endif
|
||||
bypass_pkt_count =
|
||||
util_scalar_read(pmadapter->pmoal_handle,
|
||||
&pmadapter->bypass_pkt_count,
|
||||
|
|
@ -482,11 +341,6 @@ t_void wlan_process_bypass_tx(pmlan_adapter pmadapter)
|
|||
for (j = 0; j < pmadapter->priv_num; ++j) {
|
||||
priv = pmadapter->priv[j];
|
||||
if (priv) {
|
||||
#if defined(USB)
|
||||
if (!wlan_is_port_ready(pmadapter,
|
||||
priv->port_index))
|
||||
continue;
|
||||
#endif
|
||||
pmbuf = (pmlan_buffer)util_dequeue_list(
|
||||
pmadapter->pmoal_handle,
|
||||
&priv->bypass_txq,
|
||||
|
|
@ -544,57 +398,3 @@ t_void wlan_process_bypass_tx(pmlan_adapter pmadapter)
|
|||
!wlan_bypass_tx_list_empty(pmadapter));
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function will convert 802.11 header to 802.3 header
|
||||
and save the backhaul station aid to pmbuf
|
||||
*
|
||||
* @param priv A pointer to mlan_private
|
||||
* @param pmbuf A pointer to mlan_buffer
|
||||
* @param prx_pd A pointer to RxPD
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
mlan_status wlan_check_easymesh_pkt(mlan_private *priv, pmlan_buffer pmbuf,
|
||||
RxPD *prx_pd)
|
||||
{
|
||||
Eth803Hdr_t *eth_header = MNULL;
|
||||
sta_node *sta_ptr = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u8 *pos = MNULL;
|
||||
t_u32 tmp = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
pos = (t_u8 *)prx_pd + prx_pd->rx_pkt_offset;
|
||||
eth_header = (Eth803Hdr_t *)pos;
|
||||
|
||||
PRINTM(MDAT_D,
|
||||
"Rx Easymesh ETH header destination address: " FULL_MACSTR
|
||||
"\nETH header source address: " FULL_MACSTR "\n",
|
||||
FULL_MAC2STR(eth_header->dest_addr),
|
||||
FULL_MAC2STR(eth_header->src_addr));
|
||||
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_UAP) {
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_EASYMESH;
|
||||
memcpy_ext(priv->adapter, pmbuf->mac, prx_pd->ta_mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
|
||||
sta_ptr = wlan_get_station_entry(priv, prx_pd->ta_mac);
|
||||
if (!sta_ptr) {
|
||||
PRINTM(MERROR,
|
||||
"Easymesh Error! Can't find station in the station list\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Save station aid to pmbuf and send it to moal */
|
||||
tmp = (t_u32)sta_ptr->aid;
|
||||
pmbuf->priority |= (tmp << 24);
|
||||
PRINTM(MDAT_D, "Easymesh: Rx for VLAN " FULL_MACSTR "\n",
|
||||
FULL_MAC2STR(prx_pd->ta_mac));
|
||||
}
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -37,13 +37,10 @@ Change log:
|
|||
#include "mlan_fw.h"
|
||||
#include "mlan_11h.h"
|
||||
#include "mlan_11ac.h"
|
||||
#include "mlan_11ax.h"
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
extern mlan_status wlan_sec_ioctl_passphrase(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
/********************************************************
|
||||
Local Functions
|
||||
|
|
@ -85,8 +82,7 @@ static t_bool wlan_can_radar_det_skip(mlan_private *priv)
|
|||
* is off then 11n_radar detection is not required for subsequent BSSes
|
||||
* since they will follow the primary bss.
|
||||
*/
|
||||
if (!priv->adapter->mc_policy &&
|
||||
(GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)) {
|
||||
if ((GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)) {
|
||||
memset(pmadapter, priv_list, 0x00, sizeof(priv_list));
|
||||
pcount = wlan_get_privs_by_cond(pmadapter, wlan_is_intf_active,
|
||||
priv_list);
|
||||
|
|
@ -340,9 +336,7 @@ static mlan_status wlan_uap_bss_ioctl_reset(pmlan_adapter pmadapter,
|
|||
for (i = 0; i < pmadapter->max_mgmt_ie_index; i++)
|
||||
memset(pmadapter, &pmpriv->mgmt_ie[i], 0, sizeof(custom_ie));
|
||||
|
||||
pmpriv->add_ba_param.timeout = pmadapter->tx_ba_timeout_support ?
|
||||
MLAN_DEFAULT_BLOCK_ACK_TIMEOUT :
|
||||
0;
|
||||
pmpriv->add_ba_param.timeout = MLAN_DEFAULT_BLOCK_ACK_TIMEOUT;
|
||||
pmpriv->add_ba_param.tx_win_size = MLAN_UAP_AMPDU_DEF_TXWINSIZE;
|
||||
pmpriv->add_ba_param.rx_win_size = MLAN_UAP_AMPDU_DEF_RXWINSIZE;
|
||||
pmpriv->user_rxwinsize = pmpriv->add_ba_param.rx_win_size;
|
||||
|
|
@ -370,40 +364,6 @@ static mlan_status wlan_uap_bss_ioctl_reset(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get FILS IP configuration value
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise
|
||||
* MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_uap_bss_ioctl_fils_ip_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 cmd_action = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function to process add station.
|
||||
*
|
||||
|
|
@ -632,39 +592,6 @@ static mlan_status wlan_uap_bss_ioctl_uap_oper_ctrl(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set 6E inband UPR or FILS Discovery frame
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_uap_bss_ioctl_6e_inband_frame(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 cmd_action = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_SYS_CONFIGURE,
|
||||
cmd_action, 0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get Uap statistics
|
||||
*
|
||||
|
|
@ -1121,8 +1048,7 @@ wlan_uap_sec_ioctl_set_encrypt_key(pmlan_adapter pmadapter,
|
|||
|
||||
ENTER();
|
||||
sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf;
|
||||
if ((pioctl_req->action != MLAN_ACT_SET) &&
|
||||
(pioctl_req->action != MLAN_ACT_PASN_KEY_DNLD)) {
|
||||
if ((pioctl_req->action != MLAN_ACT_SET)) {
|
||||
pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID;
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
|
|
@ -1795,37 +1721,6 @@ static mlan_status wlan_uap_snmp_mib_11h_fakeradar(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ACS scan
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
static mlan_status wlan_uap_bss_ioctl_acs_scan(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
if (pmadapter->uap_fw_ver < UAP_FW_VERSION_2) {
|
||||
PRINTM(MIOCTL, "FW don't support ACS SCAN API\n");
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_APCMD_ACS_SCAN,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
|
@ -1919,39 +1814,6 @@ mlan_status wlan_uap_get_beacon_dtim(pmlan_private pmpriv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get/Start/Stop/Reset stats
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
static mlan_status wlan_misc_ioctl_stats(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 cmd_action = 0;
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
cmd_action = pioctl_req->action;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_STATS, cmd_action, 0,
|
||||
(t_void *)pioctl_req,
|
||||
(t_void *)&misc->param.stats);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get deauth control.
|
||||
*
|
||||
|
|
@ -2139,12 +2001,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
else if (bss->sub_command == MLAN_OID_UAP_CHANNEL)
|
||||
status = wlan_uap_bss_ioctl_uap_channel(pmadapter,
|
||||
pioctl_req);
|
||||
else if (bss->sub_command == MLAN_OID_UAP_ACS_SCAN)
|
||||
status = wlan_uap_bss_ioctl_acs_scan(pmadapter,
|
||||
pioctl_req);
|
||||
else if (bss->sub_command == MLAN_OID_FILS_IP_CFG)
|
||||
status = wlan_uap_bss_ioctl_fils_ip_cfg(pmadapter,
|
||||
pioctl_req);
|
||||
else if (bss->sub_command == MLAN_OID_UAP_OPER_CTRL)
|
||||
status = wlan_uap_bss_ioctl_uap_oper_ctrl(pmadapter,
|
||||
pioctl_req);
|
||||
|
|
@ -2154,9 +2010,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
else if (bss->sub_command == MLAN_OID_ACTION_CHAN_SWITCH)
|
||||
status = wlan_uap_bss_ioctl_action_chan_switch(
|
||||
pmadapter, pioctl_req);
|
||||
else if (bss->sub_command == MLAN_OID_UAP_6E_INBAND_FRAME)
|
||||
status = wlan_uap_bss_ioctl_6e_inband_frame(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
#ifdef STA_SUPPORT
|
||||
case MLAN_IOCTL_SCAN:
|
||||
|
|
@ -2220,23 +2073,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
pmpriv->usr_dot_11ac_mcs_support;
|
||||
pget_info->param.fw_info.usr_dot_11ac_dev_cap_a =
|
||||
pmpriv->usr_dot_11ac_dev_cap_a;
|
||||
pget_info->param.fw_info.hw_hecap_len =
|
||||
pmadapter->hw_hecap_len;
|
||||
pget_info->param.fw_info.hw_2g_hecap_len =
|
||||
pmadapter->hw_2g_hecap_len;
|
||||
memcpy_ext(pmadapter,
|
||||
pget_info->param.fw_info.hw_he_cap,
|
||||
pmadapter->hw_he_cap,
|
||||
pmadapter->hw_hecap_len,
|
||||
sizeof(pget_info->param.fw_info.hw_he_cap));
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
pget_info->param.fw_info.hw_2g_he_cap,
|
||||
pmadapter->hw_2g_he_cap,
|
||||
pmadapter->hw_2g_hecap_len,
|
||||
sizeof(pget_info->param.fw_info.hw_2g_he_cap));
|
||||
pget_info->param.fw_info.hw_he_6g_cap =
|
||||
pmadapter->hw_he_6g_cap;
|
||||
pget_info->param.fw_info.region_code =
|
||||
pmadapter->region_code;
|
||||
if (pmadapter->otp_region &&
|
||||
|
|
@ -2313,15 +2149,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
else if (misc->sub_command == MLAN_OID_MISC_MAC_CONTROL)
|
||||
status = wlan_misc_ioctl_mac_control(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_MULTI_CHAN_CFG)
|
||||
status = wlan_misc_ioctl_multi_chan_config(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_MULTI_CHAN_POLICY)
|
||||
status = wlan_misc_ioctl_multi_chan_policy(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_DRCS_CFG)
|
||||
status = wlan_misc_ioctl_drcs_config(pmadapter,
|
||||
pioctl_req);
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
else if (misc->sub_command == MLAN_OID_MISC_WIFI_DIRECT_CONFIG)
|
||||
status = wlan_misc_p2p_config(pmadapter, pioctl_req);
|
||||
|
|
@ -2345,27 +2172,16 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
} else if (misc->sub_command == MLAN_OID_MISC_IND_RST_CFG)
|
||||
status = wlan_misc_ioctl_ind_rst_cfg(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_MC_AGGR_CFG)
|
||||
status = wlan_misc_ioctl_mc_aggr_cfg(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_STATS)
|
||||
status = wlan_misc_ioctl_stats(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_CH_LOAD)
|
||||
status = wlan_misc_ioctl_ch_load(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_CH_LOAD_RESULTS)
|
||||
status = wlan_misc_ioctl_ch_load_results(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_FOUNDRY_TYPE)
|
||||
status = wlan_misc_ioctl_foundry_type(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_GET_TSF)
|
||||
status = wlan_misc_ioctl_get_tsf(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_CROSS_CHIP_SYNCH)
|
||||
status = wlan_misc_ioctl_cross_chip_synch(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_TSP_CFG)
|
||||
status = wlan_misc_ioctl_tsp_config(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_GET_CHAN_REGION_CFG)
|
||||
status = wlan_misc_chan_reg_cfg(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_OPER_CLASS_CHECK)
|
||||
|
|
@ -2374,14 +2190,8 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
else if (misc->sub_command == MLAN_OID_MISC_OPER_CLASS)
|
||||
status = wlan_misc_ioctl_oper_class(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_AGGR_CTRL)
|
||||
status = wlan_misc_ioctl_aggr_ctrl(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_PER_PKT_CFG)
|
||||
status = wlan_misc_per_pkt_cfg(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_NET_MONITOR)
|
||||
status = wlan_misc_ioctl_net_monitor(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_FW_DUMP_EVENT)
|
||||
status = wlan_misc_ioctl_fw_dump_event(pmadapter,
|
||||
pioctl_req);
|
||||
|
|
@ -2420,19 +2230,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
else if (misc->sub_command == MLAN_OID_MISC_CCK_DESENSE_CFG)
|
||||
status = wlan_misc_ioctl_cck_desense_cfg(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_ROBUSTCOEX)
|
||||
status = wlan_misc_robustcoex(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_DMCS_CONFIG)
|
||||
status = wlan_misc_dmcs_config(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_CONFIG_RTT)
|
||||
status = wlan_config_rtt(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_CANCEL_RTT)
|
||||
status = wlan_cancel_rtt(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_RTT_RESPONDER_CFG)
|
||||
status = wlan_rtt_responder_cfg(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_GET_TX_RX_HISTOGRAM)
|
||||
status =
|
||||
wlan_get_tx_rx_histogram(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_CFP_INFO)
|
||||
status = wlan_get_cfpinfo(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_BOOT_SLEEP)
|
||||
|
|
@ -2454,9 +2251,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_CFP_TABLE)
|
||||
status = wlan_get_cfp_table(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_RANGE_EXT)
|
||||
status = wlan_misc_ioctl_range_ext(pmadapter,
|
||||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_WACP_MODE)
|
||||
status = wlan_misc_ioctl_wacp_mode(pmadapter,
|
||||
pioctl_req);
|
||||
|
|
@ -2476,8 +2270,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_CSI)
|
||||
status = wlan_misc_csi(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_MULTI_AP_CFG)
|
||||
status = wlan_misc_multi_ap_cfg(pmadapter, pioctl_req);
|
||||
else if (misc->sub_command == MLAN_OID_MISC_PER_BAND_TXPWR_CAP)
|
||||
status = wlan_misc_ioctl_per_band_txpwr_cap(pmadapter,
|
||||
pioctl_req);
|
||||
|
|
@ -2537,9 +2329,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
else if (sec->sub_command == MLAN_OID_SEC_CFG_REPORT_MIC_ERR)
|
||||
status = wlan_uap_sec_ioctl_report_mic_error(
|
||||
pmadapter, pioctl_req);
|
||||
else if (sec->sub_command == MLAN_OID_SEC_CFG_PASSPHRASE)
|
||||
status = wlan_sec_ioctl_passphrase(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
case MLAN_IOCTL_11N_CFG:
|
||||
status = wlan_11n_cfg_ioctl(pmadapter, pioctl_req);
|
||||
|
|
@ -2617,9 +2406,6 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
case MLAN_IOCTL_11AC_CFG:
|
||||
status = wlan_11ac_cfg_ioctl(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_IOCTL_11AX_CFG:
|
||||
status = wlan_11ax_cfg_ioctl(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_IOCTL_REG_MEM:
|
||||
reg_mem = (mlan_ds_reg_mem *)pioctl_req->pbuf;
|
||||
if (reg_mem->sub_command == MLAN_OID_REG_RW)
|
||||
|
|
|
|||
|
|
@ -94,13 +94,6 @@ static mlan_status wlan_upload_uap_rx_packet(pmlan_adapter pmadapter,
|
|||
}
|
||||
if (ret != MLAN_STATUS_PENDING)
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
#ifdef USB
|
||||
else if (IS_USB(pmadapter->card_type))
|
||||
pmadapter->callbacks.moal_recv_complete(pmadapter->pmoal_handle,
|
||||
MNULL,
|
||||
pmadapter->rx_data_ep,
|
||||
ret);
|
||||
#endif
|
||||
LEAVE();
|
||||
|
||||
return ret;
|
||||
|
|
@ -125,7 +118,6 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
t_u32 pkt_type;
|
||||
t_u32 tx_control;
|
||||
t_u8 dst_mac[MLAN_MAC_ADDR_LENGTH];
|
||||
tx_ctrl *ctrl;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -193,9 +185,8 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
/* Offset of actual data */
|
||||
plocal_tx_pd->tx_pkt_offset =
|
||||
(t_u16)((t_ptr)pmbuf->pbuf + pmbuf->data_offset -
|
||||
(t_ptr)plocal_tx_pd);
|
||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||
|
||||
if (!plocal_tx_pd->tx_control) {
|
||||
/* TxCtrl set by user or default */
|
||||
|
|
@ -206,11 +197,6 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type;
|
||||
plocal_tx_pd->tx_control = tx_control;
|
||||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_EASYMESH) {
|
||||
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_EASYMESH;
|
||||
memcpy_ext(pmpriv->adapter, plocal_tx_pd->ra_mac, pmbuf->mac,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_TX_CTRL) {
|
||||
if (pmbuf->u.tx_info.data_rate) {
|
||||
|
|
@ -238,42 +224,6 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_control |= TXPD_RETRY_ENABLE;
|
||||
}
|
||||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MC_AGGR_PKT) {
|
||||
tx_ctrl *ctrl = (tx_ctrl *)&plocal_tx_pd->tx_control;
|
||||
mc_tx_ctrl *mc_ctrl =
|
||||
(mc_tx_ctrl *)&plocal_tx_pd->pkt_delay_2ms;
|
||||
plocal_tx_pd->tx_pkt_type = PKT_TYPE_802DOT11_MC_AGGR;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_START_CYCLE)
|
||||
ctrl->mc_cycle_start = MTRUE;
|
||||
else
|
||||
ctrl->mc_cycle_start = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_END_CYCLE)
|
||||
ctrl->mc_cycle_end = MTRUE;
|
||||
else
|
||||
ctrl->mc_cycle_end = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_START_AMPDU)
|
||||
ctrl->mc_ampdu_start = MTRUE;
|
||||
else
|
||||
ctrl->mc_ampdu_start = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_END_AMPDU)
|
||||
ctrl->mc_ampdu_end = MTRUE;
|
||||
else
|
||||
ctrl->mc_ampdu_end = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_RETRY)
|
||||
ctrl->mc_pkt_retry = MTRUE;
|
||||
else
|
||||
ctrl->mc_pkt_retry = MFALSE;
|
||||
ctrl->bw = pmbuf->u.mc_tx_info.bandwidth & 0x7;
|
||||
ctrl->tx_rate = pmbuf->u.mc_tx_info.mcs_index & 0x1f;
|
||||
mc_ctrl->abs_tsf_expirytime =
|
||||
wlan_cpu_to_le32(pmbuf->u.mc_tx_info.pkt_expiry);
|
||||
mc_ctrl->mc_seq = wlan_cpu_to_le16(pmbuf->u.mc_tx_info.seq_num);
|
||||
}
|
||||
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_LLDE_PKT_FILTER) {
|
||||
ctrl = (tx_ctrl *)&plocal_tx_pd->tx_control;
|
||||
ctrl->llde_pkt_filter = MTRUE;
|
||||
}
|
||||
|
||||
endian_convert_TxPD(plocal_tx_pd);
|
||||
|
||||
|
|
@ -313,15 +263,6 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
|
||||
t_u32 last_rx_sec = 0;
|
||||
t_u32 last_rx_usec = 0;
|
||||
RxPD *prx_pd2;
|
||||
EthII_Hdr_t *peth_hdr2;
|
||||
wlan_802_11_header *pwlan_hdr;
|
||||
IEEEtypes_FrameCtl_t *frmctl;
|
||||
pmlan_buffer pmbuf2 = MNULL;
|
||||
mlan_802_11_mac_addr src_addr = {0x00};
|
||||
mlan_802_11_mac_addr dest_addr = {0x00};
|
||||
t_u16 hdr_len;
|
||||
t_u8 snap_eth_hdr[5] = {0xaa, 0xaa, 0x03, 0x00, 0x00};
|
||||
t_u8 ext_rate_info = 0;
|
||||
|
||||
ENTER();
|
||||
|
|
@ -330,12 +271,6 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
/* Endian conversion */
|
||||
endian_convert_RxPD(prx_pd);
|
||||
|
||||
if (prx_pd->flags & RXPD_FLAG_EXTRA_HEADER) {
|
||||
endian_convert_RxPD_extra_header(
|
||||
(rxpd_extra_info *)((t_u8 *)prx_pd +
|
||||
Rx_PD_SIZEOF(pmadapter)));
|
||||
}
|
||||
|
||||
if (priv->rx_pkt_info) {
|
||||
ext_rate_info = (t_u8)(prx_pd->rx_info >> 16);
|
||||
pmbuf->u.rx_info.data_rate =
|
||||
|
|
@ -349,14 +284,6 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
rx_pkt_type = prx_pd->rx_pkt_type;
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH) {
|
||||
PRINTM_NETINTF(MDAT_D, priv);
|
||||
PRINTM(MDAT_D, "UAP Rx Easymesh pkt flags : 0x%x\n",
|
||||
prx_pd->flags);
|
||||
ret = wlan_check_easymesh_pkt(priv, pmbuf, prx_pd);
|
||||
if (ret != MLAN_STATUS_SUCCESS)
|
||||
goto done;
|
||||
}
|
||||
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd + prx_pd->rx_pkt_offset);
|
||||
|
||||
PRINTM(MINFO,
|
||||
|
|
@ -397,111 +324,6 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
goto done;
|
||||
}
|
||||
if (pmadapter->enable_net_mon &&
|
||||
(prx_pd->flags & RXPD_FLAG_UCAST_PKT)) {
|
||||
pwlan_hdr = (wlan_802_11_header *)((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset);
|
||||
frmctl = (IEEEtypes_FrameCtl_t *)pwlan_hdr;
|
||||
if (frmctl->type == 0x02) {
|
||||
/* This is a valid unicast destined data packet, with
|
||||
* 802.11 and rtap headers attached. Duplicate this
|
||||
* packet and process this copy as a sniffed packet,
|
||||
* meant for monitor iface
|
||||
*/
|
||||
pmbuf2 = wlan_alloc_mlan_buffer(pmadapter,
|
||||
MLAN_RX_DATA_BUF_SIZE,
|
||||
MLAN_RX_HEADER_LEN,
|
||||
MOAL_ALLOC_MLAN_BUFFER);
|
||||
if (!pmbuf2) {
|
||||
PRINTM(MERROR,
|
||||
"Unable to allocate mlan_buffer for Rx");
|
||||
PRINTM(MERROR, "sniffed packet\n");
|
||||
} else {
|
||||
pmbuf2->bss_index = pmbuf->bss_index;
|
||||
pmbuf2->buf_type = pmbuf->buf_type;
|
||||
pmbuf2->priority = pmbuf->priority;
|
||||
pmbuf2->in_ts_sec = pmbuf->in_ts_sec;
|
||||
pmbuf2->in_ts_usec = pmbuf->in_ts_usec;
|
||||
pmbuf2->data_len = pmbuf->data_len;
|
||||
memcpy(pmadapter,
|
||||
pmbuf2->pbuf + pmbuf2->data_offset,
|
||||
pmbuf->pbuf + pmbuf->data_offset,
|
||||
pmbuf->data_len);
|
||||
|
||||
prx_pd2 = (RxPD *)(pmbuf2->pbuf +
|
||||
pmbuf2->data_offset);
|
||||
/* set pkt type of duplicated pkt to 802.11 */
|
||||
prx_pd2->rx_pkt_type = PKT_TYPE_802DOT11;
|
||||
wlan_process_uap_rx_packet(priv, pmbuf2);
|
||||
}
|
||||
|
||||
/* Now, process this pkt as a normal data packet.
|
||||
* rx_pkt_offset points to the 802.11 hdr. Construct
|
||||
* 802.3 header from 802.11 hdr fields and attach it
|
||||
* just before the payload.
|
||||
*/
|
||||
memcpy(pmadapter, (t_u8 *)&dest_addr, pwlan_hdr->addr1,
|
||||
sizeof(pwlan_hdr->addr1));
|
||||
memcpy(pmadapter, (t_u8 *)&src_addr, pwlan_hdr->addr2,
|
||||
sizeof(pwlan_hdr->addr2));
|
||||
|
||||
hdr_len = sizeof(wlan_802_11_header);
|
||||
|
||||
/* subtract mac addr field size for 3 address mac80211
|
||||
* header */
|
||||
if (!(frmctl->from_ds && frmctl->to_ds))
|
||||
hdr_len -= sizeof(mlan_802_11_mac_addr);
|
||||
|
||||
/* add 2 bytes of qos ctrl flags */
|
||||
if (frmctl->sub_type & QOS_DATA)
|
||||
hdr_len += 2;
|
||||
|
||||
if (prx_pd->rx_pkt_type == PKT_TYPE_AMSDU) {
|
||||
/* no need to generate 802.3 hdr, update pkt
|
||||
* offset */
|
||||
prx_pd->rx_pkt_offset += hdr_len;
|
||||
prx_pd->rx_pkt_length -= hdr_len;
|
||||
} else {
|
||||
/* skip 6-byte snap and 2-byte type */
|
||||
if (memcmp(pmadapter,
|
||||
(t_u8 *)pwlan_hdr + hdr_len,
|
||||
snap_eth_hdr,
|
||||
sizeof(snap_eth_hdr)) == 0)
|
||||
hdr_len += 8;
|
||||
|
||||
peth_hdr2 =
|
||||
(EthII_Hdr_t *)((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset +
|
||||
hdr_len -
|
||||
sizeof(EthII_Hdr_t));
|
||||
memcpy(pmadapter, peth_hdr2->dest_addr,
|
||||
(t_u8 *)&dest_addr,
|
||||
sizeof(peth_hdr2->dest_addr));
|
||||
memcpy(pmadapter, peth_hdr2->src_addr,
|
||||
(t_u8 *)&src_addr,
|
||||
sizeof(peth_hdr2->src_addr));
|
||||
|
||||
/* Update the rx_pkt_offset to point the 802.3
|
||||
* hdr */
|
||||
prx_pd->rx_pkt_offset +=
|
||||
(hdr_len - sizeof(EthII_Hdr_t));
|
||||
prx_pd->rx_pkt_length -=
|
||||
(hdr_len - sizeof(EthII_Hdr_t));
|
||||
}
|
||||
/* update the prx_pkt pointer */
|
||||
prx_pkt = (RxPacketHdr_t *)((t_u8 *)prx_pd +
|
||||
prx_pd->rx_pkt_offset);
|
||||
} else {
|
||||
pmbuf->status_code = MLAN_ERROR_PKT_SIZE_INVALID;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
PRINTM(MERROR,
|
||||
"Drop invalid unicast sniffer pkt, subType=0x%x, flag=0x%x, pkt_type=%d\n",
|
||||
frmctl->sub_type, prx_pd->flags,
|
||||
prx_pd->rx_pkt_type);
|
||||
wlan_free_mlan_buffer(pmadapter, pmbuf);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (rx_pkt_type != PKT_TYPE_BAR) {
|
||||
priv->rxpd_rate = prx_pd->rx_rate;
|
||||
|
|
@ -518,11 +340,7 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
}
|
||||
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH)
|
||||
sta_ptr = wlan_get_station_entry(priv, prx_pd->ta_mac);
|
||||
else
|
||||
sta_ptr = wlan_get_station_entry(priv,
|
||||
prx_pkt->eth803_hdr.src_addr);
|
||||
sta_ptr = wlan_get_station_entry(priv, prx_pkt->eth803_hdr.src_addr);
|
||||
if (sta_ptr) {
|
||||
sta_ptr->snr = prx_pd->snr;
|
||||
sta_ptr->nf = prx_pd->nf;
|
||||
|
|
@ -537,17 +355,8 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
|
||||
pmbuf->priority |= prx_pd->priority;
|
||||
if (pmadapter->enable_net_mon &&
|
||||
(prx_pd->rx_pkt_type == PKT_TYPE_802DOT11)) {
|
||||
wlan_process_uap_rx_packet(priv, pmbuf);
|
||||
goto done;
|
||||
}
|
||||
if (prx_pd->flags & RXPD_FLAG_PKT_EASYMESH)
|
||||
memcpy_ext(pmadapter, ta, prx_pd->ta_mac, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
else
|
||||
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
if ((rx_pkt_type != PKT_TYPE_BAR) && (prx_pd->priority < MAX_NUM_TID)) {
|
||||
sta_ptr = wlan_get_station_entry(priv, ta);
|
||||
if (sta_ptr) {
|
||||
|
|
@ -557,7 +366,7 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
}
|
||||
/* check if UAP enable 11n */
|
||||
if ((!priv->is_11n_enabled && !priv->is_11ax_enabled) ||
|
||||
if ((!priv->is_11n_enabled) ||
|
||||
(!wlan_11n_get_rxreorder_tbl((mlan_private *)priv, prx_pd->priority,
|
||||
ta) &&
|
||||
(prx_pd->rx_pkt_type != PKT_TYPE_AMSDU))) {
|
||||
|
|
@ -748,13 +557,6 @@ mlan_status wlan_process_uap_rx_packet(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
PRINTM(MDATA, "Rx dest " MACSTR "\n",
|
||||
MAC2STR(prx_pkt->eth803_hdr.dest_addr));
|
||||
|
||||
if (pmadapter->enable_net_mon) {
|
||||
if (prx_pd->rx_pkt_type == PKT_TYPE_802DOT11) {
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_NET_MONITOR;
|
||||
goto upload;
|
||||
}
|
||||
}
|
||||
|
||||
/* don't do packet forwarding in disconnected state */
|
||||
/* don't do packet forwarding when packet > 1514 */
|
||||
if (priv->media_connected == MFALSE)
|
||||
|
|
@ -813,77 +615,6 @@ mlan_status wlan_process_uap_rx_packet(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
(wlan_get_station_entry(priv,
|
||||
prx_pkt->eth803_hdr.dest_addr))) {
|
||||
/* Forwarding Intra-BSS packet */
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_RX_DEAGGR) {
|
||||
newbuf = wlan_alloc_mlan_buffer(
|
||||
pmadapter,
|
||||
MLAN_TX_DATA_BUF_SIZE_2K, 0,
|
||||
MOAL_MALLOC_BUFFER);
|
||||
if (newbuf) {
|
||||
newbuf->bss_index =
|
||||
pmbuf->bss_index;
|
||||
newbuf->buf_type =
|
||||
pmbuf->buf_type;
|
||||
newbuf->priority =
|
||||
pmbuf->priority;
|
||||
newbuf->in_ts_sec =
|
||||
pmbuf->in_ts_sec;
|
||||
newbuf->in_ts_usec =
|
||||
pmbuf->in_ts_usec;
|
||||
newbuf->data_offset =
|
||||
(Tx_PD_SIZEOF(
|
||||
pmadapter) +
|
||||
priv->intf_hr_len +
|
||||
DMA_ALIGNMENT);
|
||||
util_scalar_increment(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock);
|
||||
newbuf->flags |=
|
||||
MLAN_BUF_FLAG_BRIDGE_BUF;
|
||||
|
||||
/* copy the data, skip rxpd */
|
||||
memcpy_ext(
|
||||
pmadapter,
|
||||
(t_u8 *)newbuf->pbuf +
|
||||
newbuf->data_offset,
|
||||
pmbuf->pbuf +
|
||||
pmbuf->data_offset +
|
||||
prx_pd->rx_pkt_offset,
|
||||
pmbuf->data_len -
|
||||
prx_pd->rx_pkt_offset,
|
||||
pmbuf->data_len -
|
||||
prx_pd->rx_pkt_offset);
|
||||
newbuf->data_len =
|
||||
pmbuf->data_len -
|
||||
prx_pd->rx_pkt_offset;
|
||||
wlan_wmm_add_buf_txqueue(
|
||||
pmadapter, newbuf);
|
||||
if (util_scalar_read(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->pending_bridge_pkts,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_lock,
|
||||
pmadapter->callbacks
|
||||
.moal_spin_unlock) >
|
||||
RX_HIGH_THRESHOLD)
|
||||
wlan_drop_tx_pkts(priv);
|
||||
wlan_recv_event(
|
||||
priv,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
}
|
||||
pmadapter->callbacks.moal_recv_complete(
|
||||
pmadapter->pmoal_handle, pmbuf,
|
||||
pmadapter->rx_data_ep, ret);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
pmbuf->data_len -= prx_pd->rx_pkt_offset;
|
||||
pmbuf->data_offset += prx_pd->rx_pkt_offset;
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_BRIDGE_BUF;
|
||||
|
|
@ -920,14 +651,6 @@ upload:
|
|||
PRINTM(MDATA, "%lu.%06lu : Data => kernel seq_num=%d tid=%d\n",
|
||||
pmbuf->out_ts_sec, pmbuf->out_ts_usec, prx_pd->seq_num,
|
||||
prx_pd->priority);
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_NET_MONITOR) {
|
||||
// Use some rxpd space to save rxpd info for radiotap header
|
||||
// We should insure radiotap_info is not bigger than RxPD
|
||||
wlan_rxpdinfo_to_radiotapinfo(
|
||||
priv, (RxPD *)prx_pd,
|
||||
(radiotap_info *)(pmbuf->pbuf + pmbuf->data_offset -
|
||||
sizeof(radiotap_info)));
|
||||
}
|
||||
|
||||
ret = pmadapter->callbacks.moal_recv_packet(pmadapter->pmoal_handle,
|
||||
pmbuf);
|
||||
|
|
@ -939,13 +662,6 @@ upload:
|
|||
|
||||
if (ret != MLAN_STATUS_PENDING)
|
||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||
#ifdef USB
|
||||
else if (IS_USB(pmadapter->card_type))
|
||||
pmadapter->callbacks.moal_recv_complete(pmadapter->pmoal_handle,
|
||||
MNULL,
|
||||
pmadapter->rx_data_ep,
|
||||
ret);
|
||||
#endif
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
|
|
|||
1446
mlan/mlan_wmm.c
1446
mlan/mlan_wmm.c
File diff suppressed because it is too large
Load diff
|
|
@ -255,15 +255,18 @@ mlan_status wlan_wmm_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
void wlan_wmm_update_sta_tx_rate(pmlan_private priv, t_u8 *mac,
|
||||
HostCmd_TX_RATE_QUERY *rate);
|
||||
|
||||
void wlan_wmm_consume_byte_budget(raListTbl *ra_list, mlan_buffer *pmbuf);
|
||||
void wlan_wmm_consume_mpdu_budget(raListTbl *ra_list);
|
||||
static INLINE void wlan_wmm_consume_byte_budget(raListTbl *ra_list,
|
||||
mlan_buffer *pmbuf)
|
||||
{
|
||||
}
|
||||
|
||||
static INLINE void wlan_wmm_consume_mpdu_budget(raListTbl *ra_list)
|
||||
{
|
||||
}
|
||||
|
||||
static INLINE void wlan_advance_bss_on_pkt_push(pmlan_adapter pmadapter,
|
||||
mlan_bssprio_tbl *bssprio_tbl)
|
||||
{
|
||||
if (pmadapter->mclient_tx_supported)
|
||||
return;
|
||||
|
||||
bssprio_tbl->bssprio_cur = bssprio_tbl->bssprio_cur->pnext;
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -81,69 +81,6 @@ static const struct center_freq_desc center_freq_idx_map_5g[] = {
|
|||
{.pri_chan = 196, .ch_40 = 194, .ch_80 = 190, .ch_160 = 0},
|
||||
{.pri_chan = 0, .ch_40 = 42 /* terminator with default cfreq */}};
|
||||
|
||||
/* List of 6GHZ channels */
|
||||
static const struct center_freq_desc center_freq_idx_map_6g[] = {
|
||||
{.pri_chan = 1, .ch_40 = 3, .ch_80 = 7, .ch_160 = 15},
|
||||
{.pri_chan = 5, .ch_40 = 3, .ch_80 = 7, .ch_160 = 15},
|
||||
{.pri_chan = 9, .ch_40 = 11, .ch_80 = 7, .ch_160 = 15},
|
||||
{.pri_chan = 13, .ch_40 = 11, .ch_80 = 7, .ch_160 = 15},
|
||||
{.pri_chan = 17, .ch_40 = 19, .ch_80 = 23, .ch_160 = 15},
|
||||
{.pri_chan = 21, .ch_40 = 19, .ch_80 = 23, .ch_160 = 15},
|
||||
{.pri_chan = 25, .ch_40 = 27, .ch_80 = 23, .ch_160 = 15},
|
||||
{.pri_chan = 29, .ch_40 = 27, .ch_80 = 23, .ch_160 = 15},
|
||||
{.pri_chan = 33, .ch_40 = 35, .ch_80 = 39, .ch_160 = 47},
|
||||
{.pri_chan = 37, .ch_40 = 35, .ch_80 = 39, .ch_160 = 47},
|
||||
{.pri_chan = 41, .ch_40 = 43, .ch_80 = 39, .ch_160 = 47},
|
||||
{.pri_chan = 45, .ch_40 = 43, .ch_80 = 39, .ch_160 = 47},
|
||||
{.pri_chan = 49, .ch_40 = 51, .ch_80 = 55, .ch_160 = 47},
|
||||
{.pri_chan = 53, .ch_40 = 51, .ch_80 = 55, .ch_160 = 47},
|
||||
{.pri_chan = 57, .ch_40 = 59, .ch_80 = 55, .ch_160 = 47},
|
||||
{.pri_chan = 61, .ch_40 = 59, .ch_80 = 55, .ch_160 = 47},
|
||||
{.pri_chan = 65, .ch_40 = 67, .ch_80 = 71, .ch_160 = 79},
|
||||
{.pri_chan = 69, .ch_40 = 67, .ch_80 = 71, .ch_160 = 79},
|
||||
{.pri_chan = 73, .ch_40 = 75, .ch_80 = 71, .ch_160 = 79},
|
||||
{.pri_chan = 77, .ch_40 = 75, .ch_80 = 71, .ch_160 = 79},
|
||||
{.pri_chan = 81, .ch_40 = 83, .ch_80 = 87, .ch_160 = 79},
|
||||
{.pri_chan = 85, .ch_40 = 83, .ch_80 = 87, .ch_160 = 79},
|
||||
{.pri_chan = 89, .ch_40 = 91, .ch_80 = 87, .ch_160 = 79},
|
||||
{.pri_chan = 93, .ch_40 = 91, .ch_80 = 87, .ch_160 = 79},
|
||||
{.pri_chan = 97, .ch_40 = 99, .ch_80 = 103, .ch_160 = 111},
|
||||
{.pri_chan = 101, .ch_40 = 99, .ch_80 = 103, .ch_160 = 111},
|
||||
{.pri_chan = 105, .ch_40 = 107, .ch_80 = 103, .ch_160 = 111},
|
||||
{.pri_chan = 109, .ch_40 = 107, .ch_80 = 103, .ch_160 = 111},
|
||||
{.pri_chan = 113, .ch_40 = 115, .ch_80 = 119, .ch_160 = 111},
|
||||
{.pri_chan = 117, .ch_40 = 115, .ch_80 = 119, .ch_160 = 111},
|
||||
{.pri_chan = 121, .ch_40 = 123, .ch_80 = 119, .ch_160 = 111},
|
||||
{.pri_chan = 125, .ch_40 = 123, .ch_80 = 119, .ch_160 = 111},
|
||||
{.pri_chan = 129, .ch_40 = 131, .ch_80 = 135, .ch_160 = 143},
|
||||
{.pri_chan = 133, .ch_40 = 131, .ch_80 = 135, .ch_160 = 143},
|
||||
{.pri_chan = 137, .ch_40 = 139, .ch_80 = 135, .ch_160 = 143},
|
||||
{.pri_chan = 141, .ch_40 = 139, .ch_80 = 135, .ch_160 = 143},
|
||||
{.pri_chan = 145, .ch_40 = 147, .ch_80 = 151, .ch_160 = 143},
|
||||
{.pri_chan = 149, .ch_40 = 147, .ch_80 = 151, .ch_160 = 143},
|
||||
{.pri_chan = 153, .ch_40 = 155, .ch_80 = 151, .ch_160 = 143},
|
||||
{.pri_chan = 157, .ch_40 = 155, .ch_80 = 151, .ch_160 = 143},
|
||||
{.pri_chan = 161, .ch_40 = 163, .ch_80 = 167, .ch_160 = 175},
|
||||
{.pri_chan = 165, .ch_40 = 163, .ch_80 = 167, .ch_160 = 175},
|
||||
{.pri_chan = 169, .ch_40 = 171, .ch_80 = 167, .ch_160 = 175},
|
||||
{.pri_chan = 173, .ch_40 = 171, .ch_80 = 167, .ch_160 = 175},
|
||||
{.pri_chan = 177, .ch_40 = 179, .ch_80 = 183, .ch_160 = 175},
|
||||
{.pri_chan = 181, .ch_40 = 179, .ch_80 = 183, .ch_160 = 175},
|
||||
{.pri_chan = 185, .ch_40 = 187, .ch_80 = 183, .ch_160 = 175},
|
||||
{.pri_chan = 189, .ch_40 = 187, .ch_80 = 183, .ch_160 = 175},
|
||||
{.pri_chan = 193, .ch_40 = 195, .ch_80 = 199, .ch_160 = 207},
|
||||
{.pri_chan = 197, .ch_40 = 195, .ch_80 = 199, .ch_160 = 207},
|
||||
{.pri_chan = 201, .ch_40 = 203, .ch_80 = 199, .ch_160 = 207},
|
||||
{.pri_chan = 205, .ch_40 = 203, .ch_80 = 199, .ch_160 = 207},
|
||||
{.pri_chan = 209, .ch_40 = 211, .ch_80 = 215, .ch_160 = 207},
|
||||
{.pri_chan = 213, .ch_40 = 211, .ch_80 = 215, .ch_160 = 207},
|
||||
{.pri_chan = 217, .ch_40 = 219, .ch_80 = 215, .ch_160 = 207},
|
||||
{.pri_chan = 221, .ch_40 = 219, .ch_80 = 215, .ch_160 = 207},
|
||||
{.pri_chan = 225, .ch_40 = 227, .ch_80 = 0, .ch_160 = 0},
|
||||
{.pri_chan = 229, .ch_40 = 227, .ch_80 = 0, .ch_160 = 0},
|
||||
{.pri_chan = 233, .ch_40 = 0, .ch_80 = 0, .ch_160 = 0},
|
||||
{.pri_chan = 0, .ch_40 = 37 /* terminator with default cfreq */}};
|
||||
|
||||
/** WLAN header size */
|
||||
#define IEEE80211_HEADER_SIZE 24
|
||||
|
||||
|
|
@ -183,15 +120,6 @@ typedef enum _WLAN_802_11_NETWORK_TYPE {
|
|||
/* Reason codes */
|
||||
#define IEEE_80211_REASONCODE_UNSPECIFIED 1
|
||||
|
||||
typedef enum _IEEEtypes_Ext_ElementId_e {
|
||||
HE_CAPABILITY = 35,
|
||||
HE_OPERATION = 36,
|
||||
MU_EDCA_PARAM_SET = 38,
|
||||
MBSSID_CONFIG = 55,
|
||||
NON_INHERITANCE = 56,
|
||||
HE_6G_CAPABILITY = 59
|
||||
} IEEEtypes_Ext_ElementId_e;
|
||||
|
||||
/** IEEE Type definitions */
|
||||
typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e {
|
||||
SSID = 0,
|
||||
|
|
@ -209,8 +137,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e {
|
|||
CHANNEL_SWITCH_ANN = 37,
|
||||
EXTEND_CHANNEL_SWITCH_ANN = 60,
|
||||
QUIET = 40,
|
||||
MEASUREMENT_REQUEST = 38,
|
||||
MEASUREMENT_REPORT = 39,
|
||||
SUPPORTED_CHANNELS = 36,
|
||||
REGULATORY_CLASS = 59,
|
||||
HT_CAPABILITY = 45,
|
||||
|
|
@ -238,14 +164,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e {
|
|||
AID_INFO = 197,
|
||||
QUIET_CHAN = 198,
|
||||
OPER_MODE_NTF = 199,
|
||||
RNR = 201,
|
||||
FILS_SESSION = 210,
|
||||
FILS_PMKID_LIST = 211,
|
||||
FILS_IP_REQ = 212,
|
||||
FILS_IP_RESP = 213,
|
||||
FILS_KEY_AUTH = 214,
|
||||
FILS_KEY_DELIVERY = 215,
|
||||
FILS_INDICATION = 240,
|
||||
|
||||
ERP_INFO = 42,
|
||||
|
||||
|
|
@ -306,33 +224,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t {
|
|||
t_u8 data[IEEE_MAX_IE_SIZE - sizeof(IEEEtypes_Header_t)];
|
||||
} MLAN_PACK_END IEEEtypes_Generic_t, *pIEEEtypes_Generic_t;
|
||||
|
||||
#define MEASURE_TYPE_CLI 8
|
||||
#define MEASURE_TYPE_LOCATION_CIVIC 9
|
||||
|
||||
/** Measurement Report IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MeasurementReport_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Measurement Token */
|
||||
t_u8 ms_token;
|
||||
/** Measurement Report Mode */
|
||||
t_u8 ms_rp_mode;
|
||||
/** Measurement Type, value in MEASURE_TYPE_XXX */
|
||||
t_u8 ms_type;
|
||||
/** variable */
|
||||
t_u8 variable[];
|
||||
} MLAN_PACK_END IEEEtypes_MeasurementReport_t;
|
||||
|
||||
/** Report */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_Report_t {
|
||||
/** Subelement ID */
|
||||
t_u8 subelement_id;
|
||||
/** length */
|
||||
t_u8 length;
|
||||
/** variable */
|
||||
t_u8 variable[];
|
||||
} MLAN_PACK_END IEEEtypes_Report_t;
|
||||
|
||||
/**ft capability policy*/
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_FtCapPolicy_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
|
|
@ -1013,28 +904,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_Tspec_Action_e {
|
|||
|
||||
} MLAN_PACK_END IEEEtypes_WMM_Tspec_Action_e;
|
||||
|
||||
/** NAN SDF vendor oui size */
|
||||
#define NAN_SDF_VENDOR_SIZE 4
|
||||
/** NAN service descriptor attribute offset */
|
||||
#define NAN_SDA_OFFSET 5
|
||||
/** NAN service control type offset */
|
||||
#define NAN_SRVC_CTRL_OFFSET 11
|
||||
/** Service control field */
|
||||
#define NAN_SRV_CTRL_TYPE_MASK (BIT(0) | BIT(1))
|
||||
/** NAN service control type */
|
||||
#define NAN_PUBLISH 0
|
||||
#define NAN_FOLLOW_UP 2
|
||||
|
||||
/** NAN Attribute ID list */
|
||||
typedef MLAN_PACK_START enum _Nan_AttrId_e {
|
||||
NAN_ATTR_SDA = 0x03
|
||||
} MLAN_PACK_END Nan_AttrId_e;
|
||||
|
||||
/** Public Action Codes */
|
||||
typedef MLAN_PACK_START enum _IEEEtypes_Public_ActionCategory_e {
|
||||
IEEE_PUBLIC_ACTION_CATEGORY_VENDOR_SPECIFIC = 9
|
||||
} MLAN_PACK_END IEEEtypes_Public_ActionCategory_e;
|
||||
|
||||
/** WMM TSPEC Category Action Base */
|
||||
typedef MLAN_PACK_START struct {
|
||||
IEEEtypes_ActionCategory_e category;
|
||||
|
|
@ -1230,65 +1099,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_HTInfo_t {
|
|||
HTInfo_t ht_info;
|
||||
} MLAN_PACK_END IEEEtypes_HTInfo_t, *pIEEEtypes_HTInfo_t;
|
||||
|
||||
/** the AP which send the multi_bssid IE */
|
||||
#define MULTI_BSSID_AP 1
|
||||
/** the AP which don't send beacon */
|
||||
#define MULTI_BSSID_SUB_AP 2
|
||||
/** IEEEtypes_NotxBssCap_t */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_NotxBssCap_t {
|
||||
/** Nontransmitted BSSID Capability: Element ID */
|
||||
t_u8 element_id;
|
||||
/** Nontransmitted BSSID Capability : Length */
|
||||
t_u8 len;
|
||||
/** capability */
|
||||
t_u16 cap;
|
||||
} MLAN_PACK_END IEEEtypes_NotxBssCap_t, *pIEEEtypes_NotxBssCap_t;
|
||||
|
||||
/** Multi BSSID IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MultiBSSIDIndex_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** BSSID Index */
|
||||
t_u8 bssid_index;
|
||||
/** DTIM Period (Optional, not Present in ProbeRsp) */
|
||||
t_u8 dtim_period;
|
||||
/** DTIM Count (Optional, not Present in ProbeRsp) */
|
||||
t_u8 dtim_count;
|
||||
} MLAN_PACK_END IEEEtypes_MultiBSSIDIndex_t, *pIEEEtypes_MultiBSSIDIndex_t;
|
||||
|
||||
/** NonTransmitted BSSID Profile Subelement IE */
|
||||
/** SUBID for IEEEtypes_NonTransBSSIDCap_t */
|
||||
#define NONTRANS_BSSID_PROFILE_SUBELEM_ID 0
|
||||
|
||||
/** NonTransmitted BSSID Capability IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_NonTransBSSIDProfile_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
t_u8 profile_data[];
|
||||
} MLAN_PACK_END IEEEtypes_NonTransBSSIDProfile_t,
|
||||
*pIEEEtypes_NonTransBSSIDProfile_t;
|
||||
|
||||
/** Multi BSSID IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MultiBSSID_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Max BSSID Indicator */
|
||||
t_u8 max_bssid_indicator;
|
||||
/** Optional Subelement data*/
|
||||
t_u8 sub_elem_data[];
|
||||
} MLAN_PACK_END IEEEtypes_MultiBSSID_t, *pIEEEtypes_MultiBSSID_t;
|
||||
|
||||
/** Multi BSSID Configuration IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MBSSID_Config_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** BSSID Count */
|
||||
t_u8 bssid_cnt;
|
||||
/** Full Set Rx Periodicity */
|
||||
t_u8 fs_rx_periodicity;
|
||||
} MLAN_PACK_END IEEEtypes_MBSSID_Config_t, *pIEEEtypes_MBSSID_Config_t;
|
||||
/** 20/40 BSS Coexistence IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_2040BSSCo_t {
|
||||
/** Generic IE header */
|
||||
|
|
@ -1462,220 +1272,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_OperModeNtf_t {
|
|||
t_u8 oper_mode;
|
||||
} MLAN_PACK_END IEEEtypes_OperModeNtf_t, *pIEEEtypes_OperModeNtf_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_Extension_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** payload */
|
||||
t_u8 data[];
|
||||
} MLAN_PACK_END IEEEtypes_Extension_t, *pIEEEtypes_Extension_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsMap_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Max HE-MAC for 8 SS */
|
||||
t_u8 max_mcs_8ss : 2;
|
||||
/** Max HE-MAC for 7 SS */
|
||||
t_u8 max_mcs_7ss : 2;
|
||||
/** Max HE-MAC for 6 SS */
|
||||
t_u8 max_mcs_6ss : 2;
|
||||
/** Max HE-MAC for 5 SS */
|
||||
t_u8 max_mcs_5ss : 2;
|
||||
/** Max HE-MAC for 4 SS */
|
||||
t_u8 max_mcs_4ss : 2;
|
||||
/** Max HE-MAC for 3 SS */
|
||||
t_u8 max_mcs_3ss : 2;
|
||||
/** Max HE-MAC for 2 SS */
|
||||
t_u8 max_mcs_2ss : 2;
|
||||
/** Max HE-MAC for 1 SS */
|
||||
t_u8 max_mcs_1ss : 2;
|
||||
#else
|
||||
/** Max HE-MAC for 1 SS */
|
||||
t_u8 max_mcs_1ss : 2;
|
||||
/** Max HE-MAC for 2 SS */
|
||||
t_u8 max_mcs_2ss : 2;
|
||||
/** Max HE-MAC for 3 SS */
|
||||
t_u8 max_mcs_3ss : 2;
|
||||
/** Max HE-MAC for 4 SS */
|
||||
t_u8 max_mcs_4ss : 2;
|
||||
/** Max HE-MAC for 5 SS */
|
||||
t_u8 max_mcs_5ss : 2;
|
||||
/** Max HE-MAC for 6 SS */
|
||||
t_u8 max_mcs_6ss : 2;
|
||||
/** Max HE-MAC for 7 SS */
|
||||
t_u8 max_mcs_7ss : 2;
|
||||
/** Max HE-MAC for 8 SS */
|
||||
t_u8 max_mcs_8ss : 2;
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_HeMcsMap_t, *pIEEEtypes_HeMcsMap_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsNss_t {
|
||||
/** HE Rx MCS and NSS Set */
|
||||
t_u16 rx_mcs;
|
||||
/** HE Tx MCS and NSS Set*/
|
||||
t_u16 tx_mcs;
|
||||
} MLAN_PACK_END IEEEtypes_HeMcsNss_t, *pIEEEtypes_HeMcsNss_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** he mac capability info */
|
||||
t_u8 he_mac_cap[6];
|
||||
/** he phy capability info */
|
||||
t_u8 he_phy_cap[11];
|
||||
/** he txrx mcs support (for 80 MHz) */
|
||||
t_u8 he_txrx_mcs_support[4];
|
||||
/** Optional Field, including he_txrx_mcs_support for 160 and 80+80 MHz,
|
||||
* and PPE Thresholds */
|
||||
t_u8 option[28];
|
||||
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeOpParam_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Reserved, including 6G Operation Info Pressent (bit17) */
|
||||
t_u8 reserved : 6; /* bit 18-23 */
|
||||
/* 6g operation info present */
|
||||
t_u8 he_6g_op_info_present : 1; /* bit 17 */
|
||||
/** ER SU Disable */
|
||||
t_u8 er_su_disable : 1; /* bit 16 */
|
||||
/** Co-Hosted BSS */
|
||||
t_u16 co_located_bss : 1; /* bit 15 */
|
||||
/** VHT Operation Info Present */
|
||||
t_u16 vht_op_info_present : 1; /* bit 14 */
|
||||
/** TXOP Duration RTS Threshold */
|
||||
t_u16 txop_dur_rts_threshold : 10; /* bit 4-13 */
|
||||
/** TWT Required */
|
||||
t_u16 twt_req : 1; /* bit 3 */
|
||||
/** Default PE Duration */
|
||||
t_u16 default_pe_dur : 3; /* bit 0-2 */
|
||||
#else
|
||||
/** Default PE Duration */
|
||||
t_u16 default_pe_dur : 3; /* bit 0-2 */
|
||||
/** TWT Required */
|
||||
t_u16 twt_req : 1; /* bit 3 */
|
||||
/** TXOP Duration RTS Threshold */
|
||||
t_u16 txop_dur_rts_threshold : 10; /* bit 4-13 */
|
||||
/** VHT Operation Info Present */
|
||||
t_u16 vht_op_info_present : 1; /* bit 14 */
|
||||
/** Co-Hosted BSS */
|
||||
t_u16 co_located_bss : 1; /* bit 15 */
|
||||
/** ER SU Disable */
|
||||
t_u8 er_su_disable : 1; /* bit 16 */
|
||||
/* 6g operation info present */
|
||||
t_u8 he_6g_op_info_present : 1; /* bit 17 */
|
||||
/** Reserved bit 18-23 */
|
||||
t_u8 reserved : 6; /* bit 18-23 */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_HeOpParam_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeBssColorInfo_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** BSS Color Disabled */
|
||||
t_u8 bss_color_disabled : 1; /* bit 7 */
|
||||
/** Partial BSS Color */
|
||||
t_u8 partial_bss_color : 1; /* bit 6 */
|
||||
/** BSS Color */
|
||||
t_u8 bss_color : 6; /* bit 0-5 */
|
||||
#else
|
||||
/** BSS Color */
|
||||
t_u8 bss_color : 6; /* bit 0-5 */
|
||||
/** Partial BSS Color */
|
||||
t_u8 partial_bss_color : 1; /* bit 6 */
|
||||
/** BSS Color Disabled */
|
||||
t_u8 bss_color_disabled : 1; /* bit 7 */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_HeBssColorInfo_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeOp_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** HE Operation Parameters */
|
||||
IEEEtypes_HeOpParam_t he_op_param;
|
||||
/** BSS Color Info */
|
||||
IEEEtypes_HeBssColorInfo_t bss_color_info;
|
||||
/** Basic HE-MCS and NSS Set */
|
||||
IEEEtypes_HeMcsMap_t basic_he_mcs_nss;
|
||||
/** Optional Field, including VHT Operation Info Max Co-Hosted BSSID
|
||||
* Indicator, and 6Ghz Operation Info */
|
||||
t_u8 option[9];
|
||||
} MLAN_PACK_END IEEEtypes_HeOp_t;
|
||||
|
||||
/** MU EDCA Parameter Set */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_MUEDCAParamSet_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Extended Tag */
|
||||
t_u8 ext_tag;
|
||||
/** QOS Information */
|
||||
t_u8 qos_info;
|
||||
/** MUAC BE Paramter Record */
|
||||
t_u8 muac_be[3];
|
||||
/** MUAC BK Paramter Record */
|
||||
t_u8 muac_bk[3];
|
||||
/** MUAC VI Paramter Record */
|
||||
t_u8 muac_vi[3];
|
||||
/** MUAC VO Paramter Record */
|
||||
t_u8 muac_vo[3];
|
||||
} MLAN_PACK_END IEEEtypes_MUEDCAParamSet_t, *pIEEEtypes_MUEDCAParamSet_t;
|
||||
|
||||
/** IEEE format IE */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_Element_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** IE data */
|
||||
t_u8 data[];
|
||||
} MLAN_PACK_END IEEEtypes_Element_t, *pIEEEtypes_Element_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_6G_control_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** reserved */
|
||||
t_u8 reserved : 2; /* bit 6-7 */
|
||||
/** regulatory info */
|
||||
t_u8 regulatory_info : 3; /* bit 3-5 */
|
||||
/** duplicate_beacon */
|
||||
t_u8 duplicate_beacon : 1; /* bit 2 */
|
||||
/** channel width */
|
||||
t_u8 channel_width : 2; /* bit 0-1 */
|
||||
#else
|
||||
/** channel width */
|
||||
t_u8 channel_width : 2; /* bit 0-1 */
|
||||
/** duplicate_beacon */
|
||||
t_u8 duplicate_beacon : 1; /* bit 2 */
|
||||
/** regulatory info */
|
||||
t_u8 regulatory_info : 3; /* bit 3-5 */
|
||||
/** reserved */
|
||||
t_u8 reserved : 2; /* bit 6-7 */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_6G_control_t;
|
||||
|
||||
/* IEEEtypes_He6GOpInfo_t */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_He6GOpInfo_t {
|
||||
/** primary channel */
|
||||
t_u8 primary_channel;
|
||||
/** control */
|
||||
IEEEtypes_6G_control_t control;
|
||||
/** center freq0 */
|
||||
t_u8 channel_center_freq0;
|
||||
/** center freq1 */
|
||||
t_u8 channel_center_freq1;
|
||||
/** minimum rate */
|
||||
t_u8 minimum_rate;
|
||||
} MLAN_PACK_END IEEEtypes_He6GOpInfo_t, *pIEEEtypes_He6GOpInfo_t;
|
||||
|
||||
/* IEEEtypes_HE6GCap_t */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HE6GCap_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** he 6g capability */
|
||||
t_u16 capa;
|
||||
} MLAN_PACK_END IEEEtypes_HE6GCap_t, *pIEEEtypes_HE6GCap_t;
|
||||
|
||||
/** default channel switch count */
|
||||
#define DEF_CHAN_SWITCH_COUNT 5
|
||||
|
||||
|
|
@ -1711,7 +1307,7 @@ typedef MLAN_PACK_START struct {
|
|||
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
|
||||
|
||||
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
|
||||
#define WLAN_11H_MAX_SUBBANDS 6
|
||||
#define WLAN_11H_MAX_SUBBANDS 5
|
||||
|
||||
/** IEEE Power Constraint element (7.3.2.15) */
|
||||
typedef MLAN_PACK_START struct {
|
||||
|
|
@ -1931,7 +1527,7 @@ typedef MLAN_PACK_START struct {
|
|||
#define MAX_SCAN_RSP_BUF (16 * 1024)
|
||||
|
||||
/** Maximum number of channels that can be sent in user scan config */
|
||||
#define WLAN_USER_SCAN_CHAN_MAX 109
|
||||
#define WLAN_USER_SCAN_CHAN_MAX 50
|
||||
/** Maximum length of SSID list */
|
||||
#define MRVDRV_MAX_SSID_LIST_LENGTH 10
|
||||
|
||||
|
|
@ -1995,105 +1591,6 @@ typedef MLAN_PACK_START struct _ChanStatistics_t {
|
|||
t_u8 max_rss;
|
||||
} MLAN_PACK_END ChanStatistics_t;
|
||||
|
||||
#define MLAN_6G_CHAN_MAX 59
|
||||
#define MLAN_RNR_COLOC_AP_MAX MLAN_6G_CHAN_MAX
|
||||
#define WLAN_MAX_6G_SCAN_PARAMS_LIST 20
|
||||
#define SHORT_SSID_VALID MBIT(0)
|
||||
#define UNSOLICITED_PROBE MBIT(1)
|
||||
|
||||
/**
|
||||
* IOCTL 6g scan params List sub-structure sent in wlan_ioctl_user_scan_cfg
|
||||
*/
|
||||
typedef MLAN_PACK_START struct _wlan_6g_scan_params {
|
||||
/** scan channel */
|
||||
t_u8 channel;
|
||||
/** bit0: short_ssid_valid, bit1: unsolicited_probe */
|
||||
t_u16 flags;
|
||||
/** short ssid */
|
||||
t_u32 short_ssid;
|
||||
/** bssid */
|
||||
t_u8 bssid[6];
|
||||
} MLAN_PACK_END wlan_6g_scan_params;
|
||||
|
||||
/*
|
||||
* Reduced Neighbor Report(RNR), based on 802.11ax-2021,
|
||||
* section 9.4.2.170.
|
||||
*/
|
||||
#define IEEE80211_RNR_TBTT_INFO_OFFSET_BSSID_BSSPARAMS 9
|
||||
#define IEEE80211_RNR_TBTT_INFO_OFFSET_BSSID_SSSID_BSSPARAMS 13
|
||||
|
||||
/** Get count of TBTT Information (bit 7:4) */
|
||||
#define GET_RNR_TBTT_INFO_HDR_COUNT(hdr) ((hdr >> 4) & 0x0f)
|
||||
#define GET_RNR_TBTT_INFO_BSSPARAMS_BIT(bss_params, bit) \
|
||||
(bss_params >> bit) & 0x01
|
||||
|
||||
/** RNR BSS parameters */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_RnrBssParams_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Reserved */
|
||||
t_u8 rsrvd : 1;
|
||||
/** Co-Located AP */
|
||||
t_u8 colocated : 1;
|
||||
/** Unsolicited Probe Responses Active */
|
||||
t_u8 unsolicited_probe : 1;
|
||||
/** Member Of ESS With 2.4/5 GHz Co-Located AP */
|
||||
t_u8 colocated_ess : 1;
|
||||
/** Transmitted BSSID */
|
||||
t_u8 transmitted_bssid : 1;
|
||||
/** Multiple BSSID */
|
||||
t_u8 multi_bss : 1;
|
||||
/** Same SSID */
|
||||
t_u8 same_ssid : 1;
|
||||
/** OCT Recommended */
|
||||
t_u8 oct_recommended : 1;
|
||||
#else
|
||||
/** OCT Recommended */
|
||||
t_u8 oct_recommended : 1;
|
||||
/** Same SSID */
|
||||
t_u8 same_ssid : 1;
|
||||
/** Multiple BSSID */
|
||||
t_u8 multi_bss : 1;
|
||||
/** Transmitted BSSID */
|
||||
t_u8 transmitted_bssid : 1;
|
||||
/** Member Of ESS With 2.4/5 GHz Co-Located AP */
|
||||
t_u8 colocated_ess : 1;
|
||||
/** Unsolicited Probe Responses Active */
|
||||
t_u8 unsolicited_probe : 1;
|
||||
/** Co-Located AP */
|
||||
t_u8 colocated : 1;
|
||||
/** Reserved */
|
||||
t_u8 rsrvd : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} MLAN_PACK_END IEEEtypes_RnrBssParams_t, *pIEEEtypes_RnrBssParams_t;
|
||||
|
||||
/** structure for RNR Neighbor AP Information */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_RnrNeighborApInfo_t {
|
||||
/* TBTT Information Header */
|
||||
t_u8 tbtt_info_hdr;
|
||||
/* TBTT Information Length */
|
||||
t_u8 tbtt_info_len;
|
||||
/** Operating Class */
|
||||
t_u8 oper_class;
|
||||
/** Channel Number */
|
||||
t_u8 chan_number;
|
||||
} MLAN_PACK_END IEEEtypes_RnrNeighborApInfo_t, *pIEEEtypes_RnrNeighborApInfo_t;
|
||||
|
||||
/** structure for RNR colocated ap */
|
||||
typedef MLAN_PACK_START struct _RnrColocatedAp_t {
|
||||
/** BSSID */
|
||||
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||
/** SSID */
|
||||
mlan_802_11_ssid ssid;
|
||||
/** Short-SSID */
|
||||
t_u32 short_ssid;
|
||||
/** Operating Class */
|
||||
t_u8 oper_class;
|
||||
/** Channel Number */
|
||||
t_u8 chan_number;
|
||||
/** BSS parameters */
|
||||
IEEEtypes_RnrBssParams_t bss_params;
|
||||
} MLAN_PACK_END RnrColocatedAp_t, *pRnrColocatedAp_t;
|
||||
|
||||
/** Enhance ext scan type defination */
|
||||
typedef enum _MLAN_EXT_SCAN_TYPE {
|
||||
EXT_SCAN_DEFAULT,
|
||||
|
|
@ -2161,10 +1658,6 @@ typedef MLAN_PACK_START struct {
|
|||
mlan_802_11_mac_addr bssid_list[MAX_BSSID_FILTER_LIST];
|
||||
/** use scan setting from scan_cfg only */
|
||||
t_u8 scan_cfg_only;
|
||||
/**num of 6g scan params for OOB scan */
|
||||
t_u8 num_6g_scan_params;
|
||||
/** 6g scan params for OOB scan */
|
||||
wlan_6g_scan_params scan_param_list[WLAN_MAX_6G_SCAN_PARAMS_LIST];
|
||||
} MLAN_PACK_END wlan_user_scan_cfg;
|
||||
|
||||
/** Default scan interval in millisecond*/
|
||||
|
|
@ -2187,17 +1680,11 @@ typedef MLAN_PACK_START struct {
|
|||
/**wait for all channel scan to complete to report scan result*/
|
||||
#define BG_SCAN_WAIT_ALL_CHAN_DONE 0x80000000
|
||||
|
||||
#define CHAN_MAX_6G 59 // reference from cfg80211_channels_6ghz table
|
||||
#define CHAN_MAX_6G 0
|
||||
|
||||
/** max bgscan chan number */
|
||||
#define WLAN_BG_SCAN_CHAN_MAX 38
|
||||
|
||||
/** max bgscan chan number, include UNII_4 channel */
|
||||
#define WLAN_BG_SCAN_CHAN_MAX_UNII_4 41
|
||||
|
||||
/** max bgscan chan number, 3 + 38 + 59 */
|
||||
#define WLAN_BG_SCAN_CHAN_MAX_6E 100
|
||||
|
||||
/** Enumeration definition */
|
||||
/** EES MODE */
|
||||
typedef enum {
|
||||
|
|
@ -2294,8 +1781,6 @@ typedef MLAN_PACK_START struct {
|
|||
/** Array of ees config struct */
|
||||
ees_ssid_config ees_ssid_cfg[EES_MAX_SSIDS];
|
||||
t_u8 random_mac[MLAN_MAC_ADDR_LENGTH];
|
||||
/** 11ai indication */
|
||||
t_u8 dot11ai;
|
||||
} MLAN_PACK_END wlan_bgscan_cfg;
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
|
|
@ -2411,14 +1896,6 @@ typedef struct _BSSDescriptor_t {
|
|||
IEEEtypes_HTInfo_t *pht_info;
|
||||
/** HT Information Offset */
|
||||
t_u16 ht_info_offset;
|
||||
/** Flag to indicate this is multi_bssid_ap */
|
||||
t_u8 multi_bssid_ap;
|
||||
/** the mac address of multi-bssid AP */
|
||||
mlan_802_11_mac_addr multi_bssid_ap_addr;
|
||||
/** Multi BSSID Configuration IE */
|
||||
IEEEtypes_MBSSID_Config_t *pmbssid_config;
|
||||
/** Multi BSSID Configuration IE offset */
|
||||
t_u16 mbssid_config_offset;
|
||||
/** 20/40 BSS Coexistence IE */
|
||||
IEEEtypes_2040BSSCo_t *pbss_co_2040;
|
||||
/** 20/40 BSS Coexistence Offset */
|
||||
|
|
@ -2460,22 +1937,6 @@ typedef struct _BSSDescriptor_t {
|
|||
IEEEtypes_OperModeNtf_t *poper_mode;
|
||||
/** Operating Mode Notification IE offset */
|
||||
t_u16 oper_mode_offset;
|
||||
/** HE Capability IE */
|
||||
IEEEtypes_HECap_t *phe_cap;
|
||||
/** HE Capability IE offset */
|
||||
t_u16 he_cap_offset;
|
||||
/** HE operation IE */
|
||||
IEEEtypes_Extension_t *phe_oprat;
|
||||
/** HE operation IE offset */
|
||||
t_u16 he_oprat_offset;
|
||||
/** HE 6G Capability IE */
|
||||
IEEEtypes_HE6GCap_t *phe_6g_cap;
|
||||
/** HE 6G Capability IE offset */
|
||||
t_u16 he_6g_cap_offset;
|
||||
/** RNR IE */
|
||||
IEEEtypes_Generic_t *prnr_ie;
|
||||
/** RNR IE offset in the beacon buffer */
|
||||
t_u16 rnr_offset;
|
||||
#ifdef STA_SUPPORT
|
||||
/** Country information set */
|
||||
IEEEtypes_CountryInfoFullSet_t country_info;
|
||||
|
|
@ -2507,10 +1968,6 @@ typedef struct _BSSDescriptor_t {
|
|||
IEEEtypes_MobilityDomain_t *pmd_ie;
|
||||
/** Mobility domain IE offset in the beacon buffer */
|
||||
t_u16 md_offset;
|
||||
/** MU EDCA Parameter IE */
|
||||
IEEEtypes_MUEDCAParamSet_t *pmuedca_ie;
|
||||
/** MU EDCA Parameter IE offset */
|
||||
t_u16 muedca_offset;
|
||||
/** Pointer to the returned scan response */
|
||||
t_u8 *pbeacon_buf;
|
||||
/** Length of the stored scan response */
|
||||
|
|
|
|||
1019
mlinux/mlan_ioctl.h
1019
mlinux/mlan_ioctl.h
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -56,10 +56,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WLAN_CIPHER_SUITE_FILS_PSK
|
||||
#define WLAN_CIPHER_SUITE_FILS_PSK 0x000FACFF
|
||||
#endif
|
||||
|
||||
/* define for custom ie operation */
|
||||
#define MLAN_CUSTOM_IE_AUTO_IDX_MASK 0xffff
|
||||
#define IE_MASK_WPS 0x0001
|
||||
|
|
@ -70,12 +66,6 @@
|
|||
|
||||
#define MRVL_PKT_TYPE_MGMT_FRAME 0xE5
|
||||
|
||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||
#define MRVL_PKT_TYPE_MGMT_EASYMESH 0xCF
|
||||
#endif
|
||||
|
||||
t_u8 woal_check_fils_capability(const t_u8 *ie, int len);
|
||||
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
void woal_cfg80211_stop_iface(moal_handle *handle);
|
||||
|
|
@ -331,8 +321,6 @@ mlan_status woal_register_cfg80211(moal_private *priv);
|
|||
|
||||
extern struct ieee80211_supported_band cfg80211_band_2ghz;
|
||||
extern struct ieee80211_supported_band cfg80211_band_5ghz;
|
||||
extern struct ieee80211_supported_band mac1_cfg80211_band_2ghz;
|
||||
extern struct ieee80211_supported_band mac1_cfg80211_band_5ghz;
|
||||
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
int woal_cfg80211_bss_role_cfg(moal_private *priv, t_u16 action,
|
||||
|
|
@ -391,7 +379,9 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WIFI_DIRECT_SUPPORT)
|
||||
void woal_remove_virtual_interface(moal_handle *handle);
|
||||
#endif
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
/* Group Owner Negotiation Req */
|
||||
|
|
@ -574,20 +564,6 @@ mlan_status woal_chandef_create(moal_private *priv,
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if KERNEL_VERSION(4, 20, 0) <= CFG80211_VERSION_CODE
|
||||
void woal_cfg80211_setup_he_cap(moal_private *priv,
|
||||
struct ieee80211_supported_band *band);
|
||||
#else
|
||||
void woal_cfg80211_setup_uap_he_cap(moal_private *priv, t_u8 wait_option);
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
mlan_status woal_request_6e_inband_frame(
|
||||
moal_private *priv, t_u8 wait_option,
|
||||
struct cfg80211_fils_discovery *fils_discovery,
|
||||
struct cfg80211_unsol_bcast_probe_resp *unsol_bcast_probe_resp);
|
||||
#endif
|
||||
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
void woal_cfg80211_free_bands(struct wiphy *wiphy);
|
||||
#endif
|
||||
|
|
@ -603,7 +579,6 @@ int woal_cfg80211_mgmt_frame_ie(
|
|||
t_u8 wait_option);
|
||||
|
||||
int woal_get_active_intf_freq(moal_private *priv);
|
||||
int woal_get_rx_freq(moal_private *priv, t_u8 band_config, t_u8 chan_num);
|
||||
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
void woal_cfg80211_setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info,
|
||||
|
|
@ -628,41 +603,6 @@ mlan_status woal_reset_wifi(moal_handle *handle, t_u8 cnt, char *reason);
|
|||
|
||||
/* Handling for 6E Indoor/Outdoor Mode */
|
||||
|
||||
#define OP_MODE_LEN 8
|
||||
#define PSD_LEN 8
|
||||
|
||||
/**
|
||||
* @brief Operation mode/PSD table
|
||||
*/
|
||||
typedef struct _mode_psd_t {
|
||||
/** @brief Operation mode */
|
||||
t_u8 op_mode[OP_MODE_LEN];
|
||||
/** @brief PSD Value */
|
||||
t_u8 psd_dbm[PSD_LEN];
|
||||
} mode_psd_t;
|
||||
|
||||
/**
|
||||
* @brief The structure for Region-Mode-PSD table
|
||||
*/
|
||||
typedef struct _rmp_table_t {
|
||||
/** @brief Region or Code */
|
||||
t_u8 code;
|
||||
/** @brief Mode/Power */
|
||||
mode_psd_t *mp_ptr;
|
||||
} rmp_table_t;
|
||||
|
||||
void woal_dnld_uap_6e_psd_table(moal_private *priv, const t_u8 *beacon_buf,
|
||||
t_u32 buf_len);
|
||||
|
||||
void woal_dnld_sta_6e_psd_table(moal_private *priv, t_u8 *resp_buf,
|
||||
t_u32 resp_len,
|
||||
chan_band_reginfo_t *psta_reg_info);
|
||||
|
||||
mlan_status woal_dnld_default_6e_psd_table(moal_private *priv);
|
||||
|
||||
mlan_status woal_request_set_host_mlme(moal_private *priv, t_u8 *bssid);
|
||||
|
||||
void process_wifi_channel_avoid_list_event(
|
||||
moal_private *priv, wifi_chan_avoid_list_t *pwifi_chan_info);
|
||||
|
||||
#endif /* _MOAL_CFG80211_H_ */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -163,10 +163,9 @@ enum logger_attributes {
|
|||
|
||||
/* Below events refer to the wifi_connectivity_event ring and shall be supported
|
||||
*/
|
||||
enum {
|
||||
WIFI_EVENT_ASSOCIATION_REQUESTED = 0,
|
||||
WIFI_EVENT_AUTH_COMPLETE,
|
||||
WIFI_EVENT_ASSOC_COMPLETE,
|
||||
enum { WIFI_EVENT_ASSOCIATION_REQUESTED = 0,
|
||||
WIFI_EVENT_AUTH_COMPLETE,
|
||||
WIFI_EVENT_ASSOC_COMPLETE,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
@ -176,13 +175,11 @@ enum {
|
|||
RING_BUFFER_ENTRY_FLAGS_HAS_TIMESTAMP = (1 << (1))
|
||||
};
|
||||
|
||||
enum {
|
||||
ENTRY_TYPE_CONNECT_EVENT = 1,
|
||||
ENTRY_TYPE_PKT,
|
||||
ENTRY_TYPE_WAKE_LOCK,
|
||||
ENTRY_TYPE_POWER_EVENT,
|
||||
ENTRY_TYPE_DATA
|
||||
};
|
||||
enum { ENTRY_TYPE_CONNECT_EVENT = 1,
|
||||
ENTRY_TYPE_PKT,
|
||||
ENTRY_TYPE_WAKE_LOCK,
|
||||
ENTRY_TYPE_POWER_EVENT,
|
||||
ENTRY_TYPE_DATA };
|
||||
|
||||
/** WiFi ring buffer entry structure */
|
||||
typedef struct {
|
||||
|
|
@ -403,67 +400,120 @@ int woal_packet_fate_monitor(moal_private *priv,
|
|||
/* Leave 0 opcode unused as it's a good indicator of accidental incorrect
|
||||
* execution (e.g. data).
|
||||
*/
|
||||
/* Load 1 byte from immediate offset, e.g. "ldb R0, [5]" */
|
||||
#define NXP_LDB_OPCODE 1
|
||||
/* Load 2 bytes from immediate offset, e.g. "ldh R0, [5]" */
|
||||
#define NXP_LDH_OPCODE 2
|
||||
/* Load 4 bytes from immediate offset, e.g. "ldw R0, [5]" */
|
||||
#define NXP_LDW_OPCODE 3
|
||||
/* Load 1 byte from immediate offset plus register, e.g. "ldbx R0, [5]R0" */
|
||||
#define NXP_LDBX_OPCODE 4
|
||||
/* Load 2 byte from immediate offset plus register, e.g. "ldhx R0, [5]R0" */
|
||||
#define NXP_LDHX_OPCODE 5
|
||||
/* Load 4 byte from immediate offset plus register, e.g. "ldwx R0, [5]R0" */
|
||||
#define NXP_LDWX_OPCODE 6
|
||||
/* Add, e.g. "add R0,5" */
|
||||
#define NXP_ADD_OPCODE 7
|
||||
/* Multiply, e.g. "mul R0,5" */
|
||||
#define NXP_MUL_OPCODE 8
|
||||
/* Divide, e.g. "div R0,5" */
|
||||
#define NXP_DIV_OPCODE 9
|
||||
/* And, e.g. "and R0,5" */
|
||||
#define NXP_AND_OPCODE 10
|
||||
/* Or, e.g. "or R0,5" */
|
||||
#define NXP_OR_OPCODE 11
|
||||
/* Left shift, e.g, "sh R0, 5" or "sh R0, -5" (shifts right) */
|
||||
#define NXP_SH_OPCODE 12
|
||||
/* Load immediate, e.g. "li R0,5" (immediate encoded as signed value) */
|
||||
#define NXP_LI_OPCODE 13
|
||||
/* Unconditional jump, e.g. "jmp label" */
|
||||
#define NXP_JMP_OPCODE 14
|
||||
/* Compare equal and branch, e.g. "jeq R0,5,label" */
|
||||
#define NXP_JEQ_OPCODE 15
|
||||
/* Compare not equal and branch, e.g. "jne R0,5,label" */
|
||||
#define NXP_JNE_OPCODE 16
|
||||
/* Compare greater than and branch, e.g. "jgt R0,5,label" */
|
||||
#define NXP_JGT_OPCODE 17
|
||||
/* Compare less than and branch, e.g. "jlt R0,5,label" */
|
||||
#define NXP_JLT_OPCODE 18
|
||||
/* Compare any bits set and branch, e.g. "jset R0,5,label" */
|
||||
#define NXP_JSET_OPCODE 19
|
||||
/* Compare not equal byte sequence, e.g. "jnebs R0,5,label,0x1122334455" */
|
||||
#define NXP_JNEBS_OPCODE 20
|
||||
/* Immediate value is one of *_EXT_OPCODE
|
||||
* Extended opcodes. These all have an opcode of EXT_OPCODE
|
||||
* and specify the actual opcode in the immediate field.
|
||||
*/
|
||||
#define NXP_EXT_OPCODE 21
|
||||
/* Load from memory, e.g. "ldm R0,5"
|
||||
* Values 0-15 represent loading the different memory slots.
|
||||
*/
|
||||
#define NXP_LDM_EXT_OPCODE 0
|
||||
/* Store to memory, e.g. "stm R0,5" *
|
||||
* Values 16-31 represent storing to the different memory slots.
|
||||
*/
|
||||
#define NXP_STM_EXT_OPCODE 16
|
||||
/* Not, e.g. "not R0" */
|
||||
#define NXP_NOT_EXT_OPCODE 32
|
||||
/* Negate, e.g. "neg R0" */
|
||||
#define NXP_NEG_EXT_OPCODE 33
|
||||
/* Swap, e.g. "swap R0,R1" */
|
||||
#define NXP_SWAP_EXT_OPCODE 34
|
||||
/* Move, e.g. "move R0,R1" */
|
||||
#define NXP_MOV_EXT_OPCODE 35
|
||||
|
||||
/* === v6 return codes === */
|
||||
#define APF_V6_DROP 0
|
||||
#define APF_V6_PASS 1
|
||||
#define APF_V6_EXCEPTION 2
|
||||
|
||||
/* === EXT opcodes (subset) === */
|
||||
/* Extended v6 opcodes */
|
||||
#define EWRITE1_EXT_OPCODE 38
|
||||
#define EWRITE2_EXT_OPCODE 39
|
||||
#define EWRITE4_EXT_OPCODE 40
|
||||
#define EPKTDATACOPYR1_EXT_OPCODE 42
|
||||
|
||||
/* Core opcodes (top 5 bits of insn) */
|
||||
#ifndef PASSDROP_OPCODE
|
||||
#define PASSDROP_OPCODE 0 /* AOSP: pass/drop + optional counter */
|
||||
#endif
|
||||
#ifndef LDB_OPCODE
|
||||
#define LDB_OPCODE 1
|
||||
#define LDH_OPCODE 2
|
||||
#define LDW_OPCODE 3
|
||||
#define LDBX_OPCODE 4
|
||||
#define LDHX_OPCODE 5
|
||||
#define LDWX_OPCODE 6
|
||||
#define ADD_OPCODE 7
|
||||
#define MUL_OPCODE 8
|
||||
#define DIV_OPCODE 9
|
||||
#define AND_OPCODE 10
|
||||
#define OR_OPCODE 11
|
||||
#define SH_OPCODE 12
|
||||
#define LI_OPCODE 13
|
||||
#define JMP_OPCODE 14
|
||||
#define JEQ_OPCODE 15
|
||||
#define JNE_OPCODE 16
|
||||
#define JGT_OPCODE 17
|
||||
#define JLT_OPCODE 18
|
||||
#define JSET_OPCODE 19
|
||||
#define JBSMATCH_OPCODE 20 /* aka “JNEBS” in your code */
|
||||
#define EXT_OPCODE 21
|
||||
#define LDDW_OPCODE 22
|
||||
#define STDW_OPCODE 23
|
||||
#define WRITE_OPCODE 24
|
||||
#define PKTDATACOPY_OPCODE 25
|
||||
#endif
|
||||
|
||||
/* Extended opcodes (imm when op == EXT_OPCODE) */
|
||||
#ifndef LDM_EXT_OPCODE
|
||||
#define LDM_EXT_OPCODE 0
|
||||
#define STM_EXT_OPCODE 16
|
||||
#define NOT_EXT_OPCODE 32
|
||||
#define NEG_EXT_OPCODE 33
|
||||
#define SWAP_EXT_OPCODE 34
|
||||
#define MOV_EXT_OPCODE 35
|
||||
#define ALLOCATE_EXT_OPCODE 36
|
||||
#define TRANSMIT_EXT_OPCODE 37
|
||||
#define EWRITE1_EXT_OPCODE 38 /* already defined above; keep same */
|
||||
#define EWRITE2_EXT_OPCODE 39
|
||||
#define EWRITE4_EXT_OPCODE 40
|
||||
#define EPKTDATACOPYIMM_EXT_OPCODE 41
|
||||
#define EPKTDATACOPYR1_EXT_OPCODE 42
|
||||
#define EXCEPTIONBUFFER_EXT_OPCODE 48
|
||||
#endif
|
||||
|
||||
#ifndef NXP_PASSDROP_OPCODE
|
||||
#define NXP_PASSDROP_OPCODE PASSDROP_OPCODE
|
||||
#endif
|
||||
#ifndef NXP_LDB_OPCODE
|
||||
#define NXP_LDB_OPCODE LDB_OPCODE
|
||||
#define NXP_LDH_OPCODE LDH_OPCODE
|
||||
#define NXP_LDW_OPCODE LDW_OPCODE
|
||||
#define NXP_LDBX_OPCODE LDBX_OPCODE
|
||||
#define NXP_LDHX_OPCODE LDHX_OPCODE
|
||||
#define NXP_LDWX_OPCODE LDWX_OPCODE
|
||||
#define NXP_ADD_OPCODE ADD_OPCODE
|
||||
#define NXP_MUL_OPCODE MUL_OPCODE
|
||||
#define NXP_DIV_OPCODE DIV_OPCODE
|
||||
#define NXP_AND_OPCODE AND_OPCODE
|
||||
#define NXP_OR_OPCODE OR_OPCODE
|
||||
#define NXP_SH_OPCODE SH_OPCODE
|
||||
#define NXP_LI_OPCODE LI_OPCODE
|
||||
#define NXP_JMP_OPCODE JMP_OPCODE
|
||||
#define NXP_JEQ_OPCODE JEQ_OPCODE
|
||||
#define NXP_JNE_OPCODE JNE_OPCODE
|
||||
#define NXP_JGT_OPCODE JGT_OPCODE
|
||||
#define NXP_JLT_OPCODE JLT_OPCODE
|
||||
#define NXP_JSET_OPCODE JSET_OPCODE
|
||||
#define NXP_JNEBS_OPCODE JBSMATCH_OPCODE
|
||||
#define NXP_EXT_OPCODE EXT_OPCODE
|
||||
#define NXP_LDDW_OPCODE LDDW_OPCODE
|
||||
#define NXP_STDW_OPCODE STDW_OPCODE
|
||||
#define NXP_WRITE_OPCODE WRITE_OPCODE
|
||||
#define NXP_PKTDATACOPY_OPCODE PKTDATACOPY_OPCODE
|
||||
#define NXP_LDM_EXT_OPCODE LDM_EXT_OPCODE
|
||||
#define NXP_STM_EXT_OPCODE STM_EXT_OPCODE
|
||||
#define NXP_NOT_EXT_OPCODE NOT_EXT_OPCODE
|
||||
#define NXP_NEG_EXT_OPCODE NEG_EXT_OPCODE
|
||||
#define NXP_SWAP_EXT_OPCODE SWAP_EXT_OPCODE
|
||||
#define NXP_MOV_EXT_OPCODE MOV_EXT_OPCODE
|
||||
#endif
|
||||
|
||||
/* Map the unprefixed EXT names used later in the switch to AOSP values */
|
||||
#ifndef LDM_EXT_OPCODE
|
||||
#define LDM_EXT_OPCODE LDM_EXT_OPCODE /* self-guard */
|
||||
#endif
|
||||
/* (others already defined above) */
|
||||
|
||||
/* Keep your memory count symbol working if only MEM_ITEMS is local */
|
||||
#ifndef V6_MEMORY_ITEMS
|
||||
#ifdef MEM_ITEMS
|
||||
#define V6_MEMORY_ITEMS MEM_ITEMS
|
||||
#else
|
||||
#define V6_MEMORY_ITEMS 16
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define GET_OPCODE(i) (((i) >> 3) & 31)
|
||||
#define GET_REGISTER(i) ((i)&1)
|
||||
|
|
@ -476,11 +526,29 @@ int woal_packet_fate_monitor(moal_private *priv,
|
|||
* Should be returned by wifi_get_packet_filter_info.
|
||||
*/
|
||||
#if (defined(ANDROID_SDK_VERSION) && ANDROID_SDK_VERSION >= 34)
|
||||
#define APF_VERSION 4
|
||||
#define APF_VERSION 6000 // Updated to 6.0 for VSR compliance
|
||||
#else
|
||||
#define APF_VERSION 2
|
||||
#define APF_VERSION 4 // Updated to 4 for older SDKs
|
||||
#endif
|
||||
|
||||
struct woal_apf_counters {
|
||||
u32 dropped_ipv6_ns_invalid;
|
||||
u32 passed_ipv6_icmp;
|
||||
};
|
||||
|
||||
struct woal_apf_ctx {
|
||||
spinlock_t lock;
|
||||
u8 *ram; /* shadow APF RAM */
|
||||
u32 ram_len; /* capability: max length (e.g., 2048) */
|
||||
u32 prog_size; /* last installed program length */
|
||||
ktime_t installed_at; /* for FILTER_AGE_SECONDS */
|
||||
u32 pkts_since_install; /* NEW: counts packets after install */
|
||||
/* simple mode flags for CTS: */
|
||||
bool drop_icmp6_echo_reply_any; /* enable driver-drop for Echo Reply */
|
||||
|
||||
struct woal_apf_counters ctr;
|
||||
};
|
||||
|
||||
/** =========== Define Copied from apf_interpreter.h END =========== */
|
||||
|
||||
/** =========== Define Copied from apf_interpreter.c START =========== */
|
||||
|
|
@ -498,22 +566,34 @@ int woal_packet_fate_monitor(moal_private *priv,
|
|||
|
||||
/** depend on the format of skb->data */
|
||||
#define APF_FRAME_HEADER_SIZE 14
|
||||
#define PACKET_FILTER_MAX_LEN 1024
|
||||
#define PACKET_FILTER_MAX_LEN 2048
|
||||
|
||||
enum {
|
||||
PACKET_FILTER_STATE_INIT = 0,
|
||||
PACKET_FILTER_STATE_STOP,
|
||||
PACKET_FILTER_STATE_START,
|
||||
#ifndef APF_TEST_MIRROR_BASE
|
||||
#define APF_TEST_MIRROR_BASE 500
|
||||
#endif
|
||||
|
||||
enum { PACKET_FILTER_STATE_INIT = 0,
|
||||
PACKET_FILTER_STATE_STOP,
|
||||
PACKET_FILTER_STATE_START,
|
||||
};
|
||||
|
||||
enum wifi_attr_packet_filter {
|
||||
/* Packet filter vendor attrs (SET / CAPA / READ) */
|
||||
enum nxp_attr_packet_filter {
|
||||
ATTR_PACKET_FILTER_INVALID = 0,
|
||||
ATTR_PACKET_FILTER_TOTAL_LENGTH,
|
||||
ATTR_PACKET_FILTER_PROGRAM,
|
||||
ATTR_PACKET_FILTER_VERSION,
|
||||
ATTR_PACKET_FILTER_MAX_LEN,
|
||||
ATTR_PACKET_FILTER_AFTER_LAST,
|
||||
ATTR_PACKET_FILTER_MAX = ATTR_PACKET_FILTER_AFTER_LAST - 1
|
||||
ATTR_PACKET_FILTER_TOTAL_LENGTH, /* u32 */
|
||||
ATTR_PACKET_FILTER_PROGRAM, /* NLA_NUL_STRING (ASCII-hex) */
|
||||
ATTR_PACKET_FILTER_VERSION, /* u32 (reply) */
|
||||
ATTR_PACKET_FILTER_DATA, /* binary (reply for READ) */
|
||||
ATTR_PACKET_FILTER_MAX_LEN, /* u32 (reply) */
|
||||
ATTR_PACKET_FILTER_MAX,
|
||||
};
|
||||
|
||||
/* READ sub-cmd specific attrs used by HAL */
|
||||
enum nxp_attr_apf_read {
|
||||
NXP_ATTR_APF_READ_INVALID = 0,
|
||||
NXP_ATTR_APF_SRC_OFFSET, /* u32 */
|
||||
NXP_ATTR_APF_LENGTH, /* u32 */
|
||||
NXP_ATTR_APF_READ_MAX,
|
||||
};
|
||||
|
||||
/** Packet filter structure */
|
||||
|
|
@ -611,21 +691,6 @@ typedef enum wifi_attr {
|
|||
ATTR_WIFI_AFTER_LAST,
|
||||
ATTR_WIFI_MAX = ATTR_WIFI_AFTER_LAST - 1
|
||||
} wifi_attr_t;
|
||||
enum mrvl_wlan_vendor_attr_secure_ranging_ctx {
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_INVALID = 0,
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_ACTION = 1,
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_SRC_ADDR = 2,
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_PEER_MAC_ADDR = 3,
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_SHA_TYPE = 4,
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_TK = 5,
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_CIPHER = 6,
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_LTF_KEYSEED = 7,
|
||||
|
||||
/* keep last */
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_AFTER_LAST,
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_MAX =
|
||||
MRVL_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_AFTER_LAST - 1,
|
||||
};
|
||||
enum mrvl_wlan_vendor_attr_wifi_logger {
|
||||
MRVL_WLAN_VENDOR_ATTR_NAME = 10,
|
||||
};
|
||||
|
|
@ -744,7 +809,6 @@ enum vendor_event {
|
|||
event_fw_reset_failure = 3,
|
||||
event_fw_reset_start = 4,
|
||||
event_rssi_monitor = 0x1501,
|
||||
event_rtt_result = 0x07,
|
||||
event_set_key_mgmt_offload = 0x10001,
|
||||
event_fw_roam_success = 0x10002,
|
||||
event_cloud_keep_alive = 0x10003,
|
||||
|
|
@ -815,21 +879,13 @@ enum vendor_sub_command {
|
|||
sub_cmd_dfs_capability = 0x0005,
|
||||
sub_cmd_set_scan_mac_oui = 0x0007,
|
||||
sub_cmd_set_scan_band = 0x0008,
|
||||
sub_cmd_secure_ranging_ctx = 0x0009,
|
||||
sub_cmd_set_packet_filter = 0x0011,
|
||||
sub_cmd_get_packet_filter_capability,
|
||||
sub_cmd_get_packet_filter_capability = 0x0012,
|
||||
sub_cmd_read_packet_filter_data = 0x0013,
|
||||
sub_cmd_nd_offload = 0x0100,
|
||||
SUBCMD_SET_GET_SCANCFG = 0x0200,
|
||||
SUBCMD_SET_GET_ADDBAPARAMS = 0x0201,
|
||||
SUBCMD_SET_GET_CLR_HOSTCMD = 0x0202,
|
||||
SUBCMD_RTT_GET_CAPA = 0x1100,
|
||||
SUBCMD_RTT_RANGE_REQUEST,
|
||||
SUBCMD_RTT_RANGE_CANCEL,
|
||||
SUBCMD_RTT_GET_RESPONDER_INFO,
|
||||
SUBCMD_RTT_ENABLE_RESPONDER,
|
||||
SUBCMD_RTT_DISABLE_RESPONDER,
|
||||
SUBCMD_RTT_SET_LCI,
|
||||
SUBCMD_RTT_SET_LCR,
|
||||
sub_cmd_link_statistic_set = 0x1200,
|
||||
sub_cmd_link_statistic_get = 0x1201,
|
||||
sub_cmd_link_statistic_clr = 0x1202,
|
||||
|
|
@ -851,15 +907,10 @@ enum vendor_sub_command {
|
|||
subcmd_get_csi_dump_path,
|
||||
subcmd_get_csi_config,
|
||||
subcmd_get_csi_capa,
|
||||
subcmd_set_get_dmcs = 0x1920,
|
||||
subcmd_set_get_edmac = 0x1921,
|
||||
subcmd_set_get_aggrpriotbl = 0x1922,
|
||||
subcmd_set_get_addbareject = 0x1923,
|
||||
subcmd_set_get_tx_ampdu_prot_mode = 0x1924,
|
||||
subcmd_twt_setup = 0x1925,
|
||||
subcmd_twt_teardown = 0x1926,
|
||||
subcmd_btwt_ap_config_set = 0x1927,
|
||||
subcmd_btwt_ap_config_get = 0x1928,
|
||||
// Get Usable channel list
|
||||
subcmd_get_usable_channels = 0x1950,
|
||||
sub_cmd_max,
|
||||
|
|
@ -919,29 +970,6 @@ enum mrvl_wlan_vendor_attr_roam_auth {
|
|||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
enum attr_rtt {
|
||||
ATTR_RTT_INVALID = 0,
|
||||
ATTR_RTT_CAPA,
|
||||
ATTR_RTT_TARGET_NUM,
|
||||
ATTR_RTT_TARGET_CONFIG,
|
||||
ATTR_RTT_TARGET_ADDR,
|
||||
ATTR_RTT_RESULT_COMPLETE,
|
||||
ATTR_RTT_RESULT_NUM,
|
||||
ATTR_RTT_RESULT_FULL,
|
||||
ATTR_RTT_CHANNEL_INFO,
|
||||
ATTR_RTT_MAX_DUR_SEC,
|
||||
ATTR_RTT_PREAMBLE,
|
||||
ATTR_RTT_LCI_INFO,
|
||||
ATTR_RTT_LCR_INFO,
|
||||
|
||||
/* keep last */
|
||||
ATTR_RTT_AFTER_LAST,
|
||||
ATTR_RTT_MAX = ATTR_RTT_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
mlan_status woal_cfg80211_event_rtt_result(moal_private *priv, t_u8 *data,
|
||||
int len);
|
||||
|
||||
enum attr_csi {
|
||||
ATTR_CSI_INVALID = 0,
|
||||
ATTR_CSI_CONFIG,
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@ Change log:
|
|||
********************************************************/
|
||||
|
||||
#include "moal_main.h"
|
||||
#ifdef USB
|
||||
#include "moal_usb.h"
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
|
|
@ -54,13 +51,6 @@ Change log:
|
|||
/** Get moal_handle member address */
|
||||
#define item_handle_addr(n) ((t_ptr) & (((moal_handle *)0)->n))
|
||||
|
||||
#ifdef USB
|
||||
/** Get moal card member size */
|
||||
#define item_card_size(n) (sizeof(((struct usb_card_rec *)0)->n))
|
||||
/** Get moal card member address */
|
||||
#define item_card_addr(n) ((t_ptr) & (((struct usb_card_rec *)0)->n))
|
||||
#endif
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
static struct debug_data items[] = {
|
||||
#ifdef DEBUG_LEVEL1
|
||||
|
|
@ -78,14 +68,6 @@ static struct debug_data items[] = {
|
|||
item_addr(mlan_rx_processing), INFO_ADDR},
|
||||
{"rx_pkts_queued", item_size(rx_pkts_queued), item_addr(rx_pkts_queued),
|
||||
INFO_ADDR},
|
||||
#ifdef PCIE
|
||||
{"pcie_event_processing", item_size(pcie_event_processing),
|
||||
item_addr(pcie_event_processing), INFO_ADDR},
|
||||
{"pcie_rx_processing", item_size(pcie_rx_processing),
|
||||
item_addr(pcie_rx_processing), INFO_ADDR},
|
||||
{"pcie_tx_processing", item_size(pcie_tx_processing),
|
||||
item_addr(pcie_tx_processing), INFO_ADDR},
|
||||
#endif
|
||||
{"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo), INFO_ADDR},
|
||||
{"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi), INFO_ADDR},
|
||||
{"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be), INFO_ADDR},
|
||||
|
|
@ -157,7 +139,6 @@ static struct debug_data items[] = {
|
|||
item_addr(num_tx_host_to_card_failure), INFO_ADDR},
|
||||
{"num_alloc_buffer_failure", item_size(num_alloc_buffer_failure),
|
||||
item_addr(num_alloc_buffer_failure), INFO_ADDR},
|
||||
#ifdef SDIO
|
||||
{"num_cmdevt_c2h_fail", item_size(num_cmdevt_card_to_host_failure),
|
||||
item_addr(num_cmdevt_card_to_host_failure),
|
||||
INFO_ADDR | (INTF_SD << 8)},
|
||||
|
|
@ -177,7 +158,6 @@ static struct debug_data items[] = {
|
|||
item_addr(mpa_sent_last_pkt), INFO_ADDR | (INTF_SD << 8)},
|
||||
{"mpa_sent_no_ports", item_size(mpa_sent_no_ports),
|
||||
item_addr(mpa_sent_no_ports), INFO_ADDR | (INTF_SD << 8)},
|
||||
#endif
|
||||
{"num_evt_deauth", item_size(num_event_deauth),
|
||||
item_addr(num_event_deauth), INFO_ADDR},
|
||||
{"num_evt_disassoc", item_size(num_event_disassoc),
|
||||
|
|
@ -204,37 +184,11 @@ static struct debug_data items[] = {
|
|||
INFO_ADDR},
|
||||
{"curr_wr_port", item_size(curr_wr_port), item_addr(curr_wr_port),
|
||||
INFO_ADDR},
|
||||
#ifdef PCIE
|
||||
{"txbd_rdptr", item_size(txbd_rdptr), item_addr(txbd_rdptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"txbd_wrptr", item_size(txbd_wrptr), item_addr(txbd_wrptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"rxbd_rdptr", item_size(rxbd_rdptr), item_addr(rxbd_rdptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"rxbd_wrptr", item_size(rxbd_wrptr), item_addr(rxbd_wrptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"eventbd_rdptr", item_size(eventbd_rdptr), item_addr(eventbd_rdptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"eventbd_wrptr", item_size(eventbd_wrptr), item_addr(eventbd_wrptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
#endif
|
||||
{"cmd_resp_received", item_size(cmd_resp_received),
|
||||
item_addr(cmd_resp_received), INFO_ADDR},
|
||||
{"event_received", item_size(event_received), item_addr(event_received),
|
||||
INFO_ADDR},
|
||||
|
||||
#ifdef USB
|
||||
{"tx_cmd_urb_pending", item_card_size(tx_cmd_urb_pending),
|
||||
item_card_addr(tx_cmd_urb_pending), CARD_ADDR | (INTF_USB << 8)},
|
||||
{"tx_data_urb_pending", item_card_size(tx_data_urb_pending),
|
||||
item_card_addr(tx_data_urb_pending), CARD_ADDR | (INTF_USB << 8)},
|
||||
#ifdef USB_CMD_DATA_EP
|
||||
{"rx_cmd_urb_pending", item_card_size(rx_cmd_urb_pending),
|
||||
item_card_addr(rx_cmd_urb_pending), CARD_ADDR | (INTF_USB << 8)},
|
||||
#endif
|
||||
{"rx_data_urb_pending", item_card_size(rx_data_urb_pending),
|
||||
item_card_addr(rx_data_urb_pending), CARD_ADDR | (INTF_USB << 8)},
|
||||
#endif /* USB */
|
||||
{"num_tx_timeout", item_priv_size(num_tx_timeout),
|
||||
item_priv_addr(num_tx_timeout), PRIV_ADDR},
|
||||
{"ioctl_pending", item_handle_size(ioctl_pending),
|
||||
|
|
@ -251,10 +205,6 @@ static struct debug_data items[] = {
|
|||
item_handle_addr(vmalloc_count), HANDLE_ADDR},
|
||||
{"mbufalloc_count", item_handle_size(mbufalloc_count),
|
||||
item_handle_addr(mbufalloc_count), HANDLE_ADDR},
|
||||
#ifdef PCIE
|
||||
{"malloc_cons_count", item_handle_size(malloc_cons_count),
|
||||
item_handle_addr(malloc_cons_count), HANDLE_ADDR},
|
||||
#endif
|
||||
{"main_state", item_handle_size(main_state),
|
||||
item_handle_addr(main_state), HANDLE_ADDR},
|
||||
{"driver_state", item_handle_size(driver_state),
|
||||
|
|
@ -265,10 +215,12 @@ static struct debug_data items[] = {
|
|||
{"sdiocmd53r", item_handle_size(cmd53r), item_handle_addr(cmd53r),
|
||||
HANDLE_ADDR},
|
||||
#endif
|
||||
#if defined(SDIO_SUSPEND_RESUME)
|
||||
{"hs_skip_count", item_handle_size(hs_skip_count),
|
||||
item_handle_addr(hs_skip_count), HANDLE_ADDR},
|
||||
{"hs_force_count", item_handle_size(hs_force_count),
|
||||
item_handle_addr(hs_force_count), HANDLE_ADDR},
|
||||
#endif
|
||||
#ifdef STA_CFG80211
|
||||
{"scan_timeout", item_handle_size(scan_timeout),
|
||||
item_handle_addr(scan_timeout), HANDLE_ADDR},
|
||||
|
|
@ -294,14 +246,6 @@ static struct debug_data uap_items[] = {
|
|||
item_addr(mlan_rx_processing), INFO_ADDR},
|
||||
{"rx_pkts_queued", item_size(rx_pkts_queued), item_addr(rx_pkts_queued),
|
||||
INFO_ADDR},
|
||||
#ifdef PCIE
|
||||
{"pcie_event_processing", item_size(pcie_event_processing),
|
||||
item_addr(pcie_event_processing), INFO_ADDR},
|
||||
{"pcie_rx_processing", item_size(pcie_rx_processing),
|
||||
item_addr(pcie_rx_processing), INFO_ADDR},
|
||||
{"pcie_tx_processing", item_size(pcie_tx_processing),
|
||||
item_addr(pcie_tx_processing), INFO_ADDR},
|
||||
#endif
|
||||
{"wmm_ac_vo", item_size(wmm_ac_vo), item_addr(wmm_ac_vo), INFO_ADDR},
|
||||
{"wmm_ac_vi", item_size(wmm_ac_vi), item_addr(wmm_ac_vi), INFO_ADDR},
|
||||
{"wmm_ac_be", item_size(wmm_ac_be), item_addr(wmm_ac_be), INFO_ADDR},
|
||||
|
|
@ -365,7 +309,6 @@ static struct debug_data uap_items[] = {
|
|||
item_addr(num_tx_host_to_card_failure), INFO_ADDR},
|
||||
{"num_alloc_buffer_failure", item_size(num_alloc_buffer_failure),
|
||||
item_addr(num_alloc_buffer_failure), INFO_ADDR},
|
||||
#ifdef SDIO
|
||||
{"num_cmdevt_c2h_fail", item_size(num_cmdevt_card_to_host_failure),
|
||||
item_addr(num_cmdevt_card_to_host_failure),
|
||||
INFO_ADDR | (INTF_SD << 8)},
|
||||
|
|
@ -385,7 +328,6 @@ static struct debug_data uap_items[] = {
|
|||
item_addr(mpa_sent_last_pkt), INFO_ADDR | (INTF_SD << 8)},
|
||||
{"mpa_sent_no_ports", item_size(mpa_sent_no_ports),
|
||||
item_addr(mpa_sent_no_ports), INFO_ADDR | (INTF_SD << 8)},
|
||||
#endif
|
||||
{"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent), INFO_ADDR},
|
||||
{"data_sent", item_size(data_sent), item_addr(data_sent), INFO_ADDR},
|
||||
{"data_sent_cnt", item_size(data_sent_cnt), item_addr(data_sent_cnt),
|
||||
|
|
@ -398,37 +340,11 @@ static struct debug_data uap_items[] = {
|
|||
INFO_ADDR},
|
||||
{"curr_wr_port", item_size(curr_wr_port), item_addr(curr_wr_port),
|
||||
INFO_ADDR},
|
||||
#ifdef PCIE
|
||||
{"txbd_rdptr", item_size(txbd_rdptr), item_addr(txbd_rdptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"txbd_wrptr", item_size(txbd_wrptr), item_addr(txbd_wrptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"rxbd_rdptr", item_size(rxbd_rdptr), item_addr(rxbd_rdptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"rxbd_wrptr", item_size(rxbd_wrptr), item_addr(rxbd_wrptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"eventbd_rdptr", item_size(eventbd_rdptr), item_addr(eventbd_rdptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
{"eventbd_wrptr", item_size(eventbd_wrptr), item_addr(eventbd_wrptr),
|
||||
INFO_ADDR | (INTF_PCIE << 8)},
|
||||
#endif
|
||||
{"cmd_resp_received", item_size(cmd_resp_received),
|
||||
item_addr(cmd_resp_received), INFO_ADDR},
|
||||
{"event_received", item_size(event_received), item_addr(event_received),
|
||||
INFO_ADDR},
|
||||
|
||||
#ifdef USB
|
||||
{"tx_cmd_urb_pending", item_card_size(tx_cmd_urb_pending),
|
||||
item_card_addr(tx_cmd_urb_pending), CARD_ADDR | (INTF_USB << 8)},
|
||||
{"tx_data_urb_pending", item_card_size(tx_data_urb_pending),
|
||||
item_card_addr(tx_data_urb_pending), CARD_ADDR | (INTF_USB << 8)},
|
||||
#ifdef USB_CMD_DATA_EP
|
||||
{"rx_cmd_urb_pending", item_card_size(rx_cmd_urb_pending),
|
||||
item_card_addr(rx_cmd_urb_pending), CARD_ADDR | (INTF_USB << 8)},
|
||||
#endif
|
||||
{"rx_data_urb_pending", item_card_size(rx_data_urb_pending),
|
||||
item_card_addr(rx_data_urb_pending), CARD_ADDR | (INTF_USB << 8)},
|
||||
#endif /* USB */
|
||||
{"num_tx_timeout", item_priv_size(num_tx_timeout),
|
||||
item_priv_addr(num_tx_timeout), PRIV_ADDR},
|
||||
{"ioctl_pending", item_handle_size(ioctl_pending),
|
||||
|
|
@ -445,10 +361,6 @@ static struct debug_data uap_items[] = {
|
|||
item_handle_addr(vmalloc_count), HANDLE_ADDR},
|
||||
{"mbufalloc_count", item_handle_size(mbufalloc_count),
|
||||
item_handle_addr(mbufalloc_count), HANDLE_ADDR},
|
||||
#ifdef PCIE
|
||||
{"malloc_cons_count", item_handle_size(malloc_cons_count),
|
||||
item_handle_addr(malloc_cons_count), HANDLE_ADDR | (INTF_PCIE << 8)},
|
||||
#endif
|
||||
{"main_state", item_handle_size(main_state),
|
||||
item_handle_addr(main_state), HANDLE_ADDR},
|
||||
{"driver_state", item_handle_size(driver_state),
|
||||
|
|
@ -459,10 +371,12 @@ static struct debug_data uap_items[] = {
|
|||
{"sdiocmd53r", item_handle_size(cmd53r), item_handle_addr(cmd53r),
|
||||
HANDLE_ADDR | (INTF_SD << 8)},
|
||||
#endif
|
||||
#if defined(SDIO_SUSPEND_RESUME)
|
||||
{"hs_skip_count", item_handle_size(hs_skip_count),
|
||||
item_handle_addr(hs_skip_count), HANDLE_ADDR},
|
||||
{"hs_force_count", item_handle_size(hs_force_count),
|
||||
item_handle_addr(hs_force_count), HANDLE_ADDR},
|
||||
#endif
|
||||
};
|
||||
#endif /* UAP_SUPPORT */
|
||||
|
||||
|
|
@ -593,7 +507,6 @@ static int woal_histogram_info(struct seq_file *sfp, void *data)
|
|||
t_u8 bw = 0;
|
||||
t_u8 mcs_index = 0;
|
||||
t_u8 nss = 0;
|
||||
t_u8 gi = 0;
|
||||
wlan_hist_proc_data *hist_data = (wlan_hist_proc_data *)sfp->private;
|
||||
moal_private *priv = (moal_private *)hist_data->priv;
|
||||
t_u16 rx_rate_max_size = priv->phandle->card_info->rx_rate_max;
|
||||
|
|
@ -633,33 +546,6 @@ static int woal_histogram_info(struct seq_file *sfp, void *data)
|
|||
seq_printf(
|
||||
sfp,
|
||||
"\t176-185: AC-MCS 0-9(VHT:BW80:NSS1:SGI) 186-195: AC-MCS 0-9(VHT:BW80:NSS2:SGI)\n\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t196-207: AX-MCS 0-11(BW20:NSS1) 208-219: AX-MCS 0-11(BW20:NSS2)\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t220-231: AX-MCS 0-11(BW40:NSS1) 232-243: AX-MCS 0-11(BW40:NSS2)\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t244-255: AX-MCS 0-11(BW80:NSS1) 256-267: AX-MCS 0-11(BW80:NSS2)\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t268-279: AX-MCS 0-11(BW20:NSS1:GI1) 280-291: AX-MCS 0-11(BW20:NSS2:GI1)\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t292-303: AX-MCS 0-11(BW40:NSS1:GI1) 304-315: AX-MCS 0-11(BW40:NSS2:GI1)\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t316-327: AX-MCS 0-11(BW80:NSS1:GI1) 328-339: AX-MCS 0-11(BW80:NSS2:GI1)\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t340-351: AX-MCS 0-11(BW20:NSS1:GI2) 352-363: AX-MCS 0-11(BW20:NSS2:GI2)\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t364-375: AX-MCS 0-11(BW40:NSS1:GI2) 376-387: AX-MCS 0-11(BW40:NSS2:GI2)\n");
|
||||
seq_printf(
|
||||
sfp,
|
||||
"\t388-399: AX-MCS 0-11(BW80:NSS1:GI2) 400-411: AX-MCS 0-11(BW80:NSS2:GI2)\n");
|
||||
|
||||
for (i = 0; i < rx_rate_max_size; i++) {
|
||||
value = atomic_read(&(phist_data->rx_rate[i]));
|
||||
|
|
@ -696,21 +582,6 @@ static int woal_histogram_info(struct seq_file *sfp, void *data)
|
|||
"rx_rate[%03d] = %d (MCS:%d VHT BW:%dMHz NSS:%d%s)\n",
|
||||
i, value, mcs_index, (1 << bw) * 20,
|
||||
nss + 1, sgi_enable ? " SGI" : "");
|
||||
} else if (i <= 411) {
|
||||
gi = (i - 196) / (MAX_MCS_NUM_AX * 6); // 0,1,2
|
||||
bw = ((i - 196) % (MAX_MCS_NUM_AX * 6)) /
|
||||
(MAX_MCS_NUM_AX * 2); // 0:20MHz, 1:40MHz,
|
||||
// 2:80MHz
|
||||
nss = (((i - 196) % (MAX_MCS_NUM_AX * 6)) %
|
||||
(MAX_MCS_NUM_AX * 2)) /
|
||||
MAX_MCS_NUM_AX; // 0:NSS1, 1:NSS2
|
||||
mcs_index = (i - 196) % MAX_MCS_NUM_AX;
|
||||
|
||||
seq_printf(
|
||||
sfp,
|
||||
"rx_rate[%03d] = %d (MCS:%d AX BW:%dMHz NSS:%d GI:%d)\n",
|
||||
i, value, mcs_index, (1 << bw) * 20,
|
||||
nss + 1, gi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -999,9 +870,7 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
|||
mlan_debug_info *info = NULL;
|
||||
t_u32 intf_mask = INTF_MASK << 8;
|
||||
unsigned int j;
|
||||
#ifdef SDIO
|
||||
t_u8 mp_aggr_pkt_limit = 0;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -1045,16 +914,11 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "\n");
|
||||
continue;
|
||||
}
|
||||
if (strstr(d[i].name, "id") || strstr(d[i].name, "bitmap")
|
||||
#ifdef PCIE
|
||||
|| strstr(d[i].name, "ptr")
|
||||
#endif
|
||||
)
|
||||
if (strstr(d[i].name, "id") || strstr(d[i].name, "bitmap"))
|
||||
seq_printf(sfp, "%s=0x%x\n", d[i].name, val);
|
||||
else
|
||||
seq_printf(sfp, "%s=%d\n", d[i].name, val);
|
||||
}
|
||||
#ifdef SDIO
|
||||
if (IS_SD(priv->phandle->card_type)) {
|
||||
mp_aggr_pkt_limit = info->mp_aggr_pkt_limit;
|
||||
seq_printf(sfp, "last_recv_wr_bitmap=0x%x last_mp_index=%d\n",
|
||||
|
|
@ -1090,20 +954,6 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "%d ", info->mp_update[i]);
|
||||
seq_printf(sfp, "\n");
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(priv->phandle->card_type)) {
|
||||
seq_printf(sfp, "txbd_rdptr=0x%x txbd_wrptr=0x%x\n",
|
||||
info->txbd_rdptr, info->txbd_wrptr);
|
||||
seq_printf(sfp, "rxbd_rdptr=0x%x rxbd_wrptr=0x%x\n",
|
||||
info->rxbd_rdptr, info->rxbd_wrptr);
|
||||
seq_printf(sfp, "eventbd_rdptr=0x%x event_wrptr=0x%x\n",
|
||||
info->eventbd_rdptr, info->eventbd_wrptr);
|
||||
seq_printf(sfp, "last_wr_index:%d\n",
|
||||
info->txbd_wrptr & (info->txrx_bd_size - 1));
|
||||
seq_printf(sfp, "txrx bd size:%d\n", info->txrx_bd_size);
|
||||
}
|
||||
#endif
|
||||
seq_printf(sfp, "tcp_ack_drop_cnt=%d\n", priv->tcp_ack_drop_cnt);
|
||||
seq_printf(sfp, "tcp_ack_cnt=%d\n", priv->tcp_ack_cnt);
|
||||
seq_printf(sfp, "tcp_ack_payload=%d\n", priv->tcp_ack_payload);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -83,9 +83,6 @@ Change log:
|
|||
#define PRIV_CMD_PRINT_LINK_STATS "plinkstats"
|
||||
#define PRIV_CMD_BSS_CONFIG "bssconfig"
|
||||
#endif
|
||||
#if defined(UAP_SUPPORT)
|
||||
#define PRIV_CMD_SETMODE "setmode"
|
||||
#endif
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
#define PRIV_CMD_BSSROLE "bssrole"
|
||||
|
|
@ -128,12 +125,7 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_HSSETPARA "hssetpara"
|
||||
#define PRIV_CMD_MGMT_FILTER "mgmtfilter"
|
||||
#define PRIV_CMD_SCANCFG "scancfg"
|
||||
#define PRIV_CMD_6GSCANCFG "6gscancfg"
|
||||
#define PRIV_CMD_GETNLNUM "getnlnum"
|
||||
#define PRIV_CMD_AGGRCTRL "aggrctrl"
|
||||
#ifdef USB
|
||||
#define PRIV_CMD_USBAGGRCTRL "usbaggrctrl"
|
||||
#endif
|
||||
#define PRIV_CMD_SET_BSS_MODE "setbssmode"
|
||||
#ifdef STA_SUPPORT
|
||||
#define PRIV_CMD_SET_AP "setap"
|
||||
|
|
@ -154,9 +146,7 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_RDEEPROM "rdeeprom"
|
||||
#define PRIV_CMD_MEMRDWR "memrdwr"
|
||||
#define PRIV_CMD_GPIOCFG "gpiocfg"
|
||||
#ifdef SDIO
|
||||
#define PRIV_CMD_SDCMD52RW "sdcmd52rw"
|
||||
#endif
|
||||
#define PRIV_CMD_ARPFILTER "arpfilter"
|
||||
#define PRIV_CMD_HOTSPOTCFG "hotspotcfg"
|
||||
#define PRIV_CMD_MGMT_FRAME_CTRL "mgmtframectrl"
|
||||
|
|
@ -175,10 +165,6 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_DSCP_MAP "dscpmap"
|
||||
/** Private command: Verext */
|
||||
#define PRIV_CMD_VEREXT "verext"
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
#define PRIV_CMD_USB_SUSPEND "usbsuspend"
|
||||
#define PRIV_CMD_USB_RESUME "usbresume"
|
||||
#endif /* CONFIG_USB_SUSPEND */
|
||||
#if defined(STA_SUPPORT) && defined(STA_WEXT)
|
||||
#define PRIV_CMD_RADIO_CTRL "radioctrl"
|
||||
#endif
|
||||
|
|
@ -215,15 +201,10 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_INACTIVITYTO "inactivityto"
|
||||
#define PRIV_CMD_AMSDU_AGGR_CTRL "amsduaggrctrl"
|
||||
#define PRIV_CMD_TX_BF_CAP "httxbfcap"
|
||||
#ifdef SDIO
|
||||
#define PRIV_CMD_SDIO_CLOCK "sdioclock"
|
||||
#define PRIV_CMD_SDIO_BUSWIDTH "sdiobuswidth"
|
||||
#endif
|
||||
#ifdef SDIO
|
||||
#define PRIV_CMD_MPA_CTRL "mpactrl"
|
||||
#endif
|
||||
#define PRIV_CMD_SLEEP_PARAMS "sleepparams"
|
||||
#define PRIV_CMD_NET_MON "netmon"
|
||||
#define PRIV_CMD_DFS_TESTING "dfstesting"
|
||||
#define PRIV_CMD_CLEAR_NOP "clear_nop"
|
||||
#define PRIV_CMD_NOP_LIST "nop_list"
|
||||
|
|
@ -241,12 +222,7 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_PORT_CTRL "port_ctrl"
|
||||
#define PRIV_CMD_PB_BYPASS "pb_bypass"
|
||||
#define PRIV_CMD_FW_WAKEUP_METHOD "fwwakeupmethod"
|
||||
#ifdef SDIO
|
||||
#define PRIV_CMD_SD_CMD53_RW "sdcmd53rw"
|
||||
#endif
|
||||
#define PRIV_CMD_MULTI_CHAN_CFG "mc_cfg"
|
||||
#define PRIV_CMD_MULTI_CHAN_POLICY "mc_policy"
|
||||
#define PRIV_CMD_DRCS_CFG "mc_cfg_ext"
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if defined(UAP_CFG80211)
|
||||
#define PRIV_CMD_CFG_NOA "cfg_noa"
|
||||
|
|
@ -268,11 +244,6 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_TX_AGGR_CTRL "txaggrctrl"
|
||||
#define PRIV_CMD_AUTO_TDLS "autotdls"
|
||||
|
||||
#ifdef PCIE
|
||||
#define PRIV_CMD_PCIE_REG_RW "pcieregrw"
|
||||
#define PRIV_CMD_PCIE_BAR0_REG_RW "pciebar0regrw"
|
||||
#endif
|
||||
|
||||
#define PRIV_CMD_GET_SENSOR_TEMP "get_sensor_temp"
|
||||
|
||||
#define PRIV_CMD_GET_CHNRGPWR "get_chnrgpwr"
|
||||
|
|
@ -291,28 +262,23 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_DFS_OFFLOAD "dfs_offload"
|
||||
#endif
|
||||
|
||||
#if defined(SDIO_SUSPEND_RESUME)
|
||||
#define PRIV_CMD_AUTO_ARP "auto_arp"
|
||||
#endif
|
||||
|
||||
#define PRIV_CMD_PER_PKT_CFG "per_pkt_cfg"
|
||||
|
||||
#define PRIV_CMD_DEAUTH_CTRL "ctrldeauth"
|
||||
|
||||
#define PRIV_CMD_TX_RX_HISTOGRAM "txrxhistogram"
|
||||
|
||||
/**Private command ID to set/get independent reset*/
|
||||
#define PRIV_CMD_IND_RST_CFG "indrstcfg"
|
||||
|
||||
#define PRIV_CMD_MCAST_AGGR_GROUP "mcast_aggr_group"
|
||||
#define PRIV_CMD_MC_AGGR_CFG "mc_aggr_cfg"
|
||||
#define PRIV_CMD_STATS "stats"
|
||||
#define PRIV_CMD_CH_LOAD "getchload"
|
||||
#define PRIV_CMD_CH_LOAD_RESULTS "getloadresults"
|
||||
#define PRIV_CMD_CROSS_CHIP_SYNCH "crosssynch"
|
||||
#define PRIV_CMD_TSP_CFG "wlan_tsp_cfg"
|
||||
|
||||
#define PRIV_CMD_ARB_CFG "arb"
|
||||
|
||||
#define PRIV_CMD_FOUNDRY_TYPE "foundry_type"
|
||||
/**Private command to configure static rx abort config */
|
||||
#define PRIV_CMD_RX_ABORT_CFG "rx_abort_cfg"
|
||||
/**Private command to configure static OFDM DESENSE config */
|
||||
|
|
@ -361,40 +327,9 @@ typedef struct _chan_stats {
|
|||
/** Private command ID to get BSS type */
|
||||
#define WOAL_GET_BSS_TYPE (SIOCDEVPRIVATE + 15)
|
||||
|
||||
/** Private command ID for robustcoex */
|
||||
#define PRIV_CMD_ROBUSTCOEX "robustcoex"
|
||||
|
||||
#define PRIV_CMD_DMCS "dmcs"
|
||||
|
||||
/**Private command to configure per_band_txpwr_cap */
|
||||
#define PRIV_CMD_PER_BAND_TXPWR_CAP "per_band_txpwr_cap"
|
||||
|
||||
#if defined(PCIE)
|
||||
#define PRIV_CMD_SSU "ssu"
|
||||
/** ssu_params_ctrl */
|
||||
typedef struct _ssu_params_cfg {
|
||||
/* ssu mode */
|
||||
t_u8 ssu_mode;
|
||||
/* 0-3; # of FFT samples to skip*/
|
||||
t_u32 nskip;
|
||||
/* 0-3: # of FFT samples selected to dump */
|
||||
t_u32 nsel;
|
||||
/* 0-3: Down sample ADC input for buffering*/
|
||||
t_u32 adcdownsample;
|
||||
/* 0-1: Mask out ADC Data from spectral packet */
|
||||
t_u32 mask_adc_pkt;
|
||||
/* 0-1: Enable 16-Bit FFT output data precision in spectral packet */
|
||||
t_u32 out_16bits;
|
||||
/* 0-1: Enable power spectrum in dB for spectral packe */
|
||||
t_u32 spec_pwr_enable;
|
||||
/* 0-1: Enable spectral packet rate reduction in DB output format */
|
||||
t_u32 rate_deduction;
|
||||
/* 0-7: Number of spectral packets over which spectral data is to be
|
||||
* averaged. */
|
||||
t_u32 n_pkt_avg;
|
||||
} __attribute__((packed)) ssu_params_cfg;
|
||||
#endif
|
||||
|
||||
#define PRIV_CMD_CSI "csi"
|
||||
|
||||
#define PRIV_CMD_BOOTSLEEP "bootsleep"
|
||||
|
|
@ -405,40 +340,6 @@ typedef struct _ssu_params_cfg {
|
|||
/** Private command to get secure boot uuid */
|
||||
#define PRIV_CMD_GET_SB_UUID "getuuid"
|
||||
|
||||
#define FILS_IP_CONFIG "FILSIPCONFIG"
|
||||
#define FILS_PSK_CONFIG "FILSPSKCONFIG"
|
||||
#define FILS_IP_STR "ip"
|
||||
#define FILS_MASK_STR "mask"
|
||||
#define FILS_BASE_IP_STR "base_ip"
|
||||
#define FILS_DNS_STR "dns"
|
||||
#define FILS_COUNT_STR "max"
|
||||
#define FILS_KEY "key"
|
||||
#define FILS_BSSID "bssid"
|
||||
|
||||
mlan_status woal_set_fils_psk(moal_private *priv, char *data);
|
||||
#ifdef UAP_SUPPORT
|
||||
mlan_status woal_set_fils_ip_cfg(moal_private *priv, char *data);
|
||||
#endif
|
||||
|
||||
/** Private command: 11AX Cfg */
|
||||
#define PRIV_CMD_11AXCFG "11axcfg"
|
||||
/** Private command: 11AX Cmd */
|
||||
#define PRIV_CMD_11AXCMDCFG "11axcmd"
|
||||
/** Private command: Range ext Cmd */
|
||||
#define PRIV_CMD_RANGE_EXT "range_ext"
|
||||
/** Private command: TWT Setup Cfg */
|
||||
#define PRIV_CMD_TWT_SETUP "twt_setup"
|
||||
/** Private command: TWT Teardown Cfg */
|
||||
#define PRIV_CMD_TWT_TEARDOWN "twt_teardown"
|
||||
/** Private command: TWT report Cfg */
|
||||
#define PRIV_CMD_TWT_REPORT "twt_report"
|
||||
/** Private command: TWT Information Cfg */
|
||||
#define PRIV_CMD_TWT_INFORMATION "twt_information"
|
||||
/** Private command: BTWT AP Cfg Set */
|
||||
#define PRIV_CMD_BTWT_AP_CONFIG_SET "btwt_AP_config_set"
|
||||
/** Private command: BTWT AP Cfg Get */
|
||||
#define PRIV_CMD_BTWT_AP_CONFIG_GET "btwt_AP_config_get"
|
||||
|
||||
#define PRIV_CMD_LPM "lpm"
|
||||
/** Private command: auth/assoc timeout cfg*/
|
||||
#define PRIV_CMD_AUTH_ASSOC_TIMEOUT_CFG "auth_assoc_timeout_cfg"
|
||||
|
|
@ -586,106 +487,6 @@ typedef struct woal_priv_addba {
|
|||
t_u32 rx_amsdu;
|
||||
} woal_addba;
|
||||
|
||||
/** Action field value : get */
|
||||
#define ACTION_GET 0
|
||||
/** Action field value : set */
|
||||
#define ACTION_SET 1
|
||||
/** Action field value: add */
|
||||
#define ACTION_ADD 2
|
||||
/** Action field value: remove */
|
||||
#define ACTION_REMOVE 3
|
||||
|
||||
#define MC_AGGR_CTRL MBIT(0)
|
||||
#define UC_NONAGGR_CTRL MBIT(6)
|
||||
/* mcast_aggr_group */
|
||||
typedef struct _mcast_aggr_group {
|
||||
/** action */
|
||||
t_u32 action;
|
||||
/** mcast addr */
|
||||
t_u8 mcast_addr[ETH_ALEN];
|
||||
/** Number of multicast addresses in the list */
|
||||
t_u32 num_mcast_addr;
|
||||
/** Multicast address list */
|
||||
mlan_802_11_mac_addr mac_list[MLAN_MAX_MULTICAST_LIST_SIZE];
|
||||
} mcast_aggr_group, *pmcast_aggr_group;
|
||||
|
||||
typedef struct _txrate_setting {
|
||||
t_u16 preamble : 2; /*BIT1-BIT0:
|
||||
* For legacy 11b: preamble type
|
||||
* 00 = long
|
||||
* 01 = short
|
||||
* 10/11 = reserved
|
||||
* For legacy 11g: reserved
|
||||
* For 11n: Green field PPDU indicator
|
||||
* 00 = HT-mix
|
||||
* 01 = HT-GF
|
||||
* 10/11 = reserved.
|
||||
* For 11ac: reserved.
|
||||
* For 11ax:
|
||||
* 00 = HE-SU
|
||||
* 01 = HE-EXT-SU
|
||||
* 10 = HE-MU
|
||||
* 11 = HE trigger based
|
||||
*/
|
||||
t_u16 bandwidth : 3; /* BIT2- BIT4
|
||||
* For 11n and 11ac traffic: Bandwidth
|
||||
* 0 = 20Mhz
|
||||
* 1 = 40Mhz
|
||||
* 2 = 80 Mhz
|
||||
* 3 = 160 Mhz
|
||||
* 4-7 = reserved
|
||||
* For legacy rate : BW>0 implies non-HT
|
||||
* duplicates. For HE SU PPDU: 0 = 20Mhz 1 = 40Mhz
|
||||
* 2 = 80 Mhz
|
||||
* 3 = 160 Mhz
|
||||
* 4-7 = reserved
|
||||
* For HE ER SU PPDU:
|
||||
* 0 = 242-tone RU
|
||||
* 1 = upper frequency 106 tone RU within the
|
||||
* primary 20 Mhz. For HE MU PPDU: 0 = 20Mhz. 1 =
|
||||
* 40Mhz. 2 = 80Mhz non-preamble puncturing mode 3
|
||||
* = 160Mhz and 80+80 Mhz non-preamble. 4 = for
|
||||
* preemble puncturing in 80 Mhz , where in the
|
||||
* preamble only the secondary 20Mhz is punctured.
|
||||
* 5 = for preemble puncturing in 80 Mhz ,
|
||||
* where in the preamble only one of the two
|
||||
* 20Mhz subchannels in the secondary 40Mhz is
|
||||
* punctured. 6 = for preemble puncturing in 160
|
||||
* Mhz or 80 Mhz + 80 Mhz, where in the primary 80
|
||||
* Mhz of the preamble only the secondary 20 Mhz is
|
||||
* punctured. 7 = for preemble puncturing in 160
|
||||
* Mhz or 80 Mhz + 80 Mhz, where in the primary 80
|
||||
* Mhz of the preamble the primary 40 Mhz is
|
||||
* present.
|
||||
*/
|
||||
t_u16 shortGI : 2; /*BIT5- BIT6
|
||||
* For legacy: not used
|
||||
* For 11n: 00 = normal, 01 =shortGI, 10/11 =
|
||||
* reserved For 11ac: SGI map to VHT-SIG-A2[0]
|
||||
* VHT-SIG-A2[1] is set to 1 if short guard
|
||||
* interval is used and NSYM mod 10 = 9, otherwise
|
||||
* set to 0. For 11ax: 00 = 1xHELTF+GI0.8usec 01 =
|
||||
* 2xHELTF+GI0.8usec 10 = 2xHELTF+GI1.6usec 11 =
|
||||
* 4xHELTF+GI0.8 usec if both DCM and STBC are 1
|
||||
* 4xHELTF+GI3.2 usec otherwise
|
||||
*/
|
||||
t_u16 stbc : 1; // BIT7, 0: no STBC; 1: STBC
|
||||
t_u16 dcm : 1; // BIT8, 0: no DCM; 1: DCM used.
|
||||
t_u16 adv_coding : 1; // BIT9, 0: BCC; 1: LDPC.
|
||||
t_u16 doppler : 2; /* BIT11-BIT10,
|
||||
00: Doppler0
|
||||
01: Doppler 1 with Mma =10
|
||||
10: Doppler 1 with Mma =20
|
||||
*/
|
||||
t_u16 max_pktext : 2; /*BIT12-BIT13:
|
||||
* Max packet extension
|
||||
* 0 - 0 usec
|
||||
* 1 - 8 usec
|
||||
* 2 - 16 usec.
|
||||
*/
|
||||
t_u16 reserverd : 2; // BIT14-BIT15
|
||||
} __ATTRIB_PACK__ txrate_setting;
|
||||
|
||||
/** data structure for cmd txratecfg */
|
||||
typedef struct woal_priv_tx_rate_cfg {
|
||||
/* LG rate: 0, HT rate: 1, VHT rate: 2 */
|
||||
|
|
@ -739,45 +540,11 @@ typedef struct _cloud_keep_alive {
|
|||
/** packet content */
|
||||
t_u8 pkt[255];
|
||||
} __ATTRIB_PACK__ cloud_keep_alive;
|
||||
/** cloud keep alive parameters */
|
||||
#define PRIV_CMD_CLOUD_KEEP_ALIVE_RX "cloud_keep_alive_rx"
|
||||
typedef struct _cloud_keep_alive_rx {
|
||||
/** id */
|
||||
t_u8 mkeep_alive_id;
|
||||
/** enable/disable of this id */
|
||||
t_u8 enable;
|
||||
/** enable/disable reset*/
|
||||
t_u8 reset;
|
||||
/** Reserved */
|
||||
t_u8 reserved;
|
||||
/** Destination MAC address */
|
||||
t_u8 dst_mac[ETH_ALEN];
|
||||
/** Source MAC address */
|
||||
t_u8 src_mac[ETH_ALEN];
|
||||
/** packet length */
|
||||
t_u8 pkt_len;
|
||||
/** packet content */
|
||||
t_u8 pkt[100];
|
||||
} __ATTRIB_PACK__ cloud_keep_alive_rx;
|
||||
|
||||
#define TLV_TYPE_PER_PKT_CFG 0x0001
|
||||
#define TX_PKT_CTRL MBIT(0)
|
||||
#define RX_PKT_INFO MBIT(1)
|
||||
|
||||
#define FLAG_TX_HISTOGRAM 0x01
|
||||
#define FLAG_RX_HISTOGRAM 0x02
|
||||
#define DISABLE_TX_RX_HISTOGRAM 0x00
|
||||
#define ENABLE_TX_RX_HISTOGRAM 0x01
|
||||
#define GET_TX_RX_HISTOGRAM 0x02
|
||||
#define PRIV_CMD_TX_RX_HISTOGRAM "txrxhistogram"
|
||||
/** TX and RX histogram statistic parameters*/
|
||||
typedef struct _tx_rx_histogram {
|
||||
/** Enable or disable get tx/rx histogram statistic */
|
||||
t_u8 enable;
|
||||
/** Choose to get TX, RX or both histogram statistic */
|
||||
t_u8 action;
|
||||
} __ATTRIB_PACK__ tx_rx_histogram;
|
||||
|
||||
/** wlan_ieee80211_chan */
|
||||
typedef struct {
|
||||
/** center freq */
|
||||
|
|
@ -800,8 +567,6 @@ typedef struct {
|
|||
wlan_ieee80211_chan chan_list[];
|
||||
} __ATTRIB_PACK__ wlan_ieee80211_chan_list;
|
||||
|
||||
#define PRIV_CMD_TP_STATE "tp_state"
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
#define PRIV_CMD_AGCS "agcs"
|
||||
#endif
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
1294
mlinux/moal_ioctl.c
1294
mlinux/moal_ioctl.c
File diff suppressed because it is too large
Load diff
4204
mlinux/moal_main.c
4204
mlinux/moal_main.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -26,14 +26,9 @@ Change log:
|
|||
************************************************************************/
|
||||
|
||||
#include "moal_main.h"
|
||||
#ifdef SDIO
|
||||
#include "moal_sdio.h"
|
||||
#endif /* SDIO */
|
||||
|
||||
#include "moal_eth_ioctl.h"
|
||||
#ifdef USB
|
||||
#include "moal_usb.h"
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
|
|
@ -208,25 +203,10 @@ static inline int woal_copy_rates(t_u8 *dest, int pos, t_u8 *src, int len)
|
|||
static int woal_warm_reset(moal_private *priv)
|
||||
{
|
||||
int ret = 0;
|
||||
moal_handle *handle = priv->phandle;
|
||||
moal_handle *ref_handle;
|
||||
moal_private *ref_priv;
|
||||
ENTER();
|
||||
ret = woal_pre_warmreset(priv);
|
||||
if (ret)
|
||||
goto done;
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
if (ref_handle) {
|
||||
ref_priv = woal_get_priv(ref_handle, MLAN_BSS_ROLE_ANY);
|
||||
if (ref_priv) {
|
||||
ret = woal_pre_warmreset(ref_priv);
|
||||
if (ret)
|
||||
goto done;
|
||||
ret = woal_warmreset(ref_priv);
|
||||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
ret = woal_warmreset(priv);
|
||||
done:
|
||||
LEAVE();
|
||||
|
|
@ -2252,7 +2232,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef SDIO
|
||||
/**
|
||||
* @brief Turn on/off the sdio clock
|
||||
*
|
||||
|
|
@ -2307,7 +2286,6 @@ done:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif /* SDIO */
|
||||
|
||||
/**
|
||||
* @brief Set/Get beacon interval
|
||||
|
|
@ -4791,7 +4769,6 @@ done:
|
|||
return status;
|
||||
}
|
||||
|
||||
#ifdef SDIO
|
||||
/**
|
||||
* @brief Cmd52 read/write register
|
||||
*
|
||||
|
|
@ -4839,7 +4816,6 @@ static int woal_cmd52rdwr_ioctl(moal_private *priv, struct iwreq *wrq)
|
|||
}
|
||||
|
||||
if (!rw) {
|
||||
#ifdef SDIO_MMC
|
||||
sdio_claim_host(((sdio_mmc_card *)priv->phandle->card)->func);
|
||||
if (func)
|
||||
data = sdio_readb(
|
||||
|
|
@ -4856,18 +4832,7 @@ static int woal_cmd52rdwr_ioctl(moal_private *priv, struct iwreq *wrq)
|
|||
reg);
|
||||
goto done;
|
||||
}
|
||||
#else
|
||||
if (sdio_read_ioreg(priv->phandle->card, func, reg, &data) <
|
||||
0) {
|
||||
PRINTM(MERROR,
|
||||
"sdio_read_ioreg: reading register 0x%X failed\n",
|
||||
reg);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
#ifdef SDIO_MMC
|
||||
sdio_claim_host(((sdio_mmc_card *)priv->phandle->card)->func);
|
||||
if (func)
|
||||
sdio_writeb(
|
||||
|
|
@ -4884,16 +4849,6 @@ static int woal_cmd52rdwr_ioctl(moal_private *priv, struct iwreq *wrq)
|
|||
reg);
|
||||
goto done;
|
||||
}
|
||||
#else
|
||||
if (sdio_write_ioreg(priv->phandle->card, func, reg, data) <
|
||||
0) {
|
||||
PRINTM(MERROR,
|
||||
"sdio_write_ioreg: writing register 0x%X failed\n",
|
||||
reg);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
buf[0] = data;
|
||||
|
|
@ -5013,9 +4968,7 @@ done:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif /* SDIO */
|
||||
|
||||
#ifdef SDIO
|
||||
/**
|
||||
* @brief Set SDIO Multi-point aggregation control parameters
|
||||
*
|
||||
|
|
@ -5132,7 +5085,6 @@ done:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set/Get scan configuration parameters
|
||||
|
|
@ -6329,30 +6281,18 @@ static int woal_set_get_tx_rx_ant(moal_private *priv, struct iwreq *wrq)
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (priv->phandle->feature_control & FEATURE_CTRL_STREAM_2X2) {
|
||||
radio->param.ant_cfg.tx_antenna = data[0];
|
||||
if (data[0] == RF_ANTENNA_AUTO) {
|
||||
radio->param.ant_cfg.rx_antenna = 0;
|
||||
if (data[1] > 0xffff) {
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
radio->param.ant_cfg.rx_antenna = data[0];
|
||||
radio->param.ant_cfg.tx_antenna = data[0];
|
||||
if (data[0] == RF_ANTENNA_AUTO) {
|
||||
radio->param.ant_cfg.rx_antenna = 0;
|
||||
if (data[1] > 0xffff) {
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
if (wrq->u.data.length == 2)
|
||||
radio->param.ant_cfg.rx_antenna = data[1];
|
||||
} else {
|
||||
radio->param.ant_cfg_1x1.antenna = data[0];
|
||||
if (wrq->u.data.length == 2) {
|
||||
if (data[1] > 0xffff) {
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
radio->param.ant_cfg_1x1.evaluate_time =
|
||||
data[1];
|
||||
}
|
||||
radio->param.ant_cfg.rx_antenna = data[0];
|
||||
}
|
||||
if (wrq->u.data.length == 2)
|
||||
radio->param.ant_cfg.rx_antenna = data[1];
|
||||
req->action = MLAN_ACT_SET;
|
||||
} else
|
||||
req->action = MLAN_ACT_GET;
|
||||
|
|
@ -6363,20 +6303,10 @@ static int woal_set_get_tx_rx_ant(moal_private *priv, struct iwreq *wrq)
|
|||
}
|
||||
if (!wrq->u.data.length) {
|
||||
wrq->u.data.length = 1;
|
||||
if (priv->phandle->feature_control & FEATURE_CTRL_STREAM_2X2) {
|
||||
data[0] = radio->param.ant_cfg.tx_antenna;
|
||||
data[1] = radio->param.ant_cfg.rx_antenna;
|
||||
if (data[0] && data[1] && (data[0] != data[1]))
|
||||
wrq->u.data.length = 2;
|
||||
} else {
|
||||
data[0] = (int)radio->param.ant_cfg_1x1.antenna;
|
||||
data[1] = (int)radio->param.ant_cfg_1x1.evaluate_time;
|
||||
data[2] = (int)radio->param.ant_cfg_1x1.current_antenna;
|
||||
if (data[0] == 0xffff && data[2] > 0)
|
||||
wrq->u.data.length = 3;
|
||||
else if (data[0] == 0xffff)
|
||||
wrq->u.data.length = 2;
|
||||
}
|
||||
data[0] = radio->param.ant_cfg.tx_antenna;
|
||||
data[1] = radio->param.ant_cfg.rx_antenna;
|
||||
if (data[0] && data[1] && (data[0] != data[1]))
|
||||
wrq->u.data.length = 2;
|
||||
if (copy_to_user(wrq->u.data.pointer, data,
|
||||
wrq->u.data.length * sizeof(int))) {
|
||||
ret = -EFAULT;
|
||||
|
|
@ -6528,16 +6458,6 @@ int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
case WOAL_WARMRESET:
|
||||
ret = woal_warm_reset(priv);
|
||||
break;
|
||||
#ifdef USB
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
case WOAL_USB_SUSPEND:
|
||||
ret = woal_enter_usb_suspend(priv->phandle);
|
||||
break;
|
||||
case WOAL_USB_RESUME:
|
||||
ret = woal_exit_usb_suspend(priv->phandle);
|
||||
break;
|
||||
#endif /* CONFIG_USB_SUSPEND */
|
||||
#endif
|
||||
case WOAL_11D_CLR_CHAN_TABLE:
|
||||
ret = woal_11d_clr_chan_table(priv, wrq);
|
||||
break;
|
||||
|
|
@ -6671,7 +6591,6 @@ int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
case WOAL_INACTIVITY_TIMEOUT_EXT:
|
||||
ret = woal_inactivity_timeout_ext(priv, wrq);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case WOAL_SDIO_CLOCK:
|
||||
ret = woal_sdio_clock_ioctl(priv, wrq);
|
||||
break;
|
||||
|
|
@ -6681,7 +6600,6 @@ int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
case WOAL_SDIO_MPA_CTRL:
|
||||
ret = woal_do_sdio_mpa_ctrl(priv, wrq);
|
||||
break;
|
||||
#endif
|
||||
case WOAL_BAND_CFG:
|
||||
ret = woal_band_cfg(priv, wrq);
|
||||
break;
|
||||
|
|
@ -6816,11 +6734,9 @@ int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
break;
|
||||
case WOAL_SET_GET_2K_BYTES:
|
||||
switch ((int)wrq->u.data.flags) {
|
||||
#ifdef SDIO
|
||||
case WOAL_CMD_53RDWR:
|
||||
ret = woal_cmd53rdwr_ioctl(priv, wrq);
|
||||
break;
|
||||
#endif
|
||||
case WOAL_SET_USER_SCAN:
|
||||
ret = woal_set_user_scan_ioctl(priv, wrq);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -67,12 +67,6 @@ Change log:
|
|||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
/** Private command ID for usb suspend */
|
||||
#define WOAL_USB_SUSPEND 2
|
||||
/** Private command ID for usb resume */
|
||||
#define WOAL_USB_RESUME 3
|
||||
#endif /* CONFIG_USB_SUSPEND */
|
||||
/** Private command ID to clear 11d chan table */
|
||||
#define WOAL_11D_CLR_CHAN_TABLE 4
|
||||
|
||||
|
|
@ -110,28 +104,22 @@ Change log:
|
|||
#define WOAL_11N_AMSDU_AGGR_CTRL 17
|
||||
/** Private command ID to set/get Inactivity timeout */
|
||||
#define WOAL_INACTIVITY_TIMEOUT_EXT 18
|
||||
#ifdef SDIO
|
||||
/** Private command ID to turn on/off sdio clock */
|
||||
#define WOAL_SDIO_CLOCK 19
|
||||
/** Private command ID to read/write Command 52 */
|
||||
#define WOAL_CMD_52RDWR 20
|
||||
#endif
|
||||
/** Private command ID to set/get scan configuration parameter */
|
||||
#define WOAL_SCAN_CFG 21
|
||||
/** Private command ID to set/get PS configuration parameter */
|
||||
#define WOAL_PS_CFG 22
|
||||
/** Private command ID to read/write memory */
|
||||
#define WOAL_MEM_READ_WRITE 23
|
||||
#ifdef SDIO
|
||||
/** Private command ID to control SDIO MP-A */
|
||||
#define WOAL_SDIO_MPA_CTRL 25
|
||||
#endif
|
||||
/** Private command ID for Updating ADDBA variables */
|
||||
#define WOAL_ADDBA_REJECT 27
|
||||
/** Private command ID to set/get sleep parameters */
|
||||
#define WOAL_SLEEP_PARAMS 28
|
||||
/** Private command ID to set/get network monitor */
|
||||
#define WOAL_NET_MONITOR 30
|
||||
/** Private command ID to set/get TX BF capabilities */
|
||||
#define WOAL_TX_BF_CAP 31
|
||||
/** Private command ID to set/get dfs testing settings */
|
||||
|
|
@ -250,10 +238,8 @@ Change log:
|
|||
/** Private command ID to set/get 2K bytes */
|
||||
#define WOAL_SET_GET_2K_BYTES (WOAL_IOCTL + 23)
|
||||
|
||||
#ifdef SDIO
|
||||
/** Private command ID to read/write Command 53 */
|
||||
#define WOAL_CMD_53RDWR 2
|
||||
#endif
|
||||
|
||||
/** Private command ID for setuserscan */
|
||||
#define WOAL_SET_USER_SCAN 3
|
||||
|
|
|
|||
|
|
@ -34,9 +34,7 @@ Change log:
|
|||
#include "moal_cfg80211.h"
|
||||
#include "moal_cfg80211_util.h"
|
||||
#endif
|
||||
#ifdef SDIO
|
||||
#include "moal_sdio.h"
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
|
|
@ -285,86 +283,6 @@ static int woal_info_proc_read(struct seq_file *sfp, void *data)
|
|||
ustats.rsna_4way_hshk_failures);
|
||||
}
|
||||
#endif /* UAP_SUPPORT */
|
||||
seq_printf(sfp, "=== tp_acnt.on:%d drop_point:%d ===\n",
|
||||
handle->tp_acnt.on, handle->tp_acnt.drop_point);
|
||||
seq_printf(sfp, "====Tx accounting====\n");
|
||||
for (i = 0; i < MAX_TP_ACCOUNT_DROP_POINT_NUM; i++) {
|
||||
seq_printf(sfp, "[%d] Tx packets : %lu\n", i,
|
||||
handle->tp_acnt.tx_packets[i]);
|
||||
seq_printf(sfp, "[%d] Tx packets last: %lu\n", i,
|
||||
handle->tp_acnt.tx_packets_last[i]);
|
||||
seq_printf(sfp, "[%d] Tx packets rate: %lu\n", i,
|
||||
handle->tp_acnt.tx_packets_rate[i]);
|
||||
seq_printf(sfp, "[%d] Tx bytes : %lu\n", i,
|
||||
handle->tp_acnt.tx_bytes[i]);
|
||||
seq_printf(sfp, "[%d] Tx bytes last : %lu\n", i,
|
||||
handle->tp_acnt.tx_bytes_last[i]);
|
||||
seq_printf(sfp, "[%d] Tx bytes rate : %luMbps\n", i,
|
||||
handle->tp_acnt.tx_bytes_rate[i] * 8 / 1024 / 1024);
|
||||
}
|
||||
seq_printf(sfp, "Tx amsdu cnt : %lu\n",
|
||||
handle->tp_acnt.tx_amsdu_cnt);
|
||||
seq_printf(sfp, "Tx amsdu cnt last : %lu\n",
|
||||
handle->tp_acnt.tx_amsdu_cnt_last);
|
||||
seq_printf(sfp, "Tx amsdu cnt rate : %lu\n",
|
||||
handle->tp_acnt.tx_amsdu_cnt_rate);
|
||||
seq_printf(sfp, "Tx amsdu pkt cnt : %lu\n",
|
||||
handle->tp_acnt.tx_amsdu_pkt_cnt);
|
||||
seq_printf(sfp, "Tx amsdu pkt cnt last : %lu\n",
|
||||
handle->tp_acnt.tx_amsdu_pkt_cnt_last);
|
||||
seq_printf(sfp, "Tx amsdu pkt cnt rate : %lu\n",
|
||||
handle->tp_acnt.tx_amsdu_pkt_cnt_rate);
|
||||
seq_printf(sfp, "Tx intr cnt : %lu\n",
|
||||
handle->tp_acnt.tx_intr_cnt);
|
||||
seq_printf(sfp, "Tx intr last : %lu\n",
|
||||
handle->tp_acnt.tx_intr_last);
|
||||
seq_printf(sfp, "Tx intr rate : %lu\n",
|
||||
handle->tp_acnt.tx_intr_rate);
|
||||
seq_printf(sfp, "Tx pending : %lu\n",
|
||||
handle->tp_acnt.tx_pending);
|
||||
seq_printf(sfp, "Tx xmit skb realloc : %lu\n",
|
||||
handle->tp_acnt.tx_xmit_skb_realloc_cnt);
|
||||
seq_printf(sfp, "Tx stop queue cnt : %lu\n",
|
||||
handle->tp_acnt.tx_stop_queue_cnt);
|
||||
seq_printf(sfp, "====Rx accounting====\n");
|
||||
for (i = 0; i < MAX_TP_ACCOUNT_DROP_POINT_NUM; i++) {
|
||||
seq_printf(sfp, "[%d] Rx packets : %lu\n", i,
|
||||
handle->tp_acnt.rx_packets[i]);
|
||||
seq_printf(sfp, "[%d] Rx packets last: %lu\n", i,
|
||||
handle->tp_acnt.rx_packets_last[i]);
|
||||
seq_printf(sfp, "[%d] Rx packets rate: %lu\n", i,
|
||||
handle->tp_acnt.rx_packets_rate[i]);
|
||||
seq_printf(sfp, "[%d] Rx bytes : %lu\n", i,
|
||||
handle->tp_acnt.rx_bytes[i]);
|
||||
seq_printf(sfp, "[%d] Rx bytes last : %lu\n", i,
|
||||
handle->tp_acnt.rx_bytes_last[i]);
|
||||
seq_printf(sfp, "[%d] Rx bytes rate : %luMbps\n", i,
|
||||
handle->tp_acnt.rx_bytes_rate[i] * 8 / 1024 / 1024);
|
||||
}
|
||||
seq_printf(sfp, "Rx amsdu cnt : %lu\n",
|
||||
handle->tp_acnt.rx_amsdu_cnt);
|
||||
seq_printf(sfp, "Rx amsdu cnt last : %lu\n",
|
||||
handle->tp_acnt.rx_amsdu_cnt_last);
|
||||
seq_printf(sfp, "Rx amsdu cnt rate : %lu\n",
|
||||
handle->tp_acnt.rx_amsdu_cnt_rate);
|
||||
seq_printf(sfp, "Rx amsdu pkt cnt : %lu\n",
|
||||
handle->tp_acnt.rx_amsdu_pkt_cnt);
|
||||
seq_printf(sfp, "Rx amsdu pkt cnt last : %lu\n",
|
||||
handle->tp_acnt.rx_amsdu_pkt_cnt_last);
|
||||
seq_printf(sfp, "Rx amsdu pkt cnt rate : %lu\n",
|
||||
handle->tp_acnt.rx_amsdu_pkt_cnt_rate);
|
||||
seq_printf(sfp, "Rx intr cnt : %lu\n",
|
||||
handle->tp_acnt.rx_intr_cnt);
|
||||
seq_printf(sfp, "Rx intr last : %lu\n",
|
||||
handle->tp_acnt.rx_intr_last);
|
||||
seq_printf(sfp, "Rx intr rate : %lu\n",
|
||||
handle->tp_acnt.rx_intr_rate);
|
||||
seq_printf(sfp, "Rx pending : %lu\n",
|
||||
handle->tp_acnt.rx_pending);
|
||||
seq_printf(sfp, "Rx pause : %lu\n",
|
||||
handle->tp_acnt.rx_paused_cnt);
|
||||
seq_printf(sfp, "Rx rdptr full cnt : %lu\n",
|
||||
handle->tp_acnt.rx_rdptr_full_cnt);
|
||||
exit:
|
||||
LEAVE();
|
||||
MODULE_PUT;
|
||||
|
|
@ -399,7 +317,6 @@ static const struct file_operations info_proc_fops = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef SDIO
|
||||
#define CMD52_STR_LEN 50
|
||||
/*
|
||||
* @brief Parse cmd52 string
|
||||
|
|
@ -455,7 +372,6 @@ static int parse_cmd52_string(const char *buffer, size_t len, int *func,
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void woal_priv_get_tx_rx_ant(struct seq_file *sfp, moal_private *priv)
|
||||
{
|
||||
|
|
@ -491,40 +407,17 @@ static void woal_priv_get_tx_rx_ant(struct seq_file *sfp, moal_private *priv)
|
|||
LEAVE();
|
||||
return;
|
||||
}
|
||||
if (priv->phandle->feature_control & FEATURE_CTRL_STREAM_2X2) {
|
||||
data[0] = radio->param.ant_cfg.tx_antenna;
|
||||
data[1] = radio->param.ant_cfg.rx_antenna;
|
||||
if (data[0] && data[1])
|
||||
ret = sizeof(int) * 2;
|
||||
else
|
||||
ret = sizeof(int) * 1;
|
||||
if (IS_CARDIW624(priv->phandle->card_type) ||
|
||||
IS_CARDAW693(priv->phandle->card_type)) {
|
||||
data[2] = radio->param.ant_cfg.tx_antenna_6g;
|
||||
data[3] = radio->param.ant_cfg.rx_antenna_6g;
|
||||
if (data[2] && data[3])
|
||||
ret = sizeof(int) * 4;
|
||||
}
|
||||
if (ret == sizeof(int) * 1)
|
||||
seq_printf(sfp, "antcfg=0x%x\n", data[0]);
|
||||
else if (ret == sizeof(int) * 2)
|
||||
seq_printf(sfp, "antcfg=0x%x 0x%x\n", data[0], data[1]);
|
||||
else if (ret == sizeof(int) * 4)
|
||||
seq_printf(sfp, "antcfg=0x%x 0x%x %d %d\n", data[0],
|
||||
data[1], data[2], data[3]);
|
||||
data[0] = radio->param.ant_cfg.tx_antenna;
|
||||
data[1] = radio->param.ant_cfg.rx_antenna;
|
||||
if (data[0] && data[1])
|
||||
ret = sizeof(int) * 2;
|
||||
else
|
||||
ret = sizeof(int) * 1;
|
||||
if (ret == sizeof(int) * 1)
|
||||
seq_printf(sfp, "antcfg=0x%x\n", data[0]);
|
||||
else if (ret == sizeof(int) * 2)
|
||||
seq_printf(sfp, "antcfg=0x%x 0x%x\n", data[0], data[1]);
|
||||
|
||||
} else {
|
||||
if (radio->param.ant_cfg_1x1.antenna == 0xffff) {
|
||||
seq_printf(
|
||||
sfp, "antcfg=0x%x %d %d\n",
|
||||
(int)radio->param.ant_cfg_1x1.antenna,
|
||||
(int)radio->param.ant_cfg_1x1.evaluate_time,
|
||||
(int)radio->param.ant_cfg_1x1.current_antenna);
|
||||
} else {
|
||||
seq_printf(sfp, "antcfg=0x%x\n",
|
||||
(int)radio->param.ant_cfg_1x1.antenna);
|
||||
}
|
||||
}
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
|
|
@ -544,7 +437,7 @@ static mlan_status woal_priv_set_tx_rx_ant(moal_handle *handle, char *line)
|
|||
memset((char *)data, 0, sizeof(data));
|
||||
parse_arguments(line, data, ARRAY_SIZE(data), &user_data_len);
|
||||
|
||||
if (user_data_len > 4) {
|
||||
if (user_data_len > 2) {
|
||||
PRINTM(MERROR, "Invalid number of args!\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
|
|
@ -570,43 +463,27 @@ static mlan_status woal_priv_set_tx_rx_ant(moal_handle *handle, char *line)
|
|||
req->req_id = MLAN_IOCTL_RADIO_CFG;
|
||||
req->action = MLAN_ACT_SET;
|
||||
|
||||
if (handle->feature_control & FEATURE_CTRL_STREAM_2X2) {
|
||||
radio->param.ant_cfg.tx_antenna = data[0];
|
||||
if (data[0] == RF_ANTENNA_AUTO) {
|
||||
radio->param.ant_cfg.rx_antenna = 0;
|
||||
if (data[1] > 0xffff) {
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
} else {
|
||||
radio->param.ant_cfg.rx_antenna = data[0];
|
||||
}
|
||||
if (user_data_len == 2)
|
||||
radio->param.ant_cfg.rx_antenna = data[1];
|
||||
if (user_data_len == 4) {
|
||||
radio->param.ant_cfg.tx_antenna_6g = data[2];
|
||||
radio->param.ant_cfg.rx_antenna_6g = data[3];
|
||||
}
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
if (IS_CARD9098(priv->phandle->card_type) ||
|
||||
IS_CARD9097(priv->phandle->card_type) ||
|
||||
IS_CARDIW624(priv->phandle->card_type) ||
|
||||
IS_CARDAW693(priv->phandle->card_type)) {
|
||||
woal_cfg80211_notify_antcfg(priv, priv->phandle->wiphy,
|
||||
radio);
|
||||
}
|
||||
#endif
|
||||
} else
|
||||
radio->param.ant_cfg_1x1.antenna = data[0];
|
||||
if (user_data_len == 2) {
|
||||
radio->param.ant_cfg.tx_antenna = data[0];
|
||||
if (data[0] == RF_ANTENNA_AUTO) {
|
||||
radio->param.ant_cfg.rx_antenna = 0;
|
||||
if (data[1] > 0xffff) {
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
radio->param.ant_cfg_1x1.evaluate_time = data[1];
|
||||
} else {
|
||||
radio->param.ant_cfg.rx_antenna = data[0];
|
||||
}
|
||||
if (user_data_len == 2)
|
||||
radio->param.ant_cfg.rx_antenna = data[1];
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
if (IS_CARD9098(priv->phandle->card_type) ||
|
||||
IS_CARD9097(priv->phandle->card_type) ||
|
||||
IS_CARDIW624(priv->phandle->card_type) ||
|
||||
IS_CARDAW693(priv->phandle->card_type)) {
|
||||
woal_cfg80211_notify_antcfg(priv, priv->phandle->wiphy, radio);
|
||||
}
|
||||
#endif
|
||||
/* Send IOCTL request to MLAN */
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
|
|
@ -637,10 +514,7 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
struct seq_file *sfp = f->private_data;
|
||||
moal_handle *handle = (moal_handle *)sfp->private;
|
||||
|
||||
#ifdef SDIO
|
||||
int func = 0, reg = 0, val = 0;
|
||||
#endif
|
||||
moal_handle *ref_handle = NULL;
|
||||
t_u32 cmd = 0;
|
||||
t_u32 tmp_count = 0;
|
||||
int copy_len;
|
||||
|
|
@ -700,7 +574,6 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
PRINTM(MERROR, "Could not switch drv mode\n");
|
||||
}
|
||||
}
|
||||
#ifdef SDIO
|
||||
if (IS_SD(handle->card_type)) {
|
||||
if (!strncmp(databuf, "sdcmd52rw=", strlen("sdcmd52rw=")) &&
|
||||
count > strlen("sdcmd52rw=")) {
|
||||
|
|
@ -709,27 +582,11 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
woal_sdio_read_write_cmd52(handle, func, reg, val);
|
||||
}
|
||||
}
|
||||
#endif /* SD */
|
||||
if (!strncmp(databuf, "debug_dump", strlen("debug_dump"))) {
|
||||
PRINTM(MERROR, "Recevie debug_dump command\n");
|
||||
#ifdef USB
|
||||
if (!IS_USB(handle->card_type))
|
||||
#endif
|
||||
handle->driver_status = MTRUE;
|
||||
handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(handle->pmlan_adapter,
|
||||
handle->driver_status);
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
if (ref_handle) {
|
||||
ref_handle->driver_status = MTRUE;
|
||||
mlan_set_driver_status(ref_handle->pmlan_adapter,
|
||||
ref_handle->driver_status);
|
||||
priv = woal_get_priv(ref_handle, MLAN_BSS_ROLE_ANY);
|
||||
if (priv) {
|
||||
ref_handle->fw_dump_status = MTRUE;
|
||||
woal_mlan_debug_info(priv);
|
||||
woal_moal_debug_info(priv, NULL, MFALSE);
|
||||
}
|
||||
}
|
||||
priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY);
|
||||
if (priv) {
|
||||
handle->fw_dump_status = MTRUE;
|
||||
|
|
@ -758,46 +615,11 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
if (!strncmp(databuf, "fw_reload=", strlen("fw_reload="))) {
|
||||
line += strlen("fw_reload") + 1;
|
||||
config_data = (t_u32)woal_string_to_number(line);
|
||||
}
|
||||
#ifdef SDIO_MMC
|
||||
else if (IS_SD(handle->card_type))
|
||||
} else if (IS_SD(handle->card_type))
|
||||
config_data = FW_RELOAD_SDIO_INBAND_RESET;
|
||||
#endif
|
||||
PRINTM(MMSG, "Request fw_reload=%d\n", config_data);
|
||||
ret = woal_request_fw_reload(handle, config_data);
|
||||
}
|
||||
if (!strncmp(databuf, "drop_point=", strlen("drop_point="))) {
|
||||
line += strlen("drop_point") + 1;
|
||||
/* line is assigned from databuf, which is checked for NULL
|
||||
* before use. Therefore, line is guaranteed to be non-NULL at
|
||||
* this point.
|
||||
*/
|
||||
// coverity[string_null:SUPPRESS]
|
||||
config_data = (t_u32)woal_string_to_number(line);
|
||||
if (config_data) {
|
||||
handle->tp_acnt.on = 1;
|
||||
handle->tp_acnt.drop_point = config_data;
|
||||
if (handle->is_tp_acnt_timer_set == MFALSE) {
|
||||
woal_initialize_timer(&handle->tp_acnt.timer,
|
||||
woal_tp_acnt_timer_func,
|
||||
handle);
|
||||
handle->is_tp_acnt_timer_set = MTRUE;
|
||||
woal_mod_timer(&handle->tp_acnt.timer, 1000);
|
||||
}
|
||||
} else {
|
||||
if (handle->is_tp_acnt_timer_set) {
|
||||
woal_cancel_timer(&handle->tp_acnt.timer);
|
||||
handle->is_tp_acnt_timer_set = MFALSE;
|
||||
}
|
||||
memset((void *)&handle->tp_acnt, 0,
|
||||
sizeof(moal_tp_acnt_t));
|
||||
}
|
||||
priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY);
|
||||
if (priv)
|
||||
woal_set_tp_state(priv);
|
||||
PRINTM(MMSG, "on=%d drop_point=%d\n", handle->tp_acnt.on,
|
||||
handle->tp_acnt.drop_point);
|
||||
}
|
||||
if (!strncmp(databuf, "hssetpara=", strlen("hssetpara="))) {
|
||||
line += strlen("hssetpara") + 1;
|
||||
PRINTM(MCMND, "hssetpara=%s\n", line);
|
||||
|
|
@ -924,13 +746,11 @@ static int woal_config_read(struct seq_file *sfp, void *data)
|
|||
seq_printf(sfp, "hssetpara=%d,0x%x,%d,%d\n", hscfg.conditions,
|
||||
hscfg.gpio, hscfg.gap, hscfg.hs_wake_interval);
|
||||
}
|
||||
#ifdef SDIO
|
||||
if (IS_SD(handle->card_type)) {
|
||||
seq_printf(sfp, "sdcmd52rw=%d 0x%0x 0x%02X\n",
|
||||
handle->cmd52_func, handle->cmd52_reg,
|
||||
handle->cmd52_val);
|
||||
}
|
||||
#endif /* SD */
|
||||
seq_printf(sfp, "rf_test_mode=%u\n", handle->rf_test_mode);
|
||||
if (handle->rf_test_mode && handle->rf_data) {
|
||||
seq_printf(sfp, "tx_antenna=%u\n", handle->rf_data->tx_antenna);
|
||||
|
|
@ -1315,99 +1135,6 @@ static const struct file_operations fw_dump_fops = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(PCIE)
|
||||
static int woal_ssu_dump_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
moal_handle *handle = (moal_handle *)sfp->private;
|
||||
int ret = 0;
|
||||
t_u32 i;
|
||||
t_u32 *tmpbuf;
|
||||
unsigned char *sfpbuf;
|
||||
char dw_string[10] = {0};
|
||||
|
||||
ENTER();
|
||||
|
||||
if (MODULE_GET == 0) {
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!handle) {
|
||||
PRINTM(MERROR, "handle is null!\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!handle->ssu_dump_buf || !handle->ssu_dump_len) {
|
||||
PRINTM(MERROR,
|
||||
"ssu dump buffer is NULL or total length is zero\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (sfp->size < ((handle->ssu_dump_len * 9) / 4)) {
|
||||
PRINTM(MCMND,
|
||||
"ssu dump size too big, size=%d, ssu_dump_len=%ld\n",
|
||||
(int)sfp->size,
|
||||
(long int)((handle->ssu_dump_len * 9) / 4));
|
||||
sfp->count = sfp->size;
|
||||
ret = 0;
|
||||
MODULE_PUT;
|
||||
return ret;
|
||||
}
|
||||
|
||||
tmpbuf = (t_u32 *)handle->ssu_dump_buf;
|
||||
sfpbuf = sfp->buf;
|
||||
for (i = 0; i < handle->ssu_dump_len / 4; i++) {
|
||||
if ((i + 1) % 8 == 0)
|
||||
snprintf(dw_string, sizeof(dw_string), "%08x\n",
|
||||
*tmpbuf);
|
||||
else
|
||||
snprintf(dw_string, sizeof(dw_string), "%08x ",
|
||||
*tmpbuf);
|
||||
|
||||
moal_memcpy_ext(handle, sfpbuf, dw_string, 9, 9);
|
||||
tmpbuf++;
|
||||
sfpbuf += 9;
|
||||
}
|
||||
|
||||
sfp->count = ((handle->ssu_dump_len * 9) / 4);
|
||||
moal_vfree(handle, handle->ssu_dump_buf);
|
||||
handle->ssu_dump_buf = NULL;
|
||||
handle->ssu_dump_len = 0;
|
||||
|
||||
done:
|
||||
MODULE_PUT;
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int woal_ssu_dump_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_ssu_dump_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_ssu_dump_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_ssu_dump_read, PDE(inode)->data);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
||||
static const struct proc_ops ssu_dump_fops = {
|
||||
.proc_open = woal_ssu_dump_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations ssu_dump_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = woal_ssu_dump_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
@ -1567,9 +1294,6 @@ void woal_proc_init(moal_handle *handle)
|
|||
#ifdef DUMP_TO_PROC
|
||||
char drv_dump_dir[20];
|
||||
char fw_dump_dir[20];
|
||||
#if defined(PCIE)
|
||||
char ssu_dump_dir[20];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
|
@ -1656,21 +1380,6 @@ void woal_proc_init(moal_handle *handle)
|
|||
if (!r)
|
||||
PRINTM(MERROR, "Failed to create proc fw dump\n");
|
||||
|
||||
#if defined(PCIE)
|
||||
strncpy(ssu_dump_dir, "ssu_dump", sizeof(ssu_dump_dir));
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
|
||||
r = proc_create_data(ssu_dump_dir, 0644, handle->proc_wlan,
|
||||
&ssu_dump_fops, handle);
|
||||
#else
|
||||
r = create_proc_entry(ssu_dump_dir, 0644, handle->proc_wlan);
|
||||
if (r) {
|
||||
r->data = handle;
|
||||
r->proc_fops = &ssu_dump_fops;
|
||||
}
|
||||
#endif
|
||||
if (!r)
|
||||
PRINTM(MERROR, "Failed to create proc ssu dump\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
done:
|
||||
|
|
@ -1690,9 +1399,6 @@ void woal_proc_exit(moal_handle *handle)
|
|||
#ifdef DUMP_TO_PROC
|
||||
char drv_dump_dir[20];
|
||||
char fw_dump_dir[20];
|
||||
#if defined(PCIE)
|
||||
char ssu_dump_dir[20];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
|
@ -1706,10 +1412,6 @@ void woal_proc_exit(moal_handle *handle)
|
|||
remove_proc_entry(drv_dump_dir, handle->proc_wlan);
|
||||
strncpy(fw_dump_dir, "fw_dump", sizeof(fw_dump_dir));
|
||||
remove_proc_entry(fw_dump_dir, handle->proc_wlan);
|
||||
#if defined(PCIE)
|
||||
strncpy(ssu_dump_dir, "ssu_dump", sizeof(ssu_dump_dir));
|
||||
remove_proc_entry(ssu_dump_dir, handle->proc_wlan);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
|
||||
|
|
@ -1739,13 +1441,6 @@ void woal_proc_exit(moal_handle *handle)
|
|||
handle->drv_dump_len = 0;
|
||||
handle->drv_dump_buf = NULL;
|
||||
}
|
||||
#if defined(PCIE)
|
||||
if (handle->ssu_dump_buf) {
|
||||
moal_vfree(handle, handle->ssu_dump_buf);
|
||||
handle->ssu_dump_buf = NULL;
|
||||
handle->ssu_dump_len = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
LEAVE();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,135 +58,12 @@ Change log:
|
|||
/** SDIO register card control 3 */
|
||||
#define SD_CARD_CTRL3 0xF3
|
||||
|
||||
#if defined(SD8977)
|
||||
#define SD8977_V0 0x0
|
||||
#define SD8977_V1 0x8
|
||||
#define SD8977_V2 0x9
|
||||
#define SD8977_V0_FW_NAME "nxp/sdsd8977_combo.bin"
|
||||
#define SD8977_V1_FW_NAME "nxp/sduart8977_combo_v1.bin"
|
||||
#define SD8977_V2_FW_NAME "nxp/sduart8977_combo_v2.bin"
|
||||
#define SD8977_WLAN_V2_FW_NAME "nxp/sd8977_wlan_v2.bin"
|
||||
#define SD8977_WLAN_V1_FW_NAME "nxp/sd8977_wlan_v1.bin"
|
||||
#define SD8977_WLAN_V0_FW_NAME "nxp/sd8977_wlan.bin"
|
||||
#endif /* SD8977_MULTI_FW */
|
||||
|
||||
#if defined(SD8887)
|
||||
/** SD8887 chip revision ID */
|
||||
#define SD8887_A0 0x0
|
||||
#define SD8887_A2 0x2
|
||||
|
||||
#define SD8887_A0_FW_NAME "nxp/sd8887_uapsta.bin"
|
||||
#define SD8887_A2_FW_NAME "nxp/sduart8887_combo_a2.bin"
|
||||
#define SD8887_WLAN_A2_FW_NAME "nxp/sd8887_wlan_a2.bin"
|
||||
#define SD8887_WLAN_A0_FW_NAME "nxp/sd8887_wlan.bin"
|
||||
#endif /* SD8887_MULTI_FW */
|
||||
|
||||
/** Default firmware name */
|
||||
#ifdef SD8887
|
||||
#define SD8887_DEFAULT_COMBO_FW_NAME "nxp/sduart8887_combo_a2.bin"
|
||||
#define SD8887_DEFAULT_WLAN_FW_NAME "nxp/sd8887_wlan_a2.bin"
|
||||
#endif /* SD8887 */
|
||||
|
||||
#ifdef SD8977
|
||||
#define SD8977_DEFAULT_COMBO_FW_NAME "nxp/sduart8977_combo_v2.bin"
|
||||
#define SD8977_DEFAULT_WLAN_FW_NAME "nxp/sd8977_wlan_v2.bin"
|
||||
#endif /* SD8977 */
|
||||
|
||||
#ifdef SD8997
|
||||
#define SD8997_DEFAULT_COMBO_FW_NAME "nxp/sduart8997_combo_v4.bin"
|
||||
#define SDUART8997_DEFAULT_COMBO_FW_NAME "nxp/sduart8997_combo_v4.bin"
|
||||
#define SDSD8997_DEFAULT_COMBO_FW_NAME "nxp/sdsd8997_combo_v4.bin"
|
||||
#define SD8997_DEFAULT_WLAN_FW_NAME "nxp/sd8997_wlan_v4.bin"
|
||||
#endif /* SD8997 */
|
||||
|
||||
#ifdef SD8987
|
||||
#define SD8987_DEFAULT_COMBO_FW_NAME "nxp/sduart8987_combo.bin"
|
||||
#define SDUART8987_DEFAULT_COMBO_FW_NAME "nxp/sduart8987_combo.bin"
|
||||
#define SDSD8987_DEFAULT_COMBO_FW_NAME "nxp/sdsd8987_combo.bin"
|
||||
#define SD8987_DEFAULT_WLAN_FW_NAME "nxp/sd8987_wlan.bin"
|
||||
#endif /* SD8987 */
|
||||
|
||||
#ifdef SD8897
|
||||
#define SD8897_DEFAULT_COMBO_FW_NAME "nxp/sduart8897_combo.bin"
|
||||
#define SD8897_DEFAULT_WLAN_FW_NAME "nxp/sd8897_wlan.bin"
|
||||
#endif /* SD8897 */
|
||||
|
||||
#ifdef SD8978
|
||||
#define SD8978_DEFAULT_COMBO_FW_NAME "nxp/sduartiw416_combo.bin"
|
||||
#define SDUART8978_DEFAULT_COMBO_FW_NAME "nxp/sduartiw416_combo.bin"
|
||||
#define SDSD8978_DEFAULT_COMBO_FW_NAME "nxp/sdsdiw416_combo.bin"
|
||||
#define SD8978_DEFAULT_WLAN_FW_NAME "nxp/sdiw416_wlan.bin"
|
||||
#endif /* SD8978 */
|
||||
|
||||
#ifdef SD9098
|
||||
#define SD9098_Z1Z2 0x00
|
||||
#define SD9098_A0 0x01
|
||||
#define SD9098_A1 0x02
|
||||
#define SD9098_A2 0x03
|
||||
#define SD9098_DEFAULT_COMBO_FW_NAME "nxp/sduart9098_combo.bin"
|
||||
#define SDUART9098_DEFAULT_COMBO_FW_NAME "nxp/sduart9098_combo.bin"
|
||||
#define SDSD9098_DEFAULT_COMBO_FW_NAME "nxp/sdsd9098_combo.bin"
|
||||
#define SD9098_DEFAULT_WLAN_FW_NAME "nxp/sd9098_wlan.bin"
|
||||
#define SDUART9098_COMBO_V1_FW_NAME "nxp/sduart9098_combo_v1.bin"
|
||||
#define SDSD9098_COMBO_V1_FW_NAME "nxp/sdsd9098_combo_v1.bin"
|
||||
#define SD9098_WLAN_V1_FW_NAME "nxp/sd9098_wlan_v1.bin"
|
||||
#endif /* SD9098 */
|
||||
|
||||
#ifdef SD9097
|
||||
#define SD9097_B0 0x01
|
||||
#define SD9097_B1 0x02
|
||||
#define SD9097_DEFAULT_COMBO_FW_NAME "nxp/sduartiw620_combo_v1.bin"
|
||||
|
||||
#define SD9097_DEFAULT_WLAN_FW_NAME "nxp/sdiw620_wlan_v1.bin"
|
||||
#define SDUART9097_COMBO_V1_FW_NAME "nxp/sduartiw620_combo_v1.bin"
|
||||
#define SDSD9097_COMBO_V1_FW_NAME "nxp/sdsdiw620_combo_v1.bin"
|
||||
#define SD9097_WLAN_V1_FW_NAME "nxp/sdiw620_wlan_v1.bin"
|
||||
#endif /* SD9097 */
|
||||
|
||||
#ifdef SDIW624
|
||||
#define SDIW624_DEFAULT_COMBO_FW_NAME "nxp/sduartiw624_combo.bin"
|
||||
#define SDUARTIW624_COMBO_FW_NAME "nxp/sduartiw624_combo.bin"
|
||||
#define SDUARTSPIIW624_COMBO_FW_NAME "nxp/sduartspiiw624_combo.bin"
|
||||
#define SDUARTUARTIW624_COMBO_FW_NAME "nxp/sduartuartiw624_combo.bin"
|
||||
#define SDSDIW624_COMBO_FW_NAME "sdsdiw624_combo.bin"
|
||||
#define SDIW624_DEFAULT_WLAN_FW_NAME "nxp/sdiw624_wlan.bin"
|
||||
#endif /* SDIW624 */
|
||||
|
||||
#ifdef SDAW693
|
||||
#define SDAW693_A0 0x00
|
||||
#define SDAW693_A1 0x01
|
||||
#define SDAW693_DEFAULT_COMBO_FW_NAME "nxp/sduartaw693_combo.bin"
|
||||
#define SDUARTAW693_COMBO_FW_NAME "nxp/sduartaw693_combo.bin"
|
||||
#define SDSDAW693_COMBO_FW_NAME "sdsdaw693_combo.bin"
|
||||
#define SDUARTAW693_COMBO_V1_FW_NAME "nxp/sduartaw693_combo_v1.bin.se"
|
||||
#define SDSDAW693_COMBO_V1_FW_NAME "sdsdaw693_combo_v1.bin.se"
|
||||
#define SDAW693_DEFAULT_WLAN_FW_NAME "nxp/sdaw693_wlan.bin"
|
||||
#define SDAW693_WLAN_V1_FW_NAME "nxp/sdaw693_wlan_v1.bin.se"
|
||||
#endif /* SDAW693 */
|
||||
|
||||
#ifdef SD9177
|
||||
#define SD9177_A0 0x00
|
||||
#define SD9177_A1 0x01
|
||||
#define SD9177_DEFAULT_COMBO_FW_NAME "nxp/sduart_nw61x.bin.se"
|
||||
#define SD9177_DEFAULT_COMBO_V1_FW_NAME "nxp/sduart_nw61x_v1.bin.se"
|
||||
#define SDUART9177_DEFAULT_COMBO_FW_NAME "nxp/sduart_nw61x.bin.se"
|
||||
#define SDSD9177_DEFAULT_COMBO_FW_NAME "nxp/sdsd_nw61x.bin.se"
|
||||
#define SD9177_DEFAULT_WLAN_FW_NAME "nxp/sd_w61x.bin.se"
|
||||
#define SDUART9177_DEFAULT_COMBO_V1_FW_NAME "nxp/sduart_nw61x_v1.bin.se"
|
||||
#define SDSD9177_DEFAULT_COMBO_V1_FW_NAME "nxp/sdsd_nw61x_v1.bin.se"
|
||||
#define SD9177_DEFAULT_WLAN_V1_FW_NAME "nxp/sd_w61x_v1.bin.se"
|
||||
#define SDUART9177_DEFAULT_RFTM_COMBO_V1_FW_NAME \
|
||||
"nxp/sduart_nw61x_rftm_v1.bin.se"
|
||||
#define SDSD9177_DEFAULT_RFTM_COMBO_V1_FW_NAME "nxp/sdsd_nw61x_rftm_v1.bin.se"
|
||||
#define SD9177_DEFAULT_RFTM_WLAN_V1_FW_NAME "nxp/sd_w61x_rftm_v1.bin.se"
|
||||
#endif /* SD9177 */
|
||||
|
||||
#ifdef SDIW610
|
||||
#define SDIW610_DEFAULT_COMBO_FW_NAME "nxp/sduartspi_iw610.bin.se"
|
||||
#define SDUARTIW610_COMBO_FW_NAME "nxp/sduart_iw610.bin.se"
|
||||
#define SDUARTSPIIW610_COMBO_FW_NAME "nxp/sduartspi_iw610.bin.se"
|
||||
#define SDIW610_DEFAULT_WLAN_FW_NAME "nxp/sd_iw610.bin.se"
|
||||
#endif /* SDIW610 */
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
|
|
@ -211,7 +88,6 @@ int woal_sdio_suspend(struct device *dev);
|
|||
int woal_sdio_resume(struct device *dev);
|
||||
#endif /* SDIO_SUSPEND_RESUME */
|
||||
|
||||
#ifdef SDIO_MMC
|
||||
/** Structure: SDIO MMC card */
|
||||
typedef struct _sdio_mmc_card {
|
||||
/** sdio_func structure pointer */
|
||||
|
|
@ -240,7 +116,6 @@ typedef struct _sdio_mmc_card {
|
|||
#endif
|
||||
} sdio_mmc_card;
|
||||
void woal_sdio_reset_hw(moal_handle *handle);
|
||||
#endif /* SDIO_MMC */
|
||||
|
||||
/** cmd52 read write */
|
||||
int woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val);
|
||||
|
|
|
|||
|
|
@ -62,109 +62,21 @@ static moal_if_ops sdiommc_ops;
|
|||
Global Variables
|
||||
********************************************************/
|
||||
|
||||
#ifdef SD8887
|
||||
/** Device ID for SD8887 */
|
||||
#define SD_DEVICE_ID_8887 (0x9135)
|
||||
#endif
|
||||
#ifdef SD8897
|
||||
/** Device ID for SD8897 */
|
||||
#define SD_DEVICE_ID_8897 (0x912d)
|
||||
#endif
|
||||
#ifdef SD8977
|
||||
/** Device ID for SD8977 */
|
||||
#define SD_DEVICE_ID_8977 (0x9145)
|
||||
#endif
|
||||
#ifdef SD8978
|
||||
/** Device ID for SD8978 */
|
||||
#define SD_DEVICE_ID_8978 (0x9159)
|
||||
#endif
|
||||
#ifdef SD8997
|
||||
/** Device ID for SD8997 */
|
||||
#define SD_DEVICE_ID_8997 (0x9141)
|
||||
#endif
|
||||
#ifdef SD8987
|
||||
/** Device ID for SD8987 */
|
||||
#define SD_DEVICE_ID_8987 (0x9149)
|
||||
#endif
|
||||
#ifdef SDAW693
|
||||
/** Device ID for SDAW693 */
|
||||
#define SD_DEVICE_ID_AW693_FN1 (0x0211)
|
||||
/** Device ID for SDAW693 */
|
||||
#define SD_DEVICE_ID_AW693_FN2 (0x0212)
|
||||
#endif
|
||||
#ifdef SD9098
|
||||
/** Device ID for SD9098 */
|
||||
#define SD_DEVICE_ID_9098_FN1 (0x914D)
|
||||
/** Device ID for SD9098 */
|
||||
#define SD_DEVICE_ID_9098_FN2 (0x914E)
|
||||
#endif
|
||||
#ifdef SD9097
|
||||
/** Device ID for SD9097 */
|
||||
#define SD_DEVICE_ID_9097 (0x9155)
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
/** Device ID for SD9177 */
|
||||
#define SD_DEVICE_ID_9177 (0x0205)
|
||||
#endif
|
||||
#ifdef SDIW624
|
||||
/** Device ID for SDIW624 */
|
||||
#define SD_DEVICE_ID_IW624 (0x020D)
|
||||
#endif
|
||||
#ifdef SDIW610
|
||||
/** Device ID for SDIW610 */
|
||||
#define SD_DEVICE_ID_IW610 (0x0215)
|
||||
#endif
|
||||
|
||||
/** WLAN IDs */
|
||||
static const struct sdio_device_id wlan_ids[] = {
|
||||
#ifdef SD8887
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8887)},
|
||||
#endif
|
||||
#ifdef SD8897
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8897)},
|
||||
#endif
|
||||
#ifdef SD8977
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8977)},
|
||||
#endif
|
||||
#ifdef SD8978
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8978)},
|
||||
#endif
|
||||
#ifdef SD8997
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8997)},
|
||||
#endif
|
||||
#ifdef SD8987
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8987)},
|
||||
#endif
|
||||
#ifdef SDAW693
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_AW693_FN1)},
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_AW693_FN2)},
|
||||
#endif
|
||||
#ifdef SD9098
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_9098_FN1)},
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_9098_FN2)},
|
||||
#endif
|
||||
#ifdef SD9097
|
||||
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_9097)},
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_9177)},
|
||||
#endif
|
||||
#ifdef SDIW624
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_IW624)},
|
||||
#endif
|
||||
#ifdef SDIW610
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_IW610)},
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(sdio, wlan_ids);
|
||||
|
||||
int woal_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id);
|
||||
void woal_sdio_remove(struct sdio_func *func);
|
||||
static void woal_sdiommc_work(struct work_struct *work);
|
||||
#ifdef SDIO
|
||||
static void woal_sdiommc_reg_dbg(pmoal_handle handle);
|
||||
#endif
|
||||
|
||||
#ifdef SDIO_SUSPEND_RESUME
|
||||
#ifdef MMC_PM_KEEP_POWER
|
||||
|
|
@ -227,9 +139,6 @@ static void woal_dump_sdio_reg(moal_handle *handle)
|
|||
t_u8 data, i;
|
||||
int fun0_reg[] = {0x05, 0x04};
|
||||
t_u8 array_size = 0;
|
||||
#ifdef SD8897
|
||||
int fun1_reg_8897[] = {0x03, 0x04, 0x05, 0x06, 0x07, 0xC0, 0xC1};
|
||||
#endif
|
||||
int fun1_reg_other[] = {0x03, 0x04, 0x05, 0x60, 0x61};
|
||||
int *fun1_reg = NULL;
|
||||
|
||||
|
|
@ -241,17 +150,8 @@ static void woal_dump_sdio_reg(moal_handle *handle)
|
|||
data, ret);
|
||||
}
|
||||
|
||||
#ifdef SD8897
|
||||
if (IS_SD8897(handle->card_type)) {
|
||||
fun1_reg = fun1_reg_8897;
|
||||
array_size = sizeof(fun1_reg_8897) / sizeof(int);
|
||||
} else {
|
||||
#endif
|
||||
fun1_reg = fun1_reg_other;
|
||||
array_size = sizeof(fun1_reg_other) / sizeof(int);
|
||||
#ifdef SD8897
|
||||
}
|
||||
#endif
|
||||
for (i = 0; i < array_size; i++) {
|
||||
data = sdio_readb(((sdio_mmc_card *)handle->card)->func,
|
||||
fun1_reg[i], &ret);
|
||||
|
|
@ -594,64 +494,7 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
t_u16 card_type = 0;
|
||||
|
||||
/* Update card type */
|
||||
#ifdef SD8887
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_8887) {
|
||||
card_type = CARD_TYPE_SD8887;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8887,
|
||||
strlen(CARD_SD8887), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V15, strlen(V15),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SD8897
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_8897) {
|
||||
card_type = CARD_TYPE_SD8897;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8897,
|
||||
strlen(CARD_SD8897), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V15, strlen(V15),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD8977
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_8977) {
|
||||
card_type = CARD_TYPE_SD8977;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8977,
|
||||
strlen(CARD_SD8977), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD8978
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_8978) {
|
||||
card_type = CARD_TYPE_SD8978;
|
||||
moal_memcpy_ext(NULL, driver_version, "SDIW416",
|
||||
strlen("SDIW416"), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD8997
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_8997) {
|
||||
card_type = CARD_TYPE_SD8997;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8997,
|
||||
|
|
@ -664,107 +507,6 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD8987
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_8987) {
|
||||
card_type = CARD_TYPE_SD8987;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD8987,
|
||||
strlen(CARD_SD8987), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V16, strlen(V16),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SDIW624
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_IW624) {
|
||||
card_type = CARD_TYPE_SDIW624;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SDIW624,
|
||||
strlen(CARD_SDIW624), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V18, strlen(V18),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SDAW693
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_AW693_FN1 ||
|
||||
cardp_sd->func->device == SD_DEVICE_ID_AW693_FN2) {
|
||||
card_type = CARD_TYPE_SDAW693;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SDAW693,
|
||||
strlen(CARD_SDAW693), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD9097
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_9097) {
|
||||
card_type = CARD_TYPE_SD9097;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD9097,
|
||||
strlen(CARD_SD9097), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD9098
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_9098_FN1 ||
|
||||
cardp_sd->func->device == SD_DEVICE_ID_9098_FN2) {
|
||||
card_type = CARD_TYPE_SD9098;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD9098,
|
||||
strlen(CARD_SD9098), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_9177) {
|
||||
card_type = CARD_TYPE_SD9177;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SD9177,
|
||||
strlen(CARD_SD9177), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V18, strlen(V18),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SDIW610
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_IW610) {
|
||||
card_type = CARD_TYPE_SDIW610;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SDIW610,
|
||||
strlen(CARD_SDIW610), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V18, strlen(V18),
|
||||
strnlen(driver_version, MLAN_MAX_VER_STR_LEN - 1) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
return card_type;
|
||||
}
|
||||
|
||||
|
|
@ -1827,48 +1569,15 @@ int woal_sdio_read_write_cmd52(moal_handle *handle, int func, int reg, int val)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function check if this is second mac
|
||||
*
|
||||
* @param handle A pointer to moal_handle structure
|
||||
* @return MTRUE/MFALSE
|
||||
*
|
||||
*/
|
||||
static t_u8 woal_sdiommc_is_second_mac(moal_handle *handle)
|
||||
{
|
||||
#if defined(SDAW693) || defined(SD9098)
|
||||
sdio_mmc_card *card = (sdio_mmc_card *)handle->card;
|
||||
#endif
|
||||
|
||||
#ifdef SDAW693
|
||||
if (card->func->device == SD_DEVICE_ID_AW693_FN2)
|
||||
return MTRUE;
|
||||
#endif
|
||||
#ifdef SD9098
|
||||
if (card->func->device == SD_DEVICE_ID_9098_FN2)
|
||||
return MTRUE;
|
||||
#endif
|
||||
return MFALSE;
|
||||
}
|
||||
|
||||
static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
sdio_mmc_card *card = (sdio_mmc_card *)handle->card;
|
||||
t_u32 revision_id = 0;
|
||||
t_u32 rev_id_reg = handle->card_info->rev_id_reg;
|
||||
|
||||
#if defined(SD8987) || defined(SD8997) || defined(SD9098) || \
|
||||
defined(SD9097) || defined(SDIW624) || defined(SDAW693) || \
|
||||
defined(SD8978) || defined(SD9177) || defined(SDIW610)
|
||||
t_u32 magic_reg = handle->card_info->magic_reg;
|
||||
t_u32 magic = 0;
|
||||
t_u32 host_strap_reg = handle->card_info->host_strap_reg;
|
||||
t_u32 strap = 0;
|
||||
#endif
|
||||
#if defined(SDAW693) || defined(SDIW610)
|
||||
char *se_pos = NULL;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -1876,14 +1585,7 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
MIN(MLAN_SDIO_BLOCK_SIZE, card->func->card->host->max_blk_size);
|
||||
if (handle->params.fw_name)
|
||||
goto done;
|
||||
/** Revision ID register */
|
||||
woal_sdiommc_read_reg(handle, rev_id_reg, &revision_id);
|
||||
PRINTM(MCMND, "revision_id=0x%x sdio_blk_size=%d\n", revision_id,
|
||||
handle->sdio_blk_size);
|
||||
|
||||
#if defined(SD8987) || defined(SD8997) || defined(SD9098) || \
|
||||
defined(SD9097) || defined(SDIW624) || defined(SDAW693) || \
|
||||
defined(SD8978) || defined(SD9177) || defined(SDIW610)
|
||||
/** Revision ID register */
|
||||
woal_sdiommc_read_reg(handle, magic_reg, &magic);
|
||||
/** Revision ID register */
|
||||
|
|
@ -1895,56 +1597,7 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
magic &= 0xFF;
|
||||
/* 1 = SDSD, 0 --SD UART */
|
||||
PRINTM(MCMND, "magic=0x%x strap=0x%x\n", magic, strap);
|
||||
#endif
|
||||
#if defined(SD8977)
|
||||
if (IS_SD8977(handle->card_type)) {
|
||||
switch (revision_id) {
|
||||
case SD8977_V0:
|
||||
strncpy(handle->card_info->fw_name, SD8977_V0_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD8977_WLAN_V0_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
case SD8977_V1:
|
||||
strncpy(handle->card_info->fw_name, SD8977_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD8977_WLAN_V1_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
case SD8977_V2:
|
||||
strncpy(handle->card_info->fw_name, SD8977_V2_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD8977_WLAN_V2_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(SD8887)
|
||||
if (IS_SD8887(handle->card_type)) {
|
||||
/* Check revision ID */
|
||||
switch (revision_id) {
|
||||
case SD8887_A0:
|
||||
strncpy(handle->card_info->fw_name, SD8887_A0_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD8887_WLAN_A0_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
case SD8887_A2:
|
||||
strncpy(handle->card_info->fw_name, SD8887_A2_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD8887_WLAN_A2_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SD8997
|
||||
if (IS_SD8997(handle->card_type)) {
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
|
|
@ -1957,283 +1610,7 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SD8987
|
||||
if (IS_SD8987(handle->card_type)) {
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART8987_DEFAULT_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSD8987_DEFAULT_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SD8978
|
||||
if (IS_SD8978(handle->card_type)) {
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART8978_DEFAULT_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSD8978_DEFAULT_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SD9098
|
||||
if (IS_SD9098(handle->card_type) &&
|
||||
(card->func->device == SD_DEVICE_ID_9098_FN1)) {
|
||||
switch (revision_id) {
|
||||
case SD9098_Z1Z2:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART9098_DEFAULT_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSD9098_DEFAULT_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD9098_DEFAULT_WLAN_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
case SD9098_A0:
|
||||
case SD9098_A1:
|
||||
case SD9098_A2:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART9098_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSD9098_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
} else {
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART9098_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD9098_WLAN_V1_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef SD9097
|
||||
if (IS_SD9097(handle->card_type)) {
|
||||
switch (revision_id) {
|
||||
case SD9097_B0:
|
||||
case SD9097_B1:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART9097_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSD9097_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD9097_WLAN_V1_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef SDAW693
|
||||
if (IS_SDAW693(handle->card_type)) {
|
||||
magic &= 0x03;
|
||||
if (magic == 0x03)
|
||||
PRINTM(MMSG, "wlan: SDAW693 in secure-boot mode\n");
|
||||
|
||||
switch (revision_id) {
|
||||
case SDAW693_A0:
|
||||
if (strap == CARD_TYPE_SDAW693_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTAW693_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSDAW693_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SDAW693_DEFAULT_WLAN_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
case SDAW693_A1:
|
||||
if (strap == CARD_TYPE_SDAW693_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTAW693_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSDAW693_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SDAW693_WLAN_V1_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
if (magic != 0x03) {
|
||||
/* remove extension .se */
|
||||
se_pos = strstr(handle->card_info->fw_name,
|
||||
".se");
|
||||
if (se_pos) {
|
||||
memset(se_pos, '\0', sizeof(".se"));
|
||||
}
|
||||
|
||||
se_pos = strstr(handle->card_info->fw_name_wlan,
|
||||
".se");
|
||||
if (se_pos) {
|
||||
memset(se_pos, '\0', sizeof(".se"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SDIW624
|
||||
if (IS_SDIW624(handle->card_type)) {
|
||||
magic &= 0x03;
|
||||
if (magic == 0x03)
|
||||
PRINTM(MMSG, "wlan: SDIW624 in secure-boot mode\n");
|
||||
if (strap == CARD_TYPE_SDIW624_UARTSPI) {
|
||||
if (handle->params.dual_nb)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTSPIIW624_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTIW624_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
} else if (strap == CARD_TYPE_SDIW624_UARTUART) {
|
||||
if (handle->params.dual_nb)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTUARTIW624_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTIW624_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
} else {
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSDIW624_COMBO_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SD9177
|
||||
if (IS_SD9177(handle->card_type)) {
|
||||
switch (revision_id) {
|
||||
case SD9177_A0:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD9177_UART)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART9177_DEFAULT_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDSD9177_DEFAULT_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD9177_DEFAULT_WLAN_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
case SD9177_A1:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD9177_UART) {
|
||||
if (handle->params.rf_test_mode)
|
||||
strncpy(handle->card_info
|
||||
->fw_name,
|
||||
SDUART9177_DEFAULT_RFTM_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info
|
||||
->fw_name,
|
||||
SDUART9177_DEFAULT_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
} else {
|
||||
if (handle->params.rf_test_mode)
|
||||
strncpy(handle->card_info
|
||||
->fw_name,
|
||||
SDSD9177_DEFAULT_RFTM_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info
|
||||
->fw_name,
|
||||
SDSD9177_DEFAULT_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
} else {
|
||||
if (handle->params.rf_test_mode)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUART9177_DEFAULT_RFTM_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SD9177_DEFAULT_COMBO_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
if (handle->params.rf_test_mode)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SD9177_DEFAULT_RFTM_WLAN_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SD9177_DEFAULT_WLAN_V1_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SDIW610
|
||||
if (IS_SDIW610(handle->card_type)) {
|
||||
magic &= 0x03;
|
||||
if (magic == 0x03)
|
||||
PRINTM(MMSG, "wlan: SDIW610 in secure-boot mode\n");
|
||||
if (strap == CARD_TYPE_SDIW610_UART) {
|
||||
if (handle->params.dual_nb)
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTSPIIW610_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
else
|
||||
strncpy(handle->card_info->fw_name,
|
||||
SDUARTIW610_COMBO_FW_NAME,
|
||||
FW_NAMW_MAX_LEN);
|
||||
}
|
||||
strncpy(handle->card_info->fw_name_wlan,
|
||||
SDIW610_DEFAULT_WLAN_FW_NAME, FW_NAMW_MAX_LEN);
|
||||
if (magic != 0x03) {
|
||||
/* remove extension .se */
|
||||
se_pos = strstr(handle->card_info->fw_name, ".se");
|
||||
if (se_pos) {
|
||||
memset(se_pos, '\0', sizeof(".se"));
|
||||
}
|
||||
|
||||
se_pos = strstr(handle->card_info->fw_name_wlan, ".se");
|
||||
if (se_pos) {
|
||||
memset(se_pos, '\0', sizeof(".se"));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
done:
|
||||
PRINTM(MCMND, "combo fw:%s wlan fw:%s \n", handle->card_info->fw_name,
|
||||
handle->card_info->fw_name_wlan);
|
||||
|
|
@ -2314,13 +1691,6 @@ static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag,
|
|||
t_u8 dbg_dump_ctrl_reg = phandle->card_info->dump_fw_ctrl_reg;
|
||||
t_u8 debug_host_ready = phandle->card_info->dump_fw_host_ready;
|
||||
|
||||
#if defined(SDAW693) || defined(SD9177) || defined(SD9098)
|
||||
if (IS_SD9177(phandle->card_type) || IS_SDAW693(phandle->card_type) ||
|
||||
IS_SD9098(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump)
|
||||
debug_host_ready = 0xAA;
|
||||
}
|
||||
#endif
|
||||
ret = woal_sdio_writeb(phandle, dbg_dump_ctrl_reg, debug_host_ready);
|
||||
if (ret) {
|
||||
PRINTM(MERROR, "SDIO Write ERR\n");
|
||||
|
|
@ -2341,13 +1711,6 @@ static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag,
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(SDAW693) || defined(SD9177) || defined(SD9098)
|
||||
if (IS_SD9177(phandle->card_type) || IS_SDAW693(phandle->card_type) ||
|
||||
IS_SD9098(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump)
|
||||
return RDWR_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
for (tries = 0; tries < MAX_POLL_TRIES; tries++) {
|
||||
ret = woal_sdio_readb(phandle, dbg_dump_ctrl_reg, &ctrl_data);
|
||||
if (ret) {
|
||||
|
|
@ -2628,7 +1991,6 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
t_u32 memory_size = 0;
|
||||
#ifndef DUMP_TO_PROC
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
moal_handle *ref_handle;
|
||||
#endif
|
||||
t_u8 *end_ptr = NULL;
|
||||
t_u8 dbg_dump_start_reg = 0;
|
||||
|
|
@ -2640,27 +2002,6 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
#if defined(SDAW693) || defined(SD9177) || defined(SD9098)
|
||||
if (IS_SD9177(phandle->card_type) || IS_SDAW693(phandle->card_type) ||
|
||||
IS_SD9098(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump) {
|
||||
if (RDWR_STATUS_FAILURE !=
|
||||
woal_cmd52_rdwr_firmware(phandle, doneflag,
|
||||
MFALSE)) {
|
||||
PRINTM(MMSG,
|
||||
"====SDIO FW DUMP EVENT MODE START ====\n");
|
||||
return;
|
||||
}
|
||||
if (RDWR_STATUS_FAILURE !=
|
||||
woal_cmd52_rdwr_firmware(phandle, doneflag,
|
||||
MTRUE)) {
|
||||
PRINTM(MMSG,
|
||||
"====SDIO FW DUMP EVENT MODE START ====\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
dbg_dump_start_reg = phandle->card_info->dump_fw_start_reg;
|
||||
dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
|
|
@ -2674,9 +2015,6 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
strncpy(path_name, "/data", sizeof(path_name));
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
ref_handle = (moal_handle *)phandle->pref_mac;
|
||||
if (ref_handle)
|
||||
woal_dump_drv_info(ref_handle, path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
#endif
|
||||
|
||||
|
|
@ -3219,13 +2557,6 @@ static int woal_sdiommc_reset_fw(moal_handle *handle)
|
|||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
#if defined(SD9098) || defined(SD9097) || defined(SDIW624) || \
|
||||
defined(SDAW693) || defined(SD9177) || defined(SDIW610)
|
||||
if (IS_SD9098(handle->card_type) || IS_SD9097(handle->card_type) ||
|
||||
IS_SDIW624(handle->card_type) || IS_SD9177(handle->card_type) ||
|
||||
IS_SDIW610(handle->card_type) || IS_SDAW693(handle->card_type))
|
||||
handle->ops.write_reg(handle, 0x00, 0x10);
|
||||
#endif
|
||||
/* Poll register around 100 ms */
|
||||
for (tries = 0; tries < MAX_POLL_TRIES; ++tries) {
|
||||
handle->ops.read_reg(handle, reset_reg, &value);
|
||||
|
|
@ -3467,7 +2798,6 @@ static void woal_sdiommc_work(struct work_struct *work)
|
|||
{
|
||||
sdio_mmc_card *card = NULL;
|
||||
moal_handle *handle = NULL;
|
||||
moal_handle *ref_handle = NULL;
|
||||
|
||||
// Validate work pointer before container_of operation
|
||||
if (!work) {
|
||||
|
|
@ -3489,28 +2819,9 @@ static void woal_sdiommc_work(struct work_struct *work)
|
|||
|
||||
PRINTM(MMSG, "========START IN-BAND RESET===========\n");
|
||||
handle = card->handle;
|
||||
// handle-> mac0 , ref_handle->second mac
|
||||
if (handle->pref_mac) {
|
||||
if (handle->second_mac) {
|
||||
handle = (moal_handle *)handle->pref_mac;
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
} else {
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
}
|
||||
if (ref_handle) {
|
||||
ref_handle->surprise_removed = MTRUE;
|
||||
woal_clean_up(ref_handle);
|
||||
mlan_ioctl(ref_handle->pmlan_adapter, NULL);
|
||||
}
|
||||
}
|
||||
handle->surprise_removed = MTRUE;
|
||||
handle->fw_reseting = MTRUE;
|
||||
woal_do_sdiommc_flr(handle, true, true);
|
||||
if (ref_handle) {
|
||||
ref_handle->surprise_removed = MTRUE;
|
||||
ref_handle->fw_reseting = MTRUE;
|
||||
woal_do_sdiommc_flr(ref_handle, true, true);
|
||||
}
|
||||
if (woal_sdiommc_reset_fw(handle)) {
|
||||
PRINTM(MERROR, "SDIO In-band Reset Fail\n");
|
||||
woal_send_auto_recovery_failure_event(handle);
|
||||
|
|
@ -3531,16 +2842,6 @@ static void woal_sdiommc_work(struct work_struct *work)
|
|||
return;
|
||||
}
|
||||
|
||||
if (ref_handle) {
|
||||
ref_handle->surprise_removed = MFALSE;
|
||||
|
||||
woal_free_module_param(ref_handle);
|
||||
woal_init_module_param(ref_handle);
|
||||
|
||||
if (MLAN_STATUS_SUCCESS ==
|
||||
woal_do_sdiommc_flr(ref_handle, false, true))
|
||||
ref_handle->fw_reseting = MFALSE;
|
||||
}
|
||||
card->work_flags = MFALSE;
|
||||
wifi_status = WIFI_STATUS_OK;
|
||||
woal_send_auto_recovery_complete_event(handle);
|
||||
|
|
@ -3576,5 +2877,4 @@ static moal_if_ops sdiommc_ops = {
|
|||
.dump_reg_info = woal_sdiommc_dump_reg_info,
|
||||
.reg_dbg = woal_sdiommc_reg_dbg,
|
||||
.card_reset = woal_sdiommc_card_reset,
|
||||
.is_second_mac = woal_sdiommc_is_second_mac,
|
||||
};
|
||||
|
|
|
|||
1986
mlinux/moal_shim.c
1986
mlinux/moal_shim.c
File diff suppressed because it is too large
Load diff
|
|
@ -42,19 +42,11 @@ mlan_status moal_alloc_mlan_buffer(t_void *pmoal, t_u32 size,
|
|||
mlan_status moal_free_mlan_buffer(t_void *pmoal, pmlan_buffer pmbuf);
|
||||
mlan_status moal_send_packet_complete(t_void *pmoal, pmlan_buffer pmbuf,
|
||||
mlan_status status);
|
||||
#ifdef USB
|
||||
mlan_status moal_recv_complete(t_void *pmoal, pmlan_buffer pmbuf, t_u32 port,
|
||||
mlan_status status);
|
||||
mlan_status moal_write_data_async(t_void *pmoal, pmlan_buffer pmbuf,
|
||||
t_u32 port);
|
||||
#endif
|
||||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/** moal_write_reg */
|
||||
mlan_status moal_write_reg(t_void *pmoal, t_u32 reg, t_u32 data);
|
||||
/** moal_read_reg */
|
||||
mlan_status moal_read_reg(t_void *pmoal, t_u32 reg, t_u32 *data);
|
||||
#endif /* SDIO || PCIE */
|
||||
mlan_status moal_write_data_sync(t_void *pmoal, pmlan_buffer pmbuf, t_u32 port,
|
||||
t_u32 timeout);
|
||||
mlan_status moal_read_data_sync(t_void *pmoal, pmlan_buffer pmbuf, t_u32 port,
|
||||
|
|
@ -66,25 +58,6 @@ mlan_status moal_malloc(t_void *pmoal, t_u32 size, t_u32 flag, t_u8 **ppbuf);
|
|||
mlan_status moal_mfree(t_void *pmoal, t_u8 *pbuf);
|
||||
mlan_status moal_vmalloc(t_void *pmoal, t_u32 size, t_u8 **ppbuf);
|
||||
mlan_status moal_vfree(t_void *pmoal, t_u8 *pbuf);
|
||||
#ifdef PCIE
|
||||
mlan_status moal_malloc_consistent(t_void *pmoal, t_u32 size, t_u8 **ppbuf,
|
||||
t_pu64 pbuf_pa);
|
||||
mlan_status moal_mfree_consistent(t_void *pmoal, t_u32 size, t_u8 *pbuf,
|
||||
t_u64 buf_pa);
|
||||
|
||||
mlan_status moal_malloc_cached(t_void *pmoal, t_u32 size, t_u8 **ppbuf,
|
||||
t_pu64 pbuf_pa);
|
||||
mlan_status moal_mfree_cached(t_void *pmoal, t_u32 size, t_u8 *pbuf,
|
||||
t_u64 buf_pa);
|
||||
mlan_status moal_dma_sync_to_cpu(t_void *pmoal, t_u32 size, t_u64 buf_pa,
|
||||
moal_dma_sync_direction_t direction);
|
||||
mlan_status moal_dma_sync_to_device(t_void *pmoal, t_u32 size, t_u64 buf_pa,
|
||||
moal_dma_sync_direction_t direction);
|
||||
mlan_status moal_map_memory(t_void *pmoal, t_u8 *pbuf, t_u64 *pbuf_pa,
|
||||
t_u32 size, t_u32 flag);
|
||||
mlan_status moal_unmap_memory(t_void *pmoal, t_u8 *pbuf, t_u64 buf_pa,
|
||||
t_u32 size, t_u32 flag);
|
||||
#endif /* PCIE */
|
||||
t_void *moal_memset(t_void *pmoal, t_void *pmem, t_u8 byte, t_u32 num);
|
||||
t_void *moal_memcpy(t_void *pmoal, t_void *pdest, const t_void *psrc,
|
||||
t_u32 num);
|
||||
|
|
@ -112,7 +85,6 @@ t_void moal_hist_data_add(t_void *pmoal, t_u32 bss_index, t_u16 rx_rate,
|
|||
|
||||
t_void moal_updata_peer_signal(t_void *pmoal, t_u32 bss_index, t_u8 *peer_addr,
|
||||
t_s8 snr, t_s8 nflr);
|
||||
mlan_status moal_get_host_time_ns(t_u64 *time);
|
||||
t_u64 moal_do_div(t_u64 num, t_u32 base);
|
||||
|
||||
mlan_status moal_init_timer(t_void *pmoal, t_void **pptimer,
|
||||
|
|
@ -122,21 +94,12 @@ mlan_status moal_free_timer(t_void *pmoal, t_void *ptimer);
|
|||
mlan_status moal_start_timer(t_void *pmoal, t_void *ptimer, t_u8 periodic,
|
||||
t_u32 msec);
|
||||
mlan_status moal_stop_timer(t_void *pmoal, t_void *ptimer);
|
||||
void moal_tp_accounting(t_void *pmoal, void *buf, t_u32 drop_point);
|
||||
void moal_tp_accounting_rx_param(t_void *pmoal, unsigned int type,
|
||||
unsigned int rsvd1);
|
||||
void moal_amsdu_tp_accounting(t_void *pmoal, t_s32 amsdu_process_delay,
|
||||
t_s32 amsdu_copy_delay);
|
||||
|
||||
void moal_connection_status_check_pmqos(t_void *pmoal);
|
||||
#if defined(PCIE) || defined(SDIO)
|
||||
/* pmqos busfreq add request handler*/
|
||||
void woal_request_busfreq_pmqos_add(t_void *pmhandle);
|
||||
/* pmqos busfreq remove handler*/
|
||||
void woal_release_busfreq_pmqos_remove(t_void *pmhandle);
|
||||
#endif
|
||||
mlan_status moal_calc_short_ssid(t_u8 *pssid, t_u32 ssid_len,
|
||||
t_u32 *pshort_ssid);
|
||||
|
||||
inline t_u16 moal_read_unaligned_u16(const void *src);
|
||||
inline t_u32 moal_read_unaligned_u32(const void *src);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -28,9 +28,7 @@ Change log:
|
|||
|
||||
#include "moal_main.h"
|
||||
#include "moal_uap.h"
|
||||
#ifdef SDIO
|
||||
#include "moal_sdio.h"
|
||||
#endif /* SDIO */
|
||||
#include "moal_eth_ioctl.h"
|
||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||
#include "moal_cfg80211.h"
|
||||
|
|
@ -626,7 +624,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef SDIO
|
||||
/**
|
||||
* @brief uap sdcmd52rw ioctl handler
|
||||
*
|
||||
|
|
@ -661,7 +658,6 @@ static int woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req)
|
|||
|
||||
if (!param.action) {
|
||||
PRINTM(MINFO, "Cmd52 read, func=%d, reg=0x%08X\n", func, reg);
|
||||
#ifdef SDIO_MMC
|
||||
sdio_claim_host(((sdio_mmc_card *)priv->phandle->card)->func);
|
||||
if (func)
|
||||
data = sdio_readb(
|
||||
|
|
@ -678,22 +674,11 @@ static int woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req)
|
|||
reg);
|
||||
goto done;
|
||||
}
|
||||
#else
|
||||
if (sdio_read_ioreg(priv->phandle->card, func, reg, &data) <
|
||||
0) {
|
||||
PRINTM(MERROR,
|
||||
"sdio_read_ioreg: reading register 0x%X failed\n",
|
||||
reg);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
param.cmd52_params[2] = data;
|
||||
} else {
|
||||
data = (t_u8)param.cmd52_params[2];
|
||||
PRINTM(MINFO, "Cmd52 write, func=%d, reg=0x%08X, data=0x%02X\n",
|
||||
func, reg, data);
|
||||
#ifdef SDIO_MMC
|
||||
sdio_claim_host(((sdio_mmc_card *)priv->phandle->card)->func);
|
||||
if (func)
|
||||
sdio_writeb(
|
||||
|
|
@ -710,16 +695,6 @@ static int woal_uap_sdcmd52_rw(struct net_device *dev, struct ifreq *req)
|
|||
reg);
|
||||
goto done;
|
||||
}
|
||||
#else
|
||||
if (sdio_write_ioreg(priv->phandle->card, func, reg, data) <
|
||||
0) {
|
||||
PRINTM(MERROR,
|
||||
"sdio_write_ioreg: writing register 0x%X failed\n",
|
||||
reg);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* Copy to user */
|
||||
if (copy_to_user(req->ifr_data, ¶m, sizeof(param))) {
|
||||
|
|
@ -730,7 +705,6 @@ done:
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief enable/disable 11h
|
||||
|
|
@ -1791,7 +1765,7 @@ static int woal_uap_tx_rate_cfg(struct net_device *dev, struct ifreq *req)
|
|||
}
|
||||
/* rate_format sanity check */
|
||||
if ((tx_rate_config.rate_format >
|
||||
MLAN_RATE_FORMAT_HE)) {
|
||||
MLAN_RATE_FORMAT_VHT)) {
|
||||
PRINTM(MERROR, "Invalid format selection\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
|
|
@ -1812,11 +1786,7 @@ static int woal_uap_tx_rate_cfg(struct net_device *dev, struct ifreq *req)
|
|||
((tx_rate_config.rate_format ==
|
||||
MLAN_RATE_FORMAT_VHT) &&
|
||||
(tx_rate_config.rate >
|
||||
MLAN_RATE_INDEX_MCS9)) ||
|
||||
((tx_rate_config.rate_format ==
|
||||
MLAN_RATE_FORMAT_HE) &&
|
||||
(tx_rate_config.rate >
|
||||
MLAN_RATE_INDEX_MCS11))) {
|
||||
MLAN_RATE_INDEX_MCS9))) {
|
||||
PRINTM(MERROR,
|
||||
"Invalid rate selection\n");
|
||||
ret = -EINVAL;
|
||||
|
|
@ -1873,9 +1843,7 @@ static int woal_uap_tx_rate_cfg(struct net_device *dev, struct ifreq *req)
|
|||
rate->param.rate_cfg.rate_format;
|
||||
tx_rate_config.rate = rate->param.rate_cfg.rate;
|
||||
if (rate->param.rate_cfg.rate_format ==
|
||||
MLAN_RATE_FORMAT_VHT ||
|
||||
rate->param.rate_cfg.rate_format ==
|
||||
MLAN_RATE_FORMAT_HE)
|
||||
MLAN_RATE_FORMAT_VHT)
|
||||
tx_rate_config.nss = rate->param.rate_cfg.nss;
|
||||
tx_rate_config.rate_setting =
|
||||
rate->param.rate_cfg.rate_setting;
|
||||
|
|
@ -1945,8 +1913,6 @@ static int woal_uap_antenna_cfg(struct net_device *dev, struct ifreq *req)
|
|||
mreq->action = MLAN_ACT_SET;
|
||||
radio->param.ant_cfg.tx_antenna = antenna_config.tx_mode;
|
||||
radio->param.ant_cfg.rx_antenna = antenna_config.rx_mode;
|
||||
radio->param.ant_cfg.tx_antenna_6g = antenna_config.tx_mode_6g;
|
||||
radio->param.ant_cfg.rx_antenna_6g = antenna_config.rx_mode_6g;
|
||||
}
|
||||
|
||||
status = woal_request_ioctl(priv, mreq, MOAL_IOCTL_WAIT);
|
||||
|
|
@ -1974,8 +1940,6 @@ static int woal_uap_antenna_cfg(struct net_device *dev, struct ifreq *req)
|
|||
if (mreq->action == MLAN_ACT_GET) {
|
||||
antenna_config.tx_mode = radio->param.ant_cfg.tx_antenna;
|
||||
antenna_config.rx_mode = radio->param.ant_cfg.rx_antenna;
|
||||
antenna_config.tx_mode_6g = radio->param.ant_cfg.tx_antenna_6g;
|
||||
antenna_config.rx_mode_6g = radio->param.ant_cfg.rx_antenna_6g;
|
||||
if (copy_to_user(req->ifr_data, &antenna_config,
|
||||
sizeof(ant_cfg_t))) {
|
||||
PRINTM(MERROR, "Copy to user failed\n");
|
||||
|
|
@ -2709,11 +2673,9 @@ static int woal_uap_ioctl(struct net_device *dev, struct ifreq *req)
|
|||
case UAP_TX_DATA_PAUSE:
|
||||
ret = woal_uap_txdatapause(dev, req);
|
||||
break;
|
||||
#ifdef SDIO
|
||||
case UAP_SDCMD52_RW:
|
||||
ret = woal_uap_sdcmd52_rw(dev, req);
|
||||
break;
|
||||
#endif
|
||||
case UAP_SNMP_MIB:
|
||||
ret = woal_uap_snmp_mib(dev, req);
|
||||
break;
|
||||
|
|
@ -3885,126 +3847,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get/Set 11ax cfg
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param action MLAN_ACT_SET or MLAN_ACT_GET
|
||||
* @param he_cfg a pointer to mlan_ds_11ax_he_cfg
|
||||
* @param wait_option wait_option
|
||||
*
|
||||
* @return 0--success, otherwise failure
|
||||
*/
|
||||
int woal_11ax_cfg(moal_private *priv, t_u8 action, mlan_ds_11ax_he_cfg *he_cfg,
|
||||
t_u8 wait_option)
|
||||
{
|
||||
int ret = 0;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_11ax_cfg *cfg_11ax = NULL;
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11ax_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
cfg_11ax = (mlan_ds_11ax_cfg *)req->pbuf;
|
||||
cfg_11ax->sub_command = MLAN_OID_11AX_HE_CFG;
|
||||
req->req_id = MLAN_IOCTL_11AX_CFG;
|
||||
req->action = action;
|
||||
moal_memcpy_ext(priv->phandle, &cfg_11ax->param.he_cfg, he_cfg,
|
||||
sizeof(mlan_ds_11ax_he_cfg),
|
||||
sizeof(mlan_ds_11ax_he_cfg));
|
||||
status = woal_request_ioctl(priv, req, wait_option);
|
||||
if (status == MLAN_STATUS_SUCCESS) {
|
||||
moal_memcpy_ext(priv->phandle, he_cfg, &cfg_11ax->param.he_cfg,
|
||||
sizeof(mlan_ds_11ax_he_cfg),
|
||||
sizeof(mlan_ds_11ax_he_cfg));
|
||||
}
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief enable/disable 11AX
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param action MLAN_ACT_DISABLE or MLAN_ACT_ENABLE
|
||||
* @param band band config
|
||||
* @param hecap_ie
|
||||
*
|
||||
* @return 0--success, otherwise failure
|
||||
*/
|
||||
int woal_uap_set_11ax_status(moal_private *priv, t_u8 action, t_u8 band,
|
||||
const IEEEtypes_HECap_t *hecap_ie)
|
||||
{
|
||||
mlan_fw_info fw_info;
|
||||
int ret = 0;
|
||||
mlan_ds_11ax_he_cfg he_cfg;
|
||||
ENTER();
|
||||
|
||||
memset(&fw_info, 0, sizeof(mlan_fw_info));
|
||||
woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info);
|
||||
if ((band == BAND_5GHZ && !(fw_info.fw_bands & BAND_AAX)) ||
|
||||
(band == BAND_2GHZ && !(fw_info.fw_bands & BAND_GAX))) {
|
||||
PRINTM(MERROR, "fw doesn't support 11ax\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
if ((band == BAND_6GHZ) && !(fw_info.fw_bands & BAND_6G)) {
|
||||
PRINTM(MERROR, "FW doesn't support 6E 11ax\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
memset(&he_cfg, 0, sizeof(he_cfg));
|
||||
if (band == BAND_5GHZ)
|
||||
he_cfg.band = MBIT(1);
|
||||
else if (band == BAND_2GHZ)
|
||||
he_cfg.band = MBIT(0);
|
||||
else if (band == BAND_6GHZ)
|
||||
he_cfg.band = MBIT(2);
|
||||
else {
|
||||
PRINTM(MERROR, "Invalid band!\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
if (woal_11ax_cfg(priv, MLAN_ACT_GET, &he_cfg, MOAL_IOCTL_WAIT)) {
|
||||
PRINTM(MERROR, "Fail to get 11ax cfg!\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
if (hecap_ie) {
|
||||
DBG_HEXDUMP(MCMD_D, "hecap_ie", (const t_u8 *)hecap_ie,
|
||||
hecap_ie->ieee_hdr.len +
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
he_cfg.he_cap.id = hecap_ie->ieee_hdr.element_id;
|
||||
he_cfg.he_cap.len = hecap_ie->ieee_hdr.len;
|
||||
moal_memcpy_ext(priv->phandle, &he_cfg.he_cap.ext_id,
|
||||
&hecap_ie->ext_id, he_cfg.he_cap.len,
|
||||
he_cfg.he_cap.len);
|
||||
}
|
||||
#define HE_MAC_CAP_TWT_REQ_SUPPORT MBIT(1)
|
||||
/* uap mode should be TWT responder only */
|
||||
he_cfg.he_cap.he_mac_cap[0] &= ~HE_MAC_CAP_TWT_REQ_SUPPORT;
|
||||
if (action == MLAN_ACT_DISABLE) {
|
||||
if (he_cfg.he_cap.len &&
|
||||
(he_cfg.he_cap.ext_id == HE_CAPABILITY)) {
|
||||
memset(he_cfg.he_cap.he_txrx_mcs_support, 0xff,
|
||||
sizeof(he_cfg.he_cap.he_txrx_mcs_support));
|
||||
} else {
|
||||
PRINTM(MCMND, "11ax already disabled\n");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
DBG_HEXDUMP(MCMD_D, "HE_CFG ", (t_u8 *)&he_cfg, sizeof(he_cfg));
|
||||
ret = woal_11ax_cfg(priv, MLAN_ACT_SET, &he_cfg, MOAL_IOCTL_WAIT);
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parse AP configuration from ASCII string
|
||||
*
|
||||
|
|
@ -4235,61 +4077,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if defined(UAP_CFG80211)
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
/**
|
||||
* @brief Set/Get multi AP mode
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param wrq A pointer to structure iwreq
|
||||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
int woal_uap_set_get_multi_ap_mode(moal_private *priv, struct iwreq *wrq)
|
||||
{
|
||||
int ret = 0;
|
||||
int mode = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (wrq->u.data.length) {
|
||||
if (wrq->u.data.length > 1) {
|
||||
PRINTM(MERROR, "Invalid no of arguments!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
if (copy_from_user(&mode, wrq->u.data.pointer, sizeof(int))) {
|
||||
PRINTM(MERROR, "copy from user failed\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
if (mode == EASY_MESH_MULTI_AP_BSS_MODE_3)
|
||||
/* Supports backhaul and fronthaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_AND_FH_BSS;
|
||||
else if (mode == EASY_MESH_MULTI_AP_BSS_MODE_2)
|
||||
/* Supports backhaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_BH_BSS;
|
||||
else if (mode == EASY_MESH_MULTI_AP_BSS_MODE_1)
|
||||
/* Supports fronthaul BSS */
|
||||
priv->multi_ap_flag = EASY_MESH_MULTI_AP_FH_BSS;
|
||||
} else {
|
||||
if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_AND_FH_BSS)
|
||||
mode = EASY_MESH_MULTI_AP_BSS_MODE_3;
|
||||
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_BH_BSS)
|
||||
mode = EASY_MESH_MULTI_AP_BSS_MODE_2;
|
||||
else if (priv->multi_ap_flag == EASY_MESH_MULTI_AP_FH_BSS)
|
||||
mode = EASY_MESH_MULTI_AP_BSS_MODE_1;
|
||||
wrq->u.data.length = 1;
|
||||
if (copy_to_user(wrq->u.data.pointer, &mode, sizeof(int)))
|
||||
ret = -EFAULT;
|
||||
}
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set AP configuration
|
||||
*
|
||||
|
|
@ -4380,56 +4167,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get ap scan channel list
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param action MLAN_ACT_SET or MLAN_ACT_GET
|
||||
* @param scan_channels A pointer to mlan_uap_scan_channels structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status
|
||||
woal_set_get_ap_scan_channels(moal_private *priv, t_u16 action,
|
||||
mlan_uap_scan_channels *scan_channels)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_ds_bss *bss = NULL;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
||||
if (req == NULL) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
bss = (mlan_ds_bss *)req->pbuf;
|
||||
bss->sub_command = MLAN_OID_UAP_SCAN_CHANNELS;
|
||||
req->req_id = MLAN_IOCTL_BSS;
|
||||
req->action = action;
|
||||
|
||||
moal_memcpy_ext(priv->phandle, &bss->param.ap_scan_channels,
|
||||
scan_channels, sizeof(mlan_uap_scan_channels),
|
||||
sizeof(bss->param.ap_scan_channels));
|
||||
|
||||
ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (ret != MLAN_STATUS_SUCCESS)
|
||||
goto done;
|
||||
if (action == MLAN_ACT_GET)
|
||||
moal_memcpy_ext(priv->phandle, scan_channels,
|
||||
&bss->param.ap_scan_channels,
|
||||
sizeof(mlan_uap_scan_channels),
|
||||
sizeof(mlan_uap_scan_channels));
|
||||
|
||||
done:
|
||||
if (ret != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get uap channel
|
||||
*
|
||||
|
|
@ -4478,129 +4215,6 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief start ACS scan
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param action MLAN_ACT_SET or MLAN_ACT_GET
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status woal_start_acs_scan(moal_private *priv)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_ds_bss *bss = NULL;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
||||
if (req == NULL) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
bss = (mlan_ds_bss *)req->pbuf;
|
||||
bss->sub_command = MLAN_OID_UAP_ACS_SCAN;
|
||||
req->req_id = MLAN_IOCTL_BSS;
|
||||
req->action = MLAN_ACT_SET;
|
||||
|
||||
ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (ret != MLAN_STATUS_SUCCESS)
|
||||
goto done;
|
||||
PRINTM(MIOCTL,
|
||||
"ACS scan done: bandcfg:[chanBand=0x%x chanWidth=0x%x chan2Offset=0x%x scanMode=0x%x], channel=%d\n",
|
||||
bss->param.ap_acs_scan.bandcfg.chanBand,
|
||||
bss->param.ap_acs_scan.bandcfg.chanWidth,
|
||||
bss->param.ap_acs_scan.bandcfg.chan2Offset,
|
||||
bss->param.ap_acs_scan.bandcfg.scanMode,
|
||||
bss->param.ap_acs_scan.chan);
|
||||
done:
|
||||
if (ret != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brie check if we need do ACS scan
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status woal_do_acs_check(moal_private *priv)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_uap_bss_param *sys_config = NULL;
|
||||
mlan_uap_scan_channels *scan_channels = NULL;
|
||||
chan_band_info uap_channel;
|
||||
ENTER();
|
||||
|
||||
sys_config = kzalloc(sizeof(mlan_uap_bss_param), GFP_ATOMIC);
|
||||
if (!sys_config) {
|
||||
PRINTM(MERROR, "Fail to alloc memory for mlan_uap_bss_param\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
if (MLAN_STATUS_SUCCESS != woal_set_get_sys_config(priv, MLAN_ACT_GET,
|
||||
MOAL_IOCTL_WAIT,
|
||||
sys_config)) {
|
||||
PRINTM(MERROR, "Fail to get sys config data\n");
|
||||
kfree(sys_config);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (!(sys_config->bandcfg.scanMode == SCAN_MODE_ACS)) {
|
||||
kfree(sys_config);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
scan_channels = kzalloc(sizeof(mlan_uap_scan_channels), GFP_ATOMIC);
|
||||
if (scan_channels == NULL) {
|
||||
PRINTM(MERROR, "Fail to alloc scan channels buffer\n");
|
||||
kfree(sys_config);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
scan_channels->remove_nop_channel = MTRUE;
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_set_get_ap_scan_channels(priv, MLAN_ACT_GET, scan_channels)) {
|
||||
PRINTM(MERROR, "Fail to get scan channels\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (scan_channels->num_remvoed_channel && scan_channels->num_of_chan) {
|
||||
scan_channels->remove_nop_channel = 0;
|
||||
/** set back new channel list after remove nop channels */
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_set_get_ap_scan_channels(priv, MLAN_ACT_SET,
|
||||
scan_channels)) {
|
||||
PRINTM(MERROR, "Fail to get scan channels\n");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (scan_channels->num_of_chan)
|
||||
ret = woal_start_acs_scan(priv);
|
||||
else
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
/** set to default channel 6 when 5G ACS is configured */
|
||||
if ((ret != MLAN_STATUS_SUCCESS) &&
|
||||
(sys_config->bandcfg.chanBand == BAND_5GHZ)) {
|
||||
memset(&uap_channel, 0, sizeof(uap_channel));
|
||||
uap_channel.bandcfg.chanBand = DEFAULT_UAP_BAND;
|
||||
uap_channel.channel = DEFAULT_UAP_CHANNEL;
|
||||
ret = woal_set_get_ap_channel(priv, MLAN_ACT_SET,
|
||||
MOAL_IOCTL_WAIT, &uap_channel);
|
||||
}
|
||||
done:
|
||||
kfree(scan_channels);
|
||||
kfree(sys_config);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set default configurations pre BSS START
|
||||
*
|
||||
|
|
@ -4792,9 +4406,6 @@ int woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data)
|
|||
|| moal_extflg_isset(priv->phandle, EXT_DFS_OFFLOAD)
|
||||
#endif
|
||||
) {
|
||||
status = woal_do_acs_check(priv);
|
||||
if (status)
|
||||
PRINTM(MMSG, "woal_do_acs_check fails\n");
|
||||
/* about to start bss: issue channel check */
|
||||
status = woal_11h_channel_check_ioctl(priv,
|
||||
MOAL_IOCTL_WAIT);
|
||||
|
|
|
|||
|
|
@ -43,10 +43,8 @@ Change log:
|
|||
#define UAP_DEEP_SLEEP 3
|
||||
/** Tx data pause subcommand */
|
||||
#define UAP_TX_DATA_PAUSE 5
|
||||
#ifdef SDIO
|
||||
/** sdcmd52 read write subcommand */
|
||||
#define UAP_SDCMD52_RW 6
|
||||
#endif
|
||||
/** snmp mib subcommand */
|
||||
#define UAP_SNMP_MIB 7
|
||||
/** domain info subcommand */
|
||||
|
|
@ -173,10 +171,6 @@ typedef struct _ant_cfg_t {
|
|||
int tx_mode;
|
||||
/** RX mode configured */
|
||||
int rx_mode;
|
||||
/** TX mode 6G configured */
|
||||
t_u8 tx_mode_6g;
|
||||
/** RX mode 6G configured */
|
||||
t_u8 rx_mode_6g;
|
||||
} ant_cfg_t;
|
||||
|
||||
/** htstream_cfg structure */
|
||||
|
|
@ -412,7 +406,6 @@ typedef struct _uap_oper_para_hdr {
|
|||
t_u32 action;
|
||||
} uap_oper_para_hdr;
|
||||
|
||||
#ifdef SDIO
|
||||
/** sdcmd52rw parameters */
|
||||
typedef struct _sdcmd52_para {
|
||||
/** subcmd */
|
||||
|
|
@ -422,7 +415,6 @@ typedef struct _sdcmd52_para {
|
|||
/** Command 52 paramters */
|
||||
t_u8 cmd52_params[3];
|
||||
} sdcmd52_para;
|
||||
#endif
|
||||
|
||||
/** deep_sleep parameters */
|
||||
typedef struct _deep_sleep_para {
|
||||
|
|
@ -616,19 +608,9 @@ mlan_status woal_set_get_ap_wmm_para(moal_private *priv, t_u16 action,
|
|||
wmm_parameter_t *ap_wmm_para);
|
||||
int woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len);
|
||||
|
||||
#if defined(UAP_CFG80211)
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
int woal_uap_set_get_multi_ap_mode(moal_private *priv, struct iwreq *wrq);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int woal_uap_set_11ac_status(moal_private *priv, t_u8 action, t_u8 band,
|
||||
t_u8 vht20_40,
|
||||
const IEEEtypes_VHTCap_t *vhtcap_ie);
|
||||
int woal_11ax_cfg(moal_private *priv, t_u8 action, mlan_ds_11ax_he_cfg *he_cfg,
|
||||
t_u8 wait_option);
|
||||
int woal_uap_set_11ax_status(moal_private *priv, t_u8 action, t_u8 band,
|
||||
const IEEEtypes_HECap_t *hecap_ie);
|
||||
int woal_set_uap_ht_tx_cfg(moal_private *priv, Band_Config_t bandcfg,
|
||||
t_u16 ht_cap, t_u8 en);
|
||||
mlan_status woal_uap_set_11n_status(moal_private *priv,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -119,16 +119,6 @@ int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
ret = woal_set_get_bss_role(priv, wrq);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(UAP_CFG80211)
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
case WOAL_UAP_SET_MODE:
|
||||
PRINTM(MINFO,
|
||||
"%s: setting multi_ap flag through user command\n",
|
||||
__func__);
|
||||
ret = woal_uap_set_get_multi_ap_mode(priv, wrq);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
|
|||
|
|
@ -65,11 +65,6 @@ Change log:
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(UAP_CFG80211)
|
||||
/** Private command ID for set multi-AP BSS mode */
|
||||
#define WOAL_UAP_SET_MODE 27
|
||||
#endif
|
||||
|
||||
/** Private command ID for hostcmd */
|
||||
#define WOAL_UAP_HOST_CMD (WOAL_UAP_IOCTL + 17)
|
||||
|
||||
|
|
|
|||
|
|
@ -57,22 +57,7 @@ static const chan_to_freq_t chan_to_freq[] = {
|
|||
{116, 5580, 1}, {120, 5600, 1}, {124, 5620, 1}, {128, 5640, 1},
|
||||
{132, 5660, 1}, {136, 5680, 1}, {140, 5700, 1}, {144, 5720, 1},
|
||||
{149, 5745, 1}, {153, 5765, 1}, {157, 5785, 1}, {161, 5805, 1},
|
||||
{165, 5825, 1}, {169, 5845, 1}, {173, 5865, 1}, {177, 5885, 1},
|
||||
{1, 5955, 2}, {5, 5975, 2}, {9, 5995, 2}, {13, 6015, 2},
|
||||
{17, 6035, 2}, {21, 6055, 2}, {25, 6075, 2}, {29, 6095, 2},
|
||||
{33, 6115, 2}, {37, 6135, 2}, {41, 6155, 2}, {45, 6175, 2},
|
||||
{49, 6195, 2}, {53, 6215, 2}, {57, 6235, 2}, {61, 6255, 2},
|
||||
{65, 6275, 2}, {69, 6295, 2}, {73, 6315, 2}, {77, 6335, 2},
|
||||
{81, 6355, 2}, {85, 6375, 2}, {89, 6395, 2}, {94, 6415, 2},
|
||||
{97, 6435, 2}, {101, 6455, 2}, {105, 6475, 2}, {109, 6495, 2},
|
||||
{113, 6515, 2}, {117, 6535, 2}, {121, 6555, 2}, {125, 6575, 2},
|
||||
{129, 6595, 2}, {133, 6615, 2}, {137, 6635, 2}, {141, 6655, 2},
|
||||
{145, 6675, 2}, {149, 6695, 2}, {153, 6715, 2}, {157, 6735, 2},
|
||||
{161, 6755, 2}, {165, 6775, 2}, {169, 6795, 2}, {173, 6815, 2},
|
||||
{177, 6835, 2}, {181, 6855, 2}, {185, 6875, 2}, {189, 6895, 2},
|
||||
{193, 6915, 2}, {197, 6935, 2}, {201, 6955, 2}, {205, 6975, 2},
|
||||
{209, 6995, 2}, {213, 7015, 2}, {217, 7035, 2}, {221, 7055, 2},
|
||||
{225, 7075, 2}, {229, 7095, 2}, {233, 7115, 2},
|
||||
{165, 5825, 1},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -99,10 +84,6 @@ static const struct iw_priv_args woal_uap_priv_args[] = {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(UAP_CFG80211)
|
||||
{WOAL_UAP_SET_MODE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
"setmode"},
|
||||
#endif
|
||||
{WOAL_UAP_SET_GET_256_CHAR, IW_PRIV_TYPE_CHAR | 256,
|
||||
IW_PRIV_TYPE_CHAR | 256, ""},
|
||||
{WOAL_WL_FW_RELOAD, IW_PRIV_TYPE_CHAR | 256, IW_PRIV_TYPE_CHAR | 256,
|
||||
|
|
@ -424,9 +405,7 @@ static int woal_get_freq(struct net_device *dev, struct iw_request_info *info,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
band = ((ap_cfg->bandcfg.chanBand == BAND_6GHZ) ?
|
||||
2 :
|
||||
((ap_cfg->bandcfg.chanBand == BAND_5GHZ) ? 1 : 0));
|
||||
band = (((ap_cfg->bandcfg.chanBand == BAND_5GHZ) ? 1 : 0));
|
||||
fwrq->m = (long)channel_to_frequency(ap_cfg->channel, band);
|
||||
fwrq->i = (long)ap_cfg->channel;
|
||||
fwrq->e = 6;
|
||||
|
|
|
|||
|
|
@ -48,10 +48,6 @@ static const struct iw_priv_args woal_private_args[] = {
|
|||
{WOAL_VEREXT, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_CHAR | 128, "verext"},
|
||||
{WOAL_SETNONE_GETNONE, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, ""},
|
||||
{WOAL_WARMRESET, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "warmreset"},
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
{WOAL_USB_SUSPEND, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "usbsuspend"},
|
||||
{WOAL_USB_RESUME, IW_PRIV_TYPE_NONE, IW_PRIV_TYPE_NONE, "usbresume"},
|
||||
#endif /* CONFIG_USB_SUSPEND */
|
||||
{WOAL_SETONEINT_GETONEINT, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
""},
|
||||
{WOAL_SET_GET_TXRATE, IW_PRIV_TYPE_INT | 1, IW_PRIV_TYPE_INT | 1,
|
||||
|
|
@ -138,25 +134,19 @@ static const struct iw_priv_args woal_private_args[] = {
|
|||
"bandcfg"},
|
||||
{WOAL_INACTIVITY_TIMEOUT_EXT, IW_PRIV_TYPE_INT | 16,
|
||||
IW_PRIV_TYPE_INT | 16, "inactivityto"},
|
||||
#ifdef SDIO
|
||||
{WOAL_SDIO_CLOCK, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"sdioclock"},
|
||||
{WOAL_CMD_52RDWR, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"sdcmd52rw"},
|
||||
#endif
|
||||
{WOAL_SCAN_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"scancfg"},
|
||||
{WOAL_PS_CFG, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16, "pscfg"},
|
||||
{WOAL_MEM_READ_WRITE, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"memrdwr"},
|
||||
#ifdef SDIO
|
||||
{WOAL_SDIO_MPA_CTRL, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"mpactrl"},
|
||||
#endif
|
||||
{WOAL_SLEEP_PARAMS, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"sleepparams"},
|
||||
{WOAL_NET_MONITOR, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"netmon"},
|
||||
{WOAL_DFS_TESTING, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
"dfstesting"},
|
||||
{WOAL_MGMT_FRAME_CTRL, IW_PRIV_TYPE_INT | 16, IW_PRIV_TYPE_INT | 16,
|
||||
|
|
@ -209,10 +199,8 @@ static const struct iw_priv_args woal_private_args[] = {
|
|||
"rdeeprom"},
|
||||
{WOAL_SET_GET_2K_BYTES, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, ""},
|
||||
#if defined(SDIO)
|
||||
{WOAL_CMD_53RDWR, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "sdcmd53rw"},
|
||||
#endif
|
||||
{WOAL_SET_USER_SCAN, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES, "setuserscan"},
|
||||
{WOAL_GET_SCAN_TABLE, IW_PRIV_TYPE_BYTE | WOAL_2K_BYTES,
|
||||
|
|
@ -2525,9 +2513,6 @@ static mlan_status woal_wext_request_scan(moal_private *priv, t_u8 wait_option,
|
|||
scan_req->scan_chan_gap = scan_cfg.scan_chan_gap;
|
||||
else
|
||||
scan_req->scan_chan_gap = priv->phandle->scan_chan_gap;
|
||||
/** indicate FW, gap is optional */
|
||||
if (scan_req->scan_chan_gap && priv->phandle->pref_mac)
|
||||
scan_req->scan_chan_gap |= GAP_FLAG_OPTIONAL;
|
||||
status = woal_request_userscan(priv, wait_option, scan_req);
|
||||
kfree(scan_req);
|
||||
LEAVE();
|
||||
|
|
@ -3197,8 +3182,8 @@ static int woal_get_scan(struct net_device *dev, struct iw_request_info *info,
|
|||
|
||||
while ((unsigned int)beacon_size >=
|
||||
sizeof(IEEEtypes_Header_t)) {
|
||||
element_id = (IEEEtypes_ElementId_e)(*(
|
||||
t_u8 *)pbeacon);
|
||||
element_id = (IEEEtypes_ElementId_e)(
|
||||
*(t_u8 *)pbeacon);
|
||||
element_len = *((t_u8 *)pbeacon + 1);
|
||||
if ((unsigned int)beacon_size <
|
||||
(unsigned int)element_len +
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue