mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-16 08:45:32 +00:00
mxm_wifiex: update to mxm5x17241 release
changes: 1. Added support for PCIE-UART W9098 SoC 2. Added support for SDIO-UART W8997 SoC 3. Added a new RF Test Mode command 4. Added txratecfg and 11axcfg related commands to mlanutl light to support pre-cert testing 5. Added cpu_latency_qos_add/remove_request calls for L5.10 for better CPU performance during throughput tests 6. Added fixes for MBO Pre-Cert failure 7. Fixed Copyright header start date, end date Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Reviewed-by: yang.tian <yang.tian@nxp.com>
This commit is contained in:
parent
3bf38111b9
commit
5e1d300484
75 changed files with 13129 additions and 2685 deletions
|
@ -1,6 +1,6 @@
|
||||||
# File: Makefile
|
# File: Makefile
|
||||||
#
|
#
|
||||||
# Copyright 2008-2020 NXP
|
# Copyright 2008-2021 NXP
|
||||||
#
|
#
|
||||||
# This software file (the File) is distributed by NXP
|
# This software file (the File) is distributed by NXP
|
||||||
# under the terms of the GNU General Public License Version 2, June 1991
|
# under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -16,13 +16,15 @@
|
||||||
# this warranty disclaimer.
|
# this warranty disclaimer.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
CONFIG_COMPATDIR=n
|
||||||
|
ifeq ($(CONFIG_COMPATDIR), y)
|
||||||
COMPATDIR=/lib/modules/$(KERNELVERSION_X86)/build/compat-wireless-3.2-rc1-1/include
|
COMPATDIR=/lib/modules/$(KERNELVERSION_X86)/build/compat-wireless-3.2-rc1-1/include
|
||||||
ifeq ($(CC),)
|
|
||||||
CC ?= $(CROSS_COMPILE)gcc -I$(COMPATDIR)
|
CC ?= $(CROSS_COMPILE)gcc -I$(COMPATDIR)
|
||||||
|
else
|
||||||
|
CC ?= $(CROSS_COMPILE)gcc
|
||||||
endif
|
endif
|
||||||
ifeq ($(LD),)
|
|
||||||
LD= $(CROSS_COMPILE)ld
|
LD ?= $(CROSS_COMPILE)ld
|
||||||
endif
|
|
||||||
BACKUP= /root/backup
|
BACKUP= /root/backup
|
||||||
YMD= `date +%Y%m%d%H%M`
|
YMD= `date +%Y%m%d%H%M`
|
||||||
|
|
||||||
|
@ -37,7 +39,7 @@ CONFIG_PCIE8897=n
|
||||||
CONFIG_SD8977=n
|
CONFIG_SD8977=n
|
||||||
CONFIG_SD8978=n
|
CONFIG_SD8978=n
|
||||||
CONFIG_USB8978=n
|
CONFIG_USB8978=n
|
||||||
CONFIG_SD8997=n
|
CONFIG_SD8997=y
|
||||||
CONFIG_USB8997=n
|
CONFIG_USB8997=n
|
||||||
CONFIG_PCIE8997=y
|
CONFIG_PCIE8997=y
|
||||||
CONFIG_SD8987=y
|
CONFIG_SD8987=y
|
||||||
|
@ -46,7 +48,7 @@ CONFIG_USB9097=n
|
||||||
CONFIG_PCIE9097=n
|
CONFIG_PCIE9097=n
|
||||||
CONFIG_SD9098=n
|
CONFIG_SD9098=n
|
||||||
CONFIG_USB9098=n
|
CONFIG_USB9098=n
|
||||||
CONFIG_PCIE9098=n
|
CONFIG_PCIE9098=y
|
||||||
|
|
||||||
|
|
||||||
# Debug Option
|
# Debug Option
|
||||||
|
@ -101,6 +103,7 @@ CONFIG_DFS_TESTING_SUPPORT=y
|
||||||
|
|
||||||
|
|
||||||
# Use static link for app build
|
# Use static link for app build
|
||||||
|
export CONFIG_STATIC_LINK=y
|
||||||
CONFIG_ANDROID_KERNEL=n
|
CONFIG_ANDROID_KERNEL=n
|
||||||
|
|
||||||
#32bit app over 64bit kernel support
|
#32bit app over 64bit kernel support
|
||||||
|
@ -115,8 +118,13 @@ MODEXT = ko
|
||||||
ccflags-y += -I$(M)/mlan
|
ccflags-y += -I$(M)/mlan
|
||||||
ccflags-y += -DLINUX
|
ccflags-y += -DLINUX
|
||||||
|
|
||||||
KERNELVERSION_X86 := $(shell uname -r)
|
|
||||||
KERNELDIR ?= $(KERNEL_DIR)
|
KERNELDIR ?= $(KERNEL_DIR)
|
||||||
|
ARCH ?= arm64
|
||||||
|
CONFIG_IMX_SUPPORT=y
|
||||||
|
ifeq ($(CONFIG_IMX_SUPPORT),y)
|
||||||
|
ccflags-y += -DIMX_SUPPORT
|
||||||
|
endif
|
||||||
|
|
||||||
LD += -S
|
LD += -S
|
||||||
|
|
||||||
BINDIR = ../bin_mxm_wifiex
|
BINDIR = ../bin_mxm_wifiex
|
||||||
|
@ -295,19 +303,22 @@ ifeq ($(CONFIG_MAC80211_SUPPORT_MESH),y)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# add -Wno-packed-bitfield-compat when GCC version greater than 4.4
|
# add -Wno-packed-bitfield-compat when GCC version greater than 4.4
|
||||||
GCC_VERSION := $(shell echo `gcc -dumpversion | cut -f1-2 -d.` \>= 4.4 | sed -e 's/\./*100+/g' | bc )
|
#GCC_VERSION := $(shell echo `gcc -dumpversion | cut -f1-2 -d.` \>= 4.4 | sed -e 's/\./*100+/g' | bc )
|
||||||
ifeq ($(GCC_VERSION),1)
|
#ifeq ($(GCC_VERSION),1)
|
||||||
#ccflags-y += -Wno-packed-bitfield-compat
|
#ccflags-y += -Wno-packed-bitfield-compat
|
||||||
endif
|
#endif
|
||||||
WimpGCC_VERSION := $(shell echo `gcc -dumpversion | cut -f1 -d.`| bc )
|
|
||||||
#ifeq ($(shell test $(WimpGCC_VERSION) -ge 7; echo $$?),0)
|
#ifeq ($(shell test $(WimpGCC_VERSION) -ge 7; echo $$?),0)
|
||||||
#ccflags-y += -Wimplicit-fallthrough=3
|
#ccflags-y += -Wimplicit-fallthrough=3
|
||||||
#endif
|
#endif
|
||||||
#ccflags-y += -Wno-stringop-overflow
|
#ccflags-y += -Wunused-but-set-variable
|
||||||
#ccflags-y += -Wno-tautological-compare
|
#ccflags-y += -Wmissing-prototypes
|
||||||
#ccflags-y += -Wno-stringop-truncation
|
#ccflags-y += -Wold-style-definition
|
||||||
#ccflags-y += -Wno-packed-bitfield-compat
|
#ccflags-y += -Wtype-limits
|
||||||
|
#ccflags-y += -Wsuggest-attribute=format
|
||||||
|
#ccflags-y += -Wmissing-include-dirs
|
||||||
|
#ccflags-y += -Wshadow
|
||||||
|
#ccflags-y += -Wsign-compare
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Make Targets
|
# Make Targets
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
@ -568,7 +579,6 @@ clean:
|
||||||
-find . -name "*.ko" -exec rm {} \;
|
-find . -name "*.ko" -exec rm {} \;
|
||||||
-find . -name ".*.cmd" -exec rm {} \;
|
-find . -name ".*.cmd" -exec rm {} \;
|
||||||
-find . -name "*.mod.c" -exec rm {} \;
|
-find . -name "*.mod.c" -exec rm {} \;
|
||||||
-find . -name "*.mod" -exec rm {} \;
|
|
||||||
-find . -name "Module.symvers" -exec rm {} \;
|
-find . -name "Module.symvers" -exec rm {} \;
|
||||||
-find . -name "Module.markers" -exec rm {} \;
|
-find . -name "Module.markers" -exec rm {} \;
|
||||||
-find . -name "modules.order" -exec rm {} \;
|
-find . -name "modules.order" -exec rm {} \;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
===============================================================================
|
===============================================================================
|
||||||
U S E R M A N U A L
|
U S E R M A N U A L
|
||||||
|
|
||||||
Copyright 2008-2020 NXP
|
Copyright 2008-2021 NXP
|
||||||
|
|
||||||
|
|
||||||
1) FOR DRIVER BUILD
|
1) FOR DRIVER BUILD
|
||||||
|
@ -73,7 +73,10 @@
|
||||||
e.g. copy dpd_data.conf to firmware directory, dpd_data_cfg=nxp/dpd_data.conf
|
e.g. copy dpd_data.conf to firmware directory, dpd_data_cfg=nxp/dpd_data.conf
|
||||||
txpwrlimit_cfg=<Tx power limit config file name>
|
txpwrlimit_cfg=<Tx power limit config file name>
|
||||||
e.g. copy txpwrlimit_cfg_set.conf to firmware directory, txpwrlimit_cfg=nxp/txpwrlimit_cfg_set.conf
|
e.g. copy txpwrlimit_cfg_set.conf to firmware directory, txpwrlimit_cfg=nxp/txpwrlimit_cfg_set.conf
|
||||||
cntry_txpwr=<Enable setting tx power table of country | Disable setting tx power table of country (default)>
|
cntry_txpwr=0|1|2
|
||||||
|
0: Disable setting tx power table of country (default)
|
||||||
|
1: Enable setting tx power table of country
|
||||||
|
2: Enable setting rgpower table of country
|
||||||
init_hostcmd_cfg=<init hostcmd config file name>
|
init_hostcmd_cfg=<init hostcmd config file name>
|
||||||
e.g. copy init_hostcmd_cfg.conf to firmware directory, init_hostcmd_cfg=nxp/init_hostcmd_cfg.conf
|
e.g. copy init_hostcmd_cfg.conf to firmware directory, init_hostcmd_cfg=nxp/init_hostcmd_cfg.conf
|
||||||
band_steer_cfg=<band steer config file name>
|
band_steer_cfg=<band steer config file name>
|
||||||
|
@ -101,7 +104,6 @@
|
||||||
When low power mode is enabled, the output power will be clipped at ~+10dBm and the
|
When low power mode is enabled, the output power will be clipped at ~+10dBm and the
|
||||||
expected PA current is expected to be in the 80-90 mA range for b/g/n modes
|
expected PA current is expected to be in the 80-90 mA range for b/g/n modes
|
||||||
wakelock_timeout=<set wakelock_timeout value (ms)>
|
wakelock_timeout=<set wakelock_timeout value (ms)>
|
||||||
defined(SD9098)||defined(USB9098) || defined(PCIE9098) || defined(SD9097) || defined(USB9097)|| defined(PCIE9097)||defined(SD8978)
|
|
||||||
pmic=0|1 <No pmic configure cmd sent to firmware | Send pmic configure cmd to firmware>
|
pmic=0|1 <No pmic configure cmd sent to firmware | Send pmic configure cmd to firmware>
|
||||||
indication_gpio=0xXY <GPIO to indicate wakeup source and its level; high four bits X:
|
indication_gpio=0xXY <GPIO to indicate wakeup source and its level; high four bits X:
|
||||||
level(0/1) for normal wakeup; low four bits Y: GPIO pin number. This parameter
|
level(0/1) for normal wakeup; low four bits Y: GPIO pin number. This parameter
|
||||||
|
@ -340,6 +342,9 @@
|
||||||
Set RF channel
|
Set RF channel
|
||||||
echo "channel=6" > /proc/mwlan/adapterX/config
|
echo "channel=6" > /proc/mwlan/adapterX/config
|
||||||
|
|
||||||
|
Set Radio Mode
|
||||||
|
echo "radio_mode=14 4" > /proc/mwlan/adapterX/config
|
||||||
|
|
||||||
Get and reset packet error rate
|
Get and reset packet error rate
|
||||||
echo "get_and_reset_per" > /proc/mwlan/adapterX/config
|
echo "get_and_reset_per" > /proc/mwlan/adapterX/config
|
||||||
|
|
||||||
|
@ -407,6 +412,7 @@ SYNOPSIS
|
||||||
mlanutl mlanX verext
|
mlanutl mlanX verext
|
||||||
mlanutl mlanX version
|
mlanutl mlanX version
|
||||||
mlanutl mlanX hostcmd <conf> generate_raw <raw_data_file>
|
mlanutl mlanX hostcmd <conf> generate_raw <raw_data_file>
|
||||||
|
mlanutl mlanX hostcmd <send_om.conf> send_om_set
|
||||||
mlanutl mlanX getdatarate
|
mlanutl mlanX getdatarate
|
||||||
mlanutl uapX getdatarate
|
mlanutl uapX getdatarate
|
||||||
mlanutl mlanX drvdbg [n]
|
mlanutl mlanX drvdbg [n]
|
||||||
|
@ -427,6 +433,10 @@ SYNOPSIS
|
||||||
mlanutl uapX vhtcfg <j> <k> [l] [m] [n] [o]
|
mlanutl uapX vhtcfg <j> <k> [l] [m] [n] [o]
|
||||||
mlanutl mlanX httxcfg [<m>] [<n>]
|
mlanutl mlanX httxcfg [<m>] [<n>]
|
||||||
mlanutl mlanX htcapinfo [<m>] [<n>]
|
mlanutl mlanX htcapinfo [<m>] [<n>]
|
||||||
|
mlanutl mlanX 11axcfg [config/11axcfg.conf]
|
||||||
|
mlanutl mlanX 11axcmd <subcmd> <value>
|
||||||
|
mlanutl mlanX txratecfg [l] [m] [n] [o]
|
||||||
|
mlanutl uapX txratecfg [l] [m] [n] [o]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
Those commands are used to send additional commands to the NXP MLAN
|
Those commands are used to send additional commands to the NXP MLAN
|
||||||
|
@ -501,6 +511,12 @@ hostcmd generate_raw
|
||||||
Usage:
|
Usage:
|
||||||
mlanutl mlanX hostcmd <conf_file> generate_raw <raw_data_file>
|
mlanutl mlanX hostcmd <conf_file> generate_raw <raw_data_file>
|
||||||
|
|
||||||
|
hostcmd send_om_set
|
||||||
|
This command is used to configure the STAUT to include OM control subfield
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
mlanutl mlanX hostcmd <send_om.conf> send_om_set
|
||||||
|
|
||||||
getdatarate
|
getdatarate
|
||||||
This command is used to get the data rate being used in last Tx
|
This command is used to get the data rate being used in last Tx
|
||||||
packet and last Rx packet.
|
packet and last Rx packet.
|
||||||
|
@ -1068,3 +1084,207 @@ htcapinfo
|
||||||
Note:- This command can be issued any time but it will only come to effect from
|
Note:- This command can be issued any time but it will only come to effect from
|
||||||
next association. (as HTCapInfo is sent only during Association).
|
next association. (as HTCapInfo is sent only during Association).
|
||||||
|
|
||||||
|
11axcfg
|
||||||
|
This command is used to config 11ax HE capability using conf file.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
mlanutl mlanX 11axcfg [conf file]
|
||||||
|
|
||||||
|
Example:
|
||||||
|
mlanutl mlan0 11axcfg config/11axcfg.conf
|
||||||
|
mlanutl uap0 11axcfg config/11axcfg.conf
|
||||||
|
|
||||||
|
11axcmd
|
||||||
|
This command is used to config 11ax HE capability using command.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
mlanutl <mlanX|uapX> 11axcmd <subcmd> [value_1] [value_2]
|
||||||
|
<subcmd = tx_omi > : set/get omi value
|
||||||
|
used for OMI transmission in MAC header HTC+ field, please see 11ax spec for OMI definition
|
||||||
|
set OMI when [value_1 = <omi>], where <omi> is defined as:
|
||||||
|
Bit 0-2: Rx NSS
|
||||||
|
Bit 3-4: Channel Width
|
||||||
|
Bit 6 : Tx NSTS (applies to client mode only)
|
||||||
|
All other bits are not supported currently.
|
||||||
|
get OMI without value_1 and value_2
|
||||||
|
|
||||||
|
<subcmd = obssnbru_toltime> : set/get OBSS narrow band RU tolerance time value in seconds
|
||||||
|
set tolerance time when [value_1 = <time>], where <time> indicates:
|
||||||
|
the minimum time that needs to pass since the reception of the last beacon frame from an OBSS AP that
|
||||||
|
did not indicate tolerance to narrow bandwidth RU in OFDMA before the STA transmits an HE TB PPDU in a
|
||||||
|
26-tine RU allocated by a trigger frame from the HE AP.
|
||||||
|
valid value range [1..3600] in seconds. Any value more than 3600 will disable this feature.
|
||||||
|
By default this feature is currently disabled.
|
||||||
|
Example :
|
||||||
|
mlanutl mlan0 11axcmd tx_omi 0x41 : set omi value to 0x41
|
||||||
|
mlanutl mlan0 11axcmd tx_omi : get omi value
|
||||||
|
mlanutl mlan0 11axcmd obssnbru_toltime 1800 : set OBSSNBRU tolerance time to 1800 seconds
|
||||||
|
mlanutl mlan0 11axcmd obssnbru_toltime 3601 : disable OBSSNBRU tolerance time
|
||||||
|
mlanutl mlan0 11axcmd obssnbru_toltime : get OBSSNBRU tolerance time
|
||||||
|
|
||||||
|
txratecfg
|
||||||
|
This command is used to set/get the transmit data rate.
|
||||||
|
|
||||||
|
Note:
|
||||||
|
1) The data rate can be set only after association.
|
||||||
|
|
||||||
|
2) If the reassoc is OFF driver reset the data rate to auto if the connection state is disconnected.
|
||||||
|
Please note that user has to re-issue the set data rate command if the driver is disconnected.
|
||||||
|
|
||||||
|
3) If the reassoc is ON driver remembers the data rate set by the user, if the driver is
|
||||||
|
disconnected user does not have to re-issue the set data rate again.
|
||||||
|
|
||||||
|
4) Parameter [o] is optional. If [o] is not given, it will be set as 0xffff.
|
||||||
|
|
||||||
|
Where
|
||||||
|
[l] is <format>
|
||||||
|
<format> - This parameter specifies the data rate format used in this command
|
||||||
|
0: LG
|
||||||
|
1: HT
|
||||||
|
2: VHT
|
||||||
|
3: HE
|
||||||
|
0xff: Auto
|
||||||
|
|
||||||
|
[m] is <index>
|
||||||
|
<index> - This parameter specifies the rate or MCS index
|
||||||
|
If <format> is 0 (LG),
|
||||||
|
0 1 Mbps
|
||||||
|
1 2 Mbps
|
||||||
|
2 5.5 Mbps
|
||||||
|
3 11 Mbps
|
||||||
|
4 6 Mbps
|
||||||
|
5 9 Mbps
|
||||||
|
6 12 Mbps
|
||||||
|
7 18 Mbps
|
||||||
|
8 24 Mbps
|
||||||
|
9 36 Mbps
|
||||||
|
10 48 Mbps
|
||||||
|
11 54 Mbps
|
||||||
|
If <format> is 1 (HT),
|
||||||
|
0 MCS0
|
||||||
|
1 MCS1
|
||||||
|
2 MCS2
|
||||||
|
3 MCS3
|
||||||
|
4 MCS4
|
||||||
|
5 MCS5
|
||||||
|
6 MCS6
|
||||||
|
7 MCS7
|
||||||
|
8 MCS8
|
||||||
|
9 MCS9
|
||||||
|
10 MCS10
|
||||||
|
11 MCS11
|
||||||
|
12 MCS12
|
||||||
|
13 MCS13
|
||||||
|
14 MCS14
|
||||||
|
15 MCS15
|
||||||
|
If <format> is 2 (VHT),
|
||||||
|
0 MCS0
|
||||||
|
1 MCS1
|
||||||
|
2 MCS2
|
||||||
|
3 MCS3
|
||||||
|
4 MCS4
|
||||||
|
5 MCS5
|
||||||
|
6 MCS6
|
||||||
|
7 MCS7
|
||||||
|
8 MCS8
|
||||||
|
9 MCS9
|
||||||
|
If <format> is 3 (HE),
|
||||||
|
0 MCS0
|
||||||
|
1 MCS1
|
||||||
|
2 MCS2
|
||||||
|
3 MCS3
|
||||||
|
4 MCS4
|
||||||
|
5 MCS5
|
||||||
|
6 MCS6
|
||||||
|
7 MCS7
|
||||||
|
8 MCS8
|
||||||
|
9 MCS9
|
||||||
|
10 MCS10
|
||||||
|
11 MCS11
|
||||||
|
[n] is <nss>
|
||||||
|
<nss> - This parameter specifies the NSS. It is valid for VHT
|
||||||
|
If <format> is 2 (VHT),
|
||||||
|
1 NSS1
|
||||||
|
2 NSS2
|
||||||
|
[n] is <nss>
|
||||||
|
<nss> - This parameter specifies the NSS. It is valid for HE
|
||||||
|
If <format> is 3 (HE),
|
||||||
|
1 NSS1
|
||||||
|
2 NSS2
|
||||||
|
[o] is <rate setting, only support 9098/9097/9xxx chips>
|
||||||
|
Bit0 - 1: indicate preambleType
|
||||||
|
For legacy 11b: preemble 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
|
||||||
|
others are reserved
|
||||||
|
|
||||||
|
Bit 2 - 4 : indicate BW:
|
||||||
|
For HE ER:
|
||||||
|
0 = 242-tone RU
|
||||||
|
1 = upper frequency 106-tone RU within the primary 20 MHz
|
||||||
|
Otherwise:
|
||||||
|
0 = 20 MHz
|
||||||
|
1 = 40 MHz
|
||||||
|
2 = 80 MHz
|
||||||
|
3 = 160 MHz
|
||||||
|
|
||||||
|
Bit 5 -6: indicate LTF + GI size
|
||||||
|
For HT:
|
||||||
|
0 = normal
|
||||||
|
1 = Short GI
|
||||||
|
For VHT:
|
||||||
|
01 = Short GI
|
||||||
|
11 = Short GI and Nsym mod 10=9
|
||||||
|
00 = otherwise
|
||||||
|
For HE:
|
||||||
|
0 = 1xHELTF + GI0.8us
|
||||||
|
1 = 2xHELTF + GI0.8us
|
||||||
|
2 = 2xHELTF + GI1.6us
|
||||||
|
3 = 4xHELTF + GI0.8us if DCM = 1 and STBC = 1
|
||||||
|
4xHELTF + GI3.2us, otherwise.
|
||||||
|
|
||||||
|
Bit 7: Indicate STBC:
|
||||||
|
0 = no STBC
|
||||||
|
1 = STBC
|
||||||
|
|
||||||
|
Bit 8: indicate DCM:
|
||||||
|
0 = no DCM
|
||||||
|
1 = DCM
|
||||||
|
|
||||||
|
Bit 9: indicate coding:
|
||||||
|
0 = BCC
|
||||||
|
1 = LDPC
|
||||||
|
|
||||||
|
Bit 10 - 11: reserved.
|
||||||
|
|
||||||
|
Bit 12 - 13: Indicate maxPE
|
||||||
|
Max packet extension
|
||||||
|
0 - 0 usec
|
||||||
|
1 - 8 usec
|
||||||
|
2 - 16 usec.
|
||||||
|
|
||||||
|
Bit 14 - 15: reserved.
|
||||||
|
|
||||||
|
0xffff: Auto
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
mlanutl mlan0 txratecfg : Read the current data rate setting
|
||||||
|
mlanutl mlan0 txratecfg 0 3 : Set fixed Tx rate to 11 Mbps
|
||||||
|
mlanutl mlan0 txratecfg 0 11 : Set fixed Tx rate to 54 Mbps
|
||||||
|
mlanutl mlan0 txratecfg 1 3 : Set fixed Tx rate to MCS3
|
||||||
|
mlanutl mlan0 txratecfg 2 3 2 : Set fixed Tx rate to MCS3 for NSS2
|
||||||
|
mlanutl mlan0 txratecfg 3 3 2 : Set 11AX fixed Tx rate to MCS3 for NSS2
|
||||||
|
mlanutl mlan0 txratecfg 3 5 2 0x2282 : Set 11AX fixed Tx rate to MCS5 for NSS2, and Preamble type is 2, BW is 0, LTF + GI size 0
|
||||||
|
STBC is 1, DMC is 0, Coding is 1, maxPE is 2.
|
||||||
|
mlanutl mlan0 txratecfg 0xff : Disable fixed rate and uses auto rate
|
||||||
|
|
||||||
|
|
23
mxm_wifiex/wlan_src/mapp/mlanconfig/config/ed_mac_ctrl_V3_909x.conf
Executable file
23
mxm_wifiex/wlan_src/mapp/mlanconfig/config/ed_mac_ctrl_V3_909x.conf
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
# File : ed_mac_ctrl_V3_909x.conf
|
||||||
|
#
|
||||||
|
# ed_mac_ctrl_v3 is used for 88W9098, 88W9097
|
||||||
|
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_909x.conf ed_mac_ctrl_v3
|
||||||
|
#
|
||||||
|
## Set Energy Detect Threshold for EU Adaptivity test
|
||||||
|
|
||||||
|
ed_mac_ctrl_v3={
|
||||||
|
CmdCode=0x0130 #Command code, DO NOT change this line
|
||||||
|
ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band
|
||||||
|
# 1 - enable EU adaptivity for 2.4GHz band
|
||||||
|
|
||||||
|
ed_ctrl_2g.offset:2=0x8 # 0 - Default Energy Detect threshold
|
||||||
|
#offset value range: 0x80 to 0x7F
|
||||||
|
|
||||||
|
ed_ctrl_5g.enable:2=0x1 # 0 - disable EU adaptivity for 5GHz band
|
||||||
|
# 1 - enable EU adaptivity for 5GHz band
|
||||||
|
|
||||||
|
ed_ctrl_5g.offset:2=0x8 # 0 - Default Energy Detect threshold
|
||||||
|
#offset value range: 0x80 to 0x7F
|
||||||
|
|
||||||
|
ed_ctrl_txq_lock:4=0x1e00FF #DO NOT Change this line
|
||||||
|
}
|
617
mxm_wifiex/wlan_src/mapp/mlanconfig/config/txpwrlimit_cfg_9098.conf
Executable file
617
mxm_wifiex/wlan_src/mapp/mlanconfig/config/txpwrlimit_cfg_9098.conf
Executable file
|
@ -0,0 +1,617 @@
|
||||||
|
# File : txpwrlimit_cfg.conf
|
||||||
|
## Get CFG data for Tx power limitation
|
||||||
|
txpwrlimit_2g_cfg_get={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=0 # 0 - GET
|
||||||
|
SubBand:2=0x00 # 0x00 2G subband (2.4G: channel 1-14)
|
||||||
|
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||||
|
# 52,56,60,64)
|
||||||
|
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||||
|
# 116,120,124,128,
|
||||||
|
# 132,136,140,144)
|
||||||
|
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||||
|
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||||
|
# 189, 192,196;
|
||||||
|
# 5G: channel 7,8,11,12,16,34)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
txpwrlimit_5g_cfg_get_sub0={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=0 # 0 - GET
|
||||||
|
SubBand:2=0x10 # 0x00 2G subband (2.4G: channel 1-14)
|
||||||
|
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||||
|
# 52,56,60,64)
|
||||||
|
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||||
|
# 116,120,124,128,
|
||||||
|
# 132,136,140,144)
|
||||||
|
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||||
|
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||||
|
# 189, 192,196;
|
||||||
|
# 5G: channel 7,8,11,12,16,34)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
txpwrlimit_5g_cfg_get_sub1={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=0 # 0 - GET
|
||||||
|
SubBand:2=0x11 # 0x00 2G subband (2.4G: channel 1-14)
|
||||||
|
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||||
|
# 52,56,60,64)
|
||||||
|
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||||
|
# 116,120,124,128,
|
||||||
|
# 132,136,140,144)
|
||||||
|
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||||
|
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||||
|
# 189, 192,196;
|
||||||
|
# 5G: channel 7,8,11,12,16,34)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
txpwrlimit_5g_cfg_get_sub2={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=0 # 0 - GET
|
||||||
|
SubBand:2=0x12 # 0x00 2G subband (2.4G: channel 1-14)
|
||||||
|
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||||
|
# 52,56,60,64)
|
||||||
|
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||||
|
# 116,120,124,128,
|
||||||
|
# 132,136,140,144)
|
||||||
|
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||||
|
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||||
|
# 189, 192,196;
|
||||||
|
# 5G: channel 7,8,11,12,16,34)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
txpwrlimit_5g_cfg_get_sub3={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=0 # 0 - GET
|
||||||
|
SubBand:2=0x13 # 0x00 2G subband (2.4G: channel 1-14)
|
||||||
|
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||||
|
# 52,56,60,64)
|
||||||
|
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||||
|
# 116,120,124,128,
|
||||||
|
# 132,136,140,144)
|
||||||
|
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||||
|
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||||
|
# 189, 192,196;
|
||||||
|
# 5G: channel 7,8,11,12,16,34)
|
||||||
|
}
|
||||||
|
|
||||||
|
## Set CFG data for Tx power limitation
|
||||||
|
##
|
||||||
|
## TLVStartFreq: Starting Frequency of the band for this channel
|
||||||
|
## 2407, 2414 or 2400 for 2.4 GHz
|
||||||
|
## 5000
|
||||||
|
## 4000
|
||||||
|
## TLVChanWidth: Channel Width
|
||||||
|
## 20
|
||||||
|
## TLVChanNum : Channel Number
|
||||||
|
## TLVPwr[] : ModulationGroup
|
||||||
|
## 0: CCK (1,2,5.5,11 Mbps)
|
||||||
|
## 1: OFDM (6,9,12,18 Mbps)
|
||||||
|
## 2: OFDM (24,36 Mbps)
|
||||||
|
## 3: OFDM (48,54 Mbps)
|
||||||
|
## 4: HT20 (MCS0,1,2)
|
||||||
|
## 5: HT20 (MCS3,4)
|
||||||
|
## 6: HT20 (MCS5,6,7)
|
||||||
|
## 7: HT40 (MCS0,1,2)
|
||||||
|
## 8: HT40 (MCS3,4)
|
||||||
|
## 9: HT40 (MCS5,6,7)
|
||||||
|
## 10: HT2_20 (MCS8,9,10)
|
||||||
|
## 11: HT2_20 (MCS11,12)
|
||||||
|
## 12: HT2_20 (MCS13,14,15)
|
||||||
|
## 13: HT2_40 (MCS8,9,10)
|
||||||
|
## 14: HT2_40 (MCS11,12)
|
||||||
|
## 15: HT2_40 (MCS13,14,15)
|
||||||
|
## 16: VHT_QAM256 (MCS8)
|
||||||
|
## 17: VHT_40_QAM256 (MCS8,9)
|
||||||
|
## 18: VHT_80_PSK (MCS0,1,2)
|
||||||
|
## 19: VHT_80_QAM16 (MCS3,4)
|
||||||
|
## 20: VHT_80_QAM64 (MCS5,6,7)
|
||||||
|
## 21: VHT_80_QAM256 (MCS8,9)
|
||||||
|
## 22: VHT2_20_QAM256 (MCS8,9)
|
||||||
|
## 23: VHT2_40_QAM256 (MCS8,9)
|
||||||
|
## 24: VHT2_80_PSK (MCS0, 1, 2)
|
||||||
|
## 25: VHT2_80_QAM16 (MCS3,4)
|
||||||
|
## 26: VHT2_80_QAM64 (MCS5,6,7)
|
||||||
|
## 27: VHT2_80_QAM256 (MCS8,9)
|
||||||
|
## 28: HE_20_QAM256 (MCS8,9)
|
||||||
|
## 29: HE_20_QAM1024 (MCS10,11)
|
||||||
|
## 30: HE_40_QAM1024 (MCS10,11)
|
||||||
|
## 31: HE_80_QAM1024 (MCS10,11)
|
||||||
|
## 32: HE2_20_QAM256 (MCS8,9)
|
||||||
|
## 33: HE2_20_QAM1024 (MCS10,11)
|
||||||
|
## 34: HE2_40_QAM1024 (MCS10,11)
|
||||||
|
## 35: HE2_80_QAM1024 (MCS10,11)
|
||||||
|
## Power Limit in dBm
|
||||||
|
##
|
||||||
|
## Note: For KF, add VHT 20/40/80 1SS/2SS mod group.
|
||||||
|
|
||||||
|
## 2G subband0 Tx power limit CFG
|
||||||
|
txpwrlimit_2g_cfg_set={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=1 # 1 - SET
|
||||||
|
SubBand:2=0 # do NOT use this member in set cmd
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=1
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=2
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=3
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=4
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=5
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=6
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=7
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=8
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=9
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=10
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=11
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=12
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=13
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=2407
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=14
|
||||||
|
TLVPwr:72='0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,10,29,10,30,10,31,0,32,10,33,10,34,10,35,0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## 5G subband1 Tx power limit CFG
|
||||||
|
txpwrlimit_5g_cfg_set_sub0={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=1 # 1 - SET
|
||||||
|
SubBand:2=0 # do NOT use this member in set cmd
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=36
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,20,5,20,6,18,7,20,8,20,9,18,10,20,11,20,12,18,13,20,14,20,15,18,16,17,17,17,18,20,19,19,20,17,21,16,22,17,23,17,24,20,25,19,26,17,27,16,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=40
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,20,5,20,6,18,7,20,8,20,9,18,10,20,11,20,12,18,13,20,14,20,15,18,16,17,17,17,18,20,19,19,20,17,21,16,22,17,23,17,24,20,25,19,26,17,27,16,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=44
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,20,5,20,6,18,7,20,8,20,9,18,10,20,11,20,12,18,13,20,14,20,15,18,16,18,17,17,18,20,19,19,20,17,21,16,22,18,23,17,24,20,25,19,26,17,27,16,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=48
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,20,5,20,6,18,7,20,8,20,9,18,10,20,11,20,12,18,13,20,14,20,15,18,16,18,17,17,18,20,19,19,20,17,21,16,22,18,23,17,24,20,25,19,26,17,27,16,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=52
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,20,5,20,6,18,7,20,8,20,9,19,10,20,11,20,12,18,13,20,14,20,15,19,16,18,17,17,18,19,19,19,20,18,21,17,22,18,23,17,24,19,25,19,26,18,27,17,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=56
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,20,5,20,6,18,7,20,8,20,9,19,10,20,11,20,12,18,13,20,14,20,15,19,16,18,17,17,18,19,19,19,20,18,21,17,22,18,23,17,24,19,25,19,26,18,27,17,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=60
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,20,5,20,6,18,7,20,8,20,9,19,10,20,11,20,12,18,13,20,14,20,15,19,16,18,17,17,18,19,19,19,20,18,21,17,22,18,23,17,24,19,25,19,26,18,27,17,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=64
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,20,5,20,6,18,7,20,8,20,9,19,10,20,11,20,12,18,13,20,14,20,15,19,16,18,17,17,18,19,19,19,20,18,21,17,22,18,23,17,24,19,25,19,26,18,27,17,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
## 5G subband2 Tx power limit CFG
|
||||||
|
txpwrlimit_5g_cfg_set_sub1={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=1 # 1 - SET
|
||||||
|
SubBand:2=0 # do NOT use this member in set cmd
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=100
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,20,4,18,5,18,6,19,7,18,8,18,9,18,10,18,11,18,12,19,13,18,14,18,15,18,16,18,17,16,18,18,19,19,20,18,21,16,22,18,23,16,24,18,25,19,26,18,27,16,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=104
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,20,4,18,5,18,6,18,7,18,8,18,9,18,10,18,11,18,12,18,13,18,14,18,15,18,16,18,17,16,18,18,19,19,20,18,21,16,22,18,23,16,24,18,25,19,26,18,27,16,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=108
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,20,4,18,5,18,6,19,7,18,8,18,9,17,10,18,11,18,12,19,13,18,14,18,15,17,16,18,17,16,18,18,19,19,20,18,21,16,22,18,23,16,24,18,25,19,26,18,27,16,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=112
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,20,4,18,5,18,6,19,7,18,8,18,9,17,10,18,11,18,12,19,13,18,14,18,15,17,16,17,17,16,18,18,19,19,20,18,21,16,22,17,23,16,24,18,25,19,26,18,27,16,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=116
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,18,6,18,7,18,8,18,9,17,10,18,11,18,12,18,13,18,14,18,15,17,16,16,17,15,18,18,19,18,20,17,21,15,22,16,23,15,24,18,25,18,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=120
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,18,6,18,7,18,8,18,9,17,10,18,11,18,12,18,13,18,14,18,15,17,16,17,17,15,18,18,19,18,20,17,21,15,22,17,23,15,24,18,25,18,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=124
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,18,6,18,7,18,8,18,9,18,10,18,11,18,12,18,13,18,14,18,15,18,16,17,17,15,18,18,19,18,20,17,21,15,22,17,23,15,24,18,25,18,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=128
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,18,6,18,7,18,8,18,9,18,10,18,11,18,12,18,13,18,14,18,15,18,16,17,17,15,18,18,19,18,20,17,21,15,22,17,23,15,24,18,25,18,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=132
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,18,6,18,7,18,8,17,9,18,10,18,11,18,12,18,13,18,14,17,15,18,16,16,17,15,18,18,19,18,20,18,21,15,22,16,23,15,24,18,25,18,26,18,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=136
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,18,6,18,7,18,8,17,9,18,10,18,11,18,12,18,13,18,14,17,15,18,16,17,17,15,18,18,19,18,20,18,21,15,22,17,23,15,24,18,25,18,26,18,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=140
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,18,6,18,7,18,8,17,9,17,10,18,11,18,12,18,13,18,14,17,15,17,16,18,17,16,18,18,19,18,20,18,21,15,22,18,23,16,24,18,25,18,26,18,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=144
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,18,6,18,7,18,8,17,9,17,10,18,11,18,12,18,13,18,14,17,15,17,16,18,17,16,18,18,19,18,20,18,21,15,22,18,23,16,24,18,25,18,26,18,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## 5G subband3 Tx power limit CFG
|
||||||
|
txpwrlimit_5g_cfg_set_sub2={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=1 # 1 - SET
|
||||||
|
SubBand:2=0 # do NOT use this member in set cmd
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=149
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,18,7,18,8,18,9,18,10,18,11,19,12,18,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=153
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=157
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=161
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=165
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## 5G subband4 Tx power limit CFG
|
||||||
|
txpwrlimit_5g_cfg_set_sub3={
|
||||||
|
CmdCode=0x00fb # do NOT change this line
|
||||||
|
Action:2=1 # 1 - SET
|
||||||
|
SubBand:2=0 # do NOT use this in set cmd
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=4000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=183
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=4000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=184
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=4000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=185
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=4000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=187
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=4000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=188
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=4000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=189
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=4000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=192
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=4000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=196
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=7
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=8
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=11
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=12
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=16
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ChanTRPC.TlvType:2=0x0189
|
||||||
|
ChanTRPC.TlvLength:2={
|
||||||
|
TLVStartFreq:2=5000
|
||||||
|
TLVChanWidth:1=20
|
||||||
|
TLVChanNum:1=34
|
||||||
|
TLVPwr:72='0,0,1,20,2,20,3,19,4,18,5,19,6,19,7,18,8,18,9,18,10,18,11,19,12,19,13,18,14,18,15,18,16,17,17,17,18,18,19,19,20,17,21,15,22,17,23,17,24,18,25,19,26,17,27,15,28,5,29,5,30,5,31,5,32,5,33,5,34,5,35,5'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains definitions for application
|
* @brief This file contains definitions for application
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2011-2020 NXP
|
* Copyright 2011-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -136,7 +136,7 @@ enum _mlan_act_ioctl {
|
||||||
#define MLAN_ETH_PRIV (SIOCDEVPRIVATE + 14)
|
#define MLAN_ETH_PRIV (SIOCDEVPRIVATE + 14)
|
||||||
|
|
||||||
/** Command buffer max length */
|
/** Command buffer max length */
|
||||||
#define BUFFER_LENGTH (3 * 1024)
|
#define BUFFER_LENGTH (4 * 1024)
|
||||||
|
|
||||||
/** Find number of elements */
|
/** Find number of elements */
|
||||||
#define NELEMENTS(x) (sizeof(x) / sizeof(x[0]))
|
#define NELEMENTS(x) (sizeof(x) / sizeof(x[0]))
|
||||||
|
@ -357,6 +357,14 @@ struct eth_priv_get_log {
|
||||||
t_u32 channel_number;
|
t_u32 channel_number;
|
||||||
/** Channel Switch Mode */
|
/** Channel Switch Mode */
|
||||||
t_u32 channel_switch_mode;
|
t_u32 channel_switch_mode;
|
||||||
|
/** Reset Rx Mac Recovery Count */
|
||||||
|
t_u32 rx_reset_mac_recovery_cnt;
|
||||||
|
/** ISR2 Not Done Count*/
|
||||||
|
t_u32 rx_Isr2_NotDone_Cnt;
|
||||||
|
/** GDMA Abort Count */
|
||||||
|
t_u32 gdma_abort_cnt;
|
||||||
|
/** Rx Reset MAC Count */
|
||||||
|
t_u32 g_reset_rx_mac_cnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** MLAN MAC Address Length */
|
/** MLAN MAC Address Length */
|
||||||
|
@ -712,4 +720,467 @@ struct eth_priv_vhtcfg {
|
||||||
t_u16 vht_tx_max_rate;
|
t_u16 vht_tx_max_rate;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** data structure for cmd txratecfg */
|
||||||
|
struct eth_priv_tx_rate_cfg {
|
||||||
|
/* LG rate: 0, HT rate: 1, VHT rate: 2 */
|
||||||
|
t_u32 rate_format;
|
||||||
|
/** Rate/MCS index (0xFF: auto) */
|
||||||
|
t_u32 rate_index;
|
||||||
|
/** Rate rate */
|
||||||
|
t_u32 rate;
|
||||||
|
/** NSS */
|
||||||
|
t_u32 nss;
|
||||||
|
/** Rate Setting */
|
||||||
|
t_u16 rate_setting;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MLAN_11AXCMD_CFG_ID_TX_OMI 6
|
||||||
|
#define MLAN_11AXCMD_CFG_ID_OBSSNBRU_TOLTIME 7
|
||||||
|
|
||||||
|
#define MLAN_11AXCMD_TXOMI_SUBID 0x105
|
||||||
|
#define MLAN_11AXCMD_OBSS_TOLTIME_SUBID 0x106
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_he_capa for MLAN_OID_11AX_HE_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_he_capa {
|
||||||
|
/** tlv id of he capability */
|
||||||
|
t_u16 id;
|
||||||
|
/** length of the payload */
|
||||||
|
t_u16 len;
|
||||||
|
/** extension id */
|
||||||
|
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 80MHz */
|
||||||
|
t_u8 he_txrx_mcs_support[4];
|
||||||
|
/** val for txrx mcs 160Mhz or 80+80, and PPE thresholds */
|
||||||
|
t_u8 val[28];
|
||||||
|
} __ATTRIB_PACK__ mlan_ds_11ax_he_capa, *pmlan_ds_11ax_he_capa;
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_he_cfg for MLAN_OID_11AX_HE_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_he_cfg {
|
||||||
|
/** band, BIT0:2.4G, BIT1:5G*/
|
||||||
|
t_u8 band;
|
||||||
|
/** mlan_ds_11ax_he_capa */
|
||||||
|
mlan_ds_11ax_he_capa he_cap;
|
||||||
|
} __ATTRIB_PACK__ mlan_ds_11ax_he_cfg, *pmlan_ds_11ax_he_cfg;
|
||||||
|
|
||||||
|
/** Type definition of mlan_11axcmdcfg_obss_pd_offset for MLAN_OID_11AX_CMD_CFG
|
||||||
|
*/
|
||||||
|
typedef struct _mlan_11axcmdcfg_obss_pd_offset {
|
||||||
|
/** <NON_SRG_OffSET, SRG_OFFSET> */
|
||||||
|
t_u8 offset[2];
|
||||||
|
} __ATTRIB_PACK__ mlan_11axcmdcfg_obss_pd_offset;
|
||||||
|
|
||||||
|
/** Type definition of mlan_11axcmdcfg_sr_control for MLAN_OID_11AX_CMD_CFG */
|
||||||
|
typedef struct _mlan_11axcmdcfg_sr_control {
|
||||||
|
/** 1 enable, 0 disable */
|
||||||
|
t_u8 control;
|
||||||
|
} __ATTRIB_PACK__ mlan_11axcmdcfg_sr_control;
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_sr_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_sr_cmd {
|
||||||
|
/** type*/
|
||||||
|
t_u16 type;
|
||||||
|
/** length of TLV */
|
||||||
|
t_u16 len;
|
||||||
|
/** value */
|
||||||
|
union {
|
||||||
|
mlan_11axcmdcfg_obss_pd_offset obss_pd_offset;
|
||||||
|
mlan_11axcmdcfg_sr_control sr_control;
|
||||||
|
} param;
|
||||||
|
} __ATTRIB_PACK__ mlan_ds_11ax_sr_cmd, *pmlan_ds_11ax_sr_cmd;
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_beam_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_beam_cmd {
|
||||||
|
/** command value: 1 is disable, 0 is enable*/
|
||||||
|
t_u8 value;
|
||||||
|
} mlan_ds_11ax_beam_cmd, *pmlan_ds_11ax_beam_cmd;
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_htc_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_htc_cmd {
|
||||||
|
/** command value: 1 is enable, 0 is disable*/
|
||||||
|
t_u8 value;
|
||||||
|
} mlan_ds_11ax_htc_cmd, *pmlan_ds_11ax_htc_cmd;
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_txop_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_txop_cmd {
|
||||||
|
/** Two byte rts threshold value of which only 10 bits, bit 0 to bit 9
|
||||||
|
* are valid */
|
||||||
|
t_u16 rts_thres;
|
||||||
|
} mlan_ds_11ax_txop_cmd, *pmlan_ds_11ax_txop_cmd;
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_txomi_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_txomi_cmd {
|
||||||
|
/* 11ax spec 9.2.4.6a.2 OM Control 12 bits. Bit 0 to bit 11 */
|
||||||
|
t_u16 omi;
|
||||||
|
} mlan_ds_11ax_txomi_cmd, *pmlan_ds_11ax_txomi_cmd;
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_toltime_cmd for MLAN_OID_11AX_CMD_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_toltime_cmd {
|
||||||
|
/* OBSS Narrow Bandwidth RU Tolerance Time */
|
||||||
|
t_u32 tol_time;
|
||||||
|
} mlan_ds_11ax_toltime_cmd, *pmlan_ds_11ax_toltime_cmd;
|
||||||
|
|
||||||
|
/** Type definition of mlan_ds_11ax_cmd_cfg for MLAN_OID_11AX_CMD_CFG */
|
||||||
|
typedef struct _mlan_ds_11ax_cmd_cfg {
|
||||||
|
/** Sub-command */
|
||||||
|
t_u32 sub_command;
|
||||||
|
/** Sub-id */
|
||||||
|
t_u32 sub_id;
|
||||||
|
/** 802.11n configuration parameter */
|
||||||
|
union {
|
||||||
|
/** SR configuration for MLAN_11AXCMD_SR_SUBID */
|
||||||
|
mlan_ds_11ax_sr_cmd sr_cfg;
|
||||||
|
/** Beam configuration for MLAN_11AXCMD_BEAM_SUBID */
|
||||||
|
mlan_ds_11ax_beam_cmd beam_cfg;
|
||||||
|
/** HTC configuration for MLAN_11AXCMD_HTC_SUBID */
|
||||||
|
mlan_ds_11ax_htc_cmd htc_cfg;
|
||||||
|
/** HTC configuration for MLAN_11AXCMD_TXOPRTS_SUBID */
|
||||||
|
mlan_ds_11ax_txop_cmd txop_cfg;
|
||||||
|
/** HTC configuration for MLAN_11AXCMD_TXOMI_SUBID */
|
||||||
|
mlan_ds_11ax_txomi_cmd txomi_cfg;
|
||||||
|
/** HTC configuration for MLAN_11AXCMD_TXOMI_SUBID */
|
||||||
|
mlan_ds_11ax_toltime_cmd toltime_cfg;
|
||||||
|
} param;
|
||||||
|
} mlan_ds_11ax_cmd_cfg, *pmlan_ds_11ax_cmd_cfg;
|
||||||
|
|
||||||
|
/** Maximum number of AC QOS queues available in the driver/firmware */
|
||||||
|
#define MAX_AC_QUEUES 4
|
||||||
|
|
||||||
|
/** Read/Write Mac register */
|
||||||
|
#define HostCmd_CMD_MAC_REG_ACCESS 0x0019
|
||||||
|
/** Read/Write BBP register */
|
||||||
|
#define HostCmd_CMD_BBP_REG_ACCESS 0x001a
|
||||||
|
/** Read/Write RF register */
|
||||||
|
#define HostCmd_CMD_RF_REG_ACCESS 0x001b
|
||||||
|
|
||||||
|
/** Data structure of WMM Aci/Aifsn */
|
||||||
|
typedef struct _IEEEtypes_WmmAciAifsn_t {
|
||||||
|
#ifdef BIG_ENDIAN_SUPPORT
|
||||||
|
/** Reserved */
|
||||||
|
t_u8 reserved : 1;
|
||||||
|
/** Aci */
|
||||||
|
t_u8 aci : 2;
|
||||||
|
/** Acm */
|
||||||
|
t_u8 acm : 1;
|
||||||
|
/** Aifsn */
|
||||||
|
t_u8 aifsn : 4;
|
||||||
|
#else
|
||||||
|
/** Aifsn */
|
||||||
|
t_u8 aifsn : 4;
|
||||||
|
/** Acm */
|
||||||
|
t_u8 acm : 1;
|
||||||
|
/** Aci */
|
||||||
|
t_u8 aci : 2;
|
||||||
|
/** Reserved */
|
||||||
|
t_u8 reserved : 1;
|
||||||
|
#endif
|
||||||
|
} __ATTRIB_PACK__ IEEEtypes_WmmAciAifsn_t, *pIEEEtypes_WmmAciAifsn_t;
|
||||||
|
|
||||||
|
/** Data structure of WMM ECW */
|
||||||
|
typedef struct _IEEEtypes_WmmEcw_t {
|
||||||
|
#ifdef BIG_ENDIAN_SUPPORT
|
||||||
|
/** Maximum Ecw */
|
||||||
|
t_u8 ecw_max : 4;
|
||||||
|
/** Minimum Ecw */
|
||||||
|
t_u8 ecw_min : 4;
|
||||||
|
#else
|
||||||
|
/** Minimum Ecw */
|
||||||
|
t_u8 ecw_min : 4;
|
||||||
|
/** Maximum Ecw */
|
||||||
|
t_u8 ecw_max : 4;
|
||||||
|
#endif
|
||||||
|
} __ATTRIB_PACK__ IEEEtypes_WmmEcw_t, *pIEEEtypes_WmmEcw_t;
|
||||||
|
|
||||||
|
/** Data structure of WMM AC parameters */
|
||||||
|
typedef struct _IEEEtypes_WmmAcParameters_t {
|
||||||
|
IEEEtypes_WmmAciAifsn_t aci_aifsn; /**< AciAifSn */
|
||||||
|
IEEEtypes_WmmEcw_t ecw; /**< Ecw */
|
||||||
|
t_u16 tx_op_limit; /**< Tx op limit */
|
||||||
|
} __ATTRIB_PACK__ IEEEtypes_WmmAcParameters_t, *pIEEEtypes_WmmAcParameters_t;
|
||||||
|
|
||||||
|
/** HostCmd_DS_802_11_CFG_DATA */
|
||||||
|
typedef struct MAPP_HostCmd_DS_802_11_CFG_DATA {
|
||||||
|
/** Action */
|
||||||
|
t_u16 action;
|
||||||
|
/** Type */
|
||||||
|
t_u16 type;
|
||||||
|
/** Data length */
|
||||||
|
t_u16 data_len;
|
||||||
|
/** Data */
|
||||||
|
t_u8 data[1];
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_802_11_CFG_DATA;
|
||||||
|
|
||||||
|
/** Host Command ID : Configuration data */
|
||||||
|
#define HostCmd_CMD_CFG_DATA 0x008f
|
||||||
|
|
||||||
|
/** mlan_ioctl_11h_tpc_resp */
|
||||||
|
typedef struct {
|
||||||
|
int status_code; /**< Firmware command result status code */
|
||||||
|
int tx_power; /**< Reported TX Power from the TPC Report */
|
||||||
|
int link_margin; /**< Reported Link margin from the TPC Report */
|
||||||
|
int rssi; /**< RSSI of the received TPC Report frame */
|
||||||
|
} __ATTRIB_PACK__ mlan_ioctl_11h_tpc_resp;
|
||||||
|
|
||||||
|
/** Host Command ID : 802.11 TPC adapt req */
|
||||||
|
#define HostCmd_CMD_802_11_TPC_ADAPT_REQ 0x0060
|
||||||
|
|
||||||
|
/** HostCmd_DS_802_11_CRYPTO */
|
||||||
|
typedef struct MAPP_HostCmd_DS_802_11_CRYPTO {
|
||||||
|
t_u16 encdec; /**< Decrypt=0, Encrypt=1 */
|
||||||
|
t_u16 algorithm; /**< RC4=1 AES=2 , AES_KEY_WRAP=3 */
|
||||||
|
t_u16 key_IV_length; /**< Length of Key IV (bytes) */
|
||||||
|
t_u8 keyIV[32]; /**< Key IV */
|
||||||
|
t_u16 key_length; /**< Length of Key (bytes) */
|
||||||
|
t_u8 key[32]; /**< Key */
|
||||||
|
MrvlIEtypes_Data_t data; /**< Plain text if encdec=Encrypt, Ciphertext
|
||||||
|
data if encdec=Decrypt*/
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_802_11_CRYPTO;
|
||||||
|
|
||||||
|
/** HostCmd_DS_802_11_CRYPTO_AES_CCM */
|
||||||
|
typedef struct MAPP_HostCmd_DS_802_11_CRYPTO_AES_CCM {
|
||||||
|
t_u16 encdec; /**< Decrypt=0, Encrypt=1 */
|
||||||
|
t_u16 algorithm; /**< AES_CCM=4 */
|
||||||
|
t_u16 key_length; /**< Length of Key (bytes) */
|
||||||
|
t_u8 key[32]; /**< Key */
|
||||||
|
t_u16 nonce_length; /**< Length of Nonce (bytes) */
|
||||||
|
t_u8 nonce[14]; /**< Nonce */
|
||||||
|
t_u16 AAD_length; /**< Length of AAD (bytes) */
|
||||||
|
t_u8 AAD[32]; /**< AAD */
|
||||||
|
MrvlIEtypes_Data_t data; /**< Plain text if encdec=Encrypt, Ciphertext
|
||||||
|
data if encdec=Decrypt*/
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_802_11_CRYPTO_AES_CCM;
|
||||||
|
|
||||||
|
/** HostCmd_DS_802_11_CRYPTO_WAPI */
|
||||||
|
typedef struct MAPP_HostCmd_DS_802_11_CRYPTO_WAPI {
|
||||||
|
t_u16 encdec; /**< Decrypt=0, Encrypt=1 */
|
||||||
|
t_u16 algorithm; /**< WAPI =5 */
|
||||||
|
t_u16 key_length; /**< Length of Key (bytes) */
|
||||||
|
t_u8 key[32]; /**< Key */
|
||||||
|
t_u16 nonce_length; /**< Length of Nonce (bytes) */
|
||||||
|
t_u8 nonce[16]; /**< Nonce */
|
||||||
|
t_u16 AAD_length; /**< Length of AAD (bytes) */
|
||||||
|
t_u8 AAD[48]; /**< AAD */
|
||||||
|
t_u16 data_length; /**< Length of data (bytes) */
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_802_11_CRYPTO_WAPI;
|
||||||
|
/** WAPI cipher test */
|
||||||
|
#define CIPHER_TEST_WAPI (5)
|
||||||
|
/** AES CCM cipher test */
|
||||||
|
#define CIPHER_TEST_AES_CCM (4)
|
||||||
|
/** GCMP cipher test */
|
||||||
|
#define CIPHER_TEST_GCMP (6)
|
||||||
|
/** Host Command ID : 802.11 crypto */
|
||||||
|
#define HostCmd_CMD_802_11_CRYPTO 0x0078
|
||||||
|
|
||||||
|
/** HostCmd_DS_802_11_SUBSCRIBE_EVENT */
|
||||||
|
typedef struct MAPP_HostCmd_DS_802_11_SUBSCRIBE_EVENT {
|
||||||
|
/** Action */
|
||||||
|
t_u16 action;
|
||||||
|
/** Events */
|
||||||
|
t_u16 events;
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_802_11_SUBSCRIBE_EVENT;
|
||||||
|
|
||||||
|
/** MrvlIEtypes_RssiParamSet_t */
|
||||||
|
typedef struct MrvlIEtypes_RssiThreshold {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** RSSI value */
|
||||||
|
t_u8 RSSI_value;
|
||||||
|
/** RSSI frequency */
|
||||||
|
t_u8 RSSI_freq;
|
||||||
|
} __ATTRIB_PACK__ MrvlIEtypes_RssiThreshold_t;
|
||||||
|
|
||||||
|
/** MrvlIEtypes_SnrThreshold_t */
|
||||||
|
typedef struct MrvlIEtypes_SnrThreshold {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** SNR value */
|
||||||
|
t_u8 SNR_value;
|
||||||
|
/** SNR frequency */
|
||||||
|
t_u8 SNR_freq;
|
||||||
|
} __ATTRIB_PACK__ MrvlIEtypes_SnrThreshold_t;
|
||||||
|
|
||||||
|
/** MrvlIEtypes_FailureCount_t */
|
||||||
|
typedef struct MrvlIEtypes_FailureCount {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** Failure value */
|
||||||
|
t_u8 fail_value;
|
||||||
|
/** Failure frequency */
|
||||||
|
t_u8 fail_freq;
|
||||||
|
} __ATTRIB_PACK__ MrvlIEtypes_FailureCount_t;
|
||||||
|
|
||||||
|
/** MrvlIEtypes_BeaconsMissed_t */
|
||||||
|
typedef struct MrvlIEtypes_BeaconsMissed {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** Number of beacons missed */
|
||||||
|
t_u8 beacon_missed;
|
||||||
|
/** Reserved */
|
||||||
|
t_u8 reserved;
|
||||||
|
} __ATTRIB_PACK__ MrvlIEtypes_BeaconsMissed_t;
|
||||||
|
|
||||||
|
/** MrvlIEtypes_LinkQuality_t */
|
||||||
|
typedef struct MrvlIEtypes_LinkQuality {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** Link SNR threshold */
|
||||||
|
t_u16 link_SNR_thrs;
|
||||||
|
/** Link SNR frequency */
|
||||||
|
t_u16 link_SNR_freq;
|
||||||
|
/** Minimum rate value */
|
||||||
|
t_u16 min_rate_val;
|
||||||
|
/** Minimum rate frequency */
|
||||||
|
t_u16 min_rate_freq;
|
||||||
|
/** Tx latency value */
|
||||||
|
t_u32 tx_latency_val;
|
||||||
|
/** Tx latency threshold */
|
||||||
|
t_u32 tx_latency_thrs;
|
||||||
|
} __ATTRIB_PACK__ MrvlIEtypes_LinkQuality_t;
|
||||||
|
|
||||||
|
/** Host Command ID : 802.11 subscribe event */
|
||||||
|
#define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075
|
||||||
|
|
||||||
|
/** TLV type : Beacon RSSI low */
|
||||||
|
#define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 0x04) /* 0x0104 */
|
||||||
|
/** TLV type : Beacon SNR low */
|
||||||
|
#define TLV_TYPE_SNR_LOW (PROPRIETARY_TLV_BASE_ID + 0x05) /* 0x0105 */
|
||||||
|
/** TLV type : Fail count */
|
||||||
|
#define TLV_TYPE_FAILCOUNT (PROPRIETARY_TLV_BASE_ID + 0x06) /* 0x0106 */
|
||||||
|
/** TLV type : BCN miss */
|
||||||
|
#define TLV_TYPE_BCNMISS (PROPRIETARY_TLV_BASE_ID + 0x07) /* 0x0107 */
|
||||||
|
/** TLV type : Beacon RSSI high */
|
||||||
|
#define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 0x16) /* 0x0116 */
|
||||||
|
/** TLV type : Beacon SNR high */
|
||||||
|
#define TLV_TYPE_SNR_HIGH (PROPRIETARY_TLV_BASE_ID + 0x17) /* 0x0117 */
|
||||||
|
|
||||||
|
/** TLV type :Link Quality */
|
||||||
|
#define TLV_TYPE_LINK_QUALITY (PROPRIETARY_TLV_BASE_ID + 0x24) /* 0x0124 */
|
||||||
|
|
||||||
|
/** TLV type : Data RSSI low */
|
||||||
|
#define TLV_TYPE_RSSI_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x26) /* 0x0126 */
|
||||||
|
/** TLV type : Data SNR low */
|
||||||
|
#define TLV_TYPE_SNR_LOW_DATA (PROPRIETARY_TLV_BASE_ID + 0x27) /* 0x0127 */
|
||||||
|
/** TLV type : Data RSSI high */
|
||||||
|
#define TLV_TYPE_RSSI_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x28) /* 0x0128 */
|
||||||
|
/** TLV type : Data SNR high */
|
||||||
|
#define TLV_TYPE_SNR_HIGH_DATA (PROPRIETARY_TLV_BASE_ID + 0x29) /* 0x0129 */
|
||||||
|
|
||||||
|
/** MrvlIEtypes_PreBeaconLost_t */
|
||||||
|
typedef struct MrvlIEtypes_PreBeaconLost {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** Pre-Beacon Lost */
|
||||||
|
t_u8 pre_beacon_lost;
|
||||||
|
/** Reserved */
|
||||||
|
t_u8 reserved;
|
||||||
|
} __ATTRIB_PACK__ MrvlIEtypes_PreBeaconLost_t;
|
||||||
|
|
||||||
|
/** TLV type: Pre-Beacon Lost */
|
||||||
|
#define TLV_TYPE_PRE_BEACON_LOST (PROPRIETARY_TLV_BASE_ID + 0x49) /* 0x0149 */
|
||||||
|
|
||||||
|
/** AutoTx_MacFrame_t */
|
||||||
|
typedef struct AutoTx_MacFrame {
|
||||||
|
t_u16 interval; /**< in seconds */
|
||||||
|
t_u8 priority; /**< User Priority: 0~7, ignored if non-WMM */
|
||||||
|
t_u8 reserved; /**< set to 0 */
|
||||||
|
t_u16 frame_len; /**< Length of MAC frame payload */
|
||||||
|
t_u8 dest_mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Destination MAC address
|
||||||
|
*/
|
||||||
|
t_u8 src_mac_addr[MLAN_MAC_ADDR_LENGTH]; /**< Source MAC address */
|
||||||
|
t_u8 payload[]; /**< Payload */
|
||||||
|
} __ATTRIB_PACK__ AutoTx_MacFrame_t;
|
||||||
|
|
||||||
|
/** MrvlIEtypes_AutoTx_t */
|
||||||
|
typedef struct MrvlIEtypes_AutoTx {
|
||||||
|
MrvlIEtypesHeader_t header; /**< Header */
|
||||||
|
AutoTx_MacFrame_t auto_tx_mac_frame; /**< Auto Tx MAC frame */
|
||||||
|
} __ATTRIB_PACK__ MrvlIEtypes_AutoTx_t;
|
||||||
|
|
||||||
|
/** HostCmd_DS_802_11_AUTO_TX */
|
||||||
|
typedef struct MAPP_HostCmd_DS_802_11_AUTO_TX {
|
||||||
|
/** Action */
|
||||||
|
t_u16 action; /* 0 = ACT_GET; 1 = ACT_SET; */
|
||||||
|
MrvlIEtypes_AutoTx_t auto_tx; /**< Auto Tx */
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_802_11_AUTO_TX;
|
||||||
|
|
||||||
|
/** Host Command ID : 802.11 auto Tx */
|
||||||
|
#define HostCmd_CMD_802_11_AUTO_TX 0x0082
|
||||||
|
|
||||||
|
/** TLV type : Auto Tx */
|
||||||
|
#define TLV_TYPE_AUTO_TX (PROPRIETARY_TLV_BASE_ID + 0x18) /* 0x0118 */
|
||||||
|
|
||||||
|
/** Host Command ID : CAU register access */
|
||||||
|
#define HostCmd_CMD_CAU_REG_ACCESS 0x00ed
|
||||||
|
|
||||||
|
/** Host Command ID : Memory access */
|
||||||
|
#define HostCmd_CMD_MEM_ACCESS 0x0086
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
t_u32 timeSinceLastQuery_ms; /**< Duration of stats collection */
|
||||||
|
|
||||||
|
t_u16 bcnCnt; /**< Number of beacons received */
|
||||||
|
t_u16 bcnMiss; /**< Estimate of beacons missed */
|
||||||
|
t_s16 bcnRssiAvg; /**< Avg beacon RSSI */
|
||||||
|
t_s16 bcnSnrAvg; /**< Avg beacon SNR */
|
||||||
|
|
||||||
|
t_u32 rxPkts; /**< Number of packets received */
|
||||||
|
t_s16 rxRssiAvg; /**< Avg received packet RSSI */
|
||||||
|
t_s16 rxSnrAvg; /**< Avg received packet SNR */
|
||||||
|
|
||||||
|
t_u32 txPkts; /**< Number of packets transmitted */
|
||||||
|
t_u32 txAttempts; /**< Number of attempts made */
|
||||||
|
t_u32 txFailures; /**< Number of pkts that failed */
|
||||||
|
t_u8 txInitRate; /**< Current rate adaptation TX rateid */
|
||||||
|
t_u8 reserved[3]; /**< Reserved */
|
||||||
|
|
||||||
|
t_u16 txQueuePktCnt[MAX_AC_QUEUES]; /**< Number of packets per AC */
|
||||||
|
t_u32 txQueueDelay[MAX_AC_QUEUES]; /**< Averge queue delay per AC*/
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_LINK_STATS_SUMMARY;
|
||||||
|
|
||||||
|
#define HostCmd_CMD_LINK_STATS_SUMMARY 0x00d3
|
||||||
|
|
||||||
|
/** Type enumeration of WMM AC_QUEUES */
|
||||||
|
typedef enum _wmm_ac {
|
||||||
|
AC_BE,
|
||||||
|
AC_BK,
|
||||||
|
AC_VI,
|
||||||
|
AC_VO,
|
||||||
|
} wmm_ac;
|
||||||
|
|
||||||
|
/** Data structure of Host command WMM_PARAM_CFG */
|
||||||
|
typedef struct _HostCmd_DS_WMM_PARAM_CONFIG {
|
||||||
|
/** action */
|
||||||
|
t_u16 action;
|
||||||
|
/** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */
|
||||||
|
IEEEtypes_WmmAcParameters_t ac_params[MAX_AC_QUEUES];
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_WMM_PARAM_CONFIG;
|
||||||
|
|
||||||
|
/** Host Command ID : Configure ADHOC_OVER_IP parameters */
|
||||||
|
#define HostCmd_CMD_WMM_PARAM_CONFIG 0x023a
|
||||||
|
|
||||||
|
/** HostCmd_DS_REG */
|
||||||
|
typedef struct MAPP_HostCmd_DS_REG {
|
||||||
|
/** Read or write */
|
||||||
|
t_u16 action;
|
||||||
|
/** Register offset */
|
||||||
|
t_u16 offset;
|
||||||
|
/** Value */
|
||||||
|
t_u32 value;
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_REG;
|
||||||
|
|
||||||
|
/** HostCmd_DS_MEM */
|
||||||
|
typedef struct MAPP_HostCmd_DS_MEM {
|
||||||
|
/** Read or write */
|
||||||
|
t_u16 action;
|
||||||
|
/** Reserved */
|
||||||
|
t_u16 reserved;
|
||||||
|
/** Address */
|
||||||
|
t_u32 addr;
|
||||||
|
/** Value */
|
||||||
|
t_u32 value;
|
||||||
|
} __ATTRIB_PACK__ HostCmd_DS_MEM;
|
||||||
|
|
||||||
#endif /* _MLANUTL_H_ */
|
#endif /* _MLANUTL_H_ */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the functions for station ioctl.
|
* @brief This file contains the functions for station ioctl.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2011-2020 NXP
|
* Copyright 2011-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
#include "mlan_main.h"
|
#include "mlan_main.h"
|
||||||
#include "mlan_wmm.h"
|
#include "mlan_wmm.h"
|
||||||
#include "mlan_11n.h"
|
#include "mlan_11n.h"
|
||||||
|
#include "mlan_11ac.h"
|
||||||
|
|
||||||
#define NO_NSS_SUPPORT 0x3
|
#define NO_NSS_SUPPORT 0x3
|
||||||
|
|
||||||
|
@ -372,7 +373,7 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
||||||
nss);
|
nss);
|
||||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||||
if ((rx_nss != 0) && (nss > rx_nss))
|
if ((tx_nss != 0) && (nss > tx_nss))
|
||||||
cfg_value = NO_NSS_SUPPORT;
|
cfg_value = NO_NSS_SUPPORT;
|
||||||
#endif
|
#endif
|
||||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||||
|
@ -592,15 +593,15 @@ void wlan_show_dot11acdevcap(pmlan_adapter pmadapter, t_u32 cap)
|
||||||
switch (GET_VHTCAP_MAXMPDULEN(cap)) {
|
switch (GET_VHTCAP_MAXMPDULEN(cap)) {
|
||||||
case 0x0:
|
case 0x0:
|
||||||
PRINTM(MINFO,
|
PRINTM(MINFO,
|
||||||
"GET_HW_SPEC: Maximum MSDU length = 3895 octets\n");
|
"GET_HW_SPEC: Maximum MPDU length = 3895 octets\n");
|
||||||
break;
|
break;
|
||||||
case 0x1:
|
case 0x1:
|
||||||
PRINTM(MINFO,
|
PRINTM(MINFO,
|
||||||
"GET_HW_SPEC: Maximum MSDU length = 7991 octets\n");
|
"GET_HW_SPEC: Maximum MPDU length = 7991 octets\n");
|
||||||
break;
|
break;
|
||||||
case 0x2:
|
case 0x2:
|
||||||
PRINTM(MINFO,
|
PRINTM(MINFO,
|
||||||
"GET_HW_SPEC: Maximum MSDU length = 11454 octets\n");
|
"GET_HW_SPEC: Maximum MPDU length = 11454 octets\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PRINTM(MINFO, "Unsupport value\n");
|
PRINTM(MINFO, "Unsupport value\n");
|
||||||
|
@ -937,6 +938,146 @@ void wlan_fill_vht_cap_ie(mlan_private *priv, IEEEtypes_VHTCap_t *pvht_cap,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief This function check if AP is in 11ac mode
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private structure
|
||||||
|
*
|
||||||
|
* @return MTRUE/MFALSE
|
||||||
|
*/
|
||||||
|
t_u8 wlan_is_ap_in_11ac_mode(mlan_private *priv)
|
||||||
|
{
|
||||||
|
BSSDescriptor_t *pbss_desc;
|
||||||
|
IEEEtypes_VHTOprat_t *vht_oprat = MNULL;
|
||||||
|
pbss_desc = &priv->curr_bss_params.bss_descriptor;
|
||||||
|
vht_oprat = pbss_desc->pvht_oprat;
|
||||||
|
if (!pbss_desc->pvht_cap)
|
||||||
|
return MFALSE;
|
||||||
|
if (vht_oprat && (vht_oprat->ieee_hdr.element_id == VHT_OPERATION)) {
|
||||||
|
if (vht_oprat->chan_width == VHT_OPER_CHWD_20_40MHZ)
|
||||||
|
return MFALSE;
|
||||||
|
else
|
||||||
|
return MTRUE;
|
||||||
|
} else
|
||||||
|
return MFALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function fills the VHTOperation ie out put format is CPU
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private structure
|
||||||
|
* @param vht_oprat A pointer to IEEEtypes_VHTOprat_t structure
|
||||||
|
* @param sta_ptr A pointer to sta_node
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
void wlan_fill_tdls_vht_oprat_ie(mlan_private *priv,
|
||||||
|
IEEEtypes_VHTOprat_t *vht_oprat,
|
||||||
|
sta_node *sta_ptr)
|
||||||
|
{
|
||||||
|
t_u8 supp_chwd_set;
|
||||||
|
t_u8 peer_supp_chwd_set;
|
||||||
|
t_u8 ap_supp_chwd_set;
|
||||||
|
t_u32 usr_vht_cap_info;
|
||||||
|
|
||||||
|
t_u16 mcs_map_user = 0;
|
||||||
|
t_u16 mcs_map_resp = 0;
|
||||||
|
t_u16 mcs_map_result = 0;
|
||||||
|
t_u16 mcs_user = 0;
|
||||||
|
t_u16 mcs_resp = 0;
|
||||||
|
t_u16 nss;
|
||||||
|
t_u8 chan_bw = 0;
|
||||||
|
BSSDescriptor_t *pbss_desc;
|
||||||
|
IEEEtypes_VHTCap_t *pvht_cap = &sta_ptr->vht_cap;
|
||||||
|
IEEEtypes_VHTCap_t *ap_vht_cap = MNULL;
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
pbss_desc = &priv->curr_bss_params.bss_descriptor;
|
||||||
|
|
||||||
|
/* Check if AP is in 11ac mode */
|
||||||
|
if (MFALSE == wlan_is_ap_in_11ac_mode(priv)) {
|
||||||
|
if (sta_ptr->ExtCap.ieee_hdr.element_id != EXT_CAPABILITY) {
|
||||||
|
PRINTM(MMSG, "No Peer's Ext_cap info\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!ISSUPP_EXTCAP_TDLS_WIDER_BANDWIDTH(
|
||||||
|
sta_ptr->ExtCap.ext_cap)) {
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"Peer don't support Wider Bandwitch in Ext_cap\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ap_vht_cap = pbss_desc->pvht_cap;
|
||||||
|
}
|
||||||
|
|
||||||
|
vht_oprat->ieee_hdr.element_id = VHT_OPERATION;
|
||||||
|
vht_oprat->ieee_hdr.len =
|
||||||
|
sizeof(IEEEtypes_VHTOprat_t) - sizeof(IEEEtypes_Header_t);
|
||||||
|
|
||||||
|
if (pbss_desc->bss_band & BAND_A)
|
||||||
|
usr_vht_cap_info = priv->usr_dot_11ac_dev_cap_a;
|
||||||
|
else
|
||||||
|
usr_vht_cap_info = priv->usr_dot_11ac_dev_cap_bg;
|
||||||
|
|
||||||
|
/* find the minmum bandwith between AP/TDLS peers */
|
||||||
|
supp_chwd_set = GET_VHTCAP_CHWDSET(usr_vht_cap_info);
|
||||||
|
peer_supp_chwd_set = GET_VHTCAP_CHWDSET(pvht_cap->vht_cap.vht_cap_info);
|
||||||
|
supp_chwd_set = MIN(supp_chwd_set, peer_supp_chwd_set);
|
||||||
|
|
||||||
|
/* We need check AP's bandwidth when TDLS_WIDER_BANDWIDTH is off */
|
||||||
|
if (ap_vht_cap &&
|
||||||
|
!ISSUPP_EXTCAP_TDLS_WIDER_BANDWIDTH(sta_ptr->ExtCap.ext_cap)) {
|
||||||
|
ap_supp_chwd_set =
|
||||||
|
GET_VHTCAP_CHWDSET(ap_vht_cap->vht_cap.vht_cap_info);
|
||||||
|
supp_chwd_set = MIN(supp_chwd_set, ap_supp_chwd_set);
|
||||||
|
}
|
||||||
|
switch (supp_chwd_set) {
|
||||||
|
case VHT_CAP_CHWD_80MHZ:
|
||||||
|
vht_oprat->chan_width = VHT_OPER_CHWD_80MHZ;
|
||||||
|
break;
|
||||||
|
case VHT_CAP_CHWD_160MHZ:
|
||||||
|
vht_oprat->chan_width = VHT_OPER_CHWD_160MHZ;
|
||||||
|
break;
|
||||||
|
case VHT_CAP_CHWD_80_80MHZ:
|
||||||
|
vht_oprat->chan_width = VHT_OPER_CHWD_80_80MHZ;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fill BASIC VHT MCS and NSS Set */
|
||||||
|
/* rx MCS Set, find the minimum of the user rx mcs and peer rx mcs*/
|
||||||
|
mcs_map_user = GET_DEVRXMCSMAP(priv->usr_dot_11ac_mcs_support);
|
||||||
|
mcs_map_resp = pvht_cap->vht_cap.mcs_sets.rx_mcs_map;
|
||||||
|
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 ((mcs_user == NO_NSS_SUPPORT) ||
|
||||||
|
(mcs_resp == NO_NSS_SUPPORT))
|
||||||
|
SET_VHTNSSMCS(mcs_map_result, nss, NO_NSS_SUPPORT);
|
||||||
|
else
|
||||||
|
SET_VHTNSSMCS(mcs_map_result, nss,
|
||||||
|
MIN(mcs_user, mcs_resp));
|
||||||
|
}
|
||||||
|
/* Basic MCS map */
|
||||||
|
vht_oprat->basic_MCS_map = mcs_map_result;
|
||||||
|
switch (vht_oprat->chan_width) {
|
||||||
|
case VHT_OPER_CHWD_80MHZ:
|
||||||
|
chan_bw = CHANNEL_BW_80MHZ;
|
||||||
|
break;
|
||||||
|
case VHT_OPER_CHWD_160MHZ:
|
||||||
|
chan_bw = CHANNEL_BW_160MHZ;
|
||||||
|
break;
|
||||||
|
case VHT_OPER_CHWD_80_80MHZ:
|
||||||
|
chan_bw = CHANNEL_BW_80MHZ;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
vht_oprat->chan_center_freq_1 = wlan_get_center_freq_idx(
|
||||||
|
priv, BAND_AAC, pbss_desc->channel, chan_bw);
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function would check whether support 80+80Mhz
|
* @brief This function would check whether support 80+80Mhz
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the functions for station ioctl.
|
* @brief This file contains the functions for station ioctl.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2011-2020 NXP
|
* Copyright 2011-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -35,12 +35,16 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
||||||
t_u16 bands, t_u8 flag, t_u8 bw_80p80);
|
t_u16 bands, t_u8 flag, t_u8 bw_80p80);
|
||||||
void wlan_fill_vht_cap_ie(mlan_private *priv, IEEEtypes_VHTCap_t *pvht_cap,
|
void wlan_fill_vht_cap_ie(mlan_private *priv, IEEEtypes_VHTCap_t *pvht_cap,
|
||||||
t_u16 bands);
|
t_u16 bands);
|
||||||
|
void wlan_fill_tdls_vht_oprat_ie(mlan_private *priv,
|
||||||
|
IEEEtypes_VHTOprat_t *vht_oprat,
|
||||||
|
sta_node *sta_ptr);
|
||||||
|
t_u8 wlan_is_ap_in_11ac_mode(mlan_private *priv);
|
||||||
int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||||
t_u8 **ppbuffer);
|
t_u8 **ppbuffer);
|
||||||
mlan_status wlan_11ac_cfg_ioctl(pmlan_adapter pmadapter,
|
mlan_status wlan_11ac_cfg_ioctl(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
void wlan_update_11ac_cap(mlan_private *pmpriv);
|
void wlan_update_11ac_cap(mlan_private *pmpriv);
|
||||||
t_u8 wlan_11ac_bandconfig_allowed(mlan_private *pmpriv, t_u8 bss_band);
|
t_u8 wlan_11ac_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band);
|
||||||
t_u8 wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc);
|
t_u8 wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc);
|
||||||
|
|
||||||
mlan_status wlan_cmd_11ac_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
mlan_status wlan_cmd_11ac_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the functions for 11ax related features.
|
* @brief This file contains the functions for 11ax related features.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2018-2020 NXP
|
* Copyright 2018-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -47,6 +47,7 @@
|
||||||
Global Functions
|
Global Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
|
#if 0
|
||||||
/**
|
/**
|
||||||
* @brief This function prints the 802.11ax HE mac capability
|
* @brief This function prints the 802.11ax HE mac capability
|
||||||
*
|
*
|
||||||
|
@ -55,13 +56,14 @@
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void wlan_show_dot11axmaccap(pmlan_adapter pmadapter, t_u32 cap)
|
static void wlan_show_dot11axmaccap(pmlan_adapter pmadapter, t_u32 cap)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function check if AP support TWT Response.
|
* @brief This function check if AP support TWT Response.
|
||||||
|
@ -70,7 +72,7 @@ void wlan_show_dot11axmaccap(pmlan_adapter pmadapter, t_u32 cap)
|
||||||
*
|
*
|
||||||
* @return MTRUE/MFALSE
|
* @return MTRUE/MFALSE
|
||||||
*/
|
*/
|
||||||
t_u8 wlan_check_ap_11ax_twt_supported(BSSDescriptor_t *pbss_desc)
|
static t_u8 wlan_check_ap_11ax_twt_supported(BSSDescriptor_t *pbss_desc)
|
||||||
{
|
{
|
||||||
if (!pbss_desc->phe_cap)
|
if (!pbss_desc->phe_cap)
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
|
@ -123,6 +125,7 @@ t_u8 wlan_check_11ax_twt_supported(mlan_private *pmpriv,
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/**
|
/**
|
||||||
* @brief This function prints the 802.11ax HE PHY cap
|
* @brief This function prints the 802.11ax HE PHY cap
|
||||||
*
|
*
|
||||||
|
@ -131,14 +134,14 @@ t_u8 wlan_check_11ax_twt_supported(mlan_private *pmpriv,
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void wlan_show_dot11axphycap(pmlan_adapter pmadapter, t_u32 support)
|
static void wlan_show_dot11axphycap(pmlan_adapter pmadapter, t_u32 support)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @brief This function fills the HE cap tlv out put format is LE, not CPU
|
* @brief This function fills the HE cap tlv out put format is LE, not CPU
|
||||||
*
|
*
|
||||||
|
@ -718,7 +721,7 @@ mlan_status wlan_ret_11ax_cmd(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
HostCmd_DS_11AX_CMD_CFG *axcmd = &resp->params.axcmd;
|
HostCmd_DS_11AX_CMD_CFG *axcmd = &resp->params.axcmd;
|
||||||
MrvlIEtypes_Data_t *tlv = MNULL;
|
MrvlIEtypes_Data_t *tlv = MNULL;
|
||||||
t_s16 left_len = 0;
|
t_s16 left_len = 0;
|
||||||
t_u16 tlv_type = 0, tlv_len = 0;
|
t_u16 tlv_len = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -735,8 +738,7 @@ mlan_status wlan_ret_11ax_cmd(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
resp->size - sizeof(HostCmd_DS_11AX_CMD_CFG) - S_DS_GEN;
|
resp->size - sizeof(HostCmd_DS_11AX_CMD_CFG) - S_DS_GEN;
|
||||||
// tlv = (MrvlIEtypes_Extension_t *)axcfg->val;
|
// tlv = (MrvlIEtypes_Extension_t *)axcfg->val;
|
||||||
tlv = (MrvlIEtypes_Data_t *)axcmd->val;
|
tlv = (MrvlIEtypes_Data_t *)axcmd->val;
|
||||||
while (left_len > sizeof(MrvlIEtypesHeader_t)) {
|
while (left_len > (t_s16)sizeof(MrvlIEtypesHeader_t)) {
|
||||||
tlv_type = wlan_le16_to_cpu(tlv->header.type);
|
|
||||||
tlv_len = wlan_le16_to_cpu(tlv->header.len);
|
tlv_len = wlan_le16_to_cpu(tlv->header.len);
|
||||||
memcpy_ext(
|
memcpy_ext(
|
||||||
pmadapter,
|
pmadapter,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains functions for 802.11H.
|
* @brief This file contains functions for 802.11H.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -3131,7 +3131,7 @@ mlan_status wlan_11h_handle_event_chanrpt_ready(mlan_private *priv,
|
||||||
evt_len -= sizeof(HostCmd_DS_CHAN_RPT_RSP) -
|
evt_len -= sizeof(HostCmd_DS_CHAN_RPT_RSP) -
|
||||||
sizeof(pchan_rpt_rsp->tlv_buffer);
|
sizeof(pchan_rpt_rsp->tlv_buffer);
|
||||||
|
|
||||||
while (evt_len >= sizeof(MrvlIEtypesHeader_t)) {
|
while (evt_len >= (t_s32)sizeof(MrvlIEtypesHeader_t)) {
|
||||||
ptlv = (MrvlIEtypes_Data_t *)pbuffer;
|
ptlv = (MrvlIEtypes_Data_t *)pbuffer;
|
||||||
tlv_len = wlan_le16_to_cpu(ptlv->header.len);
|
tlv_len = wlan_le16_to_cpu(ptlv->header.len);
|
||||||
|
|
||||||
|
@ -3355,7 +3355,8 @@ void wlan_11h_update_bandcfg(Band_Config_t *uap_band_cfg, t_u8 new_channel)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_11h_get_priv_curr_idx(mlan_private *pmpriv,
|
static mlan_status
|
||||||
|
wlan_11h_get_priv_curr_idx(mlan_private *pmpriv,
|
||||||
wlan_radar_det_hndlg_state_t *pstate_rdh)
|
wlan_radar_det_hndlg_state_t *pstate_rdh)
|
||||||
{
|
{
|
||||||
t_bool found = MFALSE;
|
t_bool found = MFALSE;
|
||||||
|
@ -4096,7 +4097,7 @@ mlan_status wlan_11h_dfs_event_preprocessing(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||||
mlan_private *pmpriv = MNULL;
|
mlan_private *pmpriv = MNULL;
|
||||||
mlan_private *priv_list[MLAN_MAX_BSS_NUM] = {0};
|
mlan_private *priv_list[MLAN_MAX_BSS_NUM] = {MNULL};
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
switch (pmadapter->event_cause & EVENT_ID_MASK) {
|
switch (pmadapter->event_cause & EVENT_ID_MASK) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains functions for 11n handling.
|
* @brief This file contains functions for 11n handling.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -354,6 +354,81 @@ static mlan_status wlan_11n_ioctl_coex_rx_winsize(pmlan_adapter pmadapter,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function will send delba request to
|
||||||
|
* the peer in the TxBAStreamTbl
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param ra MAC Address to send DELBA
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
void wlan_11n_send_delba_to_peer(mlan_private *priv, t_u8 *ra)
|
||||||
|
{
|
||||||
|
TxBAStreamTbl *ptx_tbl;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
wlan_request_ralist_lock(priv);
|
||||||
|
ptx_tbl = (TxBAStreamTbl *)util_peek_list(priv->adapter->pmoal_handle,
|
||||||
|
&priv->tx_ba_stream_tbl_ptr,
|
||||||
|
MNULL, MNULL);
|
||||||
|
if (!ptx_tbl) {
|
||||||
|
wlan_release_ralist_lock(priv);
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (ptx_tbl != (TxBAStreamTbl *)&priv->tx_ba_stream_tbl_ptr) {
|
||||||
|
if (!memcmp(priv->adapter, ptx_tbl->ra, ra,
|
||||||
|
MLAN_MAC_ADDR_LENGTH)) {
|
||||||
|
PRINTM(MIOCTL, "Tx:Send delba to tid=%d, " MACSTR "\n",
|
||||||
|
ptx_tbl->tid, MAC2STR(ptx_tbl->ra));
|
||||||
|
wlan_send_delba(priv, MNULL, ptx_tbl->tid, ptx_tbl->ra,
|
||||||
|
1);
|
||||||
|
}
|
||||||
|
ptx_tbl = ptx_tbl->pnext;
|
||||||
|
}
|
||||||
|
wlan_release_ralist_lock(priv);
|
||||||
|
/* Signal MOAL to trigger mlan_main_process */
|
||||||
|
wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING, MNULL);
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set/Get control to TX AMPDU configuration on infra link
|
||||||
|
*
|
||||||
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
|
* @param pioctl_req A pointer to ioctl request buffer
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
||||||
|
*/
|
||||||
|
static mlan_status wlan_11n_ioctl_txaggrctrl(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req)
|
||||||
|
{
|
||||||
|
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_GET)
|
||||||
|
cfg->param.txaggrctrl = pmpriv->txaggrctrl;
|
||||||
|
else if (pioctl_req->action == MLAN_ACT_SET)
|
||||||
|
pmpriv->txaggrctrl = (t_u8)cfg->param.txaggrctrl;
|
||||||
|
|
||||||
|
if (pmpriv->media_connected == MTRUE) {
|
||||||
|
if (pioctl_req->action == MLAN_ACT_SET && !pmpriv->txaggrctrl &&
|
||||||
|
pmpriv->adapter->tdls_status != TDLS_NOT_SETUP)
|
||||||
|
wlan_11n_send_delba_to_peer(
|
||||||
|
pmpriv, pmpriv->curr_bss_params.bss_descriptor
|
||||||
|
.mac_address);
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function will resend addba request to all
|
* @brief This function will resend addba request to all
|
||||||
* the peer in the TxBAStreamTbl
|
* the peer in the TxBAStreamTbl
|
||||||
|
@ -956,7 +1031,7 @@ static void wlan_send_delba_txbastream_tbl(pmlan_private priv, t_u8 tid)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void wlan_update_all_stations_ampdu(mlan_private *priv)
|
static void wlan_update_all_stations_ampdu(mlan_private *priv)
|
||||||
{
|
{
|
||||||
sta_node *sta_ptr;
|
sta_node *sta_ptr;
|
||||||
mlan_adapter *pmadapter = priv->adapter;
|
mlan_adapter *pmadapter = priv->adapter;
|
||||||
|
@ -1319,6 +1394,7 @@ static void wlan_fill_cap_info(mlan_private *priv, HTCap_t *ht_cap, t_u8 bands)
|
||||||
|
|
||||||
/* Need change to support 8k AMSDU receive */
|
/* Need change to support 8k AMSDU receive */
|
||||||
RESETHT_MAXAMSDU(ht_cap->ht_cap_info);
|
RESETHT_MAXAMSDU(ht_cap->ht_cap_info);
|
||||||
|
|
||||||
/* SM power save */
|
/* SM power save */
|
||||||
if (ISSUPP_MIMOPS(priv->adapter->hw_dot_11n_dev_cap))
|
if (ISSUPP_MIMOPS(priv->adapter->hw_dot_11n_dev_cap))
|
||||||
RESETHT_SM_POWERSAVE(ht_cap->ht_cap_info); /* Enable HT SMPS*/
|
RESETHT_SM_POWERSAVE(ht_cap->ht_cap_info); /* Enable HT SMPS*/
|
||||||
|
@ -1761,6 +1837,9 @@ mlan_status wlan_ret_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *resp)
|
||||||
disable_station_ampdu(
|
disable_station_ampdu(
|
||||||
priv, tid, padd_ba_rsp->peer_mac_addr);
|
priv, tid, padd_ba_rsp->peer_mac_addr);
|
||||||
#endif /* UAP_SUPPORT */
|
#endif /* UAP_SUPPORT */
|
||||||
|
if (ra_list && ra_list->is_tdls_link)
|
||||||
|
disable_station_ampdu(
|
||||||
|
priv, tid, padd_ba_rsp->peer_mac_addr);
|
||||||
priv->aggr_prio_tbl[tid].ampdu_ap =
|
priv->aggr_prio_tbl[tid].ampdu_ap =
|
||||||
BA_STREAM_NOT_ALLOWED;
|
BA_STREAM_NOT_ALLOWED;
|
||||||
|
|
||||||
|
@ -2159,7 +2238,7 @@ mlan_status wlan_ret_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
txbf->no_of_peers = *(t_u8 *)&txbfcfg->body;
|
txbf->no_of_peers = *(t_u8 *)&txbfcfg->body;
|
||||||
tx_bf_peer = (bf_peer_args *)((t_u8 *)&txbfcfg->body +
|
tx_bf_peer = (bf_peer_args *)((t_u8 *)&txbfcfg->body +
|
||||||
sizeof(t_u8));
|
sizeof(t_u8));
|
||||||
for (i = 0; i < txbf->no_of_peers; i++) {
|
for (i = 0; i < (int)txbf->no_of_peers; i++) {
|
||||||
memcpy_ext(pmadapter,
|
memcpy_ext(pmadapter,
|
||||||
txbf->body.tx_bf_peer[i].peer_mac,
|
txbf->body.tx_bf_peer[i].peer_mac,
|
||||||
(t_u8 *)tx_bf_peer->peer_mac,
|
(t_u8 *)tx_bf_peer->peer_mac,
|
||||||
|
@ -2178,7 +2257,7 @@ mlan_status wlan_ret_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
txbf->no_of_peers = *(t_u8 *)&txbfcfg->body;
|
txbf->no_of_peers = *(t_u8 *)&txbfcfg->body;
|
||||||
bf_snr = (bf_snr_thr_t *)((t_u8 *)&txbfcfg->body +
|
bf_snr = (bf_snr_thr_t *)((t_u8 *)&txbfcfg->body +
|
||||||
sizeof(t_u8));
|
sizeof(t_u8));
|
||||||
for (i = 0; i < txbf->no_of_peers; i++) {
|
for (i = 0; i < (int)txbf->no_of_peers; i++) {
|
||||||
memcpy_ext(pmadapter,
|
memcpy_ext(pmadapter,
|
||||||
txbf->body.bf_snr[i].peer_mac,
|
txbf->body.bf_snr[i].peer_mac,
|
||||||
(t_u8 *)bf_snr->peer_mac,
|
(t_u8 *)bf_snr->peer_mac,
|
||||||
|
@ -2387,7 +2466,6 @@ int wlan_cmd_append_11n_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||||
MrvlIETypes_2040BSSCo_t *p2040_bss_co;
|
MrvlIETypes_2040BSSCo_t *p2040_bss_co;
|
||||||
MrvlIETypes_ExtCap_t *pext_cap;
|
MrvlIETypes_ExtCap_t *pext_cap;
|
||||||
t_u32 usr_dot_11n_dev_cap, orig_usr_dot_11n_dev_cap = 0;
|
t_u32 usr_dot_11n_dev_cap, orig_usr_dot_11n_dev_cap = 0;
|
||||||
t_u32 usr_vht_cap_info;
|
|
||||||
t_u8 usr_dot_11ac_bw;
|
t_u8 usr_dot_11ac_bw;
|
||||||
int ret_len = 0;
|
int ret_len = 0;
|
||||||
|
|
||||||
|
@ -2412,10 +2490,6 @@ int wlan_cmd_append_11n_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||||
else
|
else
|
||||||
usr_dot_11n_dev_cap = pmpriv->usr_dot_11n_dev_cap_bg;
|
usr_dot_11n_dev_cap = pmpriv->usr_dot_11n_dev_cap_bg;
|
||||||
|
|
||||||
if (pbss_desc->bss_band & BAND_A)
|
|
||||||
usr_vht_cap_info = pmpriv->usr_dot_11ac_dev_cap_a;
|
|
||||||
else
|
|
||||||
usr_vht_cap_info = pmpriv->usr_dot_11ac_dev_cap_bg;
|
|
||||||
if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS)
|
if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS)
|
||||||
usr_dot_11ac_bw = BW_FOLLOW_VHTCAP;
|
usr_dot_11ac_bw = BW_FOLLOW_VHTCAP;
|
||||||
else
|
else
|
||||||
|
@ -2544,6 +2618,8 @@ int wlan_cmd_append_11n_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||||
(t_u8 *)pext_cap + sizeof(MrvlIEtypesHeader_t),
|
(t_u8 *)pext_cap + sizeof(MrvlIEtypesHeader_t),
|
||||||
(t_u8 *)&pmpriv->ext_cap, sizeof(ExtCap_t),
|
(t_u8 *)&pmpriv->ext_cap, sizeof(ExtCap_t),
|
||||||
pext_cap->header.len);
|
pext_cap->header.len);
|
||||||
|
if (pbss_desc && pbss_desc->multi_bssid_ap)
|
||||||
|
SET_EXTCAP_MULTI_BSSID(pext_cap->ext_cap);
|
||||||
if (!pmadapter->ecsa_enable)
|
if (!pmadapter->ecsa_enable)
|
||||||
RESET_EXTCAP_EXT_CHANNEL_SWITCH(pext_cap->ext_cap);
|
RESET_EXTCAP_EXT_CHANNEL_SWITCH(pext_cap->ext_cap);
|
||||||
else
|
else
|
||||||
|
@ -2638,6 +2714,9 @@ mlan_status wlan_11n_cfg_ioctl(pmlan_adapter pmadapter,
|
||||||
case MLAN_OID_11N_CFG_COEX_RX_WINSIZE:
|
case MLAN_OID_11N_CFG_COEX_RX_WINSIZE:
|
||||||
status = wlan_11n_ioctl_coex_rx_winsize(pmadapter, pioctl_req);
|
status = wlan_11n_ioctl_coex_rx_winsize(pmadapter, pioctl_req);
|
||||||
break;
|
break;
|
||||||
|
case MLAN_OID_11N_CFG_TX_AGGR_CTRL:
|
||||||
|
status = wlan_11n_ioctl_txaggrctrl(pmadapter, pioctl_req);
|
||||||
|
break;
|
||||||
case MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM:
|
case MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM:
|
||||||
status = wlan_11n_ioctl_ibss_ampdu_param(pmadapter, pioctl_req);
|
status = wlan_11n_ioctl_ibss_ampdu_param(pmadapter, pioctl_req);
|
||||||
break;
|
break;
|
||||||
|
@ -3024,7 +3103,7 @@ int wlan_get_txbastream_tbl(mlan_private *priv, tx_ba_stream_tbl *buf)
|
||||||
ptxtbl = ptxtbl->pnext;
|
ptxtbl = ptxtbl->pnext;
|
||||||
ptbl++;
|
ptbl++;
|
||||||
count++;
|
count++;
|
||||||
if (count >= bastream_max)
|
if (count >= (int)bastream_max)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wlan_release_ralist_lock(priv);
|
wlan_release_ralist_lock(priv);
|
||||||
|
|
|
@ -234,6 +234,11 @@ static INLINE void reset_station_ampdu(mlan_private *priv, t_u8 tid, t_u8 *ra)
|
||||||
static INLINE t_u8 wlan_is_ampdu_allowed(mlan_private *priv, raListTbl *ptr,
|
static INLINE t_u8 wlan_is_ampdu_allowed(mlan_private *priv, raListTbl *ptr,
|
||||||
int tid)
|
int tid)
|
||||||
{
|
{
|
||||||
|
if (ptr->is_tdls_link)
|
||||||
|
return is_station_ampdu_allowed(priv, ptr, tid);
|
||||||
|
if (priv->adapter->tdls_status != TDLS_NOT_SETUP && !priv->txaggrctrl)
|
||||||
|
return MFALSE;
|
||||||
|
|
||||||
if ((!priv->is_data_rate_auto) && IS_BG_RATE)
|
if ((!priv->is_data_rate_auto) && IS_BG_RATE)
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
|
@ -272,6 +277,8 @@ static INLINE void wlan_update_del_ba_count(mlan_private *priv, raListTbl *ptr)
|
||||||
return wlan_update_station_del_ba_count(priv, ptr);
|
return wlan_update_station_del_ba_count(priv, ptr);
|
||||||
#endif /* UAP_SUPPORT */
|
#endif /* UAP_SUPPORT */
|
||||||
#endif /* UAP_802_11N */
|
#endif /* UAP_802_11N */
|
||||||
|
if (ptr->is_tdls_link)
|
||||||
|
return wlan_update_station_del_ba_count(priv, ptr);
|
||||||
rssi = priv->snr - priv->nf;
|
rssi = priv->snr - priv->nf;
|
||||||
if (rssi > BA_RSSI_HIGH_THRESHOLD)
|
if (rssi > BA_RSSI_HIGH_THRESHOLD)
|
||||||
ptr->del_ba_count = 0;
|
ptr->del_ba_count = 0;
|
||||||
|
@ -304,6 +311,11 @@ static INLINE t_u8 wlan_is_amsdu_allowed(mlan_private *priv, raListTbl *ptr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* UAP_SUPPORT */
|
#endif /* UAP_SUPPORT */
|
||||||
|
if (ptr->is_tdls_link)
|
||||||
|
return (priv->aggr_prio_tbl[tid].amsdu !=
|
||||||
|
BA_STREAM_NOT_ALLOWED) ?
|
||||||
|
MTRUE :
|
||||||
|
MFALSE;
|
||||||
#define TXRATE_BITMAP_INDEX_MCS0_7 2
|
#define TXRATE_BITMAP_INDEX_MCS0_7 2
|
||||||
return ((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED) &&
|
return ((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED) &&
|
||||||
((priv->is_data_rate_auto) ||
|
((priv->is_data_rate_auto) ||
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains functions for 11n Aggregation.
|
* @brief This file contains functions for 11n Aggregation.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -127,6 +127,8 @@ static void wlan_11n_form_amsdu_txpd(mlan_private *priv, mlan_buffer *mbuf)
|
||||||
/* Always zero as the data is followed by TxPD */
|
/* Always zero as the data is followed by TxPD */
|
||||||
ptx_pd->tx_pkt_offset = sizeof(TxPD);
|
ptx_pd->tx_pkt_offset = sizeof(TxPD);
|
||||||
ptx_pd->tx_pkt_type = PKT_TYPE_AMSDU;
|
ptx_pd->tx_pkt_type = PKT_TYPE_AMSDU;
|
||||||
|
if (mbuf->flags & MLAN_BUF_FLAG_TDLS)
|
||||||
|
ptx_pd->flags = MRVDRV_TxPD_FLAGS_TDLS_PACKET;
|
||||||
if (ptx_pd->tx_control == 0)
|
if (ptx_pd->tx_control == 0)
|
||||||
/* TxCtrl set by user or default */
|
/* TxCtrl set by user or default */
|
||||||
ptx_pd->tx_control = priv->pkt_tx_ctrl;
|
ptx_pd->tx_control = priv->pkt_tx_ctrl;
|
||||||
|
@ -227,6 +229,7 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
||||||
0x00, 0x00, 0x00};
|
0x00, 0x00, 0x00};
|
||||||
t_u8 hdr_len = sizeof(Eth803Hdr_t);
|
t_u8 hdr_len = sizeof(Eth803Hdr_t);
|
||||||
t_u8 eapol_type[2] = {0x88, 0x8e};
|
t_u8 eapol_type[2] = {0x88, 0x8e};
|
||||||
|
t_u8 tdls_action_type[2] = {0x89, 0x0d};
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -250,7 +253,7 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (total_pkt_len > max_rx_data_size) {
|
if (total_pkt_len > (int)max_rx_data_size) {
|
||||||
PRINTM(MERROR,
|
PRINTM(MERROR,
|
||||||
"Total packet length greater than tx buffer"
|
"Total packet length greater than tx buffer"
|
||||||
" size %d\n",
|
" size %d\n",
|
||||||
|
@ -261,9 +264,12 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
||||||
pmbuf->use_count = wlan_11n_get_num_aggrpkts(data, total_pkt_len);
|
pmbuf->use_count = wlan_11n_get_num_aggrpkts(data, total_pkt_len);
|
||||||
|
|
||||||
// rx_trace 7
|
// rx_trace 7
|
||||||
if (pmadapter->tp_state_on)
|
if (pmadapter->tp_state_on) {
|
||||||
pmadapter->callbacks.moal_tp_accounting(
|
pmadapter->callbacks.moal_tp_accounting(
|
||||||
pmadapter->pmoal_handle, pmbuf, 7 /*RX_DROP_P3*/);
|
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*/)
|
if (pmadapter->tp_state_drop_point == 7 /*RX_DROP_P3*/)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
@ -311,6 +317,8 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
||||||
daggr_mbuf->data_len = pkt_len;
|
daggr_mbuf->data_len = pkt_len;
|
||||||
daggr_mbuf->in_ts_sec = pmbuf->in_ts_sec;
|
daggr_mbuf->in_ts_sec = pmbuf->in_ts_sec;
|
||||||
daggr_mbuf->in_ts_usec = pmbuf->in_ts_usec;
|
daggr_mbuf->in_ts_usec = pmbuf->in_ts_usec;
|
||||||
|
daggr_mbuf->extra_ts_sec = pmbuf->extra_ts_sec;
|
||||||
|
daggr_mbuf->extra_ts_usec = pmbuf->extra_ts_usec;
|
||||||
daggr_mbuf->pparent = pmbuf;
|
daggr_mbuf->pparent = pmbuf;
|
||||||
daggr_mbuf->priority = pmbuf->priority;
|
daggr_mbuf->priority = pmbuf->priority;
|
||||||
memcpy_ext(pmadapter,
|
memcpy_ext(pmadapter,
|
||||||
|
@ -341,6 +349,20 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
||||||
data += pkt_len + pad;
|
data += pkt_len + pad;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
/**process tdls packet*/
|
||||||
|
if (!memcmp(pmadapter,
|
||||||
|
daggr_mbuf->pbuf + daggr_mbuf->data_offset +
|
||||||
|
MLAN_ETHER_PKT_TYPE_OFFSET,
|
||||||
|
tdls_action_type,
|
||||||
|
sizeof(tdls_action_type))) {
|
||||||
|
PRINTM(MEVENT,
|
||||||
|
"Recevie AMSDU TDLS action frame\n");
|
||||||
|
wlan_process_tdls_action_frame(
|
||||||
|
priv,
|
||||||
|
daggr_mbuf->pbuf +
|
||||||
|
daggr_mbuf->data_offset,
|
||||||
|
daggr_mbuf->data_len);
|
||||||
|
}
|
||||||
|
|
||||||
ret = pmadapter->callbacks.moal_recv_packet(
|
ret = pmadapter->callbacks.moal_recv_packet(
|
||||||
pmadapter->pmoal_handle, daggr_mbuf);
|
pmadapter->pmoal_handle, daggr_mbuf);
|
||||||
|
@ -402,6 +424,7 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
||||||
TxPD *ptx_pd = MNULL;
|
TxPD *ptx_pd = MNULL;
|
||||||
#endif
|
#endif
|
||||||
t_u32 max_amsdu_size = MIN(pra_list->max_amsdu, pmadapter->tx_buf_size);
|
t_u32 max_amsdu_size = MIN(pra_list->max_amsdu, pmadapter->tx_buf_size);
|
||||||
|
t_u32 msdu_in_tx_amsdu_cnt = 0;
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
PRINTM(MDAT_D, "Handling Aggr packet\n");
|
PRINTM(MDAT_D, "Handling Aggr packet\n");
|
||||||
|
@ -429,6 +452,8 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
||||||
pmbuf_aggr->data_offset = 0;
|
pmbuf_aggr->data_offset = 0;
|
||||||
pmbuf_aggr->in_ts_sec = pmbuf_src->in_ts_sec;
|
pmbuf_aggr->in_ts_sec = pmbuf_src->in_ts_sec;
|
||||||
pmbuf_aggr->in_ts_usec = pmbuf_src->in_ts_usec;
|
pmbuf_aggr->in_ts_usec = pmbuf_src->in_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)
|
if (pmbuf_src->flags & MLAN_BUF_FLAG_TCP_ACK)
|
||||||
pmbuf_aggr->flags |= MLAN_BUF_FLAG_TCP_ACK;
|
pmbuf_aggr->flags |= MLAN_BUF_FLAG_TCP_ACK;
|
||||||
|
|
||||||
|
@ -494,6 +519,7 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
||||||
&pra_list->buf_head, MNULL,
|
&pra_list->buf_head, MNULL,
|
||||||
MNULL);
|
MNULL);
|
||||||
priv->msdu_in_tx_amsdu_cnt++;
|
priv->msdu_in_tx_amsdu_cnt++;
|
||||||
|
msdu_in_tx_amsdu_cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||||
|
@ -508,9 +534,12 @@ int wlan_11n_aggregate_pkt(mlan_private *priv, raListTbl *pra_list,
|
||||||
tx_param.next_pkt_len =
|
tx_param.next_pkt_len =
|
||||||
((pmbuf_src) ? pmbuf_src->data_len + sizeof(TxPD) : 0);
|
((pmbuf_src) ? pmbuf_src->data_len + sizeof(TxPD) : 0);
|
||||||
/* Collects TP statistics */
|
/* Collects TP statistics */
|
||||||
if (pmadapter->tp_state_on)
|
if (pmadapter->tp_state_on) {
|
||||||
pmadapter->callbacks.moal_tp_accounting(pmadapter->pmoal_handle,
|
pmadapter->callbacks.moal_tp_accounting(pmadapter->pmoal_handle,
|
||||||
pmbuf_aggr, 4);
|
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 */
|
/* Drop Tx packets at drop point 4 */
|
||||||
if (pmadapter->tp_state_drop_point == 4) {
|
if (pmadapter->tp_state_drop_point == 4) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* driver.
|
* driver.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -503,6 +503,10 @@ static t_void wlan_11n_create_rxreorder_tbl(mlan_private *priv, t_u8 *ta,
|
||||||
PRINTM(MINFO, "UAP/ADHOC:last_seq=%d start_win=%d\n", last_seq,
|
PRINTM(MINFO, "UAP/ADHOC:last_seq=%d start_win=%d\n", last_seq,
|
||||||
new_node->start_win);
|
new_node->start_win);
|
||||||
} else {
|
} else {
|
||||||
|
sta_ptr = wlan_get_station_entry(priv, ta);
|
||||||
|
if (sta_ptr)
|
||||||
|
last_seq = sta_ptr->rx_seq[tid];
|
||||||
|
else
|
||||||
last_seq = priv->rx_seq[tid];
|
last_seq = priv->rx_seq[tid];
|
||||||
}
|
}
|
||||||
new_node->last_seq = last_seq;
|
new_node->last_seq = last_seq;
|
||||||
|
@ -603,7 +607,7 @@ mlan_status wlan_cmd_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *cmd,
|
||||||
*
|
*
|
||||||
* @return MTRUE/MFALSE
|
* @return MTRUE/MFALSE
|
||||||
*/
|
*/
|
||||||
t_u8 wlan_is_addba_reject(mlan_private *priv, t_u8 tid)
|
static t_u8 wlan_is_addba_reject(mlan_private *priv, t_u8 tid)
|
||||||
{
|
{
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
#endif
|
#endif
|
||||||
|
@ -1206,7 +1210,7 @@ void wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len)
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
DBG_HEXDUMP(MEVT_D, "RXBA_SYNC_EVT", event_buf, len);
|
DBG_HEXDUMP(MEVT_D, "RXBA_SYNC_EVT", event_buf, len);
|
||||||
while (tlv_buf_left >= sizeof(MrvlIEtypes_RxBaSync_t)) {
|
while (tlv_buf_left >= (int)sizeof(MrvlIEtypes_RxBaSync_t)) {
|
||||||
tlv_type = wlan_le16_to_cpu(tlv_rxba->header.type);
|
tlv_type = wlan_le16_to_cpu(tlv_rxba->header.type);
|
||||||
tlv_len = wlan_le16_to_cpu(tlv_rxba->header.len);
|
tlv_len = wlan_le16_to_cpu(tlv_rxba->header.len);
|
||||||
if (tlv_type != TLV_TYPE_RXBA_SYNC) {
|
if (tlv_type != TLV_TYPE_RXBA_SYNC) {
|
||||||
|
@ -1293,7 +1297,7 @@ void wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void wlan_set_rxreorder_tbl_no_drop_flag(mlan_private *priv, t_u8 flag)
|
static void wlan_set_rxreorder_tbl_no_drop_flag(mlan_private *priv, t_u8 flag)
|
||||||
{
|
{
|
||||||
RxReorderTbl *rx_reor_tbl_ptr;
|
RxReorderTbl *rx_reor_tbl_ptr;
|
||||||
|
|
||||||
|
@ -1345,7 +1349,7 @@ void wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void wlan_flush_priv_rxreorder_tbl(mlan_private *priv)
|
static void wlan_flush_priv_rxreorder_tbl(mlan_private *priv)
|
||||||
{
|
{
|
||||||
RxReorderTbl *rx_reor_tbl_ptr;
|
RxReorderTbl *rx_reor_tbl_ptr;
|
||||||
|
|
||||||
|
@ -1399,7 +1403,7 @@ void wlan_flush_rxreorder_tbl(pmlan_adapter pmadapter)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag)
|
static void wlan_update_ampdu_rxwinsize(pmlan_adapter pmadapter, t_u8 coex_flag)
|
||||||
{
|
{
|
||||||
t_u8 i;
|
t_u8 i;
|
||||||
t_u32 rx_win_size = 0;
|
t_u32 rx_win_size = 0;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* related code
|
* related code
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2009-2020 NXP
|
* Copyright 2009-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -748,7 +748,7 @@ typedef struct _rate_map {
|
||||||
/** If user configure to 1x1 or we found peer device only support 1x1,
|
/** If user configure to 1x1 or we found peer device only support 1x1,
|
||||||
* then we need skip the nss1 part when map to Mrvl rate.
|
* then we need skip the nss1 part when map to Mrvl rate.
|
||||||
*/
|
*/
|
||||||
const rate_map rate_map_table_2x2[] = {
|
static const rate_map rate_map_table_2x2[] = {
|
||||||
/* LG <--> Mrvl rate idx */
|
/* LG <--> Mrvl rate idx */
|
||||||
{2, 0, 0}, // RATEID_DBPSK1Mbps
|
{2, 0, 0}, // RATEID_DBPSK1Mbps
|
||||||
{4, 1, 0}, // RATEID_DQPSK2Mbps
|
{4, 1, 0}, // RATEID_DQPSK2Mbps
|
||||||
|
@ -887,7 +887,7 @@ const rate_map rate_map_table_2x2[] = {
|
||||||
* For the chip who only support 1x1, Mrvl rate idx define is different with 2x2
|
* For the chip who only support 1x1, Mrvl rate idx define is different with 2x2
|
||||||
* in FW We need redefine a bitrate to Mrvl rate idx table for 1x1 chip.
|
* in FW We need redefine a bitrate to Mrvl rate idx table for 1x1 chip.
|
||||||
*/
|
*/
|
||||||
const rate_map rate_map_table_1x1[] = {
|
static const rate_map rate_map_table_1x1[] = {
|
||||||
/* LG <--> Mrvl rate idx */
|
/* LG <--> Mrvl rate idx */
|
||||||
{2, 0, 0}, // RATEID_DBPSK1Mbps
|
{2, 0, 0}, // RATEID_DBPSK1Mbps
|
||||||
{4, 1, 0}, // RATEID_DQPSK2Mbps
|
{4, 1, 0}, // RATEID_DQPSK2Mbps
|
||||||
|
@ -1019,7 +1019,7 @@ t_u8 SupportedRates_A[A_SUPPORTED_RATES] = {0x0c, 0x12, 0x18, 0x24, 0xb0,
|
||||||
/**
|
/**
|
||||||
* The rates supported by the card
|
* The rates supported by the card
|
||||||
*/
|
*/
|
||||||
t_u16 WlanDataRates[WLAN_SUPPORTED_RATES_EXT] = {
|
static t_u16 WlanDataRates[WLAN_SUPPORTED_RATES_EXT] = {
|
||||||
0x02, 0x04, 0x0B, 0x16, 0x00, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48,
|
0x02, 0x04, 0x0B, 0x16, 0x00, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48,
|
||||||
0x60, 0x6C, 0x90, 0x0D, 0x1A, 0x27, 0x34, 0x4E, 0x68, 0x75, 0x82,
|
0x60, 0x6C, 0x90, 0x0D, 0x1A, 0x27, 0x34, 0x4E, 0x68, 0x75, 0x82,
|
||||||
0x0C, 0x1B, 0x36, 0x51, 0x6C, 0xA2, 0xD8, 0xF3, 0x10E, 0x00};
|
0x0C, 0x1B, 0x36, 0x51, 0x6C, 0xA2, 0xD8, 0xF3, 0x10E, 0x00};
|
||||||
|
@ -1050,7 +1050,7 @@ t_u8 SupportedRates_N[N_SUPPORTED_RATES] = {0x02, 0x04, 0};
|
||||||
#define MCS_NUM_AX 12
|
#define MCS_NUM_AX 12
|
||||||
// for MCS0/MCS1/MCS3/MCS4 have 4 additional DCM=1 value
|
// for MCS0/MCS1/MCS3/MCS4 have 4 additional DCM=1 value
|
||||||
// note: the value in the table is 2 multiplier of the actual rate
|
// note: the value in the table is 2 multiplier of the actual rate
|
||||||
t_u16 ax_mcs_rate_nss1[12][MCS_NUM_AX + 4] = {
|
static t_u16 ax_mcs_rate_nss1[12][MCS_NUM_AX + 4] = {
|
||||||
{0x90, 0x48, 0x120, 0x90, 0x1B0, 0x240, 0x120, 0x360, 0x1B0, 0x481,
|
{0x90, 0x48, 0x120, 0x90, 0x1B0, 0x240, 0x120, 0x360, 0x1B0, 0x481,
|
||||||
0x511, 0x5A1, 0x6C1, 0x781, 0x871, 0x962}, /*SG 160M*/
|
0x511, 0x5A1, 0x6C1, 0x781, 0x871, 0x962}, /*SG 160M*/
|
||||||
{0x88, 0x44, 0x110, 0x88, 0x198, 0x220, 0x110, 0x330, 0x198, 0x440,
|
{0x88, 0x44, 0x110, 0x88, 0x198, 0x220, 0x110, 0x330, 0x198, 0x440,
|
||||||
|
@ -1077,6 +1077,7 @@ t_u16 ax_mcs_rate_nss1[12][MCS_NUM_AX + 4] = {
|
||||||
0xAF, 0xC3, 0xDB, 0xF3} /*LG 20M*/
|
0xAF, 0xC3, 0xDB, 0xF3} /*LG 20M*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
// note: the value in the table is 2 multiplier of the actual rate
|
// note: the value in the table is 2 multiplier of the actual rate
|
||||||
t_u16 ax_tone_ru_rate_nss1[9][MCS_NUM_AX + 4] = {
|
t_u16 ax_tone_ru_rate_nss1[9][MCS_NUM_AX + 4] = {
|
||||||
{0x8, 0x4, 0xF, 0x8, 0x17, 0x1E, 0xF, 0x2D, 0x17, 0x3C, 0x44, 0x4B,
|
{0x8, 0x4, 0xF, 0x8, 0x17, 0x1E, 0xF, 0x2D, 0x17, 0x3C, 0x44, 0x4B,
|
||||||
|
@ -1098,9 +1099,10 @@ t_u16 ax_tone_ru_rate_nss1[9][MCS_NUM_AX + 4] = {
|
||||||
{0x2, 0x1, 0x3, 0x2, 0x5, 0x6, 0x3, 0x9, 0x4, 0xC, 0xE, 0xF, 0x12, 0x14,
|
{0x2, 0x1, 0x3, 0x2, 0x5, 0x6, 0x3, 0x9, 0x4, 0xC, 0xE, 0xF, 0x12, 0x14,
|
||||||
0x17, 0x19} /*LG 26-tone*/
|
0x17, 0x19} /*LG 26-tone*/
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
// note: the value in the table is 2 multiplier of the actual rate
|
// note: the value in the table is 2 multiplier of the actual rate
|
||||||
t_u16 ax_mcs_rate_nss2[12][MCS_NUM_AX + 4] = {
|
static t_u16 ax_mcs_rate_nss2[12][MCS_NUM_AX + 4] = {
|
||||||
{0x120, 0x90, 0x240, 0x120, 0x360, 0x481, 0x240, 0x61C, 0x360, 0x901,
|
{0x120, 0x90, 0x240, 0x120, 0x360, 0x481, 0x240, 0x61C, 0x360, 0x901,
|
||||||
0xA22, 0xB42, 0xD82, 0xF03, 0x10E3, 0x12C3}, /*SG 160M*/
|
0xA22, 0xB42, 0xD82, 0xF03, 0x10E3, 0x12C3}, /*SG 160M*/
|
||||||
{0x110, 0x88, 0x220, 0x110, 0x330, 0x440, 0x220, 0x661, 0x330, 0x881,
|
{0x110, 0x88, 0x220, 0x110, 0x330, 0x440, 0x220, 0x661, 0x330, 0x881,
|
||||||
|
@ -1127,6 +1129,7 @@ t_u16 ax_mcs_rate_nss2[12][MCS_NUM_AX + 4] = {
|
||||||
0x124, 0x15F, 0x186, 0x1B6, 0x1E7} /*LG 20M*/
|
0x124, 0x15F, 0x186, 0x1B6, 0x1E7} /*LG 20M*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
// note: the value in the table is 2 multiplier of the actual rate
|
// note: the value in the table is 2 multiplier of the actual rate
|
||||||
t_u16 ax_tone_ru_rate_nss2[9][MCS_NUM_AX + 4] = {
|
t_u16 ax_tone_ru_rate_nss2[9][MCS_NUM_AX + 4] = {
|
||||||
{0xF, 0x8, 0x1E, 0xF, 0x2D, 0x3C, 0x1E, 0x5A, 0x2D, 0x78, 0x87, 0x96,
|
{0xF, 0x8, 0x1E, 0xF, 0x2D, 0x3C, 0x1E, 0x5A, 0x2D, 0x78, 0x87, 0x96,
|
||||||
|
@ -1148,6 +1151,7 @@ t_u16 ax_tone_ru_rate_nss2[9][MCS_NUM_AX + 4] = {
|
||||||
{0x3, 0x2, 0x6, 0x3, 0x9, 0xC, 0x6, 0x12, 0x9, 0x18, 0x1B, 0x1E, 0x24,
|
{0x3, 0x2, 0x6, 0x3, 0x9, 0xC, 0x6, 0x12, 0x9, 0x18, 0x1B, 0x1E, 0x24,
|
||||||
0x28, 0x2D, 0x32} /*LG 26-tone*/
|
0x28, 0x2D, 0x32} /*LG 26-tone*/
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* Local Functions
|
* Local Functions
|
||||||
|
@ -1563,7 +1567,7 @@ t_u32 wlan_index_to_data_rate(pmlan_adapter pmadapter, t_u8 index,
|
||||||
t_u32 rate = 0;
|
t_u32 rate = 0;
|
||||||
t_u8 mcs_index = 0;
|
t_u8 mcs_index = 0;
|
||||||
t_u8 he_dcm = 0;
|
t_u8 he_dcm = 0;
|
||||||
t_u8 he_tone = 0;
|
// t_u8 he_tone = 0;
|
||||||
t_u8 stbc = 0;
|
t_u8 stbc = 0;
|
||||||
|
|
||||||
t_u8 bw = 0;
|
t_u8 bw = 0;
|
||||||
|
@ -1625,10 +1629,12 @@ t_u32 wlan_index_to_data_rate(pmlan_adapter pmadapter, t_u8 index,
|
||||||
if (gi > 0)
|
if (gi > 0)
|
||||||
gi = gi - 1;
|
gi = gi - 1;
|
||||||
|
|
||||||
|
//#ifdef ENABLE_802_11AX
|
||||||
// TODO: hardcode he_tone here, wait for FW value ready.
|
// TODO: hardcode he_tone here, wait for FW value ready.
|
||||||
he_tone = 4;
|
// he_tone = 4;
|
||||||
|
|
||||||
// he_tone = (ext_rate_info & 0xE) >> 1;
|
// he_tone = (ext_rate_info & 0xE) >> 1;
|
||||||
|
//#endif
|
||||||
|
|
||||||
if ((index >> 4) == 1) {
|
if ((index >> 4) == 1) {
|
||||||
switch (mcs_index) {
|
switch (mcs_index) {
|
||||||
|
@ -2364,7 +2370,7 @@ static oper_bw_chan oper_bw_chan_cn[] = {
|
||||||
*
|
*
|
||||||
* @return A pointer to oper_bw_chan
|
* @return A pointer to oper_bw_chan
|
||||||
*/
|
*/
|
||||||
oper_bw_chan *wlan_get_nonglobal_operclass_table(mlan_private *pmpriv,
|
static oper_bw_chan *wlan_get_nonglobal_operclass_table(mlan_private *pmpriv,
|
||||||
int *arraysize)
|
int *arraysize)
|
||||||
{
|
{
|
||||||
t_u8 country_code[][COUNTRY_CODE_LEN] = {"US", "JP", "CN"};
|
t_u8 country_code[][COUNTRY_CODE_LEN] = {"US", "JP", "CN"};
|
||||||
|
@ -2428,7 +2434,7 @@ mlan_status wlan_check_operclass_validation(mlan_private *pmpriv, t_u8 channel,
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
for (i = 0; i < sizeof(center_freqs); i++) {
|
for (i = 0; i < (int)sizeof(center_freqs); i++) {
|
||||||
if (channel == center_freqs[i]) {
|
if (channel == center_freqs[i]) {
|
||||||
PRINTM(MERROR, "Invalid channel number %d!\n", channel);
|
PRINTM(MERROR, "Invalid channel number %d!\n", channel);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -2453,11 +2459,12 @@ mlan_status wlan_check_operclass_validation(mlan_private *pmpriv, t_u8 channel,
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < arraysize / sizeof(oper_bw_chan); i++) {
|
for (i = 0; i < (int)(arraysize / sizeof(oper_bw_chan)); i++) {
|
||||||
if (poper_bw_chan[i].oper_class == oper_class ||
|
if (poper_bw_chan[i].oper_class == oper_class ||
|
||||||
poper_bw_chan[i].global_oper_class == oper_class) {
|
poper_bw_chan[i].global_oper_class == oper_class) {
|
||||||
for (channum = 0;
|
for (channum = 0;
|
||||||
channum < sizeof(poper_bw_chan[i].channel_list);
|
channum <
|
||||||
|
(int)sizeof(poper_bw_chan[i].channel_list);
|
||||||
channum++) {
|
channum++) {
|
||||||
if (poper_bw_chan[i].channel_list[channum] &&
|
if (poper_bw_chan[i].channel_list[channum] &&
|
||||||
poper_bw_chan[i].channel_list[channum] ==
|
poper_bw_chan[i].channel_list[channum] ==
|
||||||
|
@ -2502,7 +2509,7 @@ mlan_status wlan_get_curr_oper_class(mlan_private *pmpriv, t_u8 channel,
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
for (i = 0; i < sizeof(center_freqs); i++) {
|
for (i = 0; i < (int)sizeof(center_freqs); i++) {
|
||||||
if (channel == center_freqs[i]) {
|
if (channel == center_freqs[i]) {
|
||||||
PRINTM(MERROR, "Invalid channel number %d!\n", channel);
|
PRINTM(MERROR, "Invalid channel number %d!\n", channel);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -2515,10 +2522,11 @@ mlan_status wlan_get_curr_oper_class(mlan_private *pmpriv, t_u8 channel,
|
||||||
channel = center_freq_idx;
|
channel = center_freq_idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < arraysize / sizeof(oper_bw_chan); i++) {
|
for (i = 0; i < (int)(arraysize / sizeof(oper_bw_chan)); i++) {
|
||||||
if (poper_bw_chan[i].bandwidth == bw) {
|
if (poper_bw_chan[i].bandwidth == bw) {
|
||||||
for (channum = 0;
|
for (channum = 0;
|
||||||
channum < sizeof(poper_bw_chan[i].channel_list);
|
channum <
|
||||||
|
(int)(sizeof(poper_bw_chan[i].channel_list));
|
||||||
channum++) {
|
channum++) {
|
||||||
if (poper_bw_chan[i].channel_list[channum] &&
|
if (poper_bw_chan[i].channel_list[channum] &&
|
||||||
poper_bw_chan[i].channel_list[channum] ==
|
poper_bw_chan[i].channel_list[channum] ==
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* @brief This file contains the handling of CMD/EVENT in MLAN
|
* @brief This file contains the handling of CMD/EVENT in MLAN
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2009-2020 NXP
|
* Copyright 2009-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -90,7 +90,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void wlan_check_scan_queue(pmlan_adapter pmadapter)
|
static void wlan_check_scan_queue(pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
cmd_ctrl_node *pcmd_node = MNULL;
|
cmd_ctrl_node *pcmd_node = MNULL;
|
||||||
t_u16 num = 0;
|
t_u16 num = 0;
|
||||||
|
@ -156,7 +156,7 @@ static void wlan_dump_pending_commands(pmlan_adapter pmadapter)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
t_void wlan_dump_info(mlan_adapter *pmadapter, t_u8 reason)
|
static t_void wlan_dump_info(mlan_adapter *pmadapter, t_u8 reason)
|
||||||
{
|
{
|
||||||
cmd_ctrl_node *pcmd_node = MNULL;
|
cmd_ctrl_node *pcmd_node = MNULL;
|
||||||
#ifdef DEBUG_LEVEL1
|
#ifdef DEBUG_LEVEL1
|
||||||
|
@ -165,7 +165,7 @@ t_void wlan_dump_info(mlan_adapter *pmadapter, t_u8 reason)
|
||||||
t_u8 i;
|
t_u8 i;
|
||||||
#ifdef SDIO
|
#ifdef SDIO
|
||||||
t_u8 j;
|
t_u8 j;
|
||||||
t_u8 mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT;
|
t_u8 mp_aggr_pkt_limit = pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||||
#endif
|
#endif
|
||||||
t_u16 cmd_id, cmd_act;
|
t_u16 cmd_id, cmd_act;
|
||||||
mlan_private *pmpriv = MNULL;
|
mlan_private *pmpriv = MNULL;
|
||||||
|
@ -360,9 +360,9 @@ t_void wlan_dump_info(mlan_adapter *pmadapter, t_u8 reason)
|
||||||
pmadapter->pcard_pcie->evtbd_wrptr);
|
pmadapter->pcard_pcie->evtbd_wrptr);
|
||||||
PRINTM(MERROR, "last_wr_index:%d\n",
|
PRINTM(MERROR, "last_wr_index:%d\n",
|
||||||
pmadapter->pcard_pcie->txbd_wrptr &
|
pmadapter->pcard_pcie->txbd_wrptr &
|
||||||
(MLAN_MAX_TXRX_BD - 1));
|
(pmadapter->pcard_pcie->reg->txrx_bd_size - 1));
|
||||||
PRINTM(MERROR, "Tx pkt size:\n");
|
PRINTM(MERROR, "Tx pkt size:\n");
|
||||||
for (i = 0; i < MLAN_MAX_TXRX_BD; i++) {
|
for (i = 0; i < pmadapter->pcard_pcie->reg->txrx_bd_size; i++) {
|
||||||
PRINTM(MERROR, "%04d ",
|
PRINTM(MERROR, "%04d ",
|
||||||
pmadapter->pcard_pcie->last_tx_pkt_size[i]);
|
pmadapter->pcard_pcie->last_tx_pkt_size[i]);
|
||||||
if (((i + 1) % 16) == 0)
|
if (((i + 1) % 16) == 0)
|
||||||
|
@ -422,7 +422,7 @@ static t_u32 wlan_hexval(t_u8 chr)
|
||||||
* @return The converted hex value if param a is a valid hex, else
|
* @return The converted hex value if param a is a valid hex, else
|
||||||
* 0
|
* 0
|
||||||
*/
|
*/
|
||||||
int wlan_atox(t_u8 *a)
|
static int wlan_atox(t_u8 *a)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ static t_u32 wlan_parse_cal_cfg(t_u8 *src, t_size len, t_u8 *dst)
|
||||||
* @return Location of the first occurrence of the char
|
* @return Location of the first occurrence of the char
|
||||||
* if found, else NULL
|
* if found, else NULL
|
||||||
*/
|
*/
|
||||||
t_u8 *wlan_strchr(t_u8 *s, int c)
|
static t_u8 *wlan_strchr(t_u8 *s, int c)
|
||||||
{
|
{
|
||||||
t_u8 *pos = s;
|
t_u8 *pos = s;
|
||||||
while (*pos != '\0') {
|
while (*pos != '\0') {
|
||||||
|
@ -950,6 +950,8 @@ static t_u16 wlan_get_cmd_timeout(t_u16 cmd_id)
|
||||||
case HostCmd_CMD_11N_ADDBA_RSP:
|
case HostCmd_CMD_11N_ADDBA_RSP:
|
||||||
case HostCmd_CMD_11N_DELBA:
|
case HostCmd_CMD_11N_DELBA:
|
||||||
case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL:
|
case HostCmd_CMD_802_11_REMAIN_ON_CHANNEL:
|
||||||
|
case HostCmd_CMD_TDLS_CONFIG:
|
||||||
|
case HostCmd_CMD_TDLS_OPERATION:
|
||||||
case HostCmd_CMD_SUPPLICANT_PMK:
|
case HostCmd_CMD_SUPPLICANT_PMK:
|
||||||
case HostCmd_CMD_SUPPLICANT_PROFILE:
|
case HostCmd_CMD_SUPPLICANT_PROFILE:
|
||||||
case HostCmd_CMD_SOFT_RESET:
|
case HostCmd_CMD_SOFT_RESET:
|
||||||
|
@ -1281,6 +1283,25 @@ done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Fetch bitmap rate index
|
||||||
|
*
|
||||||
|
* @param rate_scope A pointer to MrvlRateScope_t
|
||||||
|
*
|
||||||
|
* @return bitmap rate index
|
||||||
|
*/
|
||||||
|
static t_u16 wlan_get_bitmap_index(MrvlRateScope_t *rate_scope)
|
||||||
|
{
|
||||||
|
t_u16 index = 0;
|
||||||
|
|
||||||
|
if (rate_scope != MNULL) {
|
||||||
|
index += NELEMENTS(rate_scope->ht_mcs_rate_bitmap);
|
||||||
|
index += NELEMENTS(rate_scope->vht_mcs_rate_bitmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Global Functions
|
Global Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
@ -2296,15 +2317,16 @@ mlan_status wlan_cancel_pending_scan_cmd(pmlan_adapter pmadapter,
|
||||||
if (pmadapter->scan_processing &&
|
if (pmadapter->scan_processing &&
|
||||||
pmadapter->ext_scan_type == EXT_SCAN_ENHANCE) {
|
pmadapter->ext_scan_type == EXT_SCAN_ENHANCE) {
|
||||||
if (priv) {
|
if (priv) {
|
||||||
if (MLAN_STATUS_FAILURE ==
|
if (MLAN_STATUS_SUCCESS ==
|
||||||
wlan_prepare_cmd(priv, HostCmd_CMD_802_11_SCAN_EXT,
|
wlan_prepare_cmd(priv, HostCmd_CMD_802_11_SCAN_EXT,
|
||||||
HostCmd_ACT_GEN_SET, 0, pioctl_req,
|
HostCmd_ACT_GEN_SET, 0, pioctl_req,
|
||||||
MNULL))
|
MNULL)) {
|
||||||
PRINTM(MERROR, "Failed to prepare command");
|
wlan_recv_event(
|
||||||
wlan_recv_event(priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||||
MNULL);
|
MNULL);
|
||||||
status = MLAN_STATUS_PENDING;
|
status = MLAN_STATUS_PENDING;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
/* Cancel all pending scan command */
|
/* Cancel all pending scan command */
|
||||||
wlan_flush_scan_queue(pmadapter);
|
wlan_flush_scan_queue(pmadapter);
|
||||||
|
@ -2344,19 +2366,21 @@ t_void wlan_cancel_all_pending_cmd(pmlan_adapter pmadapter, t_u8 flag)
|
||||||
MLAN_STATUS_FAILURE);
|
MLAN_STATUS_FAILURE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (pmadapter->curr_cmd && flag) {
|
if (pmadapter->curr_cmd) {
|
||||||
pcmd_node = pmadapter->curr_cmd;
|
pcmd_node = pmadapter->curr_cmd;
|
||||||
if (pcmd_node->pioctl_buf) {
|
if (pcmd_node->pioctl_buf) {
|
||||||
pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf;
|
pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf;
|
||||||
|
pcmd_node->pioctl_buf = MNULL;
|
||||||
pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL;
|
pioctl_buf->status_code = MLAN_ERROR_CMD_CANCEL;
|
||||||
pcb->moal_ioctl_complete(pmadapter->pmoal_handle,
|
pcb->moal_ioctl_complete(pmadapter->pmoal_handle,
|
||||||
pioctl_buf,
|
pioctl_buf,
|
||||||
MLAN_STATUS_FAILURE);
|
MLAN_STATUS_FAILURE);
|
||||||
pcmd_node->pioctl_buf = MNULL;
|
|
||||||
}
|
}
|
||||||
|
if (flag) {
|
||||||
pmadapter->curr_cmd = MNULL;
|
pmadapter->curr_cmd = MNULL;
|
||||||
wlan_insert_cmd_to_free_q(pmadapter, pcmd_node);
|
wlan_insert_cmd_to_free_q(pmadapter, pcmd_node);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Cancel all pending command */
|
/* Cancel all pending command */
|
||||||
while ((pcmd_node = (cmd_ctrl_node *)util_peek_list(
|
while ((pcmd_node = (cmd_ctrl_node *)util_peek_list(
|
||||||
|
@ -3698,6 +3722,7 @@ mlan_status wlan_cmd_tx_rate_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TX_RATE_CFG);
|
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TX_RATE_CFG);
|
||||||
|
|
||||||
rate_cfg->action = wlan_cpu_to_le16(cmd_action);
|
rate_cfg->action = wlan_cpu_to_le16(cmd_action);
|
||||||
|
rate_cfg->cfg_index = 0;
|
||||||
|
|
||||||
rate_scope = (MrvlRateScope_t *)rate_cfg->tlv_buf;
|
rate_scope = (MrvlRateScope_t *)rate_cfg->tlv_buf;
|
||||||
rate_scope->type = wlan_cpu_to_le16(TLV_TYPE_RATE_SCOPE);
|
rate_scope->type = wlan_cpu_to_le16(TLV_TYPE_RATE_SCOPE);
|
||||||
|
@ -3723,14 +3748,9 @@ mlan_status wlan_cmd_tx_rate_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
i < NELEMENTS(rate_scope->he_mcs_rate_bitmap); i++)
|
i < NELEMENTS(rate_scope->he_mcs_rate_bitmap); i++)
|
||||||
rate_scope->he_mcs_rate_bitmap
|
rate_scope->he_mcs_rate_bitmap
|
||||||
[i] = wlan_cpu_to_le16(
|
[i] = wlan_cpu_to_le16(
|
||||||
pbitmap_rates
|
pbitmap_rates[2 +
|
||||||
[2 +
|
wlan_get_bitmap_index(
|
||||||
NELEMENTS(
|
rate_scope) +
|
||||||
rate_scope
|
|
||||||
->ht_mcs_rate_bitmap) +
|
|
||||||
NELEMENTS(
|
|
||||||
rate_scope
|
|
||||||
->vht_mcs_rate_bitmap) +
|
|
||||||
i]);
|
i]);
|
||||||
} else {
|
} else {
|
||||||
rate_scope->length = wlan_cpu_to_le16(
|
rate_scope->length = wlan_cpu_to_le16(
|
||||||
|
@ -3757,16 +3777,12 @@ mlan_status wlan_cmd_tx_rate_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
i < NELEMENTS(rate_scope->vht_mcs_rate_bitmap);
|
i < NELEMENTS(rate_scope->vht_mcs_rate_bitmap);
|
||||||
i++)
|
i++)
|
||||||
rate_scope->he_mcs_rate_bitmap
|
rate_scope->he_mcs_rate_bitmap[i] =
|
||||||
[i] = wlan_cpu_to_le16(
|
wlan_cpu_to_le16(
|
||||||
pmpriv->bitmap_rates
|
pmpriv->bitmap_rates
|
||||||
[2 +
|
[2 +
|
||||||
NELEMENTS(
|
wlan_get_bitmap_index(
|
||||||
rate_scope
|
rate_scope) +
|
||||||
->ht_mcs_rate_bitmap) +
|
|
||||||
NELEMENTS(
|
|
||||||
rate_scope
|
|
||||||
->vht_mcs_rate_bitmap) +
|
|
||||||
i]);
|
i]);
|
||||||
} else {
|
} else {
|
||||||
rate_scope->length = wlan_cpu_to_le16(
|
rate_scope->length = wlan_cpu_to_le16(
|
||||||
|
@ -4077,14 +4093,12 @@ mlan_status wlan_adapter_get_hw_spec(pmlan_adapter pmadapter)
|
||||||
pmadapter->cal_data_len = 0;
|
pmadapter->cal_data_len = 0;
|
||||||
}
|
}
|
||||||
/* Get FW region and cfp tables */
|
/* Get FW region and cfp tables */
|
||||||
if (pmadapter->init_para.fw_region) {
|
|
||||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_CHAN_REGION_CFG,
|
ret = wlan_prepare_cmd(priv, HostCmd_CMD_CHAN_REGION_CFG,
|
||||||
HostCmd_ACT_GEN_GET, 0, MNULL, MNULL);
|
HostCmd_ACT_GEN_GET, 0, MNULL, MNULL);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Get HW spec
|
* Get HW spec
|
||||||
*/
|
*/
|
||||||
|
@ -4174,6 +4188,17 @@ mlan_status wlan_adapter_init_cmd(pmlan_adapter pmadapter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define DEF_AUTO_NULL_PKT_PERIOD 30
|
||||||
|
if (pmpriv_sta) {
|
||||||
|
t_u32 value = DEF_AUTO_NULL_PKT_PERIOD;
|
||||||
|
ret = wlan_prepare_cmd(pmpriv_sta, HostCmd_CMD_802_11_SNMP_MIB,
|
||||||
|
HostCmd_ACT_GEN_SET, NullPktPeriod_i,
|
||||||
|
MNULL, &value);
|
||||||
|
if (ret) {
|
||||||
|
ret = MLAN_STATUS_FAILURE;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (pmadapter->init_para.indrstcfg != 0xffffffff) {
|
if (pmadapter->init_para.indrstcfg != 0xffffffff) {
|
||||||
mlan_ds_ind_rst_cfg ind_rst_cfg;
|
mlan_ds_ind_rst_cfg ind_rst_cfg;
|
||||||
ind_rst_cfg.ir_mode = pmadapter->init_para.indrstcfg & 0xff;
|
ind_rst_cfg.ir_mode = pmadapter->init_para.indrstcfg & 0xff;
|
||||||
|
@ -4488,6 +4513,12 @@ mlan_status wlan_process_vdll_event(pmlan_private pmpriv, pmlan_buffer pevent)
|
||||||
PRINTM(MEVENT, "VDLL_IND (OFFSET): offset=0x%x\n", offset);
|
PRINTM(MEVENT, "VDLL_IND (OFFSET): offset=0x%x\n", offset);
|
||||||
wlan_get_vdll_image(pmadapter, offset);
|
wlan_get_vdll_image(pmadapter, offset);
|
||||||
break;
|
break;
|
||||||
|
case VDLL_IND_TYPE_ERR_SIG:
|
||||||
|
PRINTM(MERROR, "VDLL_IND (SIG ERR).\n");
|
||||||
|
break;
|
||||||
|
case VDLL_IND_TYPE_ERR_ID:
|
||||||
|
PRINTM(MERROR, "VDLL_IND (ID ERR).\n");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
PRINTM(MERROR, "unknow vdll ind type=%d\n", ind->type);
|
PRINTM(MERROR, "unknow vdll ind type=%d\n", ind->type);
|
||||||
break;
|
break;
|
||||||
|
@ -4879,11 +4910,11 @@ mlan_status wlan_ret_get_hw_spec(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
pmadapter->pcard_sd->mp_end_port =
|
pmadapter->pcard_sd->mp_end_port =
|
||||||
wlan_le16_to_cpu(hw_spec->mp_end_port);
|
wlan_le16_to_cpu(hw_spec->mp_end_port);
|
||||||
|
|
||||||
for (i = 1; i <= (unsigned)(MAX_PORT -
|
for (i = 1; i <= (unsigned)(pmadapter->pcard_sd->max_ports -
|
||||||
pmadapter->pcard_sd->mp_end_port);
|
pmadapter->pcard_sd->mp_end_port);
|
||||||
i++)
|
i++)
|
||||||
pmadapter->pcard_sd->mp_data_port_mask &=
|
pmadapter->pcard_sd->mp_data_port_mask &=
|
||||||
~(1 << (MAX_PORT - i));
|
~(1 << (pmadapter->pcard_sd->max_ports - i));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6203,11 +6234,11 @@ void wlan_bt_coex_wlan_param_update_event(pmlan_private priv,
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
while (len >= sizeof(MrvlIEtypesHeader_t)) {
|
while (len >= (t_s32)sizeof(MrvlIEtypesHeader_t)) {
|
||||||
tlv = (MrvlIEtypesHeader_t *)pCurrent_ptr;
|
tlv = (MrvlIEtypesHeader_t *)pCurrent_ptr;
|
||||||
tlv_len = wlan_le16_to_cpu(tlv->len);
|
tlv_len = wlan_le16_to_cpu(tlv->len);
|
||||||
tlv_type = wlan_le16_to_cpu(tlv->type);
|
tlv_type = wlan_le16_to_cpu(tlv->type);
|
||||||
if ((tlv_len + sizeof(MrvlIEtypesHeader_t)) > len)
|
if ((tlv_len + (t_s32)sizeof(MrvlIEtypesHeader_t)) > len)
|
||||||
break;
|
break;
|
||||||
switch (tlv_type) {
|
switch (tlv_type) {
|
||||||
case TLV_BTCOEX_WL_AGGR_WINSIZE:
|
case TLV_BTCOEX_WL_AGGR_WINSIZE:
|
||||||
|
@ -7877,6 +7908,63 @@ mlan_status wlan_ret_rxabortcfg_ext(pmlan_private pmpriv,
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function sets the hal/phy cfg params
|
||||||
|
*
|
||||||
|
* @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_hal_phy_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
|
t_u16 cmd_action, t_u16 *pdata_buf)
|
||||||
|
{
|
||||||
|
HostCmd_DS_HAL_PHY_CFG *hal_phy_cfg_cmd =
|
||||||
|
&cmd->params.hal_phy_cfg_params;
|
||||||
|
mlan_ds_hal_phy_cfg_params *hal_phy_cfg_params = MNULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_HAL_PHY_CFG);
|
||||||
|
cmd->size = sizeof(HostCmd_DS_HAL_PHY_CFG) + S_DS_GEN;
|
||||||
|
hal_phy_cfg_cmd->action = wlan_cpu_to_le16(cmd_action);
|
||||||
|
hal_phy_cfg_params = (mlan_ds_hal_phy_cfg_params *)pdata_buf;
|
||||||
|
hal_phy_cfg_cmd->dot11b_psd_mask_cfg =
|
||||||
|
hal_phy_cfg_params->dot11b_psd_mask_cfg;
|
||||||
|
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles the command response of hal_phy_cfg
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||||
|
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_SUCCESS
|
||||||
|
*/
|
||||||
|
mlan_status wlan_ret_hal_phy_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
|
mlan_ioctl_req *pioctl_buf)
|
||||||
|
{
|
||||||
|
HostCmd_DS_HAL_PHY_CFG *cfg_cmd =
|
||||||
|
(HostCmd_DS_HAL_PHY_CFG *)&resp->params.hal_phy_cfg_params;
|
||||||
|
mlan_ds_misc_cfg *misc_cfg = MNULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
if (pioctl_buf) {
|
||||||
|
misc_cfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||||
|
misc_cfg->param.hal_phy_cfg_params.dot11b_psd_mask_cfg =
|
||||||
|
cfg_cmd->dot11b_psd_mask_cfg;
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function prepares command of Dot11mc unassoc ftm cfg
|
* @brief This function prepares command of Dot11mc unassoc ftm cfg
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file declares the generic data structures and APIs.
|
* @brief This file declares the generic data structures and APIs.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
#define _MLAN_DECL_H_
|
#define _MLAN_DECL_H_
|
||||||
|
|
||||||
/** MLAN release version */
|
/** MLAN release version */
|
||||||
#define MLAN_RELEASE_VERSION "214"
|
#define MLAN_RELEASE_VERSION "241"
|
||||||
|
|
||||||
/** Re-define generic data types for MLAN/MOAL */
|
/** Re-define generic data types for MLAN/MOAL */
|
||||||
/** Signed char (1-byte) */
|
/** Signed char (1-byte) */
|
||||||
|
@ -233,12 +233,12 @@ typedef t_s32 t_sval;
|
||||||
/** MU beamformer */
|
/** MU beamformer */
|
||||||
#define DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK (MBIT(19))
|
#define DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK (MBIT(19))
|
||||||
|
|
||||||
/** Size of rx data buffer 4096+256 */
|
/** Size of rx data buffer 3839+256 */
|
||||||
#define MLAN_RX_DATA_BUF_SIZE 4352
|
#define MLAN_RX_DATA_BUF_SIZE 4096
|
||||||
|
|
||||||
/** Size of command buffer */
|
/** Size of command buffer */
|
||||||
/** because cal_data_size 2.4 k */
|
/** because cal_data_size 2.4 k */
|
||||||
#define MRVDRV_SIZE_OF_CMD_BUFFER (4 * 1024)
|
#define MRVDRV_SIZE_OF_CMD_BUFFER (3 * 1024)
|
||||||
/** Size of rx command buffer */
|
/** Size of rx command buffer */
|
||||||
#define MLAN_RX_CMD_BUF_SIZE MRVDRV_SIZE_OF_CMD_BUFFER
|
#define MLAN_RX_CMD_BUF_SIZE MRVDRV_SIZE_OF_CMD_BUFFER
|
||||||
/** Upload size */
|
/** Upload size */
|
||||||
|
@ -330,6 +330,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define ALLOC_BUF_SIZE MLAN_RX_DATA_BUF_SIZE
|
#define ALLOC_BUF_SIZE MLAN_RX_DATA_BUF_SIZE
|
||||||
/** SDIO MP aggr pkt limit */
|
/** SDIO MP aggr pkt limit */
|
||||||
#define SDIO_MP_AGGR_DEF_PKT_LIMIT (16)
|
#define SDIO_MP_AGGR_DEF_PKT_LIMIT (16)
|
||||||
|
/** SDIO MP aggr pkt limit 8 */
|
||||||
|
#define SDIO_MP_AGGR_DEF_PKT_LIMIT_8 (8)
|
||||||
/** max SDIO MP aggr pkt limit */
|
/** max SDIO MP aggr pkt limit */
|
||||||
#define SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX (16)
|
#define SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX (16)
|
||||||
|
|
||||||
|
@ -365,6 +367,10 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_TYPE_9097 0x07
|
#define CARD_TYPE_9097 0x07
|
||||||
/** 8978 card type */
|
/** 8978 card type */
|
||||||
#define CARD_TYPE_8978 0x08
|
#define CARD_TYPE_8978 0x08
|
||||||
|
/** 9177 card type */
|
||||||
|
#define CARD_TYPE_9177 0x09
|
||||||
|
/** 8801 card type */
|
||||||
|
#define CARD_TYPE_8801 0x0a
|
||||||
|
|
||||||
/** 9098 A0 reverion num */
|
/** 9098 A0 reverion num */
|
||||||
#define CHIP_9098_REV_A0 1
|
#define CHIP_9098_REV_A0 1
|
||||||
|
@ -392,6 +398,10 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_TYPE_SD9097 (CARD_TYPE_9097 | (INTF_SD << 8))
|
#define CARD_TYPE_SD9097 (CARD_TYPE_9097 | (INTF_SD << 8))
|
||||||
/** SD9098 card type */
|
/** SD9098 card type */
|
||||||
#define CARD_TYPE_SD9098 (CARD_TYPE_9098 | (INTF_SD << 8))
|
#define CARD_TYPE_SD9098 (CARD_TYPE_9098 | (INTF_SD << 8))
|
||||||
|
/** SD9177 card type */
|
||||||
|
#define CARD_TYPE_SD9177 (CARD_TYPE_9177 | (INTF_SD << 8))
|
||||||
|
/** SD8801 card type */
|
||||||
|
#define CARD_TYPE_SD8801 (CARD_TYPE_8801 | (INTF_SD << 8))
|
||||||
|
|
||||||
#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct))
|
#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct))
|
||||||
#define IS_SD8897(ct) (CARD_TYPE_SD8897 == (ct))
|
#define IS_SD8897(ct) (CARD_TYPE_SD8897 == (ct))
|
||||||
|
@ -401,6 +411,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define IS_SD8987(ct) (CARD_TYPE_SD8987 == (ct))
|
#define IS_SD8987(ct) (CARD_TYPE_SD8987 == (ct))
|
||||||
#define IS_SD9097(ct) (CARD_TYPE_SD9097 == (ct))
|
#define IS_SD9097(ct) (CARD_TYPE_SD9097 == (ct))
|
||||||
#define IS_SD9098(ct) (CARD_TYPE_SD9098 == (ct))
|
#define IS_SD9098(ct) (CARD_TYPE_SD9098 == (ct))
|
||||||
|
#define IS_SD9177(ct) (CARD_TYPE_SD9177 == (ct))
|
||||||
|
#define IS_SD8801(ct) (CARD_TYPE_SD8801 == (ct))
|
||||||
|
|
||||||
/** SD8887 Card */
|
/** SD8887 Card */
|
||||||
#define CARD_SD8887 "SD8887"
|
#define CARD_SD8887 "SD8887"
|
||||||
|
@ -418,6 +430,10 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_SD9097 "SD9097"
|
#define CARD_SD9097 "SD9097"
|
||||||
/** SD9098 Card */
|
/** SD9098 Card */
|
||||||
#define CARD_SD9098 "SD9098"
|
#define CARD_SD9098 "SD9098"
|
||||||
|
/** SD9177 Card */
|
||||||
|
#define CARD_SD9177 "SD9177"
|
||||||
|
/** SD9177 Card */
|
||||||
|
#define CARD_SD8801 "SD9177"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
|
@ -445,9 +461,13 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_PCIE9000S "PCIE9000S"
|
#define CARD_PCIE9000S "PCIE9000S"
|
||||||
/** PCIE9098 Card */
|
/** PCIE9098 Card */
|
||||||
#define CARD_PCIE9098 "PCIE9098"
|
#define CARD_PCIE9098 "PCIE9098"
|
||||||
|
/** PCIEAW690 Card */
|
||||||
|
#define CARD_PCIEAW690 "PCIEAW690"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
|
/** USB8801 card type */
|
||||||
|
#define CARD_TYPE_USB8801 (CARD_TYPE_8801 | (INTF_USB << 8))
|
||||||
/** USB8897 card type */
|
/** USB8897 card type */
|
||||||
#define CARD_TYPE_USB8897 (CARD_TYPE_8897 | (INTF_USB << 8))
|
#define CARD_TYPE_USB8897 (CARD_TYPE_8897 | (INTF_USB << 8))
|
||||||
/** USB8997 card type */
|
/** USB8997 card type */
|
||||||
|
@ -459,12 +479,15 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
/** USB9097 card type */
|
/** USB9097 card type */
|
||||||
#define CARD_TYPE_USB9097 (CARD_TYPE_9097 | (INTF_USB << 8))
|
#define CARD_TYPE_USB9097 (CARD_TYPE_9097 | (INTF_USB << 8))
|
||||||
|
|
||||||
|
#define IS_USB8801(ct) (CARD_TYPE_USB8801 == (ct))
|
||||||
#define IS_USB8897(ct) (CARD_TYPE_USB8897 == (ct))
|
#define IS_USB8897(ct) (CARD_TYPE_USB8897 == (ct))
|
||||||
#define IS_USB8997(ct) (CARD_TYPE_USB8997 == (ct))
|
#define IS_USB8997(ct) (CARD_TYPE_USB8997 == (ct))
|
||||||
#define IS_USB8978(ct) (CARD_TYPE_USB8978 == (ct))
|
#define IS_USB8978(ct) (CARD_TYPE_USB8978 == (ct))
|
||||||
#define IS_USB9098(ct) (CARD_TYPE_USB9098 == (ct))
|
#define IS_USB9098(ct) (CARD_TYPE_USB9098 == (ct))
|
||||||
#define IS_USB9097(ct) (CARD_TYPE_USB9097 == (ct))
|
#define IS_USB9097(ct) (CARD_TYPE_USB9097 == (ct))
|
||||||
|
|
||||||
|
/** USB8801 Card */
|
||||||
|
#define CARD_USB8801 "USB8801"
|
||||||
/** USB8897 Card */
|
/** USB8897 Card */
|
||||||
#define CARD_USB8897 "USB8897"
|
#define CARD_USB8897 "USB8897"
|
||||||
/** USB8997 Card */
|
/** USB8997 Card */
|
||||||
|
@ -477,6 +500,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_USB9097 "USB9097"
|
#define CARD_USB9097 "USB9097"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define IS_CARD8801(ct) (CARD_TYPE_8801 == ((ct)&0xf))
|
||||||
#define IS_CARD8887(ct) (CARD_TYPE_8887 == ((ct)&0xf))
|
#define IS_CARD8887(ct) (CARD_TYPE_8887 == ((ct)&0xf))
|
||||||
#define IS_CARD8897(ct) (CARD_TYPE_8897 == ((ct)&0xf))
|
#define IS_CARD8897(ct) (CARD_TYPE_8897 == ((ct)&0xf))
|
||||||
#define IS_CARD8977(ct) (CARD_TYPE_8977 == ((ct)&0xf))
|
#define IS_CARD8977(ct) (CARD_TYPE_8977 == ((ct)&0xf))
|
||||||
|
@ -484,6 +508,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define IS_CARD8987(ct) (CARD_TYPE_8987 == ((ct)&0xf))
|
#define IS_CARD8987(ct) (CARD_TYPE_8987 == ((ct)&0xf))
|
||||||
#define IS_CARD9098(ct) (CARD_TYPE_9098 == ((ct)&0xf))
|
#define IS_CARD9098(ct) (CARD_TYPE_9098 == ((ct)&0xf))
|
||||||
#define IS_CARD9097(ct) (CARD_TYPE_9097 == ((ct)&0xf))
|
#define IS_CARD9097(ct) (CARD_TYPE_9097 == ((ct)&0xf))
|
||||||
|
#define IS_CARD9177(ct) (CARD_TYPE_9177 == ((ct)&0xf))
|
||||||
|
|
||||||
typedef struct _card_type_entry {
|
typedef struct _card_type_entry {
|
||||||
t_u16 card_type;
|
t_u16 card_type;
|
||||||
|
@ -534,6 +559,9 @@ typedef enum {
|
||||||
#define MLAN_BUF_FLAG_USB_TX_AGGR MBIT(7)
|
#define MLAN_BUF_FLAG_USB_TX_AGGR MBIT(7)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** Buffer flag for TDLS */
|
||||||
|
#define MLAN_BUF_FLAG_TDLS MBIT(8)
|
||||||
|
|
||||||
/** Buffer flag for TCP_ACK */
|
/** Buffer flag for TCP_ACK */
|
||||||
#define MLAN_BUF_FLAG_TCP_ACK MBIT(9)
|
#define MLAN_BUF_FLAG_TCP_ACK MBIT(9)
|
||||||
|
|
||||||
|
@ -745,6 +773,7 @@ typedef enum _mlan_event_id {
|
||||||
MLAN_EVENT_ID_DRV_BGSCAN_RESULT = 0x80000013,
|
MLAN_EVENT_ID_DRV_BGSCAN_RESULT = 0x80000013,
|
||||||
MLAN_EVENT_ID_DRV_FLUSH_RX_WORK = 0x80000015,
|
MLAN_EVENT_ID_DRV_FLUSH_RX_WORK = 0x80000015,
|
||||||
MLAN_EVENT_ID_DRV_DEFER_RX_WORK = 0x80000016,
|
MLAN_EVENT_ID_DRV_DEFER_RX_WORK = 0x80000016,
|
||||||
|
MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ = 0x80000017,
|
||||||
MLAN_EVENT_ID_DRV_FT_RESPONSE = 0x80000018,
|
MLAN_EVENT_ID_DRV_FT_RESPONSE = 0x80000018,
|
||||||
MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK = 0x80000019,
|
MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK = 0x80000019,
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
|
@ -918,7 +947,7 @@ typedef MLAN_PACK_START struct _chan_band_info {
|
||||||
t_u8 center_chan;
|
t_u8 center_chan;
|
||||||
/** dfs channel flag */
|
/** dfs channel flag */
|
||||||
t_u8 is_dfs_chan;
|
t_u8 is_dfs_chan;
|
||||||
} MLAN_PACK_END chan_band_info, *pchan_band_info;
|
} MLAN_PACK_END chan_band_info;
|
||||||
|
|
||||||
/** Channel usability flags */
|
/** Channel usability flags */
|
||||||
#define NXP_CHANNEL_NO_OFDM MBIT(9)
|
#define NXP_CHANNEL_NO_OFDM MBIT(9)
|
||||||
|
@ -1109,7 +1138,10 @@ typedef struct _mlan_buffer {
|
||||||
t_u32 out_ts_usec;
|
t_u32 out_ts_usec;
|
||||||
/** tx_seq_num */
|
/** tx_seq_num */
|
||||||
t_u32 tx_seq_num;
|
t_u32 tx_seq_num;
|
||||||
|
/** Time stamp when packet is deque from rx_q(seconds) */
|
||||||
|
t_u32 extra_ts_sec;
|
||||||
|
/** Time stamp when packet is dequed from rx_q(micro seconds) */
|
||||||
|
t_u32 extra_ts_usec;
|
||||||
/** Fields below are valid for MLAN module only */
|
/** Fields below are valid for MLAN module only */
|
||||||
/** Pointer to parent mlan_buffer */
|
/** Pointer to parent mlan_buffer */
|
||||||
struct _mlan_buffer *pparent;
|
struct _mlan_buffer *pparent;
|
||||||
|
@ -1121,9 +1153,10 @@ typedef struct _mlan_buffer {
|
||||||
} u;
|
} u;
|
||||||
} mlan_buffer, *pmlan_buffer, **ppmlan_buffer;
|
} mlan_buffer, *pmlan_buffer, **ppmlan_buffer;
|
||||||
|
|
||||||
/** mlan_fw_info data structure */
|
/** mlan_hw_info data structure */
|
||||||
typedef struct _mlan_hw_info {
|
typedef struct _mlan_hw_info {
|
||||||
t_u32 fw_cap;
|
t_u32 fw_cap;
|
||||||
|
t_u32 fw_cap_ext;
|
||||||
} mlan_hw_info, *pmlan_hw_info;
|
} mlan_hw_info, *pmlan_hw_info;
|
||||||
|
|
||||||
/** mlan_bss_attr data structure */
|
/** mlan_bss_attr data structure */
|
||||||
|
@ -1262,6 +1295,242 @@ typedef MLAN_PACK_START struct _tlvbuf_custom_ie {
|
||||||
tlvbuf_max_mgmt_ie max_mgmt_ie;
|
tlvbuf_max_mgmt_ie max_mgmt_ie;
|
||||||
} MLAN_PACK_END mlan_ds_misc_custom_ie;
|
} MLAN_PACK_END mlan_ds_misc_custom_ie;
|
||||||
|
|
||||||
|
/** Max TDLS config data length */
|
||||||
|
#define MAX_TDLS_DATA_LEN 1024
|
||||||
|
|
||||||
|
/** Action commands for TDLS enable/disable */
|
||||||
|
#define WLAN_TDLS_CONFIG 0x00
|
||||||
|
/** Action commands for TDLS configuration :Set */
|
||||||
|
#define WLAN_TDLS_SET_INFO 0x01
|
||||||
|
/** Action commands for TDLS configuration :Discovery Request */
|
||||||
|
#define WLAN_TDLS_DISCOVERY_REQ 0x02
|
||||||
|
/** Action commands for TDLS configuration :Setup Request */
|
||||||
|
#define WLAN_TDLS_SETUP_REQ 0x03
|
||||||
|
/** Action commands for TDLS configuration :Tear down Request */
|
||||||
|
#define WLAN_TDLS_TEAR_DOWN_REQ 0x04
|
||||||
|
/** Action ID for TDLS power mode */
|
||||||
|
#define WLAN_TDLS_POWER_MODE 0x05
|
||||||
|
/**Action ID for init TDLS Channel Switch*/
|
||||||
|
#define WLAN_TDLS_INIT_CHAN_SWITCH 0x06
|
||||||
|
/** Action ID for stop TDLS Channel Switch */
|
||||||
|
#define WLAN_TDLS_STOP_CHAN_SWITCH 0x07
|
||||||
|
/** Action ID for configure CS related parameters */
|
||||||
|
#define WLAN_TDLS_CS_PARAMS 0x08
|
||||||
|
/** Action ID for Disable CS */
|
||||||
|
#define WLAN_TDLS_CS_DISABLE 0x09
|
||||||
|
/** Action ID for TDLS link status */
|
||||||
|
#define WLAN_TDLS_LINK_STATUS 0x0A
|
||||||
|
/** Action ID for Host TDLS config uapsd and CS */
|
||||||
|
#define WLAN_HOST_TDLS_CONFIG 0x0D
|
||||||
|
/** Action ID for TDLS CS immediate return */
|
||||||
|
#define WLAN_TDLS_DEBUG_CS_RET_IM 0xFFF7
|
||||||
|
/** Action ID for TDLS Stop RX */
|
||||||
|
#define WLAN_TDLS_DEBUG_STOP_RX 0xFFF8
|
||||||
|
/** Action ID for TDLS Allow weak security for links establish */
|
||||||
|
#define WLAN_TDLS_DEBUG_ALLOW_WEAK_SECURITY 0xFFF9
|
||||||
|
/** Action ID for TDLS Ignore key lifetime expiry */
|
||||||
|
#define WLAN_TDLS_DEBUG_IGNORE_KEY_EXPIRY 0xFFFA
|
||||||
|
/** Action ID for TDLS Higher/Lower mac Test */
|
||||||
|
#define WLAN_TDLS_DEBUG_HIGHER_LOWER_MAC 0xFFFB
|
||||||
|
/** Action ID for TDLS Prohibited Test */
|
||||||
|
#define WLAN_TDLS_DEBUG_SETUP_PROHIBITED 0xFFFC
|
||||||
|
/** Action ID for TDLS Existing link Test */
|
||||||
|
#define WLAN_TDLS_DEBUG_SETUP_SAME_LINK 0xFFFD
|
||||||
|
/** Action ID for TDLS Fail Setup Confirm */
|
||||||
|
#define WLAN_TDLS_DEBUG_FAIL_SETUP_CONFIRM 0xFFFE
|
||||||
|
/** Action commands for TDLS debug: Wrong BSS Request */
|
||||||
|
#define WLAN_TDLS_DEBUG_WRONG_BSS 0xFFFF
|
||||||
|
|
||||||
|
/** tdls each link rate information */
|
||||||
|
typedef MLAN_PACK_START struct _tdls_link_rate_info {
|
||||||
|
/** Tx Data Rate */
|
||||||
|
t_u8 tx_data_rate;
|
||||||
|
/** Tx Rate HT info*/
|
||||||
|
t_u8 tx_rate_htinfo;
|
||||||
|
} MLAN_PACK_END tdls_link_rate_info;
|
||||||
|
|
||||||
|
/** tdls each link status */
|
||||||
|
typedef MLAN_PACK_START struct _tdls_each_link_status {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** Link Flags */
|
||||||
|
t_u8 link_flags;
|
||||||
|
/** Traffic Status */
|
||||||
|
t_u8 traffic_status;
|
||||||
|
/** Tx Failure Count */
|
||||||
|
t_u8 tx_fail_count;
|
||||||
|
/** Channel Number */
|
||||||
|
t_u32 active_channel;
|
||||||
|
/** Last Data RSSI in dBm */
|
||||||
|
t_s16 data_rssi_last;
|
||||||
|
/** Last Data NF in dBm */
|
||||||
|
t_s16 data_nf_last;
|
||||||
|
/** AVG DATA RSSI in dBm */
|
||||||
|
t_s16 data_rssi_avg;
|
||||||
|
/** AVG DATA NF in dBm */
|
||||||
|
t_s16 data_nf_avg;
|
||||||
|
union {
|
||||||
|
/** tdls rate info */
|
||||||
|
tdls_link_rate_info rate_info;
|
||||||
|
/** tdls link final rate*/
|
||||||
|
t_u16 final_data_rate;
|
||||||
|
} u;
|
||||||
|
/** Security Method */
|
||||||
|
t_u8 security_method;
|
||||||
|
/** Key Lifetime in milliseconds */
|
||||||
|
t_u32 key_lifetime;
|
||||||
|
/** Key Length */
|
||||||
|
t_u8 key_length;
|
||||||
|
/** actual key */
|
||||||
|
t_u8 key[];
|
||||||
|
} MLAN_PACK_END tdls_each_link_status;
|
||||||
|
|
||||||
|
/** TDLS configuration data */
|
||||||
|
typedef MLAN_PACK_START struct _tdls_all_config {
|
||||||
|
union {
|
||||||
|
/** TDLS state enable disable */
|
||||||
|
MLAN_PACK_START struct _tdls_config {
|
||||||
|
/** enable or disable */
|
||||||
|
t_u16 enable;
|
||||||
|
} MLAN_PACK_END tdls_config;
|
||||||
|
/** Host tdls config */
|
||||||
|
MLAN_PACK_START struct _host_tdls_cfg {
|
||||||
|
/** support uapsd */
|
||||||
|
t_u8 uapsd_support;
|
||||||
|
/** channel_switch */
|
||||||
|
t_u8 cs_support;
|
||||||
|
/** TLV length */
|
||||||
|
t_u16 tlv_len;
|
||||||
|
/** tdls info */
|
||||||
|
t_u8 tlv_buffer[];
|
||||||
|
} MLAN_PACK_END host_tdls_cfg;
|
||||||
|
/** TDLS set info */
|
||||||
|
MLAN_PACK_START struct _tdls_set_data {
|
||||||
|
/** (tlv + capInfo) length */
|
||||||
|
t_u16 tlv_length;
|
||||||
|
/** Cap Info */
|
||||||
|
t_u16 cap_info;
|
||||||
|
/** TLV buffer */
|
||||||
|
t_u8 tlv_buffer[];
|
||||||
|
} MLAN_PACK_END tdls_set;
|
||||||
|
|
||||||
|
/** TDLS discovery and others having mac argument */
|
||||||
|
MLAN_PACK_START struct _tdls_discovery_data {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END tdls_discovery, tdls_stop_chan_switch,
|
||||||
|
tdls_link_status_req;
|
||||||
|
|
||||||
|
/** TDLS discovery Response */
|
||||||
|
MLAN_PACK_START struct _tdls_discovery_resp {
|
||||||
|
/** payload length */
|
||||||
|
t_u16 payload_len;
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** RSSI */
|
||||||
|
t_s8 rssi;
|
||||||
|
/** Cap Info */
|
||||||
|
t_u16 cap_info;
|
||||||
|
/** TLV buffer */
|
||||||
|
t_u8 tlv_buffer[];
|
||||||
|
} MLAN_PACK_END tdls_discovery_resp;
|
||||||
|
|
||||||
|
/** TDLS setup request */
|
||||||
|
MLAN_PACK_START struct _tdls_setup_data {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** timeout value in milliseconds */
|
||||||
|
t_u32 setup_timeout;
|
||||||
|
/** key lifetime in milliseconds */
|
||||||
|
t_u32 key_lifetime;
|
||||||
|
} MLAN_PACK_END tdls_setup;
|
||||||
|
|
||||||
|
/** TDLS tear down info */
|
||||||
|
MLAN_PACK_START struct _tdls_tear_down_data {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** reason code */
|
||||||
|
t_u16 reason_code;
|
||||||
|
} MLAN_PACK_END tdls_tear_down, tdls_cmd_resp;
|
||||||
|
|
||||||
|
/** TDLS power mode info */
|
||||||
|
MLAN_PACK_START struct _tdls_power_mode_data {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** Power Mode */
|
||||||
|
t_u16 power_mode;
|
||||||
|
} MLAN_PACK_END tdls_power_mode;
|
||||||
|
|
||||||
|
/** TDLS channel switch info */
|
||||||
|
MLAN_PACK_START struct _tdls_chan_switch {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** Channel Switch primary channel no */
|
||||||
|
t_u8 primary_channel;
|
||||||
|
/** Channel Switch secondary channel offset */
|
||||||
|
t_u8 secondary_channel_offset;
|
||||||
|
/** Channel Switch Band */
|
||||||
|
t_u8 band;
|
||||||
|
/** Channel Switch time in milliseconds */
|
||||||
|
t_u16 switch_time;
|
||||||
|
/** Channel Switch timeout in milliseconds */
|
||||||
|
t_u16 switch_timeout;
|
||||||
|
/** Channel Regulatory class*/
|
||||||
|
t_u8 regulatory_class;
|
||||||
|
/** peridicity flag*/
|
||||||
|
t_u8 periodicity;
|
||||||
|
} MLAN_PACK_END tdls_chan_switch;
|
||||||
|
|
||||||
|
/** TDLS channel switch paramters */
|
||||||
|
MLAN_PACK_START struct _tdls_cs_params {
|
||||||
|
/** unit time, multiples of 10ms */
|
||||||
|
t_u8 unit_time;
|
||||||
|
/** threshold for other link */
|
||||||
|
t_u8 threshold_otherlink;
|
||||||
|
/** threshold for direct link */
|
||||||
|
t_u8 threshold_directlink;
|
||||||
|
} MLAN_PACK_END tdls_cs_params;
|
||||||
|
|
||||||
|
/** tdls disable channel switch */
|
||||||
|
MLAN_PACK_START struct _tdls_disable_cs {
|
||||||
|
/** Data*/
|
||||||
|
t_u16 data;
|
||||||
|
} MLAN_PACK_END tdls_disable_cs;
|
||||||
|
/** TDLS debug data */
|
||||||
|
MLAN_PACK_START struct _tdls_debug_data {
|
||||||
|
/** debug data */
|
||||||
|
t_u16 debug_data;
|
||||||
|
} MLAN_PACK_END tdls_debug_data;
|
||||||
|
|
||||||
|
/** TDLS link status Response */
|
||||||
|
MLAN_PACK_START struct _tdls_link_status_resp {
|
||||||
|
/** payload length */
|
||||||
|
t_u16 payload_len;
|
||||||
|
/** number of links */
|
||||||
|
t_u8 active_links;
|
||||||
|
/** structure for link status */
|
||||||
|
tdls_each_link_status link_stats[1];
|
||||||
|
} MLAN_PACK_END tdls_link_status_resp;
|
||||||
|
|
||||||
|
} u;
|
||||||
|
} MLAN_PACK_END tdls_all_config;
|
||||||
|
|
||||||
|
/** TDLS configuration buffer */
|
||||||
|
typedef MLAN_PACK_START struct _buf_tdls_config {
|
||||||
|
/** TDLS Action */
|
||||||
|
t_u16 tdls_action;
|
||||||
|
/** TDLS data */
|
||||||
|
t_u8 tdls_data[MAX_TDLS_DATA_LEN];
|
||||||
|
} MLAN_PACK_END mlan_ds_misc_tdls_config;
|
||||||
|
|
||||||
|
/** Event structure for tear down */
|
||||||
|
typedef struct _tdls_tear_down_event {
|
||||||
|
/** Peer mac address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** Reason code */
|
||||||
|
t_u16 reason_code;
|
||||||
|
} tdls_tear_down_event;
|
||||||
|
|
||||||
/** channel width */
|
/** channel width */
|
||||||
typedef enum wifi_channel_width {
|
typedef enum wifi_channel_width {
|
||||||
WIFI_CHAN_WIDTH_20 = 0,
|
WIFI_CHAN_WIDTH_20 = 0,
|
||||||
|
@ -1614,160 +1883,149 @@ typedef struct _sta_stats {
|
||||||
/** mlan_callbacks data structure */
|
/** mlan_callbacks data structure */
|
||||||
typedef struct _mlan_callbacks {
|
typedef struct _mlan_callbacks {
|
||||||
/** moal_get_fw_data */
|
/** moal_get_fw_data */
|
||||||
mlan_status (*moal_get_fw_data)(t_void *pmoal_handle, t_u32 offset,
|
mlan_status (*moal_get_fw_data)(t_void *pmoal, t_u32 offset, t_u32 len,
|
||||||
t_u32 len, t_u8 *pbuf);
|
|
||||||
mlan_status (*moal_get_vdll_data)(t_void *pmoal_handle, t_u32 len,
|
|
||||||
t_u8 *pbuf);
|
t_u8 *pbuf);
|
||||||
|
mlan_status (*moal_get_vdll_data)(t_void *pmoal, t_u32 len, t_u8 *pbuf);
|
||||||
/** moal_get_hw_spec_complete */
|
/** moal_get_hw_spec_complete */
|
||||||
mlan_status (*moal_get_hw_spec_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_get_hw_spec_complete)(t_void *pmoal,
|
||||||
mlan_status status,
|
mlan_status status,
|
||||||
pmlan_hw_info phw,
|
pmlan_hw_info phw,
|
||||||
pmlan_bss_tbl ptbl);
|
pmlan_bss_tbl ptbl);
|
||||||
/** moal_init_fw_complete */
|
/** moal_init_fw_complete */
|
||||||
mlan_status (*moal_init_fw_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_init_fw_complete)(t_void *pmoal, mlan_status status);
|
||||||
mlan_status status);
|
|
||||||
/** moal_shutdown_fw_complete */
|
/** moal_shutdown_fw_complete */
|
||||||
mlan_status (*moal_shutdown_fw_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_shutdown_fw_complete)(t_void *pmoal,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
/** moal_send_packet_complete */
|
/** moal_send_packet_complete */
|
||||||
mlan_status (*moal_send_packet_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_send_packet_complete)(t_void *pmoal,
|
||||||
pmlan_buffer pmbuf,
|
pmlan_buffer pmbuf,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
/** moal_recv_complete */
|
/** moal_recv_complete */
|
||||||
mlan_status (*moal_recv_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_recv_complete)(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port,
|
t_u32 port, mlan_status status);
|
||||||
mlan_status status);
|
|
||||||
/** moal_recv_packet */
|
/** moal_recv_packet */
|
||||||
mlan_status (*moal_recv_packet)(t_void *pmoal_handle,
|
mlan_status (*moal_recv_packet)(t_void *pmoal, pmlan_buffer pmbuf);
|
||||||
pmlan_buffer pmbuf);
|
|
||||||
/** moal_recv_event */
|
/** moal_recv_event */
|
||||||
mlan_status (*moal_recv_event)(t_void *pmoal_handle,
|
mlan_status (*moal_recv_event)(t_void *pmoal, pmlan_event pmevent);
|
||||||
pmlan_event pmevent);
|
|
||||||
/** moal_ioctl_complete */
|
/** moal_ioctl_complete */
|
||||||
mlan_status (*moal_ioctl_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_ioctl_complete)(t_void *pmoal,
|
||||||
pmlan_ioctl_req pioctl_req,
|
pmlan_ioctl_req pioctl_req,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
|
|
||||||
/** moal_alloc_mlan_buffer */
|
/** moal_alloc_mlan_buffer */
|
||||||
mlan_status (*moal_alloc_mlan_buffer)(t_void *pmoal_handle, t_u32 size,
|
mlan_status (*moal_alloc_mlan_buffer)(t_void *pmoal, t_u32 size,
|
||||||
ppmlan_buffer pmbuf);
|
ppmlan_buffer pmbuf);
|
||||||
/** moal_free_mlan_buffer */
|
/** moal_free_mlan_buffer */
|
||||||
mlan_status (*moal_free_mlan_buffer)(t_void *pmoal_handle,
|
mlan_status (*moal_free_mlan_buffer)(t_void *pmoal, pmlan_buffer pmbuf);
|
||||||
pmlan_buffer pmbuf);
|
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
/** moal_write_data_async */
|
/** moal_write_data_async */
|
||||||
mlan_status (*moal_write_data_async)(t_void *pmoal_handle,
|
mlan_status (*moal_write_data_async)(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port);
|
t_u32 port);
|
||||||
#endif /* USB */
|
#endif /* USB */
|
||||||
#if defined(SDIO) || defined(PCIE)
|
#if defined(SDIO) || defined(PCIE)
|
||||||
/** moal_write_reg */
|
/** moal_write_reg */
|
||||||
mlan_status (*moal_write_reg)(t_void *pmoal_handle, t_u32 reg,
|
mlan_status (*moal_write_reg)(t_void *pmoal, t_u32 reg, t_u32 data);
|
||||||
t_u32 data);
|
|
||||||
/** moal_read_reg */
|
/** moal_read_reg */
|
||||||
mlan_status (*moal_read_reg)(t_void *pmoal_handle, t_u32 reg,
|
mlan_status (*moal_read_reg)(t_void *pmoal, t_u32 reg, t_u32 *data);
|
||||||
t_u32 *data);
|
|
||||||
#endif /* SDIO || PCIE */
|
#endif /* SDIO || PCIE */
|
||||||
/** moal_write_data_sync */
|
/** moal_write_data_sync */
|
||||||
mlan_status (*moal_write_data_sync)(t_void *pmoal_handle,
|
mlan_status (*moal_write_data_sync)(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port,
|
t_u32 port, t_u32 timeout);
|
||||||
t_u32 timeout);
|
|
||||||
/** moal_read_data_sync */
|
/** moal_read_data_sync */
|
||||||
mlan_status (*moal_read_data_sync)(t_void *pmoal_handle,
|
mlan_status (*moal_read_data_sync)(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port,
|
t_u32 port, t_u32 timeout);
|
||||||
t_u32 timeout);
|
|
||||||
/** moal_malloc */
|
/** moal_malloc */
|
||||||
mlan_status (*moal_malloc)(t_void *pmoal_handle, t_u32 size, t_u32 flag,
|
mlan_status (*moal_malloc)(t_void *pmoal, t_u32 size, t_u32 flag,
|
||||||
t_u8 **ppbuf);
|
t_u8 **ppbuf);
|
||||||
/** moal_mfree */
|
/** moal_mfree */
|
||||||
mlan_status (*moal_mfree)(t_void *pmoal_handle, t_u8 *pbuf);
|
mlan_status (*moal_mfree)(t_void *pmoal, t_u8 *pbuf);
|
||||||
/** moal_vmalloc */
|
/** moal_vmalloc */
|
||||||
mlan_status (*moal_vmalloc)(t_void *pmoal_handle, t_u32 size,
|
mlan_status (*moal_vmalloc)(t_void *pmoal, t_u32 size, t_u8 **ppbuf);
|
||||||
t_u8 **ppbuf);
|
|
||||||
/** moal_vfree */
|
/** moal_vfree */
|
||||||
mlan_status (*moal_vfree)(t_void *pmoal_handle, t_u8 *pbuf);
|
mlan_status (*moal_vfree)(t_void *pmoal, t_u8 *pbuf);
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
/** moal_malloc_consistent */
|
/** moal_malloc_consistent */
|
||||||
mlan_status (*moal_malloc_consistent)(t_void *pmoal_handle, t_u32 size,
|
mlan_status (*moal_malloc_consistent)(t_void *pmoal, t_u32 size,
|
||||||
t_u8 **ppbuf, t_u64 *pbuf_pa);
|
t_u8 **ppbuf, t_u64 *pbuf_pa);
|
||||||
/** moal_mfree_consistent */
|
/** moal_mfree_consistent */
|
||||||
mlan_status (*moal_mfree_consistent)(t_void *pmoal_handle, t_u32 size,
|
mlan_status (*moal_mfree_consistent)(t_void *pmoal, t_u32 size,
|
||||||
t_u8 *pbuf, t_u64 buf_pa);
|
t_u8 *pbuf, t_u64 buf_pa);
|
||||||
/** moal_map_memory */
|
/** moal_map_memory */
|
||||||
mlan_status (*moal_map_memory)(t_void *pmoal_handle, t_u8 *pbuf,
|
mlan_status (*moal_map_memory)(t_void *pmoal, t_u8 *pbuf,
|
||||||
t_u64 *pbuf_pa, t_u32 size, t_u32 flag);
|
t_u64 *pbuf_pa, t_u32 size, t_u32 flag);
|
||||||
/** moal_unmap_memory */
|
/** moal_unmap_memory */
|
||||||
mlan_status (*moal_unmap_memory)(t_void *pmoal_handle, t_u8 *pbuf,
|
mlan_status (*moal_unmap_memory)(t_void *pmoal, t_u8 *pbuf,
|
||||||
t_u64 buf_pa, t_u32 size, t_u32 flag);
|
t_u64 buf_pa, t_u32 size, t_u32 flag);
|
||||||
#endif /* PCIE */
|
#endif /* PCIE */
|
||||||
/** moal_memset */
|
/** moal_memset */
|
||||||
t_void *(*moal_memset)(t_void *pmoal_handle, t_void *pmem, t_u8 byte,
|
t_void *(*moal_memset)(t_void *pmoal, t_void *pmem, t_u8 byte,
|
||||||
t_u32 num);
|
t_u32 num);
|
||||||
/** moal_memcpy */
|
/** moal_memcpy */
|
||||||
t_void *(*moal_memcpy)(t_void *pmoal_handle, t_void *pdest,
|
t_void *(*moal_memcpy)(t_void *pmoal, t_void *pdest, const t_void *psrc,
|
||||||
const t_void *psrc, t_u32 num);
|
t_u32 num);
|
||||||
/** moal_memcpy_ext */
|
/** moal_memcpy_ext */
|
||||||
t_void *(*moal_memcpy_ext)(t_void *pmoal_handle, t_void *pdest,
|
t_void *(*moal_memcpy_ext)(t_void *pmoal, t_void *pdest,
|
||||||
const t_void *psrc, t_u32 num,
|
const t_void *psrc, t_u32 num,
|
||||||
t_u32 dest_size);
|
t_u32 dest_size);
|
||||||
/** moal_memmove */
|
/** moal_memmove */
|
||||||
t_void *(*moal_memmove)(t_void *pmoal_handle, t_void *pdest,
|
t_void *(*moal_memmove)(t_void *pmoal, t_void *pdest,
|
||||||
const t_void *psrc, t_u32 num);
|
const t_void *psrc, t_u32 num);
|
||||||
/** moal_memcmp */
|
/** moal_memcmp */
|
||||||
t_s32 (*moal_memcmp)(t_void *pmoal_handle, const t_void *pmem1,
|
t_s32 (*moal_memcmp)(t_void *pmoal, const t_void *pmem1,
|
||||||
const t_void *pmem2, t_u32 num);
|
const t_void *pmem2, t_u32 num);
|
||||||
/** moal_udelay */
|
/** moal_udelay */
|
||||||
t_void (*moal_udelay)(t_void *pmoal_handle, t_u32 udelay);
|
t_void (*moal_udelay)(t_void *pmoal, t_u32 udelay);
|
||||||
/** moal_usleep_range */
|
/** moal_usleep_range */
|
||||||
t_void (*moal_usleep_range)(t_void *pmoal_handle, t_u32 min_delay,
|
t_void (*moal_usleep_range)(t_void *pmoal, t_u32 min_delay,
|
||||||
t_u32 max_delay);
|
t_u32 max_delay);
|
||||||
/** moal_get_boot_ktime */
|
/** moal_get_boot_ktime */
|
||||||
mlan_status (*moal_get_boot_ktime)(t_void *pmoal_handle, t_u64 *pnsec);
|
mlan_status (*moal_get_boot_ktime)(t_void *pmoal, t_u64 *pnsec);
|
||||||
/** moal_get_system_time */
|
/** moal_get_system_time */
|
||||||
mlan_status (*moal_get_system_time)(t_void *pmoal_handle, t_u32 *psec,
|
mlan_status (*moal_get_system_time)(t_void *pmoal, t_u32 *psec,
|
||||||
t_u32 *pusec);
|
t_u32 *pusec);
|
||||||
/** moal_init_timer*/
|
/** moal_init_timer*/
|
||||||
mlan_status (*moal_init_timer)(t_void *pmoal_handle, t_void **pptimer,
|
mlan_status (*moal_init_timer)(t_void *pmoal, t_void **pptimer,
|
||||||
IN t_void (*callback)(t_void *pcontext),
|
IN t_void (*callback)(t_void *pcontext),
|
||||||
t_void *pcontext);
|
t_void *pcontext);
|
||||||
/** moal_free_timer */
|
/** moal_free_timer */
|
||||||
mlan_status (*moal_free_timer)(t_void *pmoal_handle, t_void *ptimer);
|
mlan_status (*moal_free_timer)(t_void *pmoal, t_void *ptimer);
|
||||||
/** moal_start_timer*/
|
/** moal_start_timer*/
|
||||||
mlan_status (*moal_start_timer)(t_void *pmoal_handle, t_void *ptimer,
|
mlan_status (*moal_start_timer)(t_void *pmoal, t_void *ptimer,
|
||||||
t_u8 periodic, t_u32 msec);
|
t_u8 periodic, t_u32 msec);
|
||||||
/** moal_stop_timer*/
|
/** moal_stop_timer*/
|
||||||
mlan_status (*moal_stop_timer)(t_void *pmoal_handle, t_void *ptimer);
|
mlan_status (*moal_stop_timer)(t_void *pmoal, t_void *ptimer);
|
||||||
/** moal_init_lock */
|
/** moal_init_lock */
|
||||||
mlan_status (*moal_init_lock)(t_void *pmoal_handle, t_void **pplock);
|
mlan_status (*moal_init_lock)(t_void *pmoal, t_void **pplock);
|
||||||
/** moal_free_lock */
|
/** moal_free_lock */
|
||||||
mlan_status (*moal_free_lock)(t_void *pmoal_handle, t_void *plock);
|
mlan_status (*moal_free_lock)(t_void *pmoal, t_void *plock);
|
||||||
/** moal_spin_lock */
|
/** moal_spin_lock */
|
||||||
mlan_status (*moal_spin_lock)(t_void *pmoal_handle, t_void *plock);
|
mlan_status (*moal_spin_lock)(t_void *pmoal, t_void *plock);
|
||||||
/** moal_spin_unlock */
|
/** moal_spin_unlock */
|
||||||
mlan_status (*moal_spin_unlock)(t_void *pmoal_handle, t_void *plock);
|
mlan_status (*moal_spin_unlock)(t_void *pmoal, t_void *plock);
|
||||||
/** moal_print */
|
/** moal_print */
|
||||||
t_void (*moal_print)(t_void *pmoal_handle, t_u32 level, char *pformat,
|
t_void (*moal_print)(t_void *pmoal, t_u32 level, char *pformat, IN...);
|
||||||
IN...);
|
|
||||||
/** moal_print_netintf */
|
/** moal_print_netintf */
|
||||||
t_void (*moal_print_netintf)(t_void *pmoal_handle, t_u32 bss_index,
|
t_void (*moal_print_netintf)(t_void *pmoal, t_u32 bss_index,
|
||||||
t_u32 level);
|
t_u32 level);
|
||||||
/** moal_assert */
|
/** moal_assert */
|
||||||
t_void (*moal_assert)(t_void *pmoal_handle, t_u32 cond);
|
t_void (*moal_assert)(t_void *pmoal, t_u32 cond);
|
||||||
|
|
||||||
/** moal_hist_data_add */
|
/** moal_hist_data_add */
|
||||||
t_void (*moal_hist_data_add)(t_void *pmoal_handle, t_u32 bss_index,
|
t_void (*moal_hist_data_add)(t_void *pmoal, t_u32 bss_index,
|
||||||
t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
||||||
t_u8 antenna);
|
t_u8 antenna);
|
||||||
|
t_void (*moal_updata_peer_signal)(t_void *pmoal, t_u32 bss_index,
|
||||||
|
t_u8 *peer_addr, t_s8 snr, t_s8 nflr);
|
||||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||||
mlan_status (*moal_wait_hostcmd_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_wait_hostcmd_complete)(t_void *pmoal,
|
||||||
t_u32 bss_index);
|
t_u32 bss_index);
|
||||||
mlan_status (*moal_notify_hostcmd_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_notify_hostcmd_complete)(t_void *pmoal,
|
||||||
t_u32 bss_index);
|
t_u32 bss_index);
|
||||||
#endif
|
#endif
|
||||||
void (*moal_tp_accounting)(t_void *pmoal_handle, t_void *buf,
|
void (*moal_tp_accounting)(t_void *pmoal, t_void *buf,
|
||||||
t_u32 drop_point);
|
t_u32 drop_point);
|
||||||
void (*moal_tp_accounting_rx_param)(t_void *pmoal_handle,
|
void (*moal_tp_accounting_rx_param)(t_void *pmoal, unsigned int type,
|
||||||
unsigned int type,
|
|
||||||
unsigned int rsvd1);
|
unsigned int rsvd1);
|
||||||
|
|
||||||
} mlan_callbacks, *pmlan_callbacks;
|
} mlan_callbacks, *pmlan_callbacks;
|
||||||
|
@ -1899,8 +2157,6 @@ typedef struct _mlan_device {
|
||||||
/** Tx data endpoint address */
|
/** Tx data endpoint address */
|
||||||
t_u8 tx_data_ep;
|
t_u8 tx_data_ep;
|
||||||
#endif
|
#endif
|
||||||
/** fw region */
|
|
||||||
t_bool fw_region;
|
|
||||||
/** passive to active scan */
|
/** passive to active scan */
|
||||||
t_u8 passive_to_active_scan;
|
t_u8 passive_to_active_scan;
|
||||||
/** uap max supported station per chip */
|
/** uap max supported station per chip */
|
||||||
|
@ -1919,51 +2175,50 @@ MLAN_API mlan_status mlan_register(pmlan_device pmdevice,
|
||||||
t_void **ppmlan_adapter);
|
t_void **ppmlan_adapter);
|
||||||
|
|
||||||
/** Un-registration */
|
/** Un-registration */
|
||||||
MLAN_API mlan_status mlan_unregister(t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_unregister(t_void *padapter);
|
||||||
|
|
||||||
/** Firmware Downloading */
|
/** Firmware Downloading */
|
||||||
MLAN_API mlan_status mlan_dnld_fw(t_void *pmlan_adapter, pmlan_fw_image pmfw);
|
MLAN_API mlan_status mlan_dnld_fw(t_void *padapter, pmlan_fw_image pmfw);
|
||||||
|
|
||||||
/** Custom data pass API */
|
/** Custom data pass API */
|
||||||
MLAN_API mlan_status mlan_set_init_param(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_set_init_param(t_void *padapter,
|
||||||
pmlan_init_param pparam);
|
pmlan_init_param pparam);
|
||||||
|
|
||||||
/** Firmware Initialization */
|
/** Firmware Initialization */
|
||||||
MLAN_API mlan_status mlan_init_fw(t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_init_fw(t_void *padapter);
|
||||||
|
|
||||||
/** Firmware Shutdown */
|
/** Firmware Shutdown */
|
||||||
MLAN_API mlan_status mlan_shutdown_fw(t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_shutdown_fw(t_void *padapter);
|
||||||
|
|
||||||
/** Main Process */
|
/** Main Process */
|
||||||
MLAN_API mlan_status mlan_main_process(t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_main_process(t_void *padapter);
|
||||||
|
|
||||||
/** Rx process */
|
/** Rx process */
|
||||||
mlan_status mlan_rx_process(t_void *pmlan_adapter, t_u8 *rx_pkts);
|
mlan_status mlan_rx_process(t_void *padapter, t_u8 *rx_pkts);
|
||||||
|
|
||||||
/** Packet Transmission */
|
/** Packet Transmission */
|
||||||
MLAN_API mlan_status mlan_send_packet(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_send_packet(t_void *padapter, pmlan_buffer pmbuf);
|
||||||
pmlan_buffer pmbuf);
|
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
/** mlan_write_data_async_complete */
|
/** mlan_write_data_async_complete */
|
||||||
MLAN_API mlan_status mlan_write_data_async_complete(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_write_data_async_complete(t_void *padapter,
|
||||||
pmlan_buffer pmbuf,
|
pmlan_buffer pmbuf,
|
||||||
t_u32 port,
|
t_u32 port,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
|
|
||||||
/** Packet Reception */
|
/** Packet Reception */
|
||||||
MLAN_API mlan_status mlan_recv(t_void *pmlan_adapter, pmlan_buffer pmbuf,
|
MLAN_API mlan_status mlan_recv(t_void *padapter, pmlan_buffer pmbuf,
|
||||||
t_u32 port);
|
t_u32 port);
|
||||||
#endif /* USB */
|
#endif /* USB */
|
||||||
|
|
||||||
/** Packet Reception complete callback */
|
/** Packet Reception complete callback */
|
||||||
MLAN_API mlan_status mlan_recv_packet_complete(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_recv_packet_complete(t_void *padapter,
|
||||||
pmlan_buffer pmbuf,
|
pmlan_buffer pmbuf,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
|
|
||||||
#if defined(SDIO) || defined(PCIE)
|
#if defined(SDIO) || defined(PCIE)
|
||||||
/** interrupt handler */
|
/** interrupt handler */
|
||||||
MLAN_API mlan_status mlan_interrupt(t_u16 msg_id, t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_interrupt(t_u16 msg_id, t_void *padapter);
|
||||||
|
|
||||||
#if defined(SYSKT)
|
#if defined(SYSKT)
|
||||||
/** GPIO IRQ callback function */
|
/** GPIO IRQ callback function */
|
||||||
|
@ -1971,7 +2226,7 @@ MLAN_API t_void mlan_hs_callback(t_void *pctx);
|
||||||
#endif /* SYSKT_MULTI || SYSKT */
|
#endif /* SYSKT_MULTI || SYSKT */
|
||||||
#endif /* SDIO || PCIE */
|
#endif /* SDIO || PCIE */
|
||||||
|
|
||||||
MLAN_API t_void mlan_pm_wakeup_card(t_void *pmlan_adapter, t_u8 keep_wakeup);
|
MLAN_API t_void mlan_pm_wakeup_card(t_void *padapter, t_u8 keep_wakeup);
|
||||||
|
|
||||||
MLAN_API t_u8 mlan_is_main_process_running(t_void *adapter);
|
MLAN_API t_u8 mlan_is_main_process_running(t_void *adapter);
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
|
@ -1979,10 +2234,8 @@ MLAN_API t_void mlan_set_int_mode(t_void *adapter, t_u32 int_mode,
|
||||||
t_u8 func_num);
|
t_u8 func_num);
|
||||||
#endif
|
#endif
|
||||||
/** mlan ioctl */
|
/** mlan ioctl */
|
||||||
MLAN_API mlan_status mlan_ioctl(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_ioctl(t_void *padapter, pmlan_ioctl_req pioctl_req);
|
||||||
pmlan_ioctl_req pioctl_req);
|
|
||||||
/** mlan select wmm queue */
|
/** mlan select wmm queue */
|
||||||
MLAN_API t_u8 mlan_select_wmm_queue(t_void *pmlan_adapter, t_u8 bss_num,
|
MLAN_API t_u8 mlan_select_wmm_queue(t_void *padapter, t_u8 bss_num, t_u8 tid);
|
||||||
t_u8 tid);
|
|
||||||
|
|
||||||
#endif /* !_MLAN_DECL_H_ */
|
#endif /* !_MLAN_DECL_H_ */
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* in MLAN module.
|
* in MLAN module.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -439,6 +439,11 @@ typedef enum _WLAN_802_11_WEP_STATUS {
|
||||||
|
|
||||||
#define TLV_TYPE_DMCS_STATUS (PROPRIETARY_TLV_BASE_ID + 0x13A) /* 0x023A */
|
#define TLV_TYPE_DMCS_STATUS (PROPRIETARY_TLV_BASE_ID + 0x13A) /* 0x023A */
|
||||||
|
|
||||||
|
/** TLV type : TDLS IDLE TIMEOUT */
|
||||||
|
#define TLV_TYPE_TDLS_IDLE_TIMEOUT \
|
||||||
|
(PROPRIETARY_TLV_BASE_ID + 0xC2) /* 0x01C2 \
|
||||||
|
*/
|
||||||
|
|
||||||
/** TLV type : HT Capabilities */
|
/** TLV type : HT Capabilities */
|
||||||
#define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 0x4a) /* 0x014a */
|
#define TLV_TYPE_HT_CAP (PROPRIETARY_TLV_BASE_ID + 0x4a) /* 0x014a */
|
||||||
/** TLV type : HT Information */
|
/** TLV type : HT Information */
|
||||||
|
@ -543,6 +548,8 @@ typedef enum _WLAN_802_11_WEP_STATUS {
|
||||||
/** Non green field station */
|
/** Non green field station */
|
||||||
#define NON_GREENFIELD_STAS 0x04
|
#define NON_GREENFIELD_STAS 0x04
|
||||||
|
|
||||||
|
/** Max AMSDU size support */
|
||||||
|
#define HWSPEC_MAX_AMSDU_SUPP MBIT(31)
|
||||||
/** Greenfield support */
|
/** Greenfield support */
|
||||||
#define HWSPEC_GREENFIELD_SUPP MBIT(29)
|
#define HWSPEC_GREENFIELD_SUPP MBIT(29)
|
||||||
/** RX STBC support */
|
/** RX STBC support */
|
||||||
|
@ -564,7 +571,8 @@ typedef enum _WLAN_802_11_WEP_STATUS {
|
||||||
/** Default 11n capability mask for 5GHz */
|
/** Default 11n capability mask for 5GHz */
|
||||||
#define DEFAULT_11N_CAP_MASK_A \
|
#define DEFAULT_11N_CAP_MASK_A \
|
||||||
(HWSPEC_CHANBW40_SUPP | HWSPEC_SHORTGI20_SUPP | \
|
(HWSPEC_CHANBW40_SUPP | HWSPEC_SHORTGI20_SUPP | \
|
||||||
HWSPEC_SHORTGI40_SUPP | HWSPEC_RXSTBC_SUPP | HWSPEC_LDPC_SUPP)
|
HWSPEC_MAX_AMSDU_SUPP | HWSPEC_SHORTGI40_SUPP | HWSPEC_RXSTBC_SUPP | \
|
||||||
|
HWSPEC_LDPC_SUPP)
|
||||||
|
|
||||||
/** Default 11n TX BF capability 2X2 chip **/
|
/** Default 11n TX BF capability 2X2 chip **/
|
||||||
#define DEFAULT_11N_TX_BF_CAP_2X2 0x19E74618
|
#define DEFAULT_11N_TX_BF_CAP_2X2 0x19E74618
|
||||||
|
@ -1273,6 +1281,11 @@ typedef enum _WLAN_802_11_WEP_STATUS {
|
||||||
|
|
||||||
#define HostCmd_CMD_802_11_BAND_STEERING 0x026f
|
#define HostCmd_CMD_802_11_BAND_STEERING 0x026f
|
||||||
|
|
||||||
|
/** Host Command ID : TDLS configuration */
|
||||||
|
#define HostCmd_CMD_TDLS_CONFIG 0x0100
|
||||||
|
/** Host Command ID : TDLS operation */
|
||||||
|
#define HostCmd_CMD_TDLS_OPERATION 0x0122
|
||||||
|
|
||||||
#ifdef SDIO
|
#ifdef SDIO
|
||||||
/** Host Command ID : SDIO single port RX aggr */
|
/** Host Command ID : SDIO single port RX aggr */
|
||||||
#define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223
|
#define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223
|
||||||
|
@ -1326,6 +1339,8 @@ typedef enum _WLAN_802_11_WEP_STATUS {
|
||||||
#define FW_CAPINFO_EXT_802_11AX MBIT(7)
|
#define FW_CAPINFO_EXT_802_11AX MBIT(7)
|
||||||
/** FW cap info bit 8: 80MHZ disabled */
|
/** FW cap info bit 8: 80MHZ disabled */
|
||||||
#define FW_CAPINFO_EXT_NO_80MHZ MBIT(8)
|
#define FW_CAPINFO_EXT_NO_80MHZ MBIT(8)
|
||||||
|
/** FW cap info bit 9: Multi BSSID Support */
|
||||||
|
#define FW_CAPINFO_EXT_MULTI_BSSID MBIT(9)
|
||||||
|
|
||||||
/** Check if 5G 1x1 only is supported by firmware */
|
/** Check if 5G 1x1 only is supported by firmware */
|
||||||
#define IS_FW_SUPPORT_5G_1X1_ONLY(_adapter) \
|
#define IS_FW_SUPPORT_5G_1X1_ONLY(_adapter) \
|
||||||
|
@ -1351,6 +1366,9 @@ typedef enum _WLAN_802_11_WEP_STATUS {
|
||||||
/** Check if 80MHZ disabled in firmware */
|
/** Check if 80MHZ disabled in firmware */
|
||||||
#define IS_FW_SUPPORT_NO_80MHZ(_adapter) \
|
#define IS_FW_SUPPORT_NO_80MHZ(_adapter) \
|
||||||
(_adapter->fw_cap_ext & FW_CAPINFO_EXT_NO_80MHZ)
|
(_adapter->fw_cap_ext & FW_CAPINFO_EXT_NO_80MHZ)
|
||||||
|
/** Check if Multi BSSID supported by firmware */
|
||||||
|
#define IS_FW_SUPPORT_MULTIBSSID(_adapter) \
|
||||||
|
(_adapter->fw_cap_ext & FW_CAPINFO_EXT_MULTI_BSSID)
|
||||||
|
|
||||||
/** FW cap info TLV */
|
/** FW cap info TLV */
|
||||||
typedef MLAN_PACK_START struct _MrvlIEtypes_fw_cap_info_t {
|
typedef MLAN_PACK_START struct _MrvlIEtypes_fw_cap_info_t {
|
||||||
|
@ -1599,6 +1617,7 @@ typedef MLAN_PACK_START struct _power_table_attr {
|
||||||
#define HostCmd_CMD_UAP_BEACON_STUCK_CFG 0x0271
|
#define HostCmd_CMD_UAP_BEACON_STUCK_CFG 0x0271
|
||||||
#define HostCmd_CMD_ARB_CONFIG 0x0273
|
#define HostCmd_CMD_ARB_CONFIG 0x0273
|
||||||
#define HostCmd_CMD_DOT11MC_UNASSOC_FTM_CFG 0x0275
|
#define HostCmd_CMD_DOT11MC_UNASSOC_FTM_CFG 0x0275
|
||||||
|
#define HostCmd_CMD_HAL_PHY_CFG 0x0276
|
||||||
|
|
||||||
/** Enhanced PS modes */
|
/** Enhanced PS modes */
|
||||||
typedef enum _ENH_PS_MODES {
|
typedef enum _ENH_PS_MODES {
|
||||||
|
@ -1839,6 +1858,9 @@ typedef enum _ENH_PS_MODES {
|
||||||
/** Remain on Channel expired event */
|
/** Remain on Channel expired event */
|
||||||
#define EVENT_REMAIN_ON_CHANNEL_EXPIRED 0x0000005f
|
#define EVENT_REMAIN_ON_CHANNEL_EXPIRED 0x0000005f
|
||||||
|
|
||||||
|
/** TDLS generic event */
|
||||||
|
#define EVENT_TDLS_GENERIC_EVENT 0x00000052
|
||||||
|
|
||||||
#define EVENT_MEF_HOST_WAKEUP 0x0000004f
|
#define EVENT_MEF_HOST_WAKEUP 0x0000004f
|
||||||
|
|
||||||
/** Card Event definition: Channel switch pending announcment */
|
/** Card Event definition: Channel switch pending announcment */
|
||||||
|
@ -1910,6 +1932,76 @@ typedef enum _ENH_PS_MODES {
|
||||||
/** Get BSS type from event cause (bit 31:24) */
|
/** Get BSS type from event cause (bit 31:24) */
|
||||||
#define EVENT_GET_BSS_TYPE(event_cause) (((event_cause) >> 24) & 0x00ff)
|
#define EVENT_GET_BSS_TYPE(event_cause) (((event_cause) >> 24) & 0x00ff)
|
||||||
|
|
||||||
|
/** event type for tdls setup failure */
|
||||||
|
#define TDLS_EVENT_TYPE_SETUP_FAILURE 1
|
||||||
|
/** event type for tdls setup request received */
|
||||||
|
#define TDLS_EVENT_TYPE_SETUP_REQ 2
|
||||||
|
/** event type for tdls link torn down */
|
||||||
|
#define TDLS_EVENT_TYPE_LINK_TORN_DOWN 3
|
||||||
|
/** event type for tdls link established */
|
||||||
|
#define TDLS_EVENT_TYPE_LINK_ESTABLISHED 4
|
||||||
|
/** event type for tdls debug */
|
||||||
|
#define TDLS_EVENT_TYPE_DEBUG 5
|
||||||
|
/** event type for tdls packet */
|
||||||
|
#define TDLS_EVENT_TYPE_PACKET 6
|
||||||
|
/** event type for channel switch result */
|
||||||
|
#define TDLS_EVENT_TYPE_CHAN_SWITCH_RESULT 7
|
||||||
|
/** event type for start channel switch */
|
||||||
|
#define TDLS_EVENT_TYPE_START_CHAN_SWITCH 8
|
||||||
|
/** event type for stop channel switch */
|
||||||
|
#define TDLS_EVENT_TYPE_CHAN_SWITCH_STOPPED 9
|
||||||
|
|
||||||
|
/** Packet received on direct link */
|
||||||
|
#define RXPD_FLAG_PKT_DIRECT_LINK 1
|
||||||
|
/** TDLS base channel */
|
||||||
|
#define TDLS_BASE_CHANNEL 0
|
||||||
|
/** TDLS off channel */
|
||||||
|
#define TDLS_OFF_CHANNEL 1
|
||||||
|
|
||||||
|
/** structure for channel switch result from TDLS FW */
|
||||||
|
typedef MLAN_PACK_START struct _chan_switch_result {
|
||||||
|
/** current channel, 0 - base channel, 1 - off channel*/
|
||||||
|
t_u8 current_channel;
|
||||||
|
/** channel switch status*/
|
||||||
|
t_u8 status;
|
||||||
|
/** channel switch fauilure reason code*/
|
||||||
|
t_u8 reason;
|
||||||
|
} MLAN_PACK_END chan_switch_result;
|
||||||
|
|
||||||
|
typedef MLAN_PACK_START struct _ie_data {
|
||||||
|
/** IE Length */
|
||||||
|
t_u16 ie_length;
|
||||||
|
/** IE pointer */
|
||||||
|
t_u8 ie_ptr[];
|
||||||
|
} MLAN_PACK_END tdls_ie_data;
|
||||||
|
|
||||||
|
/** Event structure for generic events from TDLS FW */
|
||||||
|
typedef MLAN_PACK_START struct _Event_tdls_generic {
|
||||||
|
/** Event Type */
|
||||||
|
t_u16 event_type;
|
||||||
|
/** Peer mac address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
union {
|
||||||
|
/** channel switch result structure*/
|
||||||
|
chan_switch_result switch_result;
|
||||||
|
/** channel switch stop reason*/
|
||||||
|
t_u8 cs_stop_reason;
|
||||||
|
/** Reason code */
|
||||||
|
t_u16 reason_code;
|
||||||
|
/** IE data */
|
||||||
|
tdls_ie_data ie_data;
|
||||||
|
} u;
|
||||||
|
} MLAN_PACK_END Event_tdls_generic;
|
||||||
|
|
||||||
|
typedef enum _tdls_error_code_e {
|
||||||
|
NO_ERROR = 0,
|
||||||
|
INTERNAL_ERROR,
|
||||||
|
MAX_TDLS_LINKS_EST,
|
||||||
|
TDLS_LINK_EXISTS,
|
||||||
|
TDLS_LINK_NONEXISTENT,
|
||||||
|
TDLS_PEER_STA_UNREACHABLE = 25,
|
||||||
|
} tdls_error_code_e;
|
||||||
|
|
||||||
/** Event_WEP_ICV_ERR structure */
|
/** Event_WEP_ICV_ERR structure */
|
||||||
typedef MLAN_PACK_START struct _Event_WEP_ICV_ERR {
|
typedef MLAN_PACK_START struct _Event_WEP_ICV_ERR {
|
||||||
/** Reason code */
|
/** Reason code */
|
||||||
|
@ -1945,6 +2037,15 @@ typedef MLAN_PACK_START struct _WLAN_802_11_VARIABLE_IEs {
|
||||||
} MLAN_PACK_END WLAN_802_11_VARIABLE_IEs;
|
} MLAN_PACK_END WLAN_802_11_VARIABLE_IEs;
|
||||||
|
|
||||||
/** TLV related data structures*/
|
/** TLV related data structures*/
|
||||||
|
/*TDLS TIMEOUT VALUE (seconds)*/
|
||||||
|
#define TDLS_IDLE_TIMEOUT 60
|
||||||
|
/** MrvlIEtypes_Data_t */
|
||||||
|
typedef MLAN_PACK_START struct _MrvlIEtypes_TDLS_Idle_Timeout_t {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** value */
|
||||||
|
t_u16 value;
|
||||||
|
} MLAN_PACK_END MrvlIEtypes_TDLS_Idle_Timeout_t;
|
||||||
#if defined(STA_SUPPORT)
|
#if defined(STA_SUPPORT)
|
||||||
/** Pairwise Cipher Suite length */
|
/** Pairwise Cipher Suite length */
|
||||||
#define PAIRWISE_CIPHER_SUITE_LEN 4
|
#define PAIRWISE_CIPHER_SUITE_LEN 4
|
||||||
|
@ -1960,6 +2061,9 @@ typedef MLAN_PACK_START struct _WLAN_802_11_VARIABLE_IEs {
|
||||||
/** Bit mask for TxPD status field for last packet */
|
/** Bit mask for TxPD status field for last packet */
|
||||||
#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
|
#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
|
||||||
|
|
||||||
|
/** Bit mask for TxPD flags field for TDLS packet */
|
||||||
|
#define MRVDRV_TxPD_FLAGS_TDLS_PACKET MBIT(4)
|
||||||
|
|
||||||
/** Bit mask for TxPD flags field for Tx status report */
|
/** Bit mask for TxPD flags field for Tx status report */
|
||||||
#define MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS MBIT(5)
|
#define MRVDRV_TxPD_FLAGS_TX_PACKET_STATUS MBIT(5)
|
||||||
|
|
||||||
|
@ -3556,6 +3660,14 @@ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_GET_LOG {
|
||||||
t_u32 channel_number;
|
t_u32 channel_number;
|
||||||
/** Channel Switch Mode */
|
/** Channel Switch Mode */
|
||||||
t_u32 channel_switch_mode;
|
t_u32 channel_switch_mode;
|
||||||
|
/** Reset Rx Mac Count */
|
||||||
|
t_u32 rx_reset_mac_recovery_cnt;
|
||||||
|
/** ISR2 Not Done Count*/
|
||||||
|
t_u32 rx_Isr2_NotDone_Cnt;
|
||||||
|
/** GDMA Abort Count */
|
||||||
|
t_u32 gdma_abort_cnt;
|
||||||
|
/** Rx Reset MAC Count */
|
||||||
|
t_u32 g_reset_rx_mac_cnt;
|
||||||
} MLAN_PACK_END HostCmd_DS_802_11_GET_LOG;
|
} MLAN_PACK_END HostCmd_DS_802_11_GET_LOG;
|
||||||
|
|
||||||
/* maln wifi rate */
|
/* maln wifi rate */
|
||||||
|
@ -3789,6 +3901,10 @@ typedef MLAN_PACK_START struct _HostCmd_DS_802_11_LINK_STATISTIC {
|
||||||
typedef MLAN_PACK_START struct _HostCmd_TX_RATE_QUERY {
|
typedef MLAN_PACK_START struct _HostCmd_TX_RATE_QUERY {
|
||||||
/** Tx rate */
|
/** Tx rate */
|
||||||
t_u8 tx_rate;
|
t_u8 tx_rate;
|
||||||
|
/** V14 FW: Ht Info
|
||||||
|
* [Bit 0] RxRate format: LG=0, HT=1
|
||||||
|
* [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
|
||||||
|
* [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */
|
||||||
/** Tx Rate Info:
|
/** Tx Rate Info:
|
||||||
* [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
|
* [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
|
||||||
* [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
|
* [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
|
||||||
|
@ -3910,6 +4026,15 @@ typedef MLAN_PACK_START struct _HostCmd_DS_SSU_CFG {
|
||||||
} MLAN_PACK_END HostCmd_DS_SSU_CFG;
|
} MLAN_PACK_END HostCmd_DS_SSU_CFG;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef MLAN_PACK_START struct _HostCmd_DS_HAL_PHY_CFG {
|
||||||
|
/** Action */
|
||||||
|
t_u16 action;
|
||||||
|
/** 11b pwr spectral density mask enable/disable */
|
||||||
|
t_u8 dot11b_psd_mask_cfg;
|
||||||
|
/** reserved fields for future hal/phy cfg use */
|
||||||
|
t_u8 reserved[7];
|
||||||
|
} MLAN_PACK_END HostCmd_DS_HAL_PHY_CFG;
|
||||||
|
|
||||||
/** SNMP_MIB_INDEX */
|
/** SNMP_MIB_INDEX */
|
||||||
typedef enum _SNMP_MIB_INDEX {
|
typedef enum _SNMP_MIB_INDEX {
|
||||||
OpRateSet_i = 1,
|
OpRateSet_i = 1,
|
||||||
|
@ -4004,7 +4129,9 @@ typedef MLAN_PACK_START struct _MrvlIETypes_rate_setting_t {
|
||||||
typedef MLAN_PACK_START struct _HostCmd_DS_TX_RATE_CFG {
|
typedef MLAN_PACK_START struct _HostCmd_DS_TX_RATE_CFG {
|
||||||
/** Action */
|
/** Action */
|
||||||
t_u16 action;
|
t_u16 action;
|
||||||
t_u16 reserved_1;
|
/** V14 FW: cfg_index */
|
||||||
|
/** V15+ FW: reserved_1 */
|
||||||
|
t_u16 cfg_index;
|
||||||
/* MrvlRateScope_t RateScope;
|
/* MrvlRateScope_t RateScope;
|
||||||
* MrvlRateDropPattern_t RateDrop; */
|
* MrvlRateDropPattern_t RateDrop; */
|
||||||
t_u8 tlv_buf[];
|
t_u8 tlv_buf[];
|
||||||
|
@ -5147,6 +5274,18 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_psk_t {
|
||||||
} MLAN_PACK_END MrvlIEtypes_psk_t;
|
} MLAN_PACK_END MrvlIEtypes_psk_t;
|
||||||
#endif /* WIFI_DIRECT_SUPPORT */
|
#endif /* WIFI_DIRECT_SUPPORT */
|
||||||
|
|
||||||
|
/** Data structure for Link ID */
|
||||||
|
typedef MLAN_PACK_START struct _MrvlIETypes_LinkIDElement_t {
|
||||||
|
/** Header */
|
||||||
|
MrvlIEtypesHeader_t header;
|
||||||
|
/** Bssid */
|
||||||
|
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** initial sta address*/
|
||||||
|
t_u8 init_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** respose sta address */
|
||||||
|
t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END MrvlIETypes_LinkIDElement_t;
|
||||||
|
|
||||||
/** MrvlIEtypes_PMK_t */
|
/** MrvlIEtypes_PMK_t */
|
||||||
typedef MLAN_PACK_START struct _MrvlIEtypes_PMK_t {
|
typedef MLAN_PACK_START struct _MrvlIEtypes_PMK_t {
|
||||||
/** Header */
|
/** Header */
|
||||||
|
@ -5355,6 +5494,28 @@ typedef MLAN_PACK_START struct _HostCmd_DS_MGMT_IE_LIST {
|
||||||
mlan_ds_misc_custom_ie ds_mgmt_ie;
|
mlan_ds_misc_custom_ie ds_mgmt_ie;
|
||||||
} MLAN_PACK_END HostCmd_DS_MGMT_IE_LIST_CFG;
|
} MLAN_PACK_END HostCmd_DS_MGMT_IE_LIST_CFG;
|
||||||
|
|
||||||
|
/** HostCmd_DS_TDLS_CONFIG */
|
||||||
|
typedef MLAN_PACK_START struct _HostCmd_DS_TDLS_CONFIG {
|
||||||
|
/** Set TDLS configuration */
|
||||||
|
mlan_ds_misc_tdls_config tdls_info;
|
||||||
|
} MLAN_PACK_END HostCmd_DS_TDLS_CONFIG;
|
||||||
|
|
||||||
|
/**Action ID for TDLS delete link*/
|
||||||
|
#define TDLS_DELETE 0x00
|
||||||
|
/**Action ID for TDLS create link*/
|
||||||
|
#define TDLS_CREATE 0x01
|
||||||
|
/**Action ID for TDLS config link*/
|
||||||
|
#define TDLS_CONFIG 0x02
|
||||||
|
/** HostCmd_DS_TDLS_OPER */
|
||||||
|
typedef MLAN_PACK_START struct _HostCmd_DS_TDLS_OPER {
|
||||||
|
/** Action */
|
||||||
|
t_u16 tdls_action;
|
||||||
|
/**reason*/
|
||||||
|
t_u16 reason;
|
||||||
|
/** peer mac */
|
||||||
|
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END HostCmd_DS_TDLS_OPER;
|
||||||
|
|
||||||
/** HostCmd_CMD_MAC_REG_ACCESS */
|
/** HostCmd_CMD_MAC_REG_ACCESS */
|
||||||
typedef MLAN_PACK_START struct _HostCmd_DS_MAC_REG_ACCESS {
|
typedef MLAN_PACK_START struct _HostCmd_DS_MAC_REG_ACCESS {
|
||||||
/** Action */
|
/** Action */
|
||||||
|
@ -5522,7 +5683,7 @@ typedef MLAN_PACK_START struct _dmcs_chan_status {
|
||||||
t_u8 sta_count;
|
t_u8 sta_count;
|
||||||
} MLAN_PACK_END dmcs_chan_status;
|
} MLAN_PACK_END dmcs_chan_status;
|
||||||
|
|
||||||
typedef MLAN_PACK_START struct _dmcs_status {
|
typedef MLAN_PACK_START struct _dmcs_status_data {
|
||||||
/** radio ID */
|
/** radio ID */
|
||||||
t_u8 radio_id;
|
t_u8 radio_id;
|
||||||
/** Running mode
|
/** Running mode
|
||||||
|
@ -5533,7 +5694,7 @@ typedef MLAN_PACK_START struct _dmcs_status {
|
||||||
t_u8 running_mode;
|
t_u8 running_mode;
|
||||||
/** Channel status of this radio */
|
/** Channel status of this radio */
|
||||||
dmcs_chan_status chan_status[2];
|
dmcs_chan_status chan_status[2];
|
||||||
} MLAN_PACK_END dmcs_status;
|
} MLAN_PACK_END dmcs_status_data;
|
||||||
|
|
||||||
/** MrvlIEtypes_DmcsConfig_t */
|
/** MrvlIEtypes_DmcsConfig_t */
|
||||||
typedef MLAN_PACK_START struct _MrvlIEtypes_DmcsConfig_t {
|
typedef MLAN_PACK_START struct _MrvlIEtypes_DmcsConfig_t {
|
||||||
|
@ -5542,7 +5703,7 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_DmcsConfig_t {
|
||||||
/** Mapping policy */
|
/** Mapping policy */
|
||||||
t_u8 mapping_policy;
|
t_u8 mapping_policy;
|
||||||
/** Radio status of DMCS */
|
/** Radio status of DMCS */
|
||||||
dmcs_status radio_status[MAX_NUM_MAC];
|
dmcs_status_data radio_status[MAX_NUM_MAC];
|
||||||
} MLAN_PACK_END MrvlIEtypes_DmcsStatus_t;
|
} MLAN_PACK_END MrvlIEtypes_DmcsStatus_t;
|
||||||
|
|
||||||
#define ANTMODE_FW_DECISION 0xff
|
#define ANTMODE_FW_DECISION 0xff
|
||||||
|
@ -7246,6 +7407,10 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND {
|
||||||
HostCmd_DS_802_11_IBSS_STATUS ibss_coalescing;
|
HostCmd_DS_802_11_IBSS_STATUS ibss_coalescing;
|
||||||
/** Mgmt IE list configuration */
|
/** Mgmt IE list configuration */
|
||||||
HostCmd_DS_MGMT_IE_LIST_CFG mgmt_ie_list;
|
HostCmd_DS_MGMT_IE_LIST_CFG mgmt_ie_list;
|
||||||
|
/** TDLS configuration command */
|
||||||
|
HostCmd_DS_TDLS_CONFIG tdls_config_data;
|
||||||
|
/** TDLS operation command */
|
||||||
|
HostCmd_DS_TDLS_OPER tdls_oper_data;
|
||||||
/** System clock configuration */
|
/** System clock configuration */
|
||||||
HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG sys_clock_cfg;
|
HostCmd_DS_ECL_SYSTEM_CLOCK_CONFIG sys_clock_cfg;
|
||||||
/** MAC register access */
|
/** MAC register access */
|
||||||
|
@ -7358,8 +7523,10 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND {
|
||||||
struct mfg_cmd_generic_cfg mfg_generic_cfg;
|
struct mfg_cmd_generic_cfg mfg_generic_cfg;
|
||||||
struct mfg_cmd_tx_cont mfg_tx_cont;
|
struct mfg_cmd_tx_cont mfg_tx_cont;
|
||||||
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
||||||
|
struct mfg_Cmd_HE_TBTx_t mfg_he_power;
|
||||||
HostCmd_DS_CMD_ARB_CONFIG arb_cfg;
|
HostCmd_DS_CMD_ARB_CONFIG arb_cfg;
|
||||||
HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG dot11mc_unassoc_ftm_cfg;
|
HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG dot11mc_unassoc_ftm_cfg;
|
||||||
|
HostCmd_DS_HAL_PHY_CFG hal_phy_cfg_params;
|
||||||
} params;
|
} params;
|
||||||
} MLAN_PACK_END HostCmd_DS_COMMAND, *pHostCmd_DS_COMMAND;
|
} MLAN_PACK_END HostCmd_DS_COMMAND, *pHostCmd_DS_COMMAND;
|
||||||
|
|
||||||
|
@ -7391,6 +7558,10 @@ typedef struct MLAN_PACK_START _opt_sleep_confirm_buffer {
|
||||||
#define VDLL_IND_TYPE_REQ 0
|
#define VDLL_IND_TYPE_REQ 0
|
||||||
/** notify vdll start offset in firmware image */
|
/** notify vdll start offset in firmware image */
|
||||||
#define VDLL_IND_TYPE_OFFSET 1
|
#define VDLL_IND_TYPE_OFFSET 1
|
||||||
|
/** notify vdll download error: signature error */
|
||||||
|
#define VDLL_IND_TYPE_ERR_SIG 2
|
||||||
|
/** notify vdll download error: ID error */
|
||||||
|
#define VDLL_IND_TYPE_ERR_ID 3
|
||||||
|
|
||||||
/** vdll indicate event structure */
|
/** vdll indicate event structure */
|
||||||
typedef MLAN_PACK_START struct _vdll_ind {
|
typedef MLAN_PACK_START struct _vdll_ind {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* definitions used in MLAN and MOAL module.
|
* definitions used in MLAN and MOAL module.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -100,6 +100,7 @@ typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e {
|
||||||
NONTX_BSSID_CAP = 83,
|
NONTX_BSSID_CAP = 83,
|
||||||
MBSSID_INDEX = 85,
|
MBSSID_INDEX = 85,
|
||||||
EXT_CAPABILITY = 127,
|
EXT_CAPABILITY = 127,
|
||||||
|
LINK_ID = 101,
|
||||||
/*IEEE802.11r*/
|
/*IEEE802.11r*/
|
||||||
MOBILITY_DOMAIN = 54,
|
MOBILITY_DOMAIN = 54,
|
||||||
FAST_BSS_TRANSITION = 55,
|
FAST_BSS_TRANSITION = 55,
|
||||||
|
@ -734,25 +735,27 @@ typedef MLAN_PACK_START struct {
|
||||||
t_u8 Schedule : 1;
|
t_u8 Schedule : 1;
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
// IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /*
|
||||||
Legacy/Trigg
|
// !Legacy/Trigg*/
|
||||||
*/
|
t_u8 PowerSaveBehavior : 1;
|
||||||
t_u8 Aggregation : 1; /* ! Reserved */
|
t_u8 Aggregation : 1; /* ! Reserved */
|
||||||
t_u8 AccessPolicy2 : 1; /* ! */
|
t_u8 AccessPolicy2 : 1; /* ! */
|
||||||
t_u8 AccessPolicy1 : 1; /* ! */
|
t_u8 AccessPolicy1 : 1; /* ! */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
||||||
t_u8 TID : 4; /* ! Unique identifier */
|
t_u8 TID : 4; /* ! Unique identifier */
|
||||||
IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
||||||
|
t_u8 TrafficType : 1;
|
||||||
#else
|
#else
|
||||||
IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
||||||
|
t_u8 TrafficType : 1;
|
||||||
t_u8 TID : 4; /* ! Unique identifier */
|
t_u8 TID : 4; /* ! Unique identifier */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
||||||
t_u8 AccessPolicy1 : 1; /* ! */
|
t_u8 AccessPolicy1 : 1; /* ! */
|
||||||
t_u8 AccessPolicy2 : 1; /* ! */
|
t_u8 AccessPolicy2 : 1; /* ! */
|
||||||
t_u8 Aggregation : 1; /* ! Reserved */
|
t_u8 Aggregation : 1; /* ! Reserved */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
// IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
||||||
Legacy/Trigg
|
// Legacy/Trigg*/
|
||||||
*/
|
t_u8 PowerSaveBehavior : 1;
|
||||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||||
t_u8 Schedule : 1;
|
t_u8 Schedule : 1;
|
||||||
|
@ -938,6 +941,20 @@ typedef MLAN_PACK_START struct _IEEEtypes_CountryInfoFullSet_t {
|
||||||
|
|
||||||
#endif /* STA_SUPPORT */
|
#endif /* STA_SUPPORT */
|
||||||
|
|
||||||
|
/** Data structure for Link ID */
|
||||||
|
typedef MLAN_PACK_START struct _IEEEtypes_LinkIDElement_t {
|
||||||
|
/** Element ID */
|
||||||
|
t_u8 element_id;
|
||||||
|
/** Length */
|
||||||
|
t_u8 len;
|
||||||
|
/** bssid */
|
||||||
|
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** initial sta address */
|
||||||
|
t_u8 init_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** respose sta address */
|
||||||
|
t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END IEEEtypes_LinkIDElement_t, *pIEEEtypes_LinkIDElement_t;
|
||||||
|
|
||||||
/** HT Capabilities Data */
|
/** HT Capabilities Data */
|
||||||
typedef struct MLAN_PACK_START _HTCap_t {
|
typedef struct MLAN_PACK_START _HTCap_t {
|
||||||
/** HT Capabilities Info field */
|
/** HT Capabilities Info field */
|
||||||
|
@ -1025,6 +1042,53 @@ typedef MLAN_PACK_START struct _IEEEtypes_HTInfo_t {
|
||||||
HTInfo_t ht_info;
|
HTInfo_t ht_info;
|
||||||
} MLAN_PACK_END IEEEtypes_HTInfo_t, *pIEEEtypes_HTInfo_t;
|
} 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;
|
||||||
/** 20/40 BSS Coexistence IE */
|
/** 20/40 BSS Coexistence IE */
|
||||||
typedef MLAN_PACK_START struct _IEEEtypes_2040BSSCo_t {
|
typedef MLAN_PACK_START struct _IEEEtypes_2040BSSCo_t {
|
||||||
/** Generic IE header */
|
/** Generic IE header */
|
||||||
|
@ -1221,6 +1285,40 @@ typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
||||||
/** PPE Thresholds (optional) */
|
/** PPE Thresholds (optional) */
|
||||||
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
|
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
|
||||||
|
|
||||||
|
/** default channel switch count */
|
||||||
|
#define DEF_CHAN_SWITCH_COUNT 5
|
||||||
|
|
||||||
|
/* IEEE Channel Switch Announcement Element (7.3.2.20) */
|
||||||
|
/**
|
||||||
|
* Provided in beacons and probe responses. Used to advertise when
|
||||||
|
* and to which channel it is changing to. Only starting STAs in
|
||||||
|
* an IBSS and APs are allowed to originate a chan switch element.
|
||||||
|
*/
|
||||||
|
typedef MLAN_PACK_START struct {
|
||||||
|
t_u8 element_id; /**< IEEE Element ID = 37 */
|
||||||
|
t_u8 len; /**< Element length after id and len */
|
||||||
|
t_u8 chan_switch_mode; /**< STA should not transmit any frames if 1 */
|
||||||
|
t_u8 new_channel_num; /**< Channel # that AP/IBSS is moving to */
|
||||||
|
t_u8 chan_switch_count; /**< # of TBTTs before channel switch */
|
||||||
|
|
||||||
|
} MLAN_PACK_END IEEEtypes_ChanSwitchAnn_t;
|
||||||
|
|
||||||
|
/** data structure for extended channel switch */
|
||||||
|
typedef MLAN_PACK_START struct {
|
||||||
|
/** IEEE element ID = 60 */
|
||||||
|
t_u8 element_id;
|
||||||
|
/** Element length after id and len, set to 4 */
|
||||||
|
t_u8 len;
|
||||||
|
/** STA should not transmit any frames if 1 */
|
||||||
|
t_u8 chan_switch_mode;
|
||||||
|
/** Operate class # that AP/IBSS is moving to */
|
||||||
|
t_u8 new_oper_class;
|
||||||
|
/** Channel # that AP/IBSS is moving to */
|
||||||
|
t_u8 new_channel_num;
|
||||||
|
/** of TBTTs before channel switch */
|
||||||
|
t_u8 chan_switch_count;
|
||||||
|
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
|
||||||
|
|
||||||
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
|
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
|
||||||
#define WLAN_11H_MAX_SUBBANDS 5
|
#define WLAN_11H_MAX_SUBBANDS 5
|
||||||
|
|
||||||
|
@ -1276,40 +1374,6 @@ typedef MLAN_PACK_START struct {
|
||||||
|
|
||||||
} MLAN_PACK_END IEEEtypes_SupportedChannels_t;
|
} MLAN_PACK_END IEEEtypes_SupportedChannels_t;
|
||||||
|
|
||||||
/** default channel switch count */
|
|
||||||
#define DEF_CHAN_SWITCH_COUNT 5
|
|
||||||
|
|
||||||
/* IEEE Channel Switch Announcement Element (7.3.2.20) */
|
|
||||||
/**
|
|
||||||
* Provided in beacons and probe responses. Used to advertise when
|
|
||||||
* and to which channel it is changing to. Only starting STAs in
|
|
||||||
* an IBSS and APs are allowed to originate a chan switch element.
|
|
||||||
*/
|
|
||||||
typedef MLAN_PACK_START struct {
|
|
||||||
t_u8 element_id; /**< IEEE Element ID = 37 */
|
|
||||||
t_u8 len; /**< Element length after id and len */
|
|
||||||
t_u8 chan_switch_mode; /**< STA should not transmit any frames if 1 */
|
|
||||||
t_u8 new_channel_num; /**< Channel # that AP/IBSS is moving to */
|
|
||||||
t_u8 chan_switch_count; /**< # of TBTTs before channel switch */
|
|
||||||
|
|
||||||
} MLAN_PACK_END IEEEtypes_ChanSwitchAnn_t;
|
|
||||||
|
|
||||||
/** data structure for extended channel switch */
|
|
||||||
typedef MLAN_PACK_START struct {
|
|
||||||
/** IEEE element ID = 60 */
|
|
||||||
t_u8 element_id;
|
|
||||||
/** Element length after id and len, set to 4 */
|
|
||||||
t_u8 len;
|
|
||||||
/** STA should not transmit any frames if 1 */
|
|
||||||
t_u8 chan_switch_mode;
|
|
||||||
/** Operate class # that AP/IBSS is moving to */
|
|
||||||
t_u8 new_oper_class;
|
|
||||||
/** Channel # that AP/IBSS is moving to */
|
|
||||||
t_u8 new_channel_num;
|
|
||||||
/** of TBTTs before channel switch */
|
|
||||||
t_u8 chan_switch_count;
|
|
||||||
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
|
|
||||||
|
|
||||||
/* IEEE Wide Bandwidth Channel Switch Element */
|
/* IEEE Wide Bandwidth Channel Switch Element */
|
||||||
/**
|
/**
|
||||||
* Provided in beacons and probe responses. Used to advertise when
|
* Provided in beacons and probe responses. Used to advertise when
|
||||||
|
@ -1444,6 +1508,50 @@ typedef struct {
|
||||||
|
|
||||||
} wlan_11h_bss_info_t;
|
} wlan_11h_bss_info_t;
|
||||||
|
|
||||||
|
/** Ethernet packet type for TDLS */
|
||||||
|
#define MLAN_ETHER_PKT_TYPE_TDLS_ACTION (0x890D)
|
||||||
|
|
||||||
|
/*802.11z TDLS action frame type and strcuct */
|
||||||
|
typedef MLAN_PACK_START struct {
|
||||||
|
/*link indentifier ie =101*/
|
||||||
|
t_u8 element_id;
|
||||||
|
/*len = 18*/
|
||||||
|
t_u8 len;
|
||||||
|
/** bssid */
|
||||||
|
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** init sta mac address */
|
||||||
|
t_u8 init_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** resp sta mac address */
|
||||||
|
t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END IEEEtypes_tdls_linkie;
|
||||||
|
|
||||||
|
/** action code for tdls setup request */
|
||||||
|
#define TDLS_SETUP_REQUEST 0
|
||||||
|
/** action code for tdls setup response */
|
||||||
|
#define TDLS_SETUP_RESPONSE 1
|
||||||
|
/** action code for tdls setup confirm */
|
||||||
|
#define TDLS_SETUP_CONFIRM 2
|
||||||
|
/** action code for tdls tear down */
|
||||||
|
#define TDLS_TEARDOWN 3
|
||||||
|
/** action code for tdls traffic indication */
|
||||||
|
#define TDLS_PEER_TRAFFIC_INDICATION 4
|
||||||
|
/** action code for tdls channel switch request */
|
||||||
|
#define TDLS_CHANNEL_SWITCH_REQUEST 5
|
||||||
|
/** action code for tdls channel switch response */
|
||||||
|
#define TDLS_CHANNEL_SWITCH_RESPONSE 6
|
||||||
|
/** action code for tdls psm request */
|
||||||
|
#define TDLS_PEER_PSM_REQUEST 7
|
||||||
|
/** action code for tdls psm response */
|
||||||
|
#define TDLS_PEER_PSM_RESPONSE 8
|
||||||
|
/** action code for tdls traffic response */
|
||||||
|
#define TDLS_PEER_TRAFFIC_RESPONSE 9
|
||||||
|
/** action code for tdls discovery request */
|
||||||
|
#define TDLS_DISCOVERY_REQUEST 10
|
||||||
|
/** action code for TDLS discovery response */
|
||||||
|
#define TDLS_DISCOVERY_RESPONSE 14
|
||||||
|
/** category public */
|
||||||
|
#define CATEGORY_PUBLIC 4
|
||||||
|
|
||||||
/** action code for 20/40 BSS Coexsitence Management frame */
|
/** action code for 20/40 BSS Coexsitence Management frame */
|
||||||
#define BSS_20_40_COEX 0
|
#define BSS_20_40_COEX 0
|
||||||
|
|
||||||
|
@ -1799,6 +1907,10 @@ typedef struct _BSSDescriptor_t {
|
||||||
IEEEtypes_HTInfo_t *pht_info;
|
IEEEtypes_HTInfo_t *pht_info;
|
||||||
/** HT Information Offset */
|
/** HT Information Offset */
|
||||||
t_u16 ht_info_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;
|
||||||
/** 20/40 BSS Coexistence IE */
|
/** 20/40 BSS Coexistence IE */
|
||||||
IEEEtypes_2040BSSCo_t *pbss_co_2040;
|
IEEEtypes_2040BSSCo_t *pbss_co_2040;
|
||||||
/** 20/40 BSS Coexistence Offset */
|
/** 20/40 BSS Coexistence Offset */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* and HW.
|
* and HW.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -53,7 +53,7 @@ Change log:
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Global Variables
|
Global Variables
|
||||||
********************************************************/
|
********************************************************/
|
||||||
extern pmlan_operations mlan_ops[];
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
Local Functions
|
Local Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
@ -255,8 +255,8 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
||||||
#ifdef SDIO
|
#ifdef SDIO
|
||||||
if (IS_SD(pmadapter->card_type)) {
|
if (IS_SD(pmadapter->card_type)) {
|
||||||
max_mp_regs = pmadapter->pcard_sd->reg->max_mp_regs;
|
max_mp_regs = pmadapter->pcard_sd->reg->max_mp_regs;
|
||||||
mp_tx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX;
|
mp_tx_aggr_buf_size = pmadapter->pcard_sd->mp_tx_aggr_buf_size;
|
||||||
mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX;
|
mp_rx_aggr_buf_size = pmadapter->pcard_sd->mp_rx_aggr_buf_size;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -362,7 +362,8 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
||||||
#ifdef DEBUG_LEVEL1
|
#ifdef DEBUG_LEVEL1
|
||||||
if (mlan_drvdbg & MMPA_D) {
|
if (mlan_drvdbg & MMPA_D) {
|
||||||
pmadapter->pcard_sd->mpa_buf_size =
|
pmadapter->pcard_sd->mpa_buf_size =
|
||||||
SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT *
|
SDIO_MP_DBG_NUM *
|
||||||
|
pmadapter->pcard_sd->mp_aggr_pkt_limit *
|
||||||
MLAN_SDIO_BLOCK_SIZE;
|
MLAN_SDIO_BLOCK_SIZE;
|
||||||
if (pmadapter->callbacks.moal_vmalloc &&
|
if (pmadapter->callbacks.moal_vmalloc &&
|
||||||
pmadapter->callbacks.moal_vfree)
|
pmadapter->callbacks.moal_vfree)
|
||||||
|
@ -521,12 +522,21 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
||||||
priv->wmm_required = MTRUE;
|
priv->wmm_required = MTRUE;
|
||||||
priv->wmm_enabled = MFALSE;
|
priv->wmm_enabled = MFALSE;
|
||||||
priv->wmm_qosinfo = 0;
|
priv->wmm_qosinfo = 0;
|
||||||
|
priv->saved_wmm_qosinfo = 0;
|
||||||
|
priv->host_tdls_cs_support = MTRUE;
|
||||||
|
priv->host_tdls_uapsd_support = MTRUE;
|
||||||
|
priv->tdls_cs_channel = 0;
|
||||||
|
priv->supp_regulatory_class_len = 0;
|
||||||
|
priv->chan_supp_len = 0;
|
||||||
|
priv->tdls_idle_time = TDLS_IDLE_TIMEOUT;
|
||||||
|
priv->txaggrctrl = MTRUE;
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
priv->pcurr_bcn_buf = MNULL;
|
priv->pcurr_bcn_buf = MNULL;
|
||||||
priv->curr_bcn_size = 0;
|
priv->curr_bcn_size = 0;
|
||||||
memset(pmadapter, &priv->ext_cap, 0, sizeof(priv->ext_cap));
|
memset(pmadapter, &priv->ext_cap, 0, sizeof(priv->ext_cap));
|
||||||
|
|
||||||
SET_EXTCAP_OPERMODENTF(priv->ext_cap);
|
SET_EXTCAP_OPERMODENTF(priv->ext_cap);
|
||||||
|
SET_EXTCAP_TDLS(priv->ext_cap);
|
||||||
SET_EXTCAP_QOS_MAP(priv->ext_cap);
|
SET_EXTCAP_QOS_MAP(priv->ext_cap);
|
||||||
/* Save default Extended Capability */
|
/* Save default Extended Capability */
|
||||||
memcpy_ext(priv->adapter, &priv->def_ext_cap, &priv->ext_cap,
|
memcpy_ext(priv->adapter, &priv->def_ext_cap, &priv->ext_cap,
|
||||||
|
@ -626,8 +636,10 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||||
pmadapter->data_sent = MTRUE;
|
pmadapter->data_sent = MTRUE;
|
||||||
pmadapter->pcard_sd->mp_rd_bitmap = 0;
|
pmadapter->pcard_sd->mp_rd_bitmap = 0;
|
||||||
pmadapter->pcard_sd->mp_wr_bitmap = 0;
|
pmadapter->pcard_sd->mp_wr_bitmap = 0;
|
||||||
pmadapter->pcard_sd->curr_rd_port = 0;
|
pmadapter->pcard_sd->curr_rd_port =
|
||||||
pmadapter->pcard_sd->curr_wr_port = 0;
|
pmadapter->pcard_sd->reg->start_rd_port;
|
||||||
|
pmadapter->pcard_sd->curr_wr_port =
|
||||||
|
pmadapter->pcard_sd->reg->start_wr_port;
|
||||||
pmadapter->pcard_sd->mp_data_port_mask =
|
pmadapter->pcard_sd->mp_data_port_mask =
|
||||||
pmadapter->pcard_sd->reg->data_port_mask;
|
pmadapter->pcard_sd->reg->data_port_mask;
|
||||||
pmadapter->pcard_sd->mp_invalid_update = 0;
|
pmadapter->pcard_sd->mp_invalid_update = 0;
|
||||||
|
@ -635,7 +647,8 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||||
sizeof(pmadapter->pcard_sd->mp_update));
|
sizeof(pmadapter->pcard_sd->mp_update));
|
||||||
pmadapter->pcard_sd->mpa_tx.buf_len = 0;
|
pmadapter->pcard_sd->mpa_tx.buf_len = 0;
|
||||||
pmadapter->pcard_sd->mpa_tx.pkt_cnt = 0;
|
pmadapter->pcard_sd->mpa_tx.pkt_cnt = 0;
|
||||||
pmadapter->pcard_sd->mpa_tx.start_port = 0;
|
pmadapter->pcard_sd->mpa_tx.start_port =
|
||||||
|
pmadapter->pcard_sd->reg->start_wr_port;
|
||||||
|
|
||||||
if (!pmadapter->init_para.mpa_tx_cfg)
|
if (!pmadapter->init_para.mpa_tx_cfg)
|
||||||
pmadapter->pcard_sd->mpa_tx.enabled = MFALSE;
|
pmadapter->pcard_sd->mpa_tx.enabled = MFALSE;
|
||||||
|
@ -645,11 +658,12 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||||
else
|
else
|
||||||
pmadapter->pcard_sd->mpa_tx.enabled = MTRUE;
|
pmadapter->pcard_sd->mpa_tx.enabled = MTRUE;
|
||||||
pmadapter->pcard_sd->mpa_tx.pkt_aggr_limit =
|
pmadapter->pcard_sd->mpa_tx.pkt_aggr_limit =
|
||||||
SDIO_MP_AGGR_DEF_PKT_LIMIT;
|
pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||||
|
|
||||||
pmadapter->pcard_sd->mpa_rx.buf_len = 0;
|
pmadapter->pcard_sd->mpa_rx.buf_len = 0;
|
||||||
pmadapter->pcard_sd->mpa_rx.pkt_cnt = 0;
|
pmadapter->pcard_sd->mpa_rx.pkt_cnt = 0;
|
||||||
pmadapter->pcard_sd->mpa_rx.start_port = 0;
|
pmadapter->pcard_sd->mpa_rx.start_port =
|
||||||
|
pmadapter->pcard_sd->reg->start_rd_port;
|
||||||
|
|
||||||
if (!pmadapter->init_para.mpa_rx_cfg)
|
if (!pmadapter->init_para.mpa_rx_cfg)
|
||||||
pmadapter->pcard_sd->mpa_rx.enabled = MFALSE;
|
pmadapter->pcard_sd->mpa_rx.enabled = MFALSE;
|
||||||
|
@ -659,7 +673,7 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||||
else
|
else
|
||||||
pmadapter->pcard_sd->mpa_rx.enabled = MTRUE;
|
pmadapter->pcard_sd->mpa_rx.enabled = MTRUE;
|
||||||
pmadapter->pcard_sd->mpa_rx.pkt_aggr_limit =
|
pmadapter->pcard_sd->mpa_rx.pkt_aggr_limit =
|
||||||
SDIO_MP_AGGR_DEF_PKT_LIMIT;
|
pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -807,6 +821,7 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||||
pmadapter->coex_rx_winsize = 1;
|
pmadapter->coex_rx_winsize = 1;
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
pmadapter->chan_bandwidth = 0;
|
pmadapter->chan_bandwidth = 0;
|
||||||
|
pmadapter->tdls_status = TDLS_NOT_SETUP;
|
||||||
#endif /* STA_SUPPORT */
|
#endif /* STA_SUPPORT */
|
||||||
|
|
||||||
pmadapter->min_ba_threshold = MIN_BA_THRESHOLD;
|
pmadapter->min_ba_threshold = MIN_BA_THRESHOLD;
|
||||||
|
@ -847,6 +862,8 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||||
sizeof(pmadapter->sleep_params));
|
sizeof(pmadapter->sleep_params));
|
||||||
memset(pmadapter, &pmadapter->sleep_period, 0,
|
memset(pmadapter, &pmadapter->sleep_period, 0,
|
||||||
sizeof(pmadapter->sleep_period));
|
sizeof(pmadapter->sleep_period));
|
||||||
|
memset(pmadapter, &pmadapter->saved_sleep_period, 0,
|
||||||
|
sizeof(pmadapter->saved_sleep_period));
|
||||||
pmadapter->tx_lock_flag = MFALSE;
|
pmadapter->tx_lock_flag = MFALSE;
|
||||||
pmadapter->null_pkt_interval = 0;
|
pmadapter->null_pkt_interval = 0;
|
||||||
pmadapter->fw_bands = 0;
|
pmadapter->fw_bands = 0;
|
||||||
|
@ -884,7 +901,8 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
||||||
#endif
|
#endif
|
||||||
#if defined(PCIE9098) || defined(PCIE9097)
|
#if defined(PCIE9098) || defined(PCIE9097)
|
||||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||||
pmadapter->pcard_pcie->rxbd_wrptr = MLAN_MAX_TXRX_BD;
|
pmadapter->pcard_pcie->rxbd_wrptr =
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
pmadapter->pcard_pcie->evtbd_wrptr = MLAN_MAX_EVT_BD;
|
pmadapter->pcard_pcie->evtbd_wrptr = MLAN_MAX_EVT_BD;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -975,6 +993,11 @@ mlan_status wlan_init_priv_lock_list(pmlan_adapter pmadapter, t_u8 start_index)
|
||||||
(t_void *)pmadapter->pmoal_handle,
|
(t_void *)pmadapter->pmoal_handle,
|
||||||
&priv->sta_list, MTRUE,
|
&priv->sta_list, MTRUE,
|
||||||
pmadapter->callbacks.moal_init_lock);
|
pmadapter->callbacks.moal_init_lock);
|
||||||
|
/* Initialize tdls_pending_txq */
|
||||||
|
util_init_list_head(
|
||||||
|
(t_void *)pmadapter->pmoal_handle,
|
||||||
|
&priv->tdls_pending_txq, MTRUE,
|
||||||
|
pmadapter->callbacks.moal_init_lock);
|
||||||
/* Initialize bypass_txq */
|
/* Initialize bypass_txq */
|
||||||
util_init_list_head(
|
util_init_list_head(
|
||||||
(t_void *)pmadapter->pmoal_handle,
|
(t_void *)pmadapter->pmoal_handle,
|
||||||
|
@ -1181,6 +1204,10 @@ t_void wlan_free_lock_list(pmlan_adapter pmadapter)
|
||||||
(t_void *)pmadapter->pmoal_handle,
|
(t_void *)pmadapter->pmoal_handle,
|
||||||
&priv->sta_list,
|
&priv->sta_list,
|
||||||
priv->adapter->callbacks.moal_free_lock);
|
priv->adapter->callbacks.moal_free_lock);
|
||||||
|
util_free_list_head(
|
||||||
|
(t_void *)pmadapter->pmoal_handle,
|
||||||
|
&priv->tdls_pending_txq,
|
||||||
|
pmadapter->callbacks.moal_free_lock);
|
||||||
util_free_list_head(
|
util_free_list_head(
|
||||||
(t_void *)pmadapter->pmoal_handle,
|
(t_void *)pmadapter->pmoal_handle,
|
||||||
&priv->bypass_txq,
|
&priv->bypass_txq,
|
||||||
|
@ -1371,7 +1398,7 @@ done:
|
||||||
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or
|
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or
|
||||||
* MLAN_STATUS_FAILURE
|
* MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
void wlan_update_hw_spec(pmlan_adapter pmadapter)
|
static void wlan_update_hw_spec(pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
t_u32 i;
|
t_u32 i;
|
||||||
|
|
||||||
|
@ -1501,7 +1528,7 @@ void wlan_update_hw_spec(pmlan_adapter pmadapter)
|
||||||
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or
|
* @return MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING or
|
||||||
* MLAN_STATUS_FAILURE
|
* MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_init_priv_fw(pmlan_adapter pmadapter)
|
static mlan_status wlan_init_priv_fw(pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_private priv = MNULL;
|
pmlan_private priv = MNULL;
|
||||||
|
@ -1757,7 +1784,7 @@ t_void wlan_free_priv(mlan_private *pmpriv)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_init_interface(pmlan_adapter pmadapter)
|
static mlan_status wlan_init_interface(pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = MNULL;
|
pmlan_callbacks pcb = MNULL;
|
||||||
|
@ -1874,6 +1901,7 @@ mlan_status wlan_get_hw_spec_complete(pmlan_adapter pmadapter)
|
||||||
else {
|
else {
|
||||||
memset(pmadapter, &info, 0, sizeof(info));
|
memset(pmadapter, &info, 0, sizeof(info));
|
||||||
info.fw_cap = pmadapter->fw_cap_info;
|
info.fw_cap = pmadapter->fw_cap_info;
|
||||||
|
info.fw_cap_ext = pmadapter->fw_cap_ext;
|
||||||
memset(pmadapter, &bss_tbl, 0, sizeof(bss_tbl));
|
memset(pmadapter, &bss_tbl, 0, sizeof(bss_tbl));
|
||||||
memcpy_ext(pmadapter, bss_tbl.bss_attr,
|
memcpy_ext(pmadapter, bss_tbl.bss_attr,
|
||||||
pmadapter->bss_attr, sizeof(mlan_bss_tbl),
|
pmadapter->bss_attr, sizeof(mlan_bss_tbl),
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file declares the IOCTL data structures and APIs.
|
* @brief This file declares the IOCTL data structures and APIs.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -198,6 +198,7 @@ enum _mlan_ioctl_req_id {
|
||||||
MLAN_OID_11N_CFG_DELBA = 0x000C000C,
|
MLAN_OID_11N_CFG_DELBA = 0x000C000C,
|
||||||
MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D,
|
MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D,
|
||||||
MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E,
|
MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E,
|
||||||
|
MLAN_OID_11N_CFG_TX_AGGR_CTRL = 0x000C000F,
|
||||||
MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM = 0x000C0010,
|
MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM = 0x000C0010,
|
||||||
MLAN_OID_11N_CFG_MIN_BA_THRESHOLD = 0x000C0011,
|
MLAN_OID_11N_CFG_MIN_BA_THRESHOLD = 0x000C0011,
|
||||||
|
|
||||||
|
@ -257,6 +258,7 @@ enum _mlan_ioctl_req_id {
|
||||||
MLAN_OID_MISC_ASSOC_RSP = 0x0020000C,
|
MLAN_OID_MISC_ASSOC_RSP = 0x0020000C,
|
||||||
MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D,
|
MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D,
|
||||||
MLAN_OID_MISC_CUSTOM_IE = 0x0020000F,
|
MLAN_OID_MISC_CUSTOM_IE = 0x0020000F,
|
||||||
|
MLAN_OID_MISC_TDLS_CONFIG = 0x00200010,
|
||||||
MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012,
|
MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012,
|
||||||
MLAN_OID_MISC_IP_ADDR = 0x00200013,
|
MLAN_OID_MISC_IP_ADDR = 0x00200013,
|
||||||
MLAN_OID_MISC_MAC_CONTROL = 0x00200014,
|
MLAN_OID_MISC_MAC_CONTROL = 0x00200014,
|
||||||
|
@ -284,13 +286,17 @@ enum _mlan_ioctl_req_id {
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025,
|
MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025,
|
||||||
#endif
|
#endif
|
||||||
|
MLAN_OID_MISC_TDLS_OPER = 0x00200026,
|
||||||
|
MLAN_OID_MISC_GET_TDLS_IES = 0x00200027,
|
||||||
MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029,
|
MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029,
|
||||||
MLAN_OID_MISC_MEF_FLT_CFG = 0x0020002A,
|
MLAN_OID_MISC_MEF_FLT_CFG = 0x0020002A,
|
||||||
MLAN_OID_MISC_DFS_REAPTER_MODE = 0x0020002B,
|
MLAN_OID_MISC_DFS_REAPTER_MODE = 0x0020002B,
|
||||||
#ifdef RX_PACKET_COALESCE
|
#ifdef RX_PACKET_COALESCE
|
||||||
MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C,
|
MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C,
|
||||||
#endif
|
#endif
|
||||||
|
MLAN_OID_MISC_TDLS_CS_CHANNEL = 0x0020002D,
|
||||||
MLAN_OID_MISC_COALESCE_CFG = 0x0020002E,
|
MLAN_OID_MISC_COALESCE_CFG = 0x0020002E,
|
||||||
|
MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F,
|
||||||
MLAN_OID_MISC_GET_SENSOR_TEMP = 0x00200030,
|
MLAN_OID_MISC_GET_SENSOR_TEMP = 0x00200030,
|
||||||
MLAN_OID_MISC_GTK_REKEY_OFFLOAD = 0x00200037,
|
MLAN_OID_MISC_GTK_REKEY_OFFLOAD = 0x00200037,
|
||||||
MLAN_OID_MISC_OPER_CLASS = 0x00200038,
|
MLAN_OID_MISC_OPER_CLASS = 0x00200038,
|
||||||
|
@ -332,6 +338,8 @@ enum _mlan_ioctl_req_id {
|
||||||
MLAN_OID_MISC_RANGE_EXT = 0x0020007B,
|
MLAN_OID_MISC_RANGE_EXT = 0x0020007B,
|
||||||
MLAN_OID_MISC_DOT11MC_UNASSOC_FTM_CFG = 0x0020007C,
|
MLAN_OID_MISC_DOT11MC_UNASSOC_FTM_CFG = 0x0020007C,
|
||||||
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
||||||
|
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
||||||
|
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Sub command size */
|
/** Sub command size */
|
||||||
|
@ -1618,6 +1626,14 @@ typedef struct _mlan_ds_get_stats {
|
||||||
t_u32 channel_number;
|
t_u32 channel_number;
|
||||||
/** Channel Switch Mode */
|
/** Channel Switch Mode */
|
||||||
t_u32 channel_switch_mode;
|
t_u32 channel_switch_mode;
|
||||||
|
/** Reset Rx Mac Count */
|
||||||
|
t_u32 rx_reset_mac_recovery_cnt;
|
||||||
|
/** ISR2 Not Done Count*/
|
||||||
|
t_u32 rx_Isr2_NotDone_Cnt;
|
||||||
|
/** GDMA Abort Count */
|
||||||
|
t_u32 gdma_abort_cnt;
|
||||||
|
/** Rx Reset MAC Count */
|
||||||
|
t_u32 g_reset_rx_mac_cnt;
|
||||||
} mlan_ds_get_stats, *pmlan_ds_get_stats;
|
} mlan_ds_get_stats, *pmlan_ds_get_stats;
|
||||||
|
|
||||||
/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */
|
/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */
|
||||||
|
@ -2087,13 +2103,27 @@ typedef struct {
|
||||||
#define SDIO_MP_DBG_NUM 10
|
#define SDIO_MP_DBG_NUM 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCIE
|
|
||||||
#define MLAN_MAX_TXRX_BD 0x20
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Maximum size of IEEE Information Elements */
|
/** Maximum size of IEEE Information Elements */
|
||||||
#define IEEE_MAX_IE_SIZE 256
|
#define IEEE_MAX_IE_SIZE 256
|
||||||
|
|
||||||
|
/** support up to 8 TDLS peer */
|
||||||
|
#define MLAN_MAX_TDLS_PEER_SUPPORTED 8
|
||||||
|
/** TDLS peer info */
|
||||||
|
typedef struct _tdls_peer_info {
|
||||||
|
/** station mac address */
|
||||||
|
t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** SNR */
|
||||||
|
t_s8 snr;
|
||||||
|
/** Noise Floor */
|
||||||
|
t_s8 nf;
|
||||||
|
/** Extended Capabilities IE */
|
||||||
|
t_u8 ext_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** HT Capabilities IE */
|
||||||
|
t_u8 ht_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** VHT Capabilities IE */
|
||||||
|
t_u8 vht_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
} tdls_peer_info;
|
||||||
|
|
||||||
/** max ralist num */
|
/** max ralist num */
|
||||||
#define MLAN_MAX_RALIST_NUM 8
|
#define MLAN_MAX_RALIST_NUM 8
|
||||||
/** ralist info */
|
/** ralist info */
|
||||||
|
@ -2132,6 +2162,10 @@ typedef struct _mlan_debug_info {
|
||||||
t_u32 rx_tbl_num;
|
t_u32 rx_tbl_num;
|
||||||
/** Rx reorder table*/
|
/** Rx reorder table*/
|
||||||
rx_reorder_tbl rx_tbl[MLAN_MAX_RX_BASTREAM_SUPPORTED];
|
rx_reorder_tbl rx_tbl[MLAN_MAX_RX_BASTREAM_SUPPORTED];
|
||||||
|
/** TDLS peer number */
|
||||||
|
t_u32 tdls_peer_num;
|
||||||
|
/** TDLS peer list*/
|
||||||
|
tdls_peer_info tdls_peer_list[MLAN_MAX_TDLS_PEER_SUPPORTED];
|
||||||
/** ralist num */
|
/** ralist num */
|
||||||
t_u32 ralist_num;
|
t_u32 ralist_num;
|
||||||
/** ralist info */
|
/** ralist info */
|
||||||
|
@ -2281,6 +2315,8 @@ typedef struct _mlan_debug_info {
|
||||||
t_u32 dnld_cmd_in_secs;
|
t_u32 dnld_cmd_in_secs;
|
||||||
/** Corresponds to data_sent member of mlan_adapter */
|
/** Corresponds to data_sent member of mlan_adapter */
|
||||||
t_u8 data_sent;
|
t_u8 data_sent;
|
||||||
|
/** Corresponds to data_sent_cnt member of mlan_adapter */
|
||||||
|
t_u32 data_sent_cnt;
|
||||||
/** Corresponds to cmd_sent member of mlan_adapter */
|
/** Corresponds to cmd_sent member of mlan_adapter */
|
||||||
t_u8 cmd_sent;
|
t_u8 cmd_sent;
|
||||||
/** SDIO multiple port read bitmap */
|
/** SDIO multiple port read bitmap */
|
||||||
|
@ -2304,8 +2340,8 @@ typedef struct _mlan_debug_info {
|
||||||
t_u32 eventbd_rdptr;
|
t_u32 eventbd_rdptr;
|
||||||
/** PCIE eventbd write pointer */
|
/** PCIE eventbd write pointer */
|
||||||
t_u32 eventbd_wrptr;
|
t_u32 eventbd_wrptr;
|
||||||
/** Last pkt size in transmit */
|
/** txrx_bd_size */
|
||||||
t_u32 last_tx_pkt_size[MLAN_MAX_TXRX_BD];
|
t_u16 txrx_bd_size;
|
||||||
/** txbd ring vbase */
|
/** txbd ring vbase */
|
||||||
t_u8 *txbd_ring_vbase;
|
t_u8 *txbd_ring_vbase;
|
||||||
/** txbd ring size */
|
/** txbd ring size */
|
||||||
|
@ -2350,7 +2386,7 @@ typedef struct _mlan_debug_info {
|
||||||
#define MAX_NUM_CLIENTS MAX_STA_COUNT
|
#define MAX_NUM_CLIENTS MAX_STA_COUNT
|
||||||
|
|
||||||
/** station info */
|
/** station info */
|
||||||
typedef struct _sta_info {
|
typedef struct _sta_info_data {
|
||||||
/** STA MAC address */
|
/** STA MAC address */
|
||||||
t_u8 mac_address[MLAN_MAC_ADDR_LENGTH];
|
t_u8 mac_address[MLAN_MAC_ADDR_LENGTH];
|
||||||
/** Power mgmt status */
|
/** Power mgmt status */
|
||||||
|
@ -2365,14 +2401,14 @@ typedef struct _sta_info {
|
||||||
t_u16 ie_len;
|
t_u16 ie_len;
|
||||||
/** ie buffer */
|
/** ie buffer */
|
||||||
t_u8 ie_buf[];
|
t_u8 ie_buf[];
|
||||||
} sta_info;
|
} sta_info_data;
|
||||||
|
|
||||||
/** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */
|
/** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */
|
||||||
typedef struct _mlan_ds_sta_list {
|
typedef struct _mlan_ds_sta_list {
|
||||||
/** station count */
|
/** station count */
|
||||||
t_u16 sta_count;
|
t_u16 sta_count;
|
||||||
/** station list */
|
/** station list */
|
||||||
sta_info info[MAX_NUM_CLIENTS];
|
sta_info_data info[MAX_NUM_CLIENTS];
|
||||||
} mlan_ds_sta_list, *pmlan_ds_sta_list;
|
} mlan_ds_sta_list, *pmlan_ds_sta_list;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3681,6 +3717,8 @@ typedef struct _mlan_ds_11n_cfg {
|
||||||
mlan_ds_reject_addba_req reject_addba_req;
|
mlan_ds_reject_addba_req reject_addba_req;
|
||||||
/** Control coex RX window size configuration */
|
/** Control coex RX window size configuration */
|
||||||
t_u32 coex_rx_winsize;
|
t_u32 coex_rx_winsize;
|
||||||
|
/** Control TX AMPDU configuration */
|
||||||
|
t_u32 txaggrctrl;
|
||||||
/** aggrprirotity table for MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM */
|
/** aggrprirotity table for MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM */
|
||||||
mlan_ds_ibss_ampdu_param ibss_ampdu;
|
mlan_ds_ibss_ampdu_param ibss_ampdu;
|
||||||
/** Minimum BA Threshold for MLAN_OID_11N_CFG_MIN_BA_THRESHOLD
|
/** Minimum BA Threshold for MLAN_OID_11N_CFG_MIN_BA_THRESHOLD
|
||||||
|
@ -4519,7 +4557,7 @@ typedef struct _mlan_ds_misc_otp_user_data {
|
||||||
t_u8 user_data[MAX_OTP_USER_DATA_LEN];
|
t_u8 user_data[MAX_OTP_USER_DATA_LEN];
|
||||||
} mlan_ds_misc_otp_user_data;
|
} mlan_ds_misc_otp_user_data;
|
||||||
|
|
||||||
typedef struct _aggr_ctrl {
|
typedef struct _aggr_ctrl_cfg {
|
||||||
/** Enable */
|
/** Enable */
|
||||||
t_u16 enable;
|
t_u16 enable;
|
||||||
/** Aggregation alignment */
|
/** Aggregation alignment */
|
||||||
|
@ -4530,18 +4568,18 @@ typedef struct _aggr_ctrl {
|
||||||
t_u16 aggr_max_num;
|
t_u16 aggr_max_num;
|
||||||
/** Aggrgation timeout, in microseconds */
|
/** Aggrgation timeout, in microseconds */
|
||||||
t_u16 aggr_tmo;
|
t_u16 aggr_tmo;
|
||||||
} aggr_ctrl;
|
} aggr_ctrl_cfg;
|
||||||
|
|
||||||
/** Type definition of mlan_ds_misc_aggr_ctrl
|
/** Type definition of mlan_ds_misc_aggr_ctrl
|
||||||
* for MLAN_OID_MISC_AGGR_CTRL
|
* for MLAN_OID_MISC_AGGR_CTRL
|
||||||
*/
|
*/
|
||||||
typedef struct _mlan_ds_misc_aggr_ctrl {
|
typedef struct _mlan_ds_misc_aggr_ctrl {
|
||||||
/** Tx aggregation control */
|
/** Tx aggregation control */
|
||||||
aggr_ctrl tx;
|
aggr_ctrl_cfg tx;
|
||||||
} mlan_ds_misc_aggr_ctrl;
|
} mlan_ds_misc_aggr_ctrl;
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
typedef struct _usb_aggr_ctrl {
|
typedef struct _usb_aggr_ctrl_cfg {
|
||||||
/** Enable */
|
/** Enable */
|
||||||
t_u16 enable;
|
t_u16 enable;
|
||||||
/** Aggregation mode */
|
/** Aggregation mode */
|
||||||
|
@ -4552,16 +4590,16 @@ typedef struct _usb_aggr_ctrl {
|
||||||
t_u16 aggr_max;
|
t_u16 aggr_max;
|
||||||
/** Aggrgation timeout, in microseconds */
|
/** Aggrgation timeout, in microseconds */
|
||||||
t_u16 aggr_tmo;
|
t_u16 aggr_tmo;
|
||||||
} usb_aggr_ctrl;
|
} usb_aggr_ctrl_cfg;
|
||||||
|
|
||||||
/** Type definition of mlan_ds_misc_usb_aggr_ctrl
|
/** Type definition of mlan_ds_misc_usb_aggr_ctrl
|
||||||
* for MLAN_OID_MISC_USB_AGGR_CTRL
|
* for MLAN_OID_MISC_USB_AGGR_CTRL
|
||||||
*/
|
*/
|
||||||
typedef struct _mlan_ds_misc_usb_aggr_ctrl {
|
typedef struct _mlan_ds_misc_usb_aggr_ctrl {
|
||||||
/** Tx aggregation control */
|
/** Tx aggregation control */
|
||||||
usb_aggr_ctrl tx_aggr_ctrl;
|
usb_aggr_ctrl_cfg tx_aggr_ctrl;
|
||||||
/** Rx deaggregation control */
|
/** Rx deaggregation control */
|
||||||
usb_aggr_ctrl rx_deaggr_ctrl;
|
usb_aggr_ctrl_cfg rx_deaggr_ctrl;
|
||||||
} mlan_ds_misc_usb_aggr_ctrl;
|
} mlan_ds_misc_usb_aggr_ctrl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4605,6 +4643,85 @@ typedef struct _mlan_ds_misc_pmfcfg {
|
||||||
#define MAX_SSID_NUM 16
|
#define MAX_SSID_NUM 16
|
||||||
#define MAX_AP_LIST 8
|
#define MAX_AP_LIST 8
|
||||||
|
|
||||||
|
/**Action ID for TDLS disable link*/
|
||||||
|
#define WLAN_TDLS_DISABLE_LINK 0x00
|
||||||
|
/**Action ID for TDLS enable link*/
|
||||||
|
#define WLAN_TDLS_ENABLE_LINK 0x01
|
||||||
|
/**Action ID for TDLS create link*/
|
||||||
|
#define WLAN_TDLS_CREATE_LINK 0x02
|
||||||
|
/**Action ID for TDLS config link*/
|
||||||
|
#define WLAN_TDLS_CONFIG_LINK 0x03
|
||||||
|
/*reason code*/
|
||||||
|
#define MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26
|
||||||
|
/** TDLS operation buffer */
|
||||||
|
typedef struct _mlan_ds_misc_tdls_oper {
|
||||||
|
/** TDLS Action */
|
||||||
|
t_u16 tdls_action;
|
||||||
|
/** TDLS peer address */
|
||||||
|
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** peer capability */
|
||||||
|
t_u16 capability;
|
||||||
|
/** peer qos info */
|
||||||
|
t_u8 qos_info;
|
||||||
|
/** peer extend capability */
|
||||||
|
t_u8 *ext_capab;
|
||||||
|
/** extend capability len */
|
||||||
|
t_u8 ext_capab_len;
|
||||||
|
/** support rates */
|
||||||
|
t_u8 *supported_rates;
|
||||||
|
/** supported rates len */
|
||||||
|
t_u8 supported_rates_len;
|
||||||
|
/** peer ht_cap */
|
||||||
|
t_u8 *ht_capa;
|
||||||
|
/** peer vht capability */
|
||||||
|
t_u8 *vht_cap;
|
||||||
|
} mlan_ds_misc_tdls_oper;
|
||||||
|
|
||||||
|
/** flag for TDLS extcap */
|
||||||
|
#define TDLS_IE_FLAGS_EXTCAP 0x0001
|
||||||
|
/** flag for TDLS HTCAP */
|
||||||
|
#define TDLS_IE_FLAGS_HTCAP 0x0002
|
||||||
|
/** flag for TDLS HTINFO */
|
||||||
|
#define TDLS_IE_FLAGS_HTINFO 0x0004
|
||||||
|
/** flag for TDLS VHTCAP */
|
||||||
|
#define TDLS_IE_FLAGS_VHTCAP 0x0008
|
||||||
|
/** flag for TDLS VHTOPRAT */
|
||||||
|
#define TDLS_IE_FLAGS_VHTOPRAT 0x0010
|
||||||
|
/** flag for TDLS AID inof */
|
||||||
|
#define TDLS_IE_FLAGS_AID 0x0020
|
||||||
|
/** flag for TDLS Supported channels and regulatory class IE*/
|
||||||
|
#define TDLS_IE_FLAGS_SUPP_CS_IE 0x0040
|
||||||
|
/** flag for TDLS Qos info */
|
||||||
|
#define TDLS_IE_FLAGS_QOS_INFO 0x0080
|
||||||
|
/** flag for TDLS SETUP */
|
||||||
|
#define TDLS_IE_FLAGS_SETUP 0x0100
|
||||||
|
|
||||||
|
/** TDLS ie buffer */
|
||||||
|
typedef struct _mlan_ds_misc_tdls_ies {
|
||||||
|
/** TDLS peer address */
|
||||||
|
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** flags for request IEs */
|
||||||
|
t_u16 flags;
|
||||||
|
/** Qos info */
|
||||||
|
t_u8 QosInfo;
|
||||||
|
/** Extended Capabilities IE */
|
||||||
|
t_u8 ext_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** HT Capabilities IE */
|
||||||
|
t_u8 ht_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** HT Information IE */
|
||||||
|
t_u8 ht_info[IEEE_MAX_IE_SIZE];
|
||||||
|
/** VHT Capabilities IE */
|
||||||
|
t_u8 vht_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** VHT Operations IE */
|
||||||
|
t_u8 vht_oprat[IEEE_MAX_IE_SIZE];
|
||||||
|
/** aid Info */
|
||||||
|
t_u8 aid_info[IEEE_MAX_IE_SIZE];
|
||||||
|
/** supported channels */
|
||||||
|
t_u8 supp_chan[IEEE_MAX_IE_SIZE];
|
||||||
|
/** supported regulatory class */
|
||||||
|
t_u8 regulatory_class[IEEE_MAX_IE_SIZE];
|
||||||
|
} mlan_ds_misc_tdls_ies;
|
||||||
|
|
||||||
#ifdef RX_PACKET_COALESCE
|
#ifdef RX_PACKET_COALESCE
|
||||||
typedef struct _mlan_ds_misc_rx_packet_coalesce {
|
typedef struct _mlan_ds_misc_rx_packet_coalesce {
|
||||||
/** packet threshold */
|
/** packet threshold */
|
||||||
|
@ -4855,6 +4972,13 @@ typedef struct _mlan_ds_ssu_params {
|
||||||
} mlan_ds_ssu_params;
|
} mlan_ds_ssu_params;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef MLAN_PACK_START struct _mlan_ds_hal_phy_cfg_params {
|
||||||
|
/** 11b pwr spectral density mask enable/disable */
|
||||||
|
t_u8 dot11b_psd_mask_cfg;
|
||||||
|
/** reserved fields for future hal/phy cfg use */
|
||||||
|
t_u8 reserved[7];
|
||||||
|
} MLAN_PACK_END mlan_ds_hal_phy_cfg_params;
|
||||||
|
|
||||||
#define MAX_NUM_MAC 2
|
#define MAX_NUM_MAC 2
|
||||||
/** Type definition of mlan_ds_misc_mapping_policy */
|
/** Type definition of mlan_ds_misc_mapping_policy */
|
||||||
typedef struct _mlan_ds_misc_mapping_policy {
|
typedef struct _mlan_ds_misc_mapping_policy {
|
||||||
|
@ -4914,6 +5038,8 @@ typedef struct _mlan_ds_misc_chan_trpc_cfg {
|
||||||
#define MFG_CMD_RFPWR 0x1033
|
#define MFG_CMD_RFPWR 0x1033
|
||||||
#define MFG_CMD_RF_BAND_AG 0x1034
|
#define MFG_CMD_RF_BAND_AG 0x1034
|
||||||
#define MFG_CMD_RF_CHANNELBW 0x1044
|
#define MFG_CMD_RF_CHANNELBW 0x1044
|
||||||
|
#define MFG_CMD_RADIO_MODE_CFG 0x1211
|
||||||
|
#define MFG_CMD_CONFIG_MAC_HE_TB_TX 0x110A
|
||||||
/** MFG CMD generic cfg */
|
/** MFG CMD generic cfg */
|
||||||
struct MLAN_PACK_START mfg_cmd_generic_cfg {
|
struct MLAN_PACK_START mfg_cmd_generic_cfg {
|
||||||
/** MFG command code */
|
/** MFG command code */
|
||||||
|
@ -4972,6 +5098,21 @@ struct MLAN_PACK_START mfg_cmd_tx_frame2 {
|
||||||
t_u32 stbc;
|
t_u32 stbc;
|
||||||
/** power id */
|
/** power id */
|
||||||
t_u32 rsvd[2];
|
t_u32 rsvd[2];
|
||||||
|
/** NumPkt */
|
||||||
|
t_u32 NumPkt;
|
||||||
|
/** MaxPE */
|
||||||
|
t_u32 MaxPE;
|
||||||
|
/** BeamChange */
|
||||||
|
t_u32 BeamChange;
|
||||||
|
/** Dcm */
|
||||||
|
t_u32 Dcm;
|
||||||
|
/** Doppler */
|
||||||
|
t_u32 Doppler;
|
||||||
|
/** MidP */
|
||||||
|
t_u32 MidP;
|
||||||
|
/** QNum */
|
||||||
|
t_u32 QNum;
|
||||||
|
|
||||||
} MLAN_PACK_END;
|
} MLAN_PACK_END;
|
||||||
|
|
||||||
/* MFG CMD Tx Continuous */
|
/* MFG CMD Tx Continuous */
|
||||||
|
@ -5000,6 +5141,27 @@ struct MLAN_PACK_START mfg_cmd_tx_cont {
|
||||||
t_u32 rsvd;
|
t_u32 rsvd;
|
||||||
} MLAN_PACK_END;
|
} MLAN_PACK_END;
|
||||||
|
|
||||||
|
struct MLAN_PACK_START mfg_Cmd_HE_TBTx_t {
|
||||||
|
/** MFG command code */
|
||||||
|
t_u32 mfg_cmd;
|
||||||
|
/** Action */
|
||||||
|
t_u16 action;
|
||||||
|
/** Device ID */
|
||||||
|
t_u16 device_id;
|
||||||
|
/** MFG Error code */
|
||||||
|
t_u32 error;
|
||||||
|
/** Enable Tx */
|
||||||
|
t_u16 enable;
|
||||||
|
/** Q num */
|
||||||
|
t_u16 qnum;
|
||||||
|
/** AID */
|
||||||
|
t_u16 aid;
|
||||||
|
/** AXQ Mu Timer */
|
||||||
|
t_u16 axq_mu_timer;
|
||||||
|
/** Tx Power */
|
||||||
|
t_u16 tx_power;
|
||||||
|
} MLAN_PACK_END;
|
||||||
|
|
||||||
typedef struct _mlan_ds_misc_chnrgpwr_cfg {
|
typedef struct _mlan_ds_misc_chnrgpwr_cfg {
|
||||||
/** length */
|
/** length */
|
||||||
t_u16 length;
|
t_u16 length;
|
||||||
|
@ -5043,8 +5205,17 @@ typedef struct _mlan_ds_misc_cfg {
|
||||||
t_u32 func_init_shutdown;
|
t_u32 func_init_shutdown;
|
||||||
/** Custom IE for MLAN_OID_MISC_CUSTOM_IE */
|
/** Custom IE for MLAN_OID_MISC_CUSTOM_IE */
|
||||||
mlan_ds_misc_custom_ie cust_ie;
|
mlan_ds_misc_custom_ie cust_ie;
|
||||||
|
t_u16 tdls_idle_time;
|
||||||
/** Config dynamic bandwidth*/
|
/** Config dynamic bandwidth*/
|
||||||
t_u16 dyn_bw;
|
t_u16 dyn_bw;
|
||||||
|
/** TDLS configuration for MLAN_OID_MISC_TDLS_CONFIG */
|
||||||
|
mlan_ds_misc_tdls_config tdls_config;
|
||||||
|
/** TDLS operation for MLAN_OID_MISC_TDLS_OPER */
|
||||||
|
mlan_ds_misc_tdls_oper tdls_oper;
|
||||||
|
/** TDLS ies for MLAN_OID_MISC_GET_TDLS_IES */
|
||||||
|
mlan_ds_misc_tdls_ies tdls_ies;
|
||||||
|
/**tdls cs off channel*/
|
||||||
|
t_u8 tdls_cs_channel;
|
||||||
/** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */
|
/** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */
|
||||||
mlan_ds_misc_tx_datapause tx_datapause;
|
mlan_ds_misc_tx_datapause tx_datapause;
|
||||||
/** IP address configuration */
|
/** IP address configuration */
|
||||||
|
@ -5131,11 +5302,13 @@ typedef struct _mlan_ds_misc_cfg {
|
||||||
struct mfg_cmd_generic_cfg mfg_generic_cfg;
|
struct mfg_cmd_generic_cfg mfg_generic_cfg;
|
||||||
struct mfg_cmd_tx_cont mfg_tx_cont;
|
struct mfg_cmd_tx_cont mfg_tx_cont;
|
||||||
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
||||||
|
struct mfg_Cmd_HE_TBTx_t mfg_he_power;
|
||||||
mlan_ds_misc_arb_cfg arb_cfg;
|
mlan_ds_misc_arb_cfg arb_cfg;
|
||||||
mlan_ds_misc_cfp_tbl cfp;
|
mlan_ds_misc_cfp_tbl cfp;
|
||||||
t_u8 range_ext_mode;
|
t_u8 range_ext_mode;
|
||||||
mlan_ds_misc_dot11mc_unassoc_ftm_cfg dot11mc_unassoc_ftm_cfg;
|
mlan_ds_misc_dot11mc_unassoc_ftm_cfg dot11mc_unassoc_ftm_cfg;
|
||||||
mlan_ds_misc_tp_state tp_state;
|
mlan_ds_misc_tp_state tp_state;
|
||||||
|
mlan_ds_hal_phy_cfg_params hal_phy_cfg_params;
|
||||||
} param;
|
} param;
|
||||||
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* to the firmware.
|
* to the firmware.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -555,7 +555,7 @@ static int wlan_cmd_append_osen_ie(mlan_private *priv, t_u8 **ppbuffer)
|
||||||
* @param data A pointer to rsn_ie data after IE header
|
* @param data A pointer to rsn_ie data after IE header
|
||||||
* @param return rsn_cap
|
* @param return rsn_cap
|
||||||
*/
|
*/
|
||||||
t_u16 wlan_get_rsn_cap(t_u8 *data)
|
static t_u16 wlan_get_rsn_cap(t_u8 *data)
|
||||||
{
|
{
|
||||||
t_u16 rsn_cap = 0;
|
t_u16 rsn_cap = 0;
|
||||||
t_u16 *ptr;
|
t_u16 *ptr;
|
||||||
|
@ -589,7 +589,7 @@ t_u16 wlan_get_rsn_cap(t_u8 *data)
|
||||||
* @param BSSDescriptor_t A pointer to BSSDescriptor_t data structure
|
* @param BSSDescriptor_t A pointer to BSSDescriptor_t data structure
|
||||||
* @param return MTRUE/MFALSE
|
* @param return MTRUE/MFALSE
|
||||||
*/
|
*/
|
||||||
t_u8 wlan_use_mfp(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
static t_u8 wlan_use_mfp(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
||||||
{
|
{
|
||||||
t_u16 ap_rsn_cap = 0;
|
t_u16 ap_rsn_cap = 0;
|
||||||
t_u16 sta_rsn_cap = 0;
|
t_u16 sta_rsn_cap = 0;
|
||||||
|
@ -624,7 +624,7 @@ t_u8 wlan_use_mfp(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
||||||
*
|
*
|
||||||
* @param ptlv_rsn_ie A pointer to rsn_ie TLV
|
* @param ptlv_rsn_ie A pointer to rsn_ie TLV
|
||||||
*/
|
*/
|
||||||
int wlan_update_rsn_ie(mlan_private *pmpriv,
|
static int wlan_update_rsn_ie(mlan_private *pmpriv,
|
||||||
MrvlIEtypes_RsnParamSet_t *ptlv_rsn_ie)
|
MrvlIEtypes_RsnParamSet_t *ptlv_rsn_ie)
|
||||||
{
|
{
|
||||||
t_u16 *prsn_cap;
|
t_u16 *prsn_cap;
|
||||||
|
@ -816,7 +816,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MFALSE if not found; MTURE if found
|
* @return MFALSE if not found; MTURE if found
|
||||||
*/
|
*/
|
||||||
t_u8 wlan_find_ie(t_u8 *ie, t_u8 ie_len, t_u8 ie_type)
|
static t_u8 wlan_find_ie(t_u8 *ie, t_u8 ie_len, t_u8 ie_type)
|
||||||
{
|
{
|
||||||
IEEEtypes_Header_t *pheader = MNULL;
|
IEEEtypes_Header_t *pheader = MNULL;
|
||||||
t_u8 *pos = MNULL;
|
t_u8 *pos = MNULL;
|
||||||
|
@ -829,7 +829,8 @@ t_u8 wlan_find_ie(t_u8 *ie, t_u8 ie_len, t_u8 ie_type)
|
||||||
ret_len = ie_len;
|
ret_len = ie_len;
|
||||||
while (ret_len >= 2) {
|
while (ret_len >= 2) {
|
||||||
pheader = (IEEEtypes_Header_t *)pos;
|
pheader = (IEEEtypes_Header_t *)pos;
|
||||||
if (pheader->len + sizeof(IEEEtypes_Header_t) > ret_len) {
|
if ((t_s8)(pheader->len + sizeof(IEEEtypes_Header_t)) >
|
||||||
|
ret_len) {
|
||||||
PRINTM(MMSG, "invalid IE length = %d left len %d\n",
|
PRINTM(MMSG, "invalid IE length = %d left len %d\n",
|
||||||
pheader->len, ret_len);
|
pheader->len, ret_len);
|
||||||
break;
|
break;
|
||||||
|
@ -879,7 +880,9 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
||||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||||
void *rsn_wpa_ie_tmp = MNULL;
|
void *rsn_wpa_ie_tmp = MNULL;
|
||||||
#endif
|
#endif
|
||||||
t_u8 ft_akm = 0;
|
//#ifdef ENABLE_802_11R
|
||||||
|
// t_u8 ft_akm = 0;
|
||||||
|
//#endif
|
||||||
t_u8 oper_class;
|
t_u8 oper_class;
|
||||||
t_u8 oper_class_flag = MFALSE;
|
t_u8 oper_class_flag = MFALSE;
|
||||||
MrvlIEtypes_HostMlme_t *host_mlme_tlv = MNULL;
|
MrvlIEtypes_HostMlme_t *host_mlme_tlv = MNULL;
|
||||||
|
@ -1038,8 +1041,10 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
||||||
prsn_ie_tlv->header.len;
|
prsn_ie_tlv->header.len;
|
||||||
prsn_ie_tlv->header.len =
|
prsn_ie_tlv->header.len =
|
||||||
wlan_cpu_to_le16(prsn_ie_tlv->header.len);
|
wlan_cpu_to_le16(prsn_ie_tlv->header.len);
|
||||||
|
//#ifdef ENABLE_802_11R
|
||||||
/** parse rsn ie to find whether ft akm is used*/
|
/** parse rsn ie to find whether ft akm is used*/
|
||||||
ft_akm = wlan_ft_akm_is_used(pmpriv, pmpriv->wpa_ie);
|
// ft_akm = wlan_ft_akm_is_used(pmpriv, pmpriv->wpa_ie);
|
||||||
|
//#endif
|
||||||
/* Append PMF Configuration coming from cfg80211 layer
|
/* Append PMF Configuration coming from cfg80211 layer
|
||||||
*/
|
*/
|
||||||
psecurity_cfg_ie = (MrvlIEtypes_SecurityCfg_t *)pos;
|
psecurity_cfg_ie = (MrvlIEtypes_SecurityCfg_t *)pos;
|
||||||
|
@ -2318,7 +2323,7 @@ mlan_status wlan_ret_802_11_ad_hoc(mlan_private *pmpriv,
|
||||||
}
|
}
|
||||||
|
|
||||||
/** process wmm ie */
|
/** process wmm ie */
|
||||||
if (ie_len >= sizeof(IEEEtypes_VendorHeader_t)) {
|
if (ie_len >= (int)sizeof(IEEEtypes_VendorHeader_t)) {
|
||||||
if ((pwmm_param_ie->vend_hdr.element_id ==
|
if ((pwmm_param_ie->vend_hdr.element_id ==
|
||||||
VENDOR_SPECIFIC_221) &&
|
VENDOR_SPECIFIC_221) &&
|
||||||
!memcmp(pmadapter, pwmm_param_ie->vend_hdr.oui, wmm_oui,
|
!memcmp(pmadapter, pwmm_param_ie->vend_hdr.oui, wmm_oui,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* in MLAN module.
|
* in MLAN module.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -286,9 +286,6 @@ extern t_u32 mlan_drvdbg;
|
||||||
b = t; \
|
b = t; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/** MLAN MNULL pointer */
|
|
||||||
#define MNULL (0)
|
|
||||||
|
|
||||||
/** 16 bits byte swap */
|
/** 16 bits byte swap */
|
||||||
#define swap_byte_16(x) \
|
#define swap_byte_16(x) \
|
||||||
((t_u16)((((t_u16)(x)&0x00ffU) << 8) | (((t_u16)(x)&0xff00U) >> 8)))
|
((t_u16)((((t_u16)(x)&0x00ffU) << 8) | (((t_u16)(x)&0xff00U) >> 8)))
|
||||||
|
@ -564,6 +561,8 @@ extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
||||||
#endif
|
#endif
|
||||||
/** Maximum port */
|
/** Maximum port */
|
||||||
#define MAX_PORT 32
|
#define MAX_PORT 32
|
||||||
|
/** Maximum port 16 */
|
||||||
|
#define MAX_PORT_16 (16)
|
||||||
|
|
||||||
/** max MP REGS */
|
/** max MP REGS */
|
||||||
#define MAX_MP_REGS_MAX (196)
|
#define MAX_MP_REGS_MAX (196)
|
||||||
|
@ -594,6 +593,8 @@ extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
||||||
#define MFG_CMD_TX_FRAME 0x1021
|
#define MFG_CMD_TX_FRAME 0x1021
|
||||||
#define MFG_CMD_RF_BAND_AG 0x1034
|
#define MFG_CMD_RF_BAND_AG 0x1034
|
||||||
#define MFG_CMD_RF_CHANNELBW 0x1044
|
#define MFG_CMD_RF_CHANNELBW 0x1044
|
||||||
|
#define MFG_CMD_RADIO_MODE_CFG 0x1211
|
||||||
|
#define MFG_CMD_CONFIG_MAC_HE_TB_TX 0x110A
|
||||||
|
|
||||||
/** Debug command number */
|
/** Debug command number */
|
||||||
#define DBG_CMD_NUM 10
|
#define DBG_CMD_NUM 10
|
||||||
|
@ -757,6 +758,8 @@ struct _raListTbl {
|
||||||
t_u8 del_ba_count;
|
t_u8 del_ba_count;
|
||||||
/** amsdu in ampdu flag */
|
/** amsdu in ampdu flag */
|
||||||
t_u8 amsdu_in_ampdu;
|
t_u8 amsdu_in_ampdu;
|
||||||
|
/** tdls flag */
|
||||||
|
t_u8 is_tdls_link;
|
||||||
/** tx_pause flag */
|
/** tx_pause flag */
|
||||||
t_u8 tx_pause;
|
t_u8 tx_pause;
|
||||||
};
|
};
|
||||||
|
@ -1209,6 +1212,9 @@ typedef struct _mlan_private {
|
||||||
t_u8 osen_ie_len;
|
t_u8 osen_ie_len;
|
||||||
/** Pointer to the station table */
|
/** Pointer to the station table */
|
||||||
mlan_list_head sta_list;
|
mlan_list_head sta_list;
|
||||||
|
/** tdls pending queue */
|
||||||
|
mlan_list_head tdls_pending_txq;
|
||||||
|
t_u16 tdls_idle_time;
|
||||||
|
|
||||||
/** MGMT IE */
|
/** MGMT IE */
|
||||||
custom_ie mgmt_ie[MAX_MGMT_IE_INDEX];
|
custom_ie mgmt_ie[MAX_MGMT_IE_INDEX];
|
||||||
|
@ -1220,6 +1226,22 @@ typedef struct _mlan_private {
|
||||||
t_u8 wmm_enabled;
|
t_u8 wmm_enabled;
|
||||||
/** WMM qos info */
|
/** WMM qos info */
|
||||||
t_u8 wmm_qosinfo;
|
t_u8 wmm_qosinfo;
|
||||||
|
/** saved WMM qos info */
|
||||||
|
t_u8 saved_wmm_qosinfo;
|
||||||
|
/**host tdls uapsd support*/
|
||||||
|
t_u8 host_tdls_uapsd_support;
|
||||||
|
/**host tdls channel switch support*/
|
||||||
|
t_u8 host_tdls_cs_support;
|
||||||
|
/**supported channel IE len*/
|
||||||
|
t_u8 chan_supp_len;
|
||||||
|
/**save channel support IE*/
|
||||||
|
t_u8 chan_supp[MAX_IE_SIZE];
|
||||||
|
/**supported regulatory classl IE len*/
|
||||||
|
t_u8 supp_regulatory_class_len;
|
||||||
|
/**save support channel regulatory class IE*/
|
||||||
|
t_u8 supp_regulatory_class[MAX_IE_SIZE];
|
||||||
|
/**tdls cs off channel*/
|
||||||
|
t_u8 tdls_cs_channel;
|
||||||
/** WMM related variable*/
|
/** WMM related variable*/
|
||||||
wmm_desc_t wmm;
|
wmm_desc_t wmm;
|
||||||
|
|
||||||
|
@ -1297,6 +1319,8 @@ typedef struct _mlan_private {
|
||||||
/** USB data port */
|
/** USB data port */
|
||||||
t_u32 port;
|
t_u32 port;
|
||||||
#endif
|
#endif
|
||||||
|
/** Control TX AMPDU on infra link */
|
||||||
|
t_u8 txaggrctrl;
|
||||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||||
t_void *psapriv;
|
t_void *psapriv;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1436,6 +1460,22 @@ struct _cmd_ctrl_node {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** default tdls wmm qosinfo */
|
||||||
|
#define DEFAULT_TDLS_WMM_QOS_INFO 15
|
||||||
|
/** default tdls sleep period */
|
||||||
|
#define DEFAULT_TDLS_SLEEP_PERIOD 30
|
||||||
|
|
||||||
|
/** TDLS status */
|
||||||
|
typedef enum _tdlsStatus_e {
|
||||||
|
TDLS_NOT_SETUP = 0,
|
||||||
|
TDLS_SETUP_INPROGRESS,
|
||||||
|
TDLS_SETUP_COMPLETE,
|
||||||
|
TDLS_SETUP_FAILURE,
|
||||||
|
TDLS_TEAR_DOWN,
|
||||||
|
TDLS_SWITCHING_CHANNEL,
|
||||||
|
TDLS_IN_BASE_CHANNEL,
|
||||||
|
TDLS_IN_OFF_CHANNEL,
|
||||||
|
} tdlsStatus_e;
|
||||||
/** station node */
|
/** station node */
|
||||||
typedef struct _sta_node sta_node, *psta_node;
|
typedef struct _sta_node sta_node, *psta_node;
|
||||||
|
|
||||||
|
@ -1463,12 +1503,39 @@ struct _sta_node {
|
||||||
t_u8 is_11ac_enabled;
|
t_u8 is_11ac_enabled;
|
||||||
/** UAP 11ax flag */
|
/** UAP 11ax flag */
|
||||||
t_u8 is_11ax_enabled;
|
t_u8 is_11ax_enabled;
|
||||||
|
IEEEtypes_HECap_t he_cap;
|
||||||
/** SNR */
|
/** SNR */
|
||||||
t_s8 snr;
|
t_s8 snr;
|
||||||
/** Noise Floor */
|
/** Noise Floor */
|
||||||
t_s8 nf;
|
t_s8 nf;
|
||||||
/** peer capability */
|
/** peer capability */
|
||||||
t_u16 capability;
|
t_u16 capability;
|
||||||
|
/** tdls status */
|
||||||
|
tdlsStatus_e status;
|
||||||
|
/** flag for host based tdls */
|
||||||
|
t_u8 external_tdls;
|
||||||
|
/** peer support rates */
|
||||||
|
t_u8 support_rate[32];
|
||||||
|
/** rate size */
|
||||||
|
t_u8 rate_len;
|
||||||
|
/*Qos capability info*/
|
||||||
|
t_u8 qos_info;
|
||||||
|
/** HT info in TDLS setup confirm*/
|
||||||
|
IEEEtypes_HTInfo_t HTInfo;
|
||||||
|
/** peer BSSCO_20_40*/
|
||||||
|
IEEEtypes_2040BSSCo_t BSSCO_20_40;
|
||||||
|
/*Extended capability*/
|
||||||
|
IEEEtypes_ExtCap_t ExtCap;
|
||||||
|
/*RSN IE*/
|
||||||
|
IEEEtypes_Generic_t rsn_ie;
|
||||||
|
/**Link ID*/
|
||||||
|
IEEEtypes_LinkIDElement_t link_ie;
|
||||||
|
/** AID info */
|
||||||
|
IEEEtypes_AID_t aid_info;
|
||||||
|
/** VHT Capabilities IE */
|
||||||
|
IEEEtypes_VHTCap_t vht_cap;
|
||||||
|
/** VHT Operations IE */
|
||||||
|
IEEEtypes_VHTOprat_t vht_oprat;
|
||||||
/** wapi key on off flag */
|
/** wapi key on off flag */
|
||||||
t_u8 wapi_key_on;
|
t_u8 wapi_key_on;
|
||||||
/** tx pause status */
|
/** tx pause status */
|
||||||
|
@ -1710,14 +1777,14 @@ typedef struct _sdio_mpa_rx {
|
||||||
/** data structure for USB Rx Deaggregation */
|
/** data structure for USB Rx Deaggregation */
|
||||||
typedef struct _usb_rx_deaggr_params {
|
typedef struct _usb_rx_deaggr_params {
|
||||||
/** Rx aggregation control */
|
/** Rx aggregation control */
|
||||||
usb_aggr_ctrl aggr_ctrl;
|
usb_aggr_ctrl_cfg aggr_ctrl;
|
||||||
} usb_rx_deaggr_params;
|
} usb_rx_deaggr_params;
|
||||||
|
|
||||||
#define MAX_USB_TX_PORT_NUM 1
|
#define MAX_USB_TX_PORT_NUM 1
|
||||||
/** data structure for USB Tx Aggregation */
|
/** data structure for USB Tx Aggregation */
|
||||||
typedef struct _usb_tx_aggr_params {
|
typedef struct _usb_tx_aggr_params {
|
||||||
/** Tx aggregation control */
|
/** Tx aggregation control */
|
||||||
usb_aggr_ctrl aggr_ctrl;
|
usb_aggr_ctrl_cfg aggr_ctrl;
|
||||||
/** allocated pmbuf for tx aggreation */
|
/** allocated pmbuf for tx aggreation */
|
||||||
pmlan_buffer pmbuf_aggr;
|
pmlan_buffer pmbuf_aggr;
|
||||||
/** packet len used in pmbuf_aggr */
|
/** packet len used in pmbuf_aggr */
|
||||||
|
@ -1738,14 +1805,14 @@ typedef struct _usb_tx_aggr_params {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Type definition of mef_entry*/
|
/** Type definition of mef_entry*/
|
||||||
typedef struct _mef_cfg {
|
typedef struct _mef_cfg_data {
|
||||||
/** criteria*/
|
/** criteria*/
|
||||||
t_u32 criteria;
|
t_u32 criteria;
|
||||||
/** entry num*/
|
/** entry num*/
|
||||||
t_u16 entry_num;
|
t_u16 entry_num;
|
||||||
/** entry pointer*/
|
/** entry pointer*/
|
||||||
mef_entry_t *pentry;
|
mef_entry_t *pentry;
|
||||||
} mef_cfg;
|
} mef_cfg_data;
|
||||||
|
|
||||||
/** Type definition of mef_entry*/
|
/** Type definition of mef_entry*/
|
||||||
typedef struct _mef_entry {
|
typedef struct _mef_entry {
|
||||||
|
@ -1814,8 +1881,6 @@ typedef struct _mlan_init_para {
|
||||||
t_u32 dev_cap_mask;
|
t_u32 dev_cap_mask;
|
||||||
/** oob independent reset mode */
|
/** oob independent reset mode */
|
||||||
t_u32 indrstcfg;
|
t_u32 indrstcfg;
|
||||||
/** fw region */
|
|
||||||
t_bool fw_region;
|
|
||||||
/** passive to active scan */
|
/** passive to active scan */
|
||||||
t_u8 passive_to_active_scan;
|
t_u8 passive_to_active_scan;
|
||||||
/** uap max sta */
|
/** uap max sta */
|
||||||
|
@ -1891,7 +1956,16 @@ typedef struct _mlan_sdio_card_reg {
|
||||||
|
|
||||||
typedef struct _mlan_sdio_card {
|
typedef struct _mlan_sdio_card {
|
||||||
const mlan_sdio_card_reg *reg;
|
const mlan_sdio_card_reg *reg;
|
||||||
|
/** maximum ports */
|
||||||
|
t_u8 max_ports;
|
||||||
|
/** mp aggregation packet limit */
|
||||||
|
t_u8 mp_aggr_pkt_limit;
|
||||||
|
/** sdio new mode support */
|
||||||
|
t_bool supports_sdio_new_mode;
|
||||||
|
/** max tx aggr buf size */
|
||||||
|
t_u32 mp_tx_aggr_buf_size;
|
||||||
|
/** max rx aggr buf size */
|
||||||
|
t_u32 mp_rx_aggr_buf_size;
|
||||||
/** IO port */
|
/** IO port */
|
||||||
t_u32 ioport;
|
t_u32 ioport;
|
||||||
/** number of interrupt receive */
|
/** number of interrupt receive */
|
||||||
|
@ -1976,12 +2050,15 @@ typedef struct _mlan_sdio_card {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
/** 8 Event buffer ring */
|
#define MAX_TXRX_BD 32
|
||||||
#define MLAN_MAX_EVT_BD 0x08
|
#define ADMA_MAX_TXRX_BD 512
|
||||||
/** 32 entry will mapping to 5*/
|
/** 512 entry will mapping to 9*/
|
||||||
#define TX_RX_NUM_DESC 5
|
#define TX_RX_NUM_DESC 9
|
||||||
/** 8 entry will mapping to 3 */
|
/** 8 entry will mapping to 3 */
|
||||||
#define EVT_NUM_DESC 3
|
#define EVT_NUM_DESC 3
|
||||||
|
#define MLAN_MAX_TXRX_BD MAX(ADMA_MAX_TXRX_BD, MAX_TXRX_BD)
|
||||||
|
/** 8 Event buffer ring */
|
||||||
|
#define MLAN_MAX_EVT_BD 0x08
|
||||||
typedef struct _mlan_pcie_card_reg {
|
typedef struct _mlan_pcie_card_reg {
|
||||||
/* TX buffer description rd pointer */
|
/* TX buffer description rd pointer */
|
||||||
t_u32 reg_txbd_rdptr;
|
t_u32 reg_txbd_rdptr;
|
||||||
|
@ -2046,6 +2123,8 @@ typedef struct _mlan_pcie_card_reg {
|
||||||
t_u8 use_adma;
|
t_u8 use_adma;
|
||||||
/** write to clear interrupt status flag */
|
/** write to clear interrupt status flag */
|
||||||
t_u8 msi_int_wr_clr;
|
t_u8 msi_int_wr_clr;
|
||||||
|
/** txrx data dma ring size */
|
||||||
|
t_u16 txrx_bd_size;
|
||||||
} mlan_pcie_card_reg, *pmlan_pcie_card_reg;
|
} mlan_pcie_card_reg, *pmlan_pcie_card_reg;
|
||||||
|
|
||||||
typedef struct _mlan_pcie_card {
|
typedef struct _mlan_pcie_card {
|
||||||
|
@ -2302,6 +2381,8 @@ typedef struct _mlan_adapter {
|
||||||
* FALSE - Tx done received for previous Tx
|
* FALSE - Tx done received for previous Tx
|
||||||
*/
|
*/
|
||||||
t_u8 data_sent;
|
t_u8 data_sent;
|
||||||
|
/** Data sent cnt */
|
||||||
|
t_u32 data_sent_cnt;
|
||||||
/** CMD sent:
|
/** CMD sent:
|
||||||
* TRUE - CMD is sent to fw, no CMD Done received
|
* TRUE - CMD is sent to fw, no CMD Done received
|
||||||
* FALSE - CMD done received for previous CMD
|
* FALSE - CMD done received for previous CMD
|
||||||
|
@ -2486,6 +2567,8 @@ typedef struct _mlan_adapter {
|
||||||
sleep_params_t sleep_params;
|
sleep_params_t sleep_params;
|
||||||
/** sleep_period_t (Enhanced Power Save) */
|
/** sleep_period_t (Enhanced Power Save) */
|
||||||
sleep_period_t sleep_period;
|
sleep_period_t sleep_period;
|
||||||
|
/** saved sleep_period_t (Enhanced Power Save) */
|
||||||
|
sleep_period_t saved_sleep_period;
|
||||||
|
|
||||||
/** Power Save mode */
|
/** Power Save mode */
|
||||||
/**
|
/**
|
||||||
|
@ -2636,6 +2719,9 @@ typedef struct _mlan_adapter {
|
||||||
t_u8 *pcal_data;
|
t_u8 *pcal_data;
|
||||||
/** Cal data length */
|
/** Cal data length */
|
||||||
t_u32 cal_data_len;
|
t_u32 cal_data_len;
|
||||||
|
/** tdls status */
|
||||||
|
/* TDLS_NOT_SETUP|TDLS_SWITCHING_CHANNEL|TDLS_IN_BASE_CHANNEL|TDLS_IN_SWITCH_CHANNEL*/
|
||||||
|
tdlsStatus_e tdls_status;
|
||||||
/** Feature control bitmask */
|
/** Feature control bitmask */
|
||||||
t_u32 feature_control;
|
t_u32 feature_control;
|
||||||
|
|
||||||
|
@ -2717,7 +2803,10 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter);
|
||||||
|
|
||||||
/** Initialize mlan_private structure */
|
/** Initialize mlan_private structure */
|
||||||
mlan_status wlan_init_priv(pmlan_private priv);
|
mlan_status wlan_init_priv(pmlan_private priv);
|
||||||
|
#ifdef USB
|
||||||
|
/** get pcie device from card type */
|
||||||
|
mlan_status wlan_get_usb_device(pmlan_adapter pmadapter);
|
||||||
|
#endif
|
||||||
mlan_status wlan_download_vdll_block(mlan_adapter *pmadapter, t_u8 *block,
|
mlan_status wlan_download_vdll_block(mlan_adapter *pmadapter, t_u8 *block,
|
||||||
t_u16 block_len);
|
t_u16 block_len);
|
||||||
mlan_status wlan_process_vdll_event(pmlan_private pmpriv, pmlan_buffer pevent);
|
mlan_status wlan_process_vdll_event(pmlan_private pmpriv, pmlan_buffer pevent);
|
||||||
|
@ -2759,6 +2848,7 @@ mlan_status wlan_get_info_debug_info(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||||
|
extern pmlan_operations mlan_ops[];
|
||||||
/** Set/Get BSS role */
|
/** Set/Get BSS role */
|
||||||
mlan_status wlan_bss_ioctl_bss_role(pmlan_adapter pmadapter,
|
mlan_status wlan_bss_ioctl_bss_role(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
@ -2768,6 +2858,9 @@ mlan_status wlan_bss_ioctl_bss_role(pmlan_adapter pmadapter,
|
||||||
mlan_status wlan_misc_ssu(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req);
|
mlan_status wlan_misc_ssu(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
mlan_status wlan_misc_hal_phy_cfg(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
mlan_status wlan_set_ewpa_mode(mlan_private *priv, pmlan_ds_passphrase psec_pp);
|
mlan_status wlan_set_ewpa_mode(mlan_private *priv, pmlan_ds_passphrase psec_pp);
|
||||||
mlan_status wlan_find_bss(mlan_private *pmpriv, pmlan_ioctl_req pioctl_req);
|
mlan_status wlan_find_bss(mlan_private *pmpriv, pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
|
@ -3332,6 +3425,10 @@ mlan_status wlan_cmd_dot11mc_unassoc_ftm_cfg(pmlan_private pmpriv,
|
||||||
mlan_status wlan_ret_dot11mc_unassoc_ftm_cfg(pmlan_private pmpriv,
|
mlan_status wlan_ret_dot11mc_unassoc_ftm_cfg(pmlan_private pmpriv,
|
||||||
HostCmd_DS_COMMAND *resp,
|
HostCmd_DS_COMMAND *resp,
|
||||||
mlan_ioctl_req *pioctl_buf);
|
mlan_ioctl_req *pioctl_buf);
|
||||||
|
mlan_status wlan_cmd_hal_phy_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
|
t_u16 cmd_action, t_u16 *pdata_buf);
|
||||||
|
mlan_status wlan_ret_hal_phy_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
|
mlan_ioctl_req *pioctl_buf);
|
||||||
|
|
||||||
mlan_status wlan_cmd_rate_adapt_cfg(pmlan_private pmpriv,
|
mlan_status wlan_cmd_rate_adapt_cfg(pmlan_private pmpriv,
|
||||||
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
||||||
|
@ -3480,6 +3577,77 @@ t_u8 *wlan_get_specific_ie(pmlan_private priv, t_u8 *ie_buf, t_u8 ie_len,
|
||||||
IEEEtypes_ElementId_e id, t_u8 ext_id);
|
IEEEtypes_ElementId_e id, t_u8 ext_id);
|
||||||
t_u8 wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 *pbuf, t_u16 buf_len);
|
t_u8 wlan_is_wmm_ie_present(pmlan_adapter pmadapter, t_u8 *pbuf, t_u16 buf_len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function checks whether a station TDLS link is enabled or not
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param mac station mac address
|
||||||
|
* @return
|
||||||
|
* TDLS_NOT_SETUP/TDLS_SETUP_INPROGRESS/TDLS_SETUP_COMPLETE/TDLS_SETUP_FAILURE/TDLS_TEAR_DOWN
|
||||||
|
*/
|
||||||
|
static INLINE tdlsStatus_e wlan_get_tdls_link_status(mlan_private *priv,
|
||||||
|
t_u8 *mac)
|
||||||
|
{
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
sta_ptr = wlan_get_station_entry(priv, mac);
|
||||||
|
if (sta_ptr)
|
||||||
|
return sta_ptr->status;
|
||||||
|
return TDLS_NOT_SETUP;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function checks if TDLS link is in channel switching
|
||||||
|
*
|
||||||
|
* @param status tdls link status
|
||||||
|
* @return MTRUE/MFALSE
|
||||||
|
*/
|
||||||
|
static INLINE int wlan_is_tdls_link_chan_switching(tdlsStatus_e status)
|
||||||
|
{
|
||||||
|
return (status == TDLS_SWITCHING_CHANNEL) ? MTRUE : MFALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function checks if send command to firmware is allowed
|
||||||
|
*
|
||||||
|
* @param status tdls link status
|
||||||
|
* @return MTRUE/MFALSE
|
||||||
|
*/
|
||||||
|
static INLINE int wlan_is_send_cmd_allowed(tdlsStatus_e status)
|
||||||
|
{
|
||||||
|
int ret = MTRUE;
|
||||||
|
switch (status) {
|
||||||
|
case TDLS_SWITCHING_CHANNEL:
|
||||||
|
case TDLS_IN_OFF_CHANNEL:
|
||||||
|
ret = MFALSE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function checks if TDLS link is setup
|
||||||
|
*
|
||||||
|
* @param status tdls link status
|
||||||
|
* @return MTRUE/MFALSE
|
||||||
|
*/
|
||||||
|
static INLINE int wlan_is_tdls_link_setup(tdlsStatus_e status)
|
||||||
|
{
|
||||||
|
int ret = MFALSE;
|
||||||
|
switch (status) {
|
||||||
|
case TDLS_SWITCHING_CHANNEL:
|
||||||
|
case TDLS_IN_OFF_CHANNEL:
|
||||||
|
case TDLS_IN_BASE_CHANNEL:
|
||||||
|
case TDLS_SETUP_COMPLETE:
|
||||||
|
ret = MTRUE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function checks tx_pause flag for peer
|
* @brief This function checks tx_pause flag for peer
|
||||||
*
|
*
|
||||||
|
@ -3573,6 +3741,28 @@ mlan_status wlan_ret_802_11_mac_address(pmlan_private pmpriv,
|
||||||
HostCmd_DS_COMMAND *resp,
|
HostCmd_DS_COMMAND *resp,
|
||||||
mlan_ioctl_req *pioctl_buf);
|
mlan_ioctl_req *pioctl_buf);
|
||||||
|
|
||||||
|
int wlan_get_tdls_list(mlan_private *priv, tdls_peer_info *buf);
|
||||||
|
t_void wlan_hold_tdls_packets(pmlan_private priv, t_u8 *mac);
|
||||||
|
t_void wlan_restore_tdls_packets(pmlan_private priv, t_u8 *mac,
|
||||||
|
tdlsStatus_e status);
|
||||||
|
t_void wlan_update_non_tdls_ralist(mlan_private *priv, t_u8 *mac,
|
||||||
|
t_u8 tx_pause);
|
||||||
|
mlan_status wlan_misc_ioctl_tdls_config(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
void wlan_11n_send_delba_to_peer(mlan_private *priv, t_u8 *ra);
|
||||||
|
void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len);
|
||||||
|
mlan_status wlan_misc_ioctl_tdls_oper(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
|
mlan_status wlan_misc_ioctl_tdls_get_ies(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
mlan_status wlan_misc_ioctl_tdls_idle_time(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
|
t_void wlan_tdls_config(pmlan_private pmpriv, t_u8 enable);
|
||||||
|
mlan_status wlan_misc_ioctl_tdls_cs_channel(pmlan_adapter pmadapter,
|
||||||
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
mlan_status wlan_get_info_ver_ext(pmlan_adapter pmadapter,
|
mlan_status wlan_get_info_ver_ext(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
|
@ -3646,6 +3836,8 @@ mlan_status wlan_misc_otp_user_data(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
|
extern mlan_adapter_operations mlan_usb_ops;
|
||||||
|
|
||||||
mlan_status wlan_misc_ioctl_usb_aggr_ctrl(pmlan_adapter pmadapter,
|
mlan_status wlan_misc_ioctl_usb_aggr_ctrl(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
#endif
|
#endif
|
||||||
|
@ -3690,7 +3882,7 @@ mlan_status wlan_misc_ioctl_cwmode_ctrl(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req);
|
pmlan_ioctl_req pioctl_req);
|
||||||
|
|
||||||
mlan_status wlan_set_mef_entry(mlan_private *pmpriv, pmlan_adapter pmadapter,
|
mlan_status wlan_set_mef_entry(mlan_private *pmpriv, pmlan_adapter pmadapter,
|
||||||
mef_cfg *pmef);
|
mef_cfg_data *pmef);
|
||||||
mlan_status wlan_process_mef_cfg_cmd(mlan_private *pmpriv,
|
mlan_status wlan_process_mef_cfg_cmd(mlan_private *pmpriv,
|
||||||
pmlan_adapter pmadapter);
|
pmlan_adapter pmadapter);
|
||||||
mlan_status wlan_misc_ioctl_mef_flt_cfg(pmlan_adapter pmadapter,
|
mlan_status wlan_misc_ioctl_mef_flt_cfg(pmlan_adapter pmadapter,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains PCI-E specific code
|
* @brief This file contains PCI-E specific code
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -67,7 +67,7 @@ static mlan_status wlan_pcie_delete_rxbd_ring(pmlan_adapter pmadapter);
|
||||||
static mlan_status wlan_init_adma(mlan_adapter *pmadapter, t_u8 type,
|
static mlan_status wlan_init_adma(mlan_adapter *pmadapter, t_u8 type,
|
||||||
t_u64 pbase, t_u16 size, t_u8 init)
|
t_u64 pbase, t_u16 size, t_u8 init)
|
||||||
{
|
{
|
||||||
t_u32 dma_cfg, dma_cfg2, int_mapping;
|
t_u32 dma_cfg, dma_cfg2, dma_cfg3, int_mapping;
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 q_addr = 0;
|
t_u32 q_addr = 0;
|
||||||
t_u8 direction = 0;
|
t_u8 direction = 0;
|
||||||
|
@ -158,6 +158,25 @@ static mlan_status wlan_init_adma(mlan_adapter *pmadapter, t_u8 type,
|
||||||
dma_cfg2 |=
|
dma_cfg2 |=
|
||||||
ADMA_MSI_LEGACY_SRC_DMA_DONE_INT_BYPASS_EN;
|
ADMA_MSI_LEGACY_SRC_DMA_DONE_INT_BYPASS_EN;
|
||||||
} else {
|
} else {
|
||||||
|
/* Read the dma_cfg3 register */
|
||||||
|
if (pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||||
|
q_addr + ADMA_DMA_CFG3,
|
||||||
|
&dma_cfg3)) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Fail to read DMA CFG3 register\n");
|
||||||
|
ret = MLAN_STATUS_FAILURE;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
dma_cfg3 |= ADMA_Q_PTR_CLR;
|
||||||
|
if (pcb->moal_write_reg(pmadapter->pmoal_handle,
|
||||||
|
q_addr + ADMA_DMA_CFG3,
|
||||||
|
(t_u32)dma_cfg3)) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Failed to write ADMA_DMA_CFG3.\n");
|
||||||
|
ret = MLAN_STATUS_FAILURE;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
dma_cfg2 |= ADMA_DST_DMA_DONE_INT_BYPASS_EN;
|
dma_cfg2 |= ADMA_DST_DMA_DONE_INT_BYPASS_EN;
|
||||||
if (pmadapter->pcard_pcie->pcie_int_mode !=
|
if (pmadapter->pcard_pcie->pcie_int_mode !=
|
||||||
PCIE_INT_MODE_MSIX)
|
PCIE_INT_MODE_MSIX)
|
||||||
|
@ -545,7 +564,7 @@ wlan_pcie_enable_host_int_status_mask(mlan_adapter *pmadapter, t_u8 enable)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_disable_pcie_host_int(mlan_adapter *pmadapter)
|
static mlan_status wlan_disable_pcie_host_int(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret;
|
mlan_status ret;
|
||||||
|
|
||||||
|
@ -578,7 +597,7 @@ mlan_status wlan_disable_pcie_host_int(mlan_adapter *pmadapter)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_clear_pending_int_status(mlan_adapter *pmadapter)
|
static mlan_status wlan_clear_pending_int_status(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 pcie_ireg = 0;
|
t_u32 pcie_ireg = 0;
|
||||||
|
@ -621,7 +640,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_enable_pcie_host_int(mlan_adapter *pmadapter)
|
static mlan_status wlan_enable_pcie_host_int(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret;
|
mlan_status ret;
|
||||||
|
|
||||||
|
@ -680,13 +699,15 @@ static mlan_status wlan_pcie_create_txbd_ring(mlan_adapter *pmadapter)
|
||||||
#if defined(PCIE8997) || defined(PCIE8897)
|
#if defined(PCIE8997) || defined(PCIE8897)
|
||||||
if (!pmadapter->pcard_pcie->reg->use_adma)
|
if (!pmadapter->pcard_pcie->reg->use_adma)
|
||||||
pmadapter->pcard_pcie->txbd_ring_size =
|
pmadapter->pcard_pcie->txbd_ring_size =
|
||||||
sizeof(mlan_pcie_data_buf) * MLAN_MAX_TXRX_BD;
|
sizeof(mlan_pcie_data_buf) *
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCIE9098) || defined(PCIE9097)
|
#if defined(PCIE9098) || defined(PCIE9097)
|
||||||
if (pmadapter->pcard_pcie->reg->use_adma)
|
if (pmadapter->pcard_pcie->reg->use_adma)
|
||||||
pmadapter->pcard_pcie->txbd_ring_size =
|
pmadapter->pcard_pcie->txbd_ring_size =
|
||||||
sizeof(adma_dual_desc_buf) * MLAN_MAX_TXRX_BD;
|
sizeof(adma_dual_desc_buf) *
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
#endif
|
#endif
|
||||||
PRINTM(MINFO, "TX ring: allocating %d bytes\n",
|
PRINTM(MINFO, "TX ring: allocating %d bytes\n",
|
||||||
pmadapter->pcard_pcie->txbd_ring_size);
|
pmadapter->pcard_pcie->txbd_ring_size);
|
||||||
|
@ -711,7 +732,7 @@ static mlan_status wlan_pcie_create_txbd_ring(mlan_adapter *pmadapter)
|
||||||
(t_u32)pmadapter->pcard_pcie->txbd_ring_pbase,
|
(t_u32)pmadapter->pcard_pcie->txbd_ring_pbase,
|
||||||
pmadapter->pcard_pcie->txbd_ring_size);
|
pmadapter->pcard_pcie->txbd_ring_size);
|
||||||
|
|
||||||
for (i = 0; i < MLAN_MAX_TXRX_BD; i++) {
|
for (i = 0; i < pmadapter->pcard_pcie->reg->txrx_bd_size; i++) {
|
||||||
pmadapter->pcard_pcie->tx_buf_list[i] = MNULL;
|
pmadapter->pcard_pcie->tx_buf_list[i] = MNULL;
|
||||||
#if defined(PCIE9098) || defined(PCIE9097)
|
#if defined(PCIE9098) || defined(PCIE9097)
|
||||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||||
|
@ -774,7 +795,7 @@ static mlan_status wlan_pcie_delete_txbd_ring(mlan_adapter *pmadapter)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
for (i = 0; i < MLAN_MAX_TXRX_BD; i++) {
|
for (i = 0; i < pmadapter->pcard_pcie->reg->txrx_bd_size; i++) {
|
||||||
if (pmadapter->pcard_pcie->tx_buf_list[i]) {
|
if (pmadapter->pcard_pcie->tx_buf_list[i]) {
|
||||||
pmbuf = pmadapter->pcard_pcie->tx_buf_list[i];
|
pmbuf = pmadapter->pcard_pcie->tx_buf_list[i];
|
||||||
pcb->moal_unmap_memory(pmadapter->pmoal_handle,
|
pcb->moal_unmap_memory(pmadapter->pmoal_handle,
|
||||||
|
@ -873,7 +894,8 @@ static mlan_status wlan_pcie_create_rxbd_ring(mlan_adapter *pmadapter)
|
||||||
/* allocate shared memory for the BD ring and divide the same in
|
/* allocate shared memory for the BD ring and divide the same in
|
||||||
to several descriptors */
|
to several descriptors */
|
||||||
pmadapter->pcard_pcie->rxbd_ring_size =
|
pmadapter->pcard_pcie->rxbd_ring_size =
|
||||||
sizeof(mlan_pcie_data_buf) * MLAN_MAX_TXRX_BD;
|
sizeof(mlan_pcie_data_buf) *
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -881,12 +903,14 @@ static mlan_status wlan_pcie_create_rxbd_ring(mlan_adapter *pmadapter)
|
||||||
/*
|
/*
|
||||||
* driver maintaines the write pointer and firmware maintaines the read
|
* driver maintaines the write pointer and firmware maintaines the read
|
||||||
* pointer. The read pointer starts at 0 (zero) while the write pointer
|
* pointer. The read pointer starts at 0 (zero) while the write pointer
|
||||||
* starts at MLAN_MAX_TXRX_BD
|
* starts at pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
*/
|
*/
|
||||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||||
pmadapter->pcard_pcie->rxbd_wrptr = MLAN_MAX_TXRX_BD;
|
pmadapter->pcard_pcie->rxbd_wrptr =
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
pmadapter->pcard_pcie->rxbd_ring_size =
|
pmadapter->pcard_pcie->rxbd_ring_size =
|
||||||
sizeof(adma_dual_desc_buf) * MLAN_MAX_TXRX_BD;
|
sizeof(adma_dual_desc_buf) *
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -913,7 +937,7 @@ static mlan_status wlan_pcie_create_rxbd_ring(mlan_adapter *pmadapter)
|
||||||
(t_u32)pmadapter->pcard_pcie->rxbd_ring_pbase,
|
(t_u32)pmadapter->pcard_pcie->rxbd_ring_pbase,
|
||||||
pmadapter->pcard_pcie->rxbd_ring_size);
|
pmadapter->pcard_pcie->rxbd_ring_size);
|
||||||
|
|
||||||
for (i = 0; i < MLAN_MAX_TXRX_BD; i++) {
|
for (i = 0; i < pmadapter->pcard_pcie->reg->txrx_bd_size; i++) {
|
||||||
/* Allocate buffer here so that firmware can DMA data on it */
|
/* Allocate buffer here so that firmware can DMA data on it */
|
||||||
pmbuf = wlan_alloc_mlan_buffer(pmadapter, MLAN_RX_DATA_BUF_SIZE,
|
pmbuf = wlan_alloc_mlan_buffer(pmadapter, MLAN_RX_DATA_BUF_SIZE,
|
||||||
MLAN_RX_HEADER_LEN,
|
MLAN_RX_HEADER_LEN,
|
||||||
|
@ -1008,7 +1032,7 @@ static mlan_status wlan_pcie_delete_rxbd_ring(mlan_adapter *pmadapter)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
for (i = 0; i < MLAN_MAX_TXRX_BD; i++) {
|
for (i = 0; i < pmadapter->pcard_pcie->reg->txrx_bd_size; i++) {
|
||||||
if (pmadapter->pcard_pcie->rx_buf_list[i]) {
|
if (pmadapter->pcard_pcie->rx_buf_list[i]) {
|
||||||
pmbuf = pmadapter->pcard_pcie->rx_buf_list[i];
|
pmbuf = pmadapter->pcard_pcie->rx_buf_list[i];
|
||||||
pcb->moal_unmap_memory(pmadapter->pmoal_handle,
|
pcb->moal_unmap_memory(pmadapter->pmoal_handle,
|
||||||
|
@ -1462,7 +1486,7 @@ static t_u8 wlan_check_tx_pending_buffer(mlan_adapter *pmadapter, t_u32 rdptr)
|
||||||
*/
|
*/
|
||||||
static mlan_status wlan_pcie_send_data_complete(mlan_adapter *pmadapter)
|
static mlan_status wlan_pcie_send_data_complete(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
const t_u32 num_tx_buffs = MLAN_MAX_TXRX_BD;
|
const t_u32 num_tx_buffs = pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
mlan_buffer *pmbuf;
|
mlan_buffer *pmbuf;
|
||||||
|
@ -1659,7 +1683,7 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
||||||
#if defined(PCIE9098) || defined(PCIE9097)
|
#if defined(PCIE9098) || defined(PCIE9097)
|
||||||
adma_dual_desc_buf *padma_bd_buf = MNULL;
|
adma_dual_desc_buf *padma_bd_buf = MNULL;
|
||||||
#endif
|
#endif
|
||||||
const t_u32 num_tx_buffs = MLAN_MAX_TXRX_BD;
|
const t_u32 num_tx_buffs = pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
mlan_status ret = MLAN_STATUS_PENDING;
|
mlan_status ret = MLAN_STATUS_PENDING;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
t_u32 rxbd_val = 0;
|
t_u32 rxbd_val = 0;
|
||||||
|
@ -1777,6 +1801,10 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
||||||
|
|
||||||
if (wlan_check_txbd_not_full(pmadapter))
|
if (wlan_check_txbd_not_full(pmadapter))
|
||||||
pmadapter->data_sent = MFALSE;
|
pmadapter->data_sent = MFALSE;
|
||||||
|
else
|
||||||
|
wlan_pcie_send_data_complete(pmadapter);
|
||||||
|
if (pmadapter->data_sent)
|
||||||
|
pmadapter->data_sent_cnt++;
|
||||||
|
|
||||||
PRINTM(MINFO, "Sent packet to firmware successfully\n");
|
PRINTM(MINFO, "Sent packet to firmware successfully\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -1875,6 +1903,56 @@ static t_u8 wlan_check_rx_pending_buffer(mlan_adapter *pmadapter, t_u32 rdptr)
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function check if the rx pending buffer is full
|
||||||
|
*
|
||||||
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
|
* @param rdptr rx rdptr
|
||||||
|
* @param rxbd_rdptr rxbd_rdptr
|
||||||
|
*
|
||||||
|
* @return MTRUE/MFALSE;
|
||||||
|
*/
|
||||||
|
static t_u8 wlan_is_rx_pending_full(mlan_adapter *pmadapter, t_u32 rdptr)
|
||||||
|
{
|
||||||
|
#if defined(PCIE8997) || defined(PCIE8897)
|
||||||
|
t_u32 txrx_rw_ptr_mask = pmadapter->pcard_pcie->reg->txrx_rw_ptr_mask;
|
||||||
|
t_u32 txrx_rw_ptr_rollover_ind =
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_rw_ptr_rollover_ind;
|
||||||
|
if (!pmadapter->pcard_pcie->reg->use_adma) {
|
||||||
|
PRINTM(MDATA,
|
||||||
|
"local wrptr: 0x%x(0x%x) -> reg rdptr: 0x%x(0x%x)\n",
|
||||||
|
(pmadapter->pcard_pcie->rxbd_wrptr & txrx_rw_ptr_mask),
|
||||||
|
(pmadapter->pcard_pcie->rxbd_wrptr &
|
||||||
|
txrx_rw_ptr_rollover_ind),
|
||||||
|
(rdptr & txrx_rw_ptr_mask),
|
||||||
|
(rdptr & txrx_rw_ptr_rollover_ind));
|
||||||
|
if (((rdptr & txrx_rw_ptr_mask) ==
|
||||||
|
(pmadapter->pcard_pcie->rxbd_wrptr & txrx_rw_ptr_mask)) &&
|
||||||
|
((rdptr & txrx_rw_ptr_rollover_ind) ==
|
||||||
|
(pmadapter->pcard_pcie->rxbd_wrptr &
|
||||||
|
txrx_rw_ptr_rollover_ind)))
|
||||||
|
return MTRUE;
|
||||||
|
else
|
||||||
|
return MFALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(PCIE9098) || defined(PCIE9097)
|
||||||
|
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||||
|
PRINTM(MDATA, "local wrptr: 0x%x -> reg rdptr: 0x%x\n",
|
||||||
|
(pmadapter->pcard_pcie->rxbd_wrptr &
|
||||||
|
ADMA_RW_PTR_WRAP_MASK),
|
||||||
|
(rdptr & ADMA_RW_PTR_WRAP_MASK));
|
||||||
|
if ((rdptr & ADMA_RW_PTR_WRAP_MASK) ==
|
||||||
|
(pmadapter->pcard_pcie->rxbd_wrptr & ADMA_RW_PTR_WRAP_MASK))
|
||||||
|
return MTRUE;
|
||||||
|
else
|
||||||
|
return MFALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return MFALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function handles received buffer ring and
|
* @brief This function handles received buffer ring and
|
||||||
* dispatches packets to upper
|
* dispatches packets to upper
|
||||||
|
@ -1891,7 +1969,7 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
||||||
mlan_buffer *pmbuf = MNULL;
|
mlan_buffer *pmbuf = MNULL;
|
||||||
t_u32 txbd_val = 0;
|
t_u32 txbd_val = 0;
|
||||||
t_u16 rx_len, rx_type;
|
t_u16 rx_len, rx_type;
|
||||||
const t_u32 num_rx_buffs = MLAN_MAX_TXRX_BD;
|
const t_u32 num_rx_buffs = pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
t_u32 reg_rxbd_rdptr = pmadapter->pcard_pcie->reg->reg_rxbd_rdptr;
|
t_u32 reg_rxbd_rdptr = pmadapter->pcard_pcie->reg->reg_rxbd_rdptr;
|
||||||
#if defined(PCIE8997) || defined(PCIE8897)
|
#if defined(PCIE8997) || defined(PCIE8897)
|
||||||
t_u32 txrx_rw_ptr_mask = pmadapter->pcard_pcie->reg->txrx_rw_ptr_mask;
|
t_u32 txrx_rw_ptr_mask = pmadapter->pcard_pcie->reg->txrx_rw_ptr_mask;
|
||||||
|
@ -1902,6 +1980,7 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
||||||
#if defined(PCIE9098) || defined(PCIE9097)
|
#if defined(PCIE9098) || defined(PCIE9097)
|
||||||
adma_dual_desc_buf *padma_bd_buf;
|
adma_dual_desc_buf *padma_bd_buf;
|
||||||
#endif
|
#endif
|
||||||
|
t_u32 in_ts_sec, in_ts_usec;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -1917,17 +1996,23 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
||||||
rdptr = rdptr >> ADMA_RPTR_START;
|
rdptr = rdptr >> ADMA_RPTR_START;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (pmadapter->tp_state_on &&
|
||||||
|
wlan_is_rx_pending_full(pmadapter, rdptr)) {
|
||||||
|
PRINTM(MDATA, "RX FULL!\n");
|
||||||
|
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||||
|
pmadapter->pmoal_handle, 6, 0);
|
||||||
|
}
|
||||||
while (wlan_check_rx_pending_buffer(pmadapter, rdptr)) {
|
while (wlan_check_rx_pending_buffer(pmadapter, rdptr)) {
|
||||||
/* detach pmbuf (with data) from Rx Ring */
|
/* detach pmbuf (with data) from Rx Ring */
|
||||||
rd_index =
|
rd_index =
|
||||||
pmadapter->pcard_pcie->rxbd_rdptr & (num_rx_buffs - 1);
|
pmadapter->pcard_pcie->rxbd_rdptr & (num_rx_buffs - 1);
|
||||||
if (rd_index > MLAN_MAX_TXRX_BD - 1) {
|
if (rd_index >
|
||||||
|
(t_u32)(pmadapter->pcard_pcie->reg->txrx_bd_size - 1)) {
|
||||||
PRINTM(MERROR, "RECV DATA: Invalid Rx buffer index.\n");
|
PRINTM(MERROR, "RECV DATA: Invalid Rx buffer index.\n");
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
pmbuf = pmadapter->pcard_pcie->rx_buf_list[rd_index];
|
pmbuf = pmadapter->pcard_pcie->rx_buf_list[rd_index];
|
||||||
|
|
||||||
if (MLAN_STATUS_FAILURE ==
|
if (MLAN_STATUS_FAILURE ==
|
||||||
pcb->moal_unmap_memory(pmadapter->pmoal_handle,
|
pcb->moal_unmap_memory(pmadapter->pmoal_handle,
|
||||||
pmbuf->pbuf + pmbuf->data_offset,
|
pmbuf->pbuf + pmbuf->data_offset,
|
||||||
|
@ -1960,10 +2045,16 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
||||||
pmbuf->data_len = rx_len - PCIE_INTF_HEADER_LEN;
|
pmbuf->data_len = rx_len - PCIE_INTF_HEADER_LEN;
|
||||||
pmbuf->data_offset += PCIE_INTF_HEADER_LEN;
|
pmbuf->data_offset += PCIE_INTF_HEADER_LEN;
|
||||||
// rx_trace 5
|
// rx_trace 5
|
||||||
if (pmadapter->tp_state_on)
|
if (pmadapter->tp_state_on) {
|
||||||
pmadapter->callbacks.moal_tp_accounting(
|
pmadapter->callbacks.moal_tp_accounting(
|
||||||
pmadapter->pmoal_handle, pmbuf,
|
pmadapter->pmoal_handle, pmbuf,
|
||||||
5 /*RX_DROP_P1*/);
|
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 ==
|
if (pmadapter->tp_state_drop_point ==
|
||||||
5 /*RX_DROP_P1*/) {
|
5 /*RX_DROP_P1*/) {
|
||||||
pmadapter->ops.data_complete(pmadapter, pmbuf,
|
pmadapter->ops.data_complete(pmadapter, pmbuf,
|
||||||
|
@ -1979,9 +2070,13 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
||||||
&pmadapter->rx_data_queue,
|
&pmadapter->rx_data_queue,
|
||||||
(pmlan_linked_list)pmbuf, MNULL, MNULL);
|
(pmlan_linked_list)pmbuf, MNULL, MNULL);
|
||||||
pmadapter->rx_pkts_queued++;
|
pmadapter->rx_pkts_queued++;
|
||||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
if (pmadapter->tp_state_on)
|
||||||
pmadapter->pmoal_handle, 1,
|
pmadapter->callbacks
|
||||||
pmadapter->rx_pkts_queued);
|
.moal_tp_accounting_rx_param(
|
||||||
|
pmadapter->pmoal_handle,
|
||||||
|
1,
|
||||||
|
pmadapter
|
||||||
|
->rx_pkts_queued);
|
||||||
pmadapter->callbacks.moal_spin_unlock(
|
pmadapter->callbacks.moal_spin_unlock(
|
||||||
pmadapter->pmoal_handle,
|
pmadapter->pmoal_handle,
|
||||||
pmadapter->rx_data_queue.plock);
|
pmadapter->rx_data_queue.plock);
|
||||||
|
@ -2031,7 +2126,8 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
||||||
|
|
||||||
/* update rxbd's rdptrs */
|
/* update rxbd's rdptrs */
|
||||||
if ((++pmadapter->pcard_pcie->rxbd_rdptr &
|
if ((++pmadapter->pcard_pcie->rxbd_rdptr &
|
||||||
txrx_rw_ptr_mask) == MLAN_MAX_TXRX_BD) {
|
txrx_rw_ptr_mask) ==
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_bd_size) {
|
||||||
pmadapter->pcard_pcie->rxbd_rdptr =
|
pmadapter->pcard_pcie->rxbd_rdptr =
|
||||||
((pmadapter->pcard_pcie->rxbd_rdptr &
|
((pmadapter->pcard_pcie->rxbd_rdptr &
|
||||||
txrx_rw_ptr_rollover_ind) ^
|
txrx_rw_ptr_rollover_ind) ^
|
||||||
|
@ -2040,7 +2136,8 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
||||||
|
|
||||||
/* update rxbd's wrptrs */
|
/* update rxbd's wrptrs */
|
||||||
if ((++pmadapter->pcard_pcie->rxbd_wrptr &
|
if ((++pmadapter->pcard_pcie->rxbd_wrptr &
|
||||||
txrx_rw_ptr_mask) == MLAN_MAX_TXRX_BD) {
|
txrx_rw_ptr_mask) ==
|
||||||
|
pmadapter->pcard_pcie->reg->txrx_bd_size) {
|
||||||
pmadapter->pcard_pcie->rxbd_wrptr =
|
pmadapter->pcard_pcie->rxbd_wrptr =
|
||||||
((pmadapter->pcard_pcie->rxbd_wrptr &
|
((pmadapter->pcard_pcie->rxbd_wrptr &
|
||||||
txrx_rw_ptr_rollover_ind) ^
|
txrx_rw_ptr_rollover_ind) ^
|
||||||
|
@ -2439,8 +2536,9 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pcie_cmdrsp_complete(mlan_adapter *pmadapter,
|
static mlan_status wlan_pcie_cmdrsp_complete(mlan_adapter *pmadapter,
|
||||||
mlan_buffer *pmbuf, mlan_status status)
|
mlan_buffer *pmbuf,
|
||||||
|
mlan_status status)
|
||||||
{
|
{
|
||||||
mlan_buffer *pcmdmbuf;
|
mlan_buffer *pcmdmbuf;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -2659,8 +2757,9 @@ static mlan_status wlan_pcie_process_event_ready(mlan_adapter *pmadapter)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
static mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
||||||
mlan_buffer *pmbuf, mlan_status status)
|
mlan_buffer *pmbuf,
|
||||||
|
mlan_status status)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -2936,7 +3035,7 @@ static mlan_status wlan_pcie_prog_fw_w_helper(mlan_adapter *pmadapter,
|
||||||
t_u32 firmware_len = fw->fw_len;
|
t_u32 firmware_len = fw->fw_len;
|
||||||
t_u32 offset = 0;
|
t_u32 offset = 0;
|
||||||
mlan_buffer *pmbuf = MNULL;
|
mlan_buffer *pmbuf = MNULL;
|
||||||
t_u32 txlen, tx_blocks = 0, tries, len;
|
t_u32 txlen, tries, len;
|
||||||
t_u32 block_retry_cnt = 0;
|
t_u32 block_retry_cnt = 0;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
#if defined(PCIE9098)
|
#if defined(PCIE9098)
|
||||||
|
@ -3095,9 +3194,6 @@ static mlan_status wlan_pcie_prog_fw_w_helper(mlan_adapter *pmadapter,
|
||||||
|
|
||||||
PRINTM(MINFO, ".");
|
PRINTM(MINFO, ".");
|
||||||
|
|
||||||
tx_blocks = (txlen + MLAN_PCIE_BLOCK_SIZE_FW_DNLD - 1) /
|
|
||||||
MLAN_PCIE_BLOCK_SIZE_FW_DNLD;
|
|
||||||
|
|
||||||
/* Copy payload to buffer */
|
/* Copy payload to buffer */
|
||||||
memmove(pmadapter, pmbuf->pbuf + pmbuf->data_offset,
|
memmove(pmadapter, pmbuf->pbuf + pmbuf->data_offset,
|
||||||
&firmware[offset], txlen);
|
&firmware[offset], txlen);
|
||||||
|
@ -3261,7 +3357,7 @@ mlan_status wlan_pcie_wakeup(mlan_adapter *pmadapter)
|
||||||
* @param pmadapter A pointer to mlan_adapter structure
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
* @return MLAN_STATUS_FAILURE -- if the intererupt is not for us
|
* @return MLAN_STATUS_FAILURE -- if the intererupt is not for us
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pcie_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
|
static mlan_status wlan_pcie_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
t_u32 pcie_ireg;
|
t_u32 pcie_ireg;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -3411,7 +3507,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 pcie_ireg = 0;
|
t_u32 pcie_ireg = 0;
|
||||||
|
@ -3468,6 +3564,9 @@ mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
||||||
pcie_ireg &=
|
pcie_ireg &=
|
||||||
~pmadapter->pcard_pcie->reg->host_intr_dnld_done;
|
~pmadapter->pcard_pcie->reg->host_intr_dnld_done;
|
||||||
PRINTM(MINFO, "<--- DATA sent Interrupt --->\n");
|
PRINTM(MINFO, "<--- DATA sent Interrupt --->\n");
|
||||||
|
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||||
|
pmadapter->pmoal_handle, 3, 0);
|
||||||
|
|
||||||
ret = wlan_pcie_send_data_complete(pmadapter);
|
ret = wlan_pcie_send_data_complete(pmadapter);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -3609,7 +3708,8 @@ mlan_status wlan_set_drv_ready_reg(mlan_adapter *pmadapter, t_u32 val)
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pcie_check_winner_status(mlan_adapter *pmadapter, t_u32 *val)
|
static mlan_status wlan_pcie_check_winner_status(mlan_adapter *pmadapter,
|
||||||
|
t_u32 *val)
|
||||||
{
|
{
|
||||||
t_u32 winner = 0;
|
t_u32 winner = 0;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -3638,7 +3738,8 @@ mlan_status wlan_pcie_check_winner_status(mlan_adapter *pmadapter, t_u32 *val)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pcie_check_fw_status(mlan_adapter *pmadapter, t_u32 pollnum)
|
static mlan_status wlan_pcie_check_fw_status(mlan_adapter *pmadapter,
|
||||||
|
t_u32 pollnum)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -3699,7 +3800,8 @@ mlan_status wlan_pcie_init(mlan_adapter *pmadapter)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pcie_dnld_fw(pmlan_adapter pmadapter, pmlan_fw_image pmfw)
|
static mlan_status wlan_pcie_dnld_fw(pmlan_adapter pmadapter,
|
||||||
|
pmlan_fw_image pmfw)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 poll_num = 1;
|
t_u32 poll_num = 1;
|
||||||
|
@ -4035,12 +4137,12 @@ mlan_status wlan_set_pcie_buf_config(mlan_private *pmpriv)
|
||||||
(t_u32)(pmadapter->pcard_pcie->txbd_ring_pbase);
|
(t_u32)(pmadapter->pcard_pcie->txbd_ring_pbase);
|
||||||
host_spec.txbd_addr_hi = (t_u32)(
|
host_spec.txbd_addr_hi = (t_u32)(
|
||||||
((t_u64)pmadapter->pcard_pcie->txbd_ring_pbase) >> 32);
|
((t_u64)pmadapter->pcard_pcie->txbd_ring_pbase) >> 32);
|
||||||
host_spec.txbd_count = MLAN_MAX_TXRX_BD;
|
host_spec.txbd_count = pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
host_spec.rxbd_addr_lo =
|
host_spec.rxbd_addr_lo =
|
||||||
(t_u32)(pmadapter->pcard_pcie->rxbd_ring_pbase);
|
(t_u32)(pmadapter->pcard_pcie->rxbd_ring_pbase);
|
||||||
host_spec.rxbd_addr_hi = (t_u32)(
|
host_spec.rxbd_addr_hi = (t_u32)(
|
||||||
((t_u64)pmadapter->pcard_pcie->rxbd_ring_pbase) >> 32);
|
((t_u64)pmadapter->pcard_pcie->rxbd_ring_pbase) >> 32);
|
||||||
host_spec.rxbd_count = MLAN_MAX_TXRX_BD;
|
host_spec.rxbd_count = pmadapter->pcard_pcie->reg->txrx_bd_size;
|
||||||
host_spec.evtbd_addr_lo =
|
host_spec.evtbd_addr_lo =
|
||||||
(t_u32)(pmadapter->pcard_pcie->evtbd_ring_pbase);
|
(t_u32)(pmadapter->pcard_pcie->evtbd_ring_pbase);
|
||||||
host_spec.evtbd_addr_hi = (t_u32)(
|
host_spec.evtbd_addr_hi = (t_u32)(
|
||||||
|
@ -4128,7 +4230,8 @@ mlan_status wlan_cmd_pcie_host_buf_cfg(pmlan_private pmpriv,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pm_pcie_wakeup_card(pmlan_adapter pmadapter, t_u8 timeout)
|
static mlan_status wlan_pm_pcie_wakeup_card(pmlan_adapter pmadapter,
|
||||||
|
t_u8 timeout)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 age_ts_usec;
|
t_u32 age_ts_usec;
|
||||||
|
@ -4152,7 +4255,7 @@ mlan_status wlan_pm_pcie_wakeup_card(pmlan_adapter pmadapter, t_u8 timeout)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
mlan_status wlan_pcie_debug_dump(pmlan_adapter pmadapter)
|
static mlan_status wlan_pcie_debug_dump(pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_buffer pmbuf = pmadapter->pcard_pcie->cmdrsp_buf;
|
pmlan_buffer pmbuf = pmadapter->pcard_pcie->cmdrsp_buf;
|
||||||
|
@ -4178,7 +4281,8 @@ mlan_status wlan_pcie_debug_dump(pmlan_adapter pmadapter)
|
||||||
* @param pmbuf A pointer to the mlan_buffer
|
* @param pmbuf A pointer to the mlan_buffer
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pcie_data_complete(pmlan_adapter pmadapter, mlan_buffer *pmbuf,
|
static mlan_status wlan_pcie_data_complete(pmlan_adapter pmadapter,
|
||||||
|
mlan_buffer *pmbuf,
|
||||||
mlan_status status)
|
mlan_status status)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* driver.
|
* driver.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -135,6 +135,8 @@ Change log:
|
||||||
|
|
||||||
/** DMA cfg3 register */
|
/** DMA cfg3 register */
|
||||||
#define ADMA_DMA_CFG3 0x0040
|
#define ADMA_DMA_CFG3 0x0040
|
||||||
|
/** ADMA Queue pointer clear */
|
||||||
|
#define ADMA_Q_PTR_CLR MBIT(0)
|
||||||
/** source rd ptr address low */
|
/** source rd ptr address low */
|
||||||
#define ADMA_SRC_RD_PTR_LOW 0x0044
|
#define ADMA_SRC_RD_PTR_LOW 0x0044
|
||||||
/** source rd ptr address high */
|
/** source rd ptr address high */
|
||||||
|
@ -152,9 +154,9 @@ Change log:
|
||||||
/** write pointer start from bit 0 */
|
/** write pointer start from bit 0 */
|
||||||
#define ADMA_WPTR_START 0
|
#define ADMA_WPTR_START 0
|
||||||
/** Tx/Rx Read/Write pointer's mask */
|
/** Tx/Rx Read/Write pointer's mask */
|
||||||
#define TXRX_RW_PTR_MASK (MLAN_MAX_TXRX_BD - 1)
|
#define TXRX_RW_PTR_MASK (ADMA_MAX_TXRX_BD - 1)
|
||||||
/** Tx/Rx Read/Write pointer's rollover indicate bit */
|
/** Tx/Rx Read/Write pointer's rollover indicate bit */
|
||||||
#define TXRX_RW_PTR_ROLLOVER_IND MLAN_MAX_TXRX_BD
|
#define TXRX_RW_PTR_ROLLOVER_IND ADMA_MAX_TXRX_BD
|
||||||
/** Start of packet flag */
|
/** Start of packet flag */
|
||||||
#define ADMA_BD_FLAG_SOP MBIT(0)
|
#define ADMA_BD_FLAG_SOP MBIT(0)
|
||||||
/** End of packet flag */
|
/** End of packet flag */
|
||||||
|
@ -485,6 +487,7 @@ static const struct _mlan_pcie_card_reg mlan_reg_pcie8897 = {
|
||||||
.txrx_rw_ptr_rollover_ind = MBIT(10),
|
.txrx_rw_ptr_rollover_ind = MBIT(10),
|
||||||
.use_adma = MFALSE,
|
.use_adma = MFALSE,
|
||||||
.msi_int_wr_clr = MTRUE,
|
.msi_int_wr_clr = MTRUE,
|
||||||
|
.txrx_bd_size = MAX_TXRX_BD,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct _mlan_card_info mlan_card_info_pcie8897 = {
|
static const struct _mlan_card_info mlan_card_info_pcie8897 = {
|
||||||
|
@ -524,6 +527,7 @@ static const struct _mlan_pcie_card_reg mlan_reg_pcie8997 = {
|
||||||
.txrx_rw_ptr_rollover_ind = MBIT(12),
|
.txrx_rw_ptr_rollover_ind = MBIT(12),
|
||||||
.use_adma = MFALSE,
|
.use_adma = MFALSE,
|
||||||
.msi_int_wr_clr = MTRUE,
|
.msi_int_wr_clr = MTRUE,
|
||||||
|
.txrx_bd_size = MAX_TXRX_BD,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct _mlan_card_info mlan_card_info_pcie8997 = {
|
static const struct _mlan_card_info mlan_card_info_pcie8997 = {
|
||||||
|
@ -565,6 +569,7 @@ static const struct _mlan_pcie_card_reg mlan_reg_pcie9098 = {
|
||||||
.host_intr_cmd_dnld = PCIE9098_HOST_INTR_CMD_DNLD,
|
.host_intr_cmd_dnld = PCIE9098_HOST_INTR_CMD_DNLD,
|
||||||
.use_adma = MTRUE,
|
.use_adma = MTRUE,
|
||||||
.msi_int_wr_clr = MTRUE,
|
.msi_int_wr_clr = MTRUE,
|
||||||
|
.txrx_bd_size = ADMA_MAX_TXRX_BD,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct _mlan_card_info mlan_card_info_pcie9098 = {
|
static const struct _mlan_card_info mlan_card_info_pcie9098 = {
|
||||||
|
@ -607,8 +612,12 @@ static const struct _mlan_pcie_card_reg mlan_reg_pcie9097_b0 = {
|
||||||
.host_intr_cmd_dnld = PCIE9098_HOST_INTR_CMD_DNLD,
|
.host_intr_cmd_dnld = PCIE9098_HOST_INTR_CMD_DNLD,
|
||||||
.use_adma = MTRUE,
|
.use_adma = MTRUE,
|
||||||
.msi_int_wr_clr = MTRUE,
|
.msi_int_wr_clr = MTRUE,
|
||||||
|
.txrx_bd_size = ADMA_MAX_TXRX_BD,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern mlan_adapter_operations mlan_pcie_ops;
|
||||||
|
|
||||||
/* Get pcie device from card type */
|
/* Get pcie device from card type */
|
||||||
mlan_status wlan_get_pcie_device(pmlan_adapter pmadapter);
|
mlan_status wlan_get_pcie_device(pmlan_adapter pmadapter);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* for sending scan commands to the firmware.
|
* for sending scan commands to the firmware.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -124,7 +124,7 @@ enum cipher_suite {
|
||||||
CIPHER_SUITE_MAX
|
CIPHER_SUITE_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
static t_u8 wpa_oui[CIPHER_SUITE_MAX][4] = {
|
static t_u8 wpa_ouis[CIPHER_SUITE_MAX][4] = {
|
||||||
{0x00, 0x50, 0xf2, 0x01}, /* WEP40 */
|
{0x00, 0x50, 0xf2, 0x01}, /* WEP40 */
|
||||||
{0x00, 0x50, 0xf2, 0x02}, /* TKIP */
|
{0x00, 0x50, 0xf2, 0x02}, /* TKIP */
|
||||||
{0x00, 0x50, 0xf2, 0x04}, /* AES */
|
{0x00, 0x50, 0xf2, 0x04}, /* AES */
|
||||||
|
@ -175,7 +175,8 @@ t_u8 radio_type_to_band(t_u8 radio_type)
|
||||||
*
|
*
|
||||||
* @return NA
|
* @return NA
|
||||||
*/
|
*/
|
||||||
void wlan_update_chan_statistics(mlan_private *pmpriv,
|
static void
|
||||||
|
wlan_update_chan_statistics(mlan_private *pmpriv,
|
||||||
MrvlIEtypes_ChannelStats_t *pchanstats_tlv)
|
MrvlIEtypes_ChannelStats_t *pchanstats_tlv)
|
||||||
{
|
{
|
||||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||||
|
@ -351,7 +352,7 @@ static t_u8 is_wpa_oui_present(mlan_adapter *pmadapter,
|
||||||
if (((pbss_desc->pwpa_ie) &&
|
if (((pbss_desc->pwpa_ie) &&
|
||||||
((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == WPA_IE))) {
|
((*(pbss_desc->pwpa_ie)).vend_hdr.element_id == WPA_IE))) {
|
||||||
ie_body = (IEBody *)pbss_desc->pwpa_ie->data;
|
ie_body = (IEBody *)pbss_desc->pwpa_ie->data;
|
||||||
oui = &wpa_oui[cipher_suite][0];
|
oui = &wpa_ouis[cipher_suite][0];
|
||||||
ret = search_oui_in_ie(pmadapter, ie_body, oui);
|
ret = search_oui_in_ie(pmadapter, ie_body, oui);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -2069,6 +2070,13 @@ static mlan_status wlan_interpret_bss_desc_with_ie(pmlan_adapter pmadapter,
|
||||||
(*(pbss_entry->pwapi_ie)).ieee_hdr.len +
|
(*(pbss_entry->pwapi_ie)).ieee_hdr.len +
|
||||||
sizeof(IEEEtypes_Header_t));
|
sizeof(IEEEtypes_Header_t));
|
||||||
break;
|
break;
|
||||||
|
case MULTI_BSSID:
|
||||||
|
if (IS_FW_SUPPORT_MULTIBSSID(pmadapter)) {
|
||||||
|
pbss_entry->multi_bssid_ap = MULTI_BSSID_AP;
|
||||||
|
HEXDUMP("InterpretIE: Multi BSSID IE",
|
||||||
|
(t_u8 *)pcurrent_ptr, total_ie_len);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case HT_CAPABILITY:
|
case HT_CAPABILITY:
|
||||||
pbss_entry->pht_cap = (IEEEtypes_HTCap_t *)pcurrent_ptr;
|
pbss_entry->pht_cap = (IEEEtypes_HTCap_t *)pcurrent_ptr;
|
||||||
pbss_entry->ht_cap_offset =
|
pbss_entry->ht_cap_offset =
|
||||||
|
@ -2962,7 +2970,7 @@ static t_u16 wlan_get_chan_load(mlan_adapter *pmadapter, t_u8 channel)
|
||||||
{
|
{
|
||||||
t_u16 chan_load = 0;
|
t_u16 chan_load = 0;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < pmadapter->num_in_chan_stats; i++) {
|
for (i = 0; i < (int)pmadapter->num_in_chan_stats; i++) {
|
||||||
if ((pmadapter->pchan_stats[i].chan_num == channel) &&
|
if ((pmadapter->pchan_stats[i].chan_num == channel) &&
|
||||||
pmadapter->pchan_stats[i].cca_scan_duration) {
|
pmadapter->pchan_stats[i].cca_scan_duration) {
|
||||||
chan_load =
|
chan_load =
|
||||||
|
@ -2988,7 +2996,7 @@ static t_u8 wlan_get_chan_rssi(mlan_adapter *pmadapter, t_u8 channel,
|
||||||
{
|
{
|
||||||
t_u8 rssi = 0;
|
t_u8 rssi = 0;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < pmadapter->num_in_scan_table; i++) {
|
for (i = 0; i < (int)pmadapter->num_in_scan_table; i++) {
|
||||||
if (pmadapter->pscan_table[i].channel == channel) {
|
if (pmadapter->pscan_table[i].channel == channel) {
|
||||||
if (rssi == 0)
|
if (rssi == 0)
|
||||||
rssi = (t_s32)pmadapter->pscan_table[i].rssi;
|
rssi = (t_s32)pmadapter->pscan_table[i].rssi;
|
||||||
|
@ -3019,7 +3027,7 @@ static t_void wlan_update_chan_rssi(mlan_adapter *pmadapter)
|
||||||
t_s8 min_rssi = 0;
|
t_s8 min_rssi = 0;
|
||||||
t_s8 max_rssi = 0;
|
t_s8 max_rssi = 0;
|
||||||
t_s8 rss = 0;
|
t_s8 rss = 0;
|
||||||
for (i = 0; i < pmadapter->num_in_chan_stats; i++) {
|
for (i = 0; i < (int)pmadapter->num_in_chan_stats; i++) {
|
||||||
if (pmadapter->pchan_stats[i].chan_num &&
|
if (pmadapter->pchan_stats[i].chan_num &&
|
||||||
pmadapter->pchan_stats[i].cca_scan_duration) {
|
pmadapter->pchan_stats[i].cca_scan_duration) {
|
||||||
min_rssi = -wlan_get_chan_rssi(
|
min_rssi = -wlan_get_chan_rssi(
|
||||||
|
@ -4178,7 +4186,7 @@ mlan_status wlan_cmd_802_11_scan(mlan_private *pmpriv, HostCmd_DS_COMMAND *pcmd,
|
||||||
* @return MTRUE/MFALSE
|
* @return MTRUE/MFALSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
t_bool wlan_active_scan_req_for_passive_chan(mlan_private *pmpriv,
|
static t_bool wlan_active_scan_req_for_passive_chan(mlan_private *pmpriv,
|
||||||
mlan_ioctl_req *pioctl_buf)
|
mlan_ioctl_req *pioctl_buf)
|
||||||
{
|
{
|
||||||
t_bool ret = MFALSE;
|
t_bool ret = MFALSE;
|
||||||
|
@ -4763,6 +4771,11 @@ mlan_status wlan_cmd_802_11_scan_ext(mlan_private *pmpriv,
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!pdata_buf) {
|
||||||
|
PRINTM(MERROR, "wlan_cmd_802_11_scan_ext: pdata_buf is null\n");
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_FAILURE;
|
||||||
|
}
|
||||||
pscan_cfg = (wlan_scan_cmd_config *)pdata_buf;
|
pscan_cfg = (wlan_scan_cmd_config *)pdata_buf;
|
||||||
|
|
||||||
memcpy_ext(pmpriv->adapter, pext_scan_cmd->tlv_buffer,
|
memcpy_ext(pmpriv->adapter, pext_scan_cmd->tlv_buffer,
|
||||||
|
@ -4866,7 +4879,7 @@ mlan_status wlan_ret_802_11_scan_ext(mlan_private *pmpriv,
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
t_void wlan_add_new_entry_to_scan_table(mlan_private *pmpriv,
|
static t_void wlan_add_new_entry_to_scan_table(mlan_private *pmpriv,
|
||||||
BSSDescriptor_t *bss_new_entry,
|
BSSDescriptor_t *bss_new_entry,
|
||||||
t_u32 *num_in_tbl)
|
t_u32 *num_in_tbl)
|
||||||
{
|
{
|
||||||
|
@ -4959,6 +4972,360 @@ done:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 8 bytes timestamp, 2 bytest interval, 2 bytes capability */
|
||||||
|
#define BEACON_FIX_SIZE 12
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function realloc the beacon buffer and update ssid for new entry
|
||||||
|
*
|
||||||
|
* @param pmadpater A pointer to mlan_adapter structure
|
||||||
|
* @param pbss_entry A pointer to the bss_entry which has multi-bssid IE
|
||||||
|
* @param pnew_entry A pinter to new entry
|
||||||
|
* @param pssid A pointer to ssid IE
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_FAILURE/MLAN_STATUS_SUCCESS
|
||||||
|
*/
|
||||||
|
static mlan_status wlan_update_ssid_in_beacon_buf(mlan_adapter *pmadapter,
|
||||||
|
BSSDescriptor_t *pbss_entry,
|
||||||
|
BSSDescriptor_t *pnew_entry,
|
||||||
|
IEEEtypes_Ssid_t *pssid)
|
||||||
|
{
|
||||||
|
mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks;
|
||||||
|
t_u8 *pbeacon_buf = MNULL;
|
||||||
|
t_u32 beacon_buf_size = 0;
|
||||||
|
t_s8 offset = pnew_entry->ssid.ssid_len - pbss_entry->ssid.ssid_len;
|
||||||
|
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||||
|
|
||||||
|
if (pnew_entry->ssid.ssid_len >= pbss_entry->ssid.ssid_len)
|
||||||
|
beacon_buf_size =
|
||||||
|
pbss_entry->beacon_buf_size +
|
||||||
|
(pnew_entry->ssid.ssid_len - pbss_entry->ssid.ssid_len);
|
||||||
|
else
|
||||||
|
beacon_buf_size =
|
||||||
|
pbss_entry->beacon_buf_size -
|
||||||
|
(pbss_entry->ssid.ssid_len - pnew_entry->ssid.ssid_len);
|
||||||
|
|
||||||
|
ret = pcb->moal_malloc(pmadapter->pmoal_handle, beacon_buf_size,
|
||||||
|
MLAN_MEM_DEF, (t_u8 **)&pbeacon_buf);
|
||||||
|
if (ret != MLAN_STATUS_SUCCESS || !pbeacon_buf) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Memory allocation for beacon buf for bss_new_entry\n");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
pnew_entry->beacon_buf_size = beacon_buf_size;
|
||||||
|
pnew_entry->pbeacon_buf = pbeacon_buf;
|
||||||
|
/** copy fixed IE */
|
||||||
|
memcpy_ext(pmadapter, pbeacon_buf, pbss_entry->pbeacon_buf,
|
||||||
|
BEACON_FIX_SIZE, BEACON_FIX_SIZE);
|
||||||
|
/** copy new ssid ie */
|
||||||
|
memcpy_ext(pmadapter, pbeacon_buf + BEACON_FIX_SIZE, (t_u8 *)pssid,
|
||||||
|
pssid->len + sizeof(IEEEtypes_Header_t),
|
||||||
|
pssid->len + sizeof(IEEEtypes_Header_t));
|
||||||
|
/** copy left IE to new beacon buffer */
|
||||||
|
memcpy_ext(pmadapter,
|
||||||
|
pbeacon_buf + BEACON_FIX_SIZE + pssid->len +
|
||||||
|
sizeof(IEEEtypes_Header_t),
|
||||||
|
pbss_entry->pbeacon_buf + BEACON_FIX_SIZE +
|
||||||
|
pbss_entry->ssid.ssid_len +
|
||||||
|
sizeof(IEEEtypes_Header_t),
|
||||||
|
pbss_entry->beacon_buf_size - BEACON_FIX_SIZE -
|
||||||
|
(pbss_entry->ssid.ssid_len +
|
||||||
|
sizeof(IEEEtypes_Header_t)),
|
||||||
|
pbss_entry->beacon_buf_size - BEACON_FIX_SIZE -
|
||||||
|
(pbss_entry->ssid.ssid_len +
|
||||||
|
sizeof(IEEEtypes_Header_t)));
|
||||||
|
|
||||||
|
/* adjust the ie pointer */
|
||||||
|
if (pnew_entry->pwpa_ie)
|
||||||
|
pnew_entry->wpa_offset += offset;
|
||||||
|
if (pnew_entry->prsn_ie)
|
||||||
|
pnew_entry->rsn_offset += offset;
|
||||||
|
if (pnew_entry->pwapi_ie)
|
||||||
|
pnew_entry->wapi_offset += offset;
|
||||||
|
|
||||||
|
if (pnew_entry->posen_ie)
|
||||||
|
pnew_entry->osen_offset += offset;
|
||||||
|
if (pnew_entry->pmd_ie)
|
||||||
|
pnew_entry->md_offset += offset;
|
||||||
|
if (pnew_entry->pht_cap)
|
||||||
|
pnew_entry->ht_cap_offset += offset;
|
||||||
|
if (pnew_entry->pht_info)
|
||||||
|
pnew_entry->ht_info_offset += offset;
|
||||||
|
if (pnew_entry->pbss_co_2040)
|
||||||
|
pnew_entry->bss_co_2040_offset += offset;
|
||||||
|
if (pnew_entry->pext_cap)
|
||||||
|
pnew_entry->ext_cap_offset += offset;
|
||||||
|
if (pnew_entry->poverlap_bss_scan_param)
|
||||||
|
pnew_entry->overlap_bss_offset += offset;
|
||||||
|
if (pnew_entry->pvht_cap)
|
||||||
|
pnew_entry->vht_cap_offset += offset;
|
||||||
|
if (pnew_entry->pvht_oprat)
|
||||||
|
pnew_entry->vht_oprat_offset += offset;
|
||||||
|
if (pnew_entry->pvht_txpower)
|
||||||
|
pnew_entry->vht_txpower_offset += offset;
|
||||||
|
if (pnew_entry->pext_pwer)
|
||||||
|
pnew_entry->ext_pwer_offset += offset;
|
||||||
|
if (pnew_entry->pext_bssload)
|
||||||
|
pnew_entry->ext_bssload_offset += offset;
|
||||||
|
if (pnew_entry->pquiet_chan)
|
||||||
|
pnew_entry->quiet_chan_offset += offset;
|
||||||
|
if (pnew_entry->poper_mode)
|
||||||
|
pnew_entry->oper_mode_offset += offset;
|
||||||
|
if (pnew_entry->phe_cap)
|
||||||
|
pnew_entry->he_cap_offset += offset;
|
||||||
|
if (pnew_entry->phe_oprat)
|
||||||
|
pnew_entry->he_oprat_offset += offset;
|
||||||
|
ret = MLAN_STATUS_SUCCESS;
|
||||||
|
done:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function generate the bssid from bssid_idx
|
||||||
|
*
|
||||||
|
* @param pmadpater A pointer to mlan_adapter structure
|
||||||
|
* @param pbss_entry A pointer to the bss_entry which has multi-bssid IE
|
||||||
|
* @param pnew_entry A pinter to new entry
|
||||||
|
* @param bssid_index bssid_index from BSSID_IDX IE
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static void wlan_gen_multi_bssid_by_bssid_index(pmlan_adapter pmadapter,
|
||||||
|
BSSDescriptor_t *pbss_entry,
|
||||||
|
BSSDescriptor_t *pnew_entry,
|
||||||
|
t_u8 bssid_index)
|
||||||
|
{
|
||||||
|
t_u8 mask = 0xff;
|
||||||
|
t_u8 new_bssid[6];
|
||||||
|
memcpy_ext(pmadapter, (t_u8 *)new_bssid,
|
||||||
|
(t_u8 *)&pbss_entry->mac_address,
|
||||||
|
sizeof(mlan_802_11_mac_addr), sizeof(new_bssid));
|
||||||
|
new_bssid[5] = (new_bssid[5] + bssid_index) & mask;
|
||||||
|
memcpy_ext(pmadapter, (t_u8 *)&pnew_entry->mac_address, new_bssid,
|
||||||
|
sizeof(new_bssid), sizeof(mlan_802_11_mac_addr));
|
||||||
|
memcpy_ext(pmadapter, (t_u8 *)&pnew_entry->multi_bssid_ap_addr,
|
||||||
|
(t_u8 *)&pbss_entry->mac_address,
|
||||||
|
sizeof(mlan_802_11_mac_addr), sizeof(mlan_802_11_mac_addr));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function parse the non_trans_bssid_profile
|
||||||
|
*
|
||||||
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
|
* @param pbss_entry A pointer to BSSDescriptor_t which has multi-bssid
|
||||||
|
* IE
|
||||||
|
* @param pbss_profile A pointer to IEEEtypes_NonTransBSSIDprofile_t
|
||||||
|
* @param num_in_table A pointer to buffer to save num of entry in scan
|
||||||
|
* table.
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static t_void wlan_parse_non_trans_bssid_profile(
|
||||||
|
mlan_private *pmpriv, BSSDescriptor_t *pbss_entry,
|
||||||
|
IEEEtypes_NonTransBSSIDProfile_t *pbss_profile, t_u32 *num_in_table)
|
||||||
|
{
|
||||||
|
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||||
|
IEEEtypes_Header_t *pheader =
|
||||||
|
(IEEEtypes_Header_t *)pbss_profile->profile_data;
|
||||||
|
IEEEtypes_MultiBSSIDIndex_t *pbssid_index = MNULL;
|
||||||
|
IEEEtypes_Ssid_t *pssid = MNULL;
|
||||||
|
IEEEtypes_NotxBssCap_t *pcap =
|
||||||
|
(IEEEtypes_NotxBssCap_t *)pbss_profile->profile_data;
|
||||||
|
t_u8 *pos = pbss_profile->profile_data;
|
||||||
|
t_s8 left_len = pbss_profile->ieee_hdr.len;
|
||||||
|
t_u8 ret = MFALSE;
|
||||||
|
mlan_callbacks *pcb = (pmlan_callbacks)&pmadapter->callbacks;
|
||||||
|
BSSDescriptor_t *bss_new_entry = MNULL;
|
||||||
|
t_u8 *pbeacon_buf = MNULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
/* The first element within the Nontransmitted
|
||||||
|
* BSSID Profile is not the Nontransmitted
|
||||||
|
* BSSID Capability element.
|
||||||
|
*/
|
||||||
|
if (pcap->element_id != NONTX_BSSID_CAP || pcap->len != 2) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"The first element within the Nontransmitted BSSID Profile is not the NontransmittedBSSID Capability element\n");
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (left_len >= 2) {
|
||||||
|
pheader = (IEEEtypes_Header_t *)pos;
|
||||||
|
if ((t_s8)(pheader->len + sizeof(IEEEtypes_Header_t)) >
|
||||||
|
left_len) {
|
||||||
|
PRINTM(MMSG, "invalid IE length = %d left len %d\n",
|
||||||
|
pheader->len, left_len);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
switch (pheader->element_id) {
|
||||||
|
case MBSSID_INDEX:
|
||||||
|
pbssid_index = (IEEEtypes_MultiBSSIDIndex_t *)pos;
|
||||||
|
if (pbssid_index->bssid_index == 0 ||
|
||||||
|
pbssid_index->bssid_index > 46) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
" No valid Multiple BSSID-Index element\n");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
PRINTM(MCMND, "MBSSID: Find mbssid_index=%d\n",
|
||||||
|
pbssid_index->bssid_index);
|
||||||
|
ret = MTRUE;
|
||||||
|
break;
|
||||||
|
case SSID:
|
||||||
|
pssid = (IEEEtypes_Ssid_t *)pos;
|
||||||
|
PRINTM(MCMND, "MBSSID: Find mbssid ssid=%s\n",
|
||||||
|
pssid->ssid);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
left_len -= pheader->len + sizeof(IEEEtypes_Header_t);
|
||||||
|
pos += pheader->len + sizeof(IEEEtypes_Header_t);
|
||||||
|
}
|
||||||
|
if (ret == MTRUE) {
|
||||||
|
ret = pcb->moal_malloc(pmadapter->pmoal_handle,
|
||||||
|
sizeof(BSSDescriptor_t), MLAN_MEM_DEF,
|
||||||
|
(t_u8 **)&bss_new_entry);
|
||||||
|
if (ret != MLAN_STATUS_SUCCESS || !bss_new_entry) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Memory allocation for bss_new_entry failed!\n");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
memcpy_ext(pmadapter, bss_new_entry, pbss_entry,
|
||||||
|
sizeof(BSSDescriptor_t), sizeof(BSSDescriptor_t));
|
||||||
|
wlan_gen_multi_bssid_by_bssid_index(pmadapter, pbss_entry,
|
||||||
|
bss_new_entry,
|
||||||
|
pbssid_index->bssid_index);
|
||||||
|
if (pssid) {
|
||||||
|
memset(pmadapter, (t_u8 *)&bss_new_entry->ssid, 0,
|
||||||
|
sizeof(mlan_802_11_ssid));
|
||||||
|
bss_new_entry->ssid.ssid_len = pssid->len;
|
||||||
|
memcpy_ext(pmadapter, bss_new_entry->ssid.ssid,
|
||||||
|
pssid->ssid, pssid->len,
|
||||||
|
MLAN_MAX_SSID_LENGTH);
|
||||||
|
if (MLAN_STATUS_SUCCESS !=
|
||||||
|
wlan_update_ssid_in_beacon_buf(
|
||||||
|
pmadapter, pbss_entry, bss_new_entry,
|
||||||
|
pssid)) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Fail to update MBSSID beacon buf\n");
|
||||||
|
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||||
|
(t_u8 *)bss_new_entry);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
pbeacon_buf = bss_new_entry->pbeacon_buf;
|
||||||
|
}
|
||||||
|
memcpy_ext(pmadapter, &bss_new_entry->cap_info, &pcap->cap,
|
||||||
|
sizeof(IEEEtypes_CapInfo_t),
|
||||||
|
sizeof(IEEEtypes_CapInfo_t));
|
||||||
|
bss_new_entry->multi_bssid_ap = MULTI_BSSID_SUB_AP;
|
||||||
|
wlan_add_new_entry_to_scan_table(pmpriv, bss_new_entry,
|
||||||
|
num_in_table);
|
||||||
|
if (pssid && pbeacon_buf)
|
||||||
|
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||||
|
(t_u8 *)pbeacon_buf);
|
||||||
|
pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)bss_new_entry);
|
||||||
|
}
|
||||||
|
done:
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function parse the multi_bssid IE from pbss_entry
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param pbss_entry A pointer to BSSDescriptor_t which has multi-bssid
|
||||||
|
* IE
|
||||||
|
* @param num_in_table A pointer to buffer to save num of entry in scan
|
||||||
|
* table.
|
||||||
|
*
|
||||||
|
* @return number entry in scan table
|
||||||
|
*/
|
||||||
|
static t_void wlan_parse_multi_bssid_ie(mlan_private *pmpriv,
|
||||||
|
BSSDescriptor_t *pbss_entry,
|
||||||
|
IEEEtypes_MultiBSSID_t *pmulti_bssid,
|
||||||
|
t_u32 *num_in_table)
|
||||||
|
{
|
||||||
|
t_u32 bytes_left = 0;
|
||||||
|
t_u8 *pcurrent_ptr = MNULL;
|
||||||
|
IEEEtypes_NonTransBSSIDProfile_t *pbssid_profile = MNULL;
|
||||||
|
|
||||||
|
if (!pmulti_bssid)
|
||||||
|
return;
|
||||||
|
bytes_left = pmulti_bssid->ieee_hdr.len - 1;
|
||||||
|
pcurrent_ptr = pmulti_bssid->sub_elem_data;
|
||||||
|
while (bytes_left >= 2) {
|
||||||
|
pbssid_profile =
|
||||||
|
(IEEEtypes_NonTransBSSIDProfile_t *)pcurrent_ptr;
|
||||||
|
if (pbssid_profile->ieee_hdr.element_id !=
|
||||||
|
NONTRANS_BSSID_PROFILE_SUBELEM_ID) {
|
||||||
|
PRINTM(MERROR, "Invalid multi-bssid IE\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (bytes_left < (t_u32)(pbssid_profile->ieee_hdr.len + 2)) {
|
||||||
|
PRINTM(MERROR, "Invalid multi-bssid IE\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
wlan_parse_non_trans_bssid_profile(
|
||||||
|
pmpriv, pbss_entry, pbssid_profile, num_in_table);
|
||||||
|
pcurrent_ptr += pbssid_profile->ieee_hdr.len + 2;
|
||||||
|
bytes_left -= pbssid_profile->ieee_hdr.len + 2;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function search all the mbssid IE in the beacon buffer
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param pbss_entry A pointer to BSSDescriptor_t which has multi-bssid
|
||||||
|
* IE
|
||||||
|
* @param num_in_table A pointer to buffer to save num of entry in scan
|
||||||
|
* table.
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static void wlan_parse_multi_bssid_ap(mlan_private *pmpriv,
|
||||||
|
BSSDescriptor_t *pbss_entry,
|
||||||
|
t_u32 *num_in_table)
|
||||||
|
{
|
||||||
|
IEEEtypes_ElementId_e element_id;
|
||||||
|
t_u8 element_len;
|
||||||
|
t_u16 total_ie_len;
|
||||||
|
t_u32 bytes_left = pbss_entry->beacon_buf_size - BEACON_FIX_SIZE;
|
||||||
|
t_u8 *pcurrent_ptr = pbss_entry->pbeacon_buf + BEACON_FIX_SIZE;
|
||||||
|
IEEEtypes_Ssid_t *pssid = (IEEEtypes_Ssid_t *)pcurrent_ptr;
|
||||||
|
|
||||||
|
if (pssid->element_id != SSID) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"Invalid beacon ie, ssid should be in the first element\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/* Process variable IE */
|
||||||
|
while (bytes_left >= 2) {
|
||||||
|
element_id = (IEEEtypes_ElementId_e)(*((t_u8 *)pcurrent_ptr));
|
||||||
|
element_len = *((t_u8 *)pcurrent_ptr + 1);
|
||||||
|
total_ie_len = element_len + sizeof(IEEEtypes_Header_t);
|
||||||
|
|
||||||
|
if (bytes_left < total_ie_len) {
|
||||||
|
PRINTM(MERROR, "InterpretIE: Error in processing IE, "
|
||||||
|
"bytes left < IE length\n");
|
||||||
|
bytes_left = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (element_id == MULTI_BSSID)
|
||||||
|
wlan_parse_multi_bssid_ie(
|
||||||
|
pmpriv, pbss_entry,
|
||||||
|
(IEEEtypes_MultiBSSID_t *)pcurrent_ptr,
|
||||||
|
num_in_table);
|
||||||
|
pcurrent_ptr += total_ie_len;
|
||||||
|
bytes_left -= total_ie_len;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function parse and store the extended scan results
|
* @brief This function parse and store the extended scan results
|
||||||
*
|
*
|
||||||
|
@ -5155,6 +5522,13 @@ static mlan_status wlan_parse_ext_scan_result(mlan_private *pmpriv,
|
||||||
"EXT_SCAN: dropping entry on blacklist channel.\n");
|
"EXT_SCAN: dropping entry on blacklist channel.\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (IS_FW_SUPPORT_MULTIBSSID(pmadapter)) {
|
||||||
|
if (bss_new_entry->multi_bssid_ap ==
|
||||||
|
MULTI_BSSID_AP)
|
||||||
|
wlan_parse_multi_bssid_ap(
|
||||||
|
pmpriv, bss_new_entry,
|
||||||
|
&num_in_table);
|
||||||
|
}
|
||||||
wlan_add_new_entry_to_scan_table(pmpriv, bss_new_entry,
|
wlan_add_new_entry_to_scan_table(pmpriv, bss_new_entry,
|
||||||
&num_in_table);
|
&num_in_table);
|
||||||
|
|
||||||
|
@ -5392,7 +5766,6 @@ done:
|
||||||
/** Complete scan ioctl */
|
/** Complete scan ioctl */
|
||||||
wlan_request_cmd_lock(pmadapter);
|
wlan_request_cmd_lock(pmadapter);
|
||||||
pmadapter->scan_processing = MFALSE;
|
pmadapter->scan_processing = MFALSE;
|
||||||
pmadapter->ext_scan_type = EXT_SCAN_DEFAULT;
|
|
||||||
pioctl_req = pmadapter->pscan_ioctl_req;
|
pioctl_req = pmadapter->pscan_ioctl_req;
|
||||||
pmadapter->pscan_ioctl_req = MNULL;
|
pmadapter->pscan_ioctl_req = MNULL;
|
||||||
/* Need to indicate IOCTL complete */
|
/* Need to indicate IOCTL complete */
|
||||||
|
@ -6083,7 +6456,12 @@ mlan_status wlan_ret_802_11_bgscan_query(mlan_private *pmpriv,
|
||||||
{
|
{
|
||||||
mlan_ds_scan *pscan = MNULL;
|
mlan_ds_scan *pscan = MNULL;
|
||||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||||
|
t_u8 i;
|
||||||
ENTER();
|
ENTER();
|
||||||
|
for (i = 0; i < pmadapter->num_in_chan_stats; i++)
|
||||||
|
pmadapter->pchan_stats[i].cca_scan_duration = 0;
|
||||||
|
pmadapter->idx_chan_stats = 0;
|
||||||
|
|
||||||
wlan_ret_802_11_scan(pmpriv, resp, MNULL);
|
wlan_ret_802_11_scan(pmpriv, resp, MNULL);
|
||||||
if (pioctl_buf) {
|
if (pioctl_buf) {
|
||||||
pscan = (mlan_ds_scan *)pioctl_buf->pbuf;
|
pscan = (mlan_ds_scan *)pioctl_buf->pbuf;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains SDIO specific code
|
* @brief This file contains SDIO specific code
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -68,17 +68,20 @@ static mlan_status wlan_sdio_init_ioport(mlan_adapter *pmadapter)
|
||||||
t_u8 cmd_config_1 = pmadapter->pcard_sd->reg->cmd_config_1;
|
t_u8 cmd_config_1 = pmadapter->pcard_sd->reg->cmd_config_1;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
if (pmadapter->pcard_sd->supports_sdio_new_mode) {
|
||||||
pmadapter->pcard_sd->ioport = MEM_PORT;
|
pmadapter->pcard_sd->ioport = MEM_PORT;
|
||||||
|
}
|
||||||
PRINTM(MINFO, "SDIO FUNC1 IO port: 0x%x\n",
|
PRINTM(MINFO, "SDIO FUNC1 IO port: 0x%x\n",
|
||||||
pmadapter->pcard_sd->ioport);
|
pmadapter->pcard_sd->ioport);
|
||||||
|
|
||||||
|
if (pmadapter->pcard_sd->supports_sdio_new_mode) {
|
||||||
/* enable sdio cmd53 new mode */
|
/* enable sdio cmd53 new mode */
|
||||||
if (MLAN_STATUS_SUCCESS == pcb->moal_read_reg(pmadapter->pmoal_handle,
|
if (MLAN_STATUS_SUCCESS ==
|
||||||
card_config_2_1_reg,
|
pcb->moal_read_reg(pmadapter->pmoal_handle,
|
||||||
®)) {
|
card_config_2_1_reg, ®)) {
|
||||||
pcb->moal_write_reg(pmadapter->pmoal_handle,
|
pcb->moal_write_reg(pmadapter->pmoal_handle,
|
||||||
card_config_2_1_reg, reg | CMD53_NEW_MODE);
|
card_config_2_1_reg,
|
||||||
|
reg | CMD53_NEW_MODE);
|
||||||
} else {
|
} else {
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
|
@ -87,8 +90,10 @@ static mlan_status wlan_sdio_init_ioport(mlan_adapter *pmadapter)
|
||||||
/* configure cmd port */
|
/* configure cmd port */
|
||||||
/* enable reading rx length from the register */
|
/* enable reading rx length from the register */
|
||||||
if (MLAN_STATUS_SUCCESS ==
|
if (MLAN_STATUS_SUCCESS ==
|
||||||
pcb->moal_read_reg(pmadapter->pmoal_handle, cmd_config_0, ®)) {
|
pcb->moal_read_reg(pmadapter->pmoal_handle, cmd_config_0,
|
||||||
pcb->moal_write_reg(pmadapter->pmoal_handle, cmd_config_0,
|
®)) {
|
||||||
|
pcb->moal_write_reg(pmadapter->pmoal_handle,
|
||||||
|
cmd_config_0,
|
||||||
reg | CMD_PORT_RD_LEN_EN);
|
reg | CMD_PORT_RD_LEN_EN);
|
||||||
} else {
|
} else {
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -97,13 +102,16 @@ static mlan_status wlan_sdio_init_ioport(mlan_adapter *pmadapter)
|
||||||
/* enable Dnld/Upld ready auto reset for cmd port
|
/* enable Dnld/Upld ready auto reset for cmd port
|
||||||
* after cmd53 is completed */
|
* after cmd53 is completed */
|
||||||
if (MLAN_STATUS_SUCCESS ==
|
if (MLAN_STATUS_SUCCESS ==
|
||||||
pcb->moal_read_reg(pmadapter->pmoal_handle, cmd_config_1, ®)) {
|
pcb->moal_read_reg(pmadapter->pmoal_handle, cmd_config_1,
|
||||||
pcb->moal_write_reg(pmadapter->pmoal_handle, cmd_config_1,
|
®)) {
|
||||||
|
pcb->moal_write_reg(pmadapter->pmoal_handle,
|
||||||
|
cmd_config_1,
|
||||||
reg | CMD_PORT_AUTO_EN);
|
reg | CMD_PORT_AUTO_EN);
|
||||||
} else {
|
} else {
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(SD8977) || defined(SD8978)
|
#if defined(SD8977) || defined(SD8978)
|
||||||
if (IS_SD8977(pmadapter->card_type) ||
|
if (IS_SD8977(pmadapter->card_type) ||
|
||||||
|
@ -196,17 +204,18 @@ static mlan_status wlan_get_rd_port(mlan_adapter *pmadapter, t_u8 *pport)
|
||||||
{
|
{
|
||||||
t_u32 rd_bitmap = pmadapter->pcard_sd->mp_rd_bitmap;
|
t_u32 rd_bitmap = pmadapter->pcard_sd->mp_rd_bitmap;
|
||||||
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
||||||
t_u8 max_ports = MAX_PORT;
|
t_u8 max_ports = pmadapter->pcard_sd->max_ports;
|
||||||
|
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
PRINTM(MIF_D, "wlan_get_rd_port: mp_rd_bitmap=0x%08x\n", rd_bitmap);
|
PRINTM(MIF_D, "wlan_get_rd_port: mp_rd_bitmap=0x%08x\n", rd_bitmap);
|
||||||
|
if (new_mode) {
|
||||||
if (!(rd_bitmap & reg->data_port_mask)) {
|
if (!(rd_bitmap & reg->data_port_mask)) {
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (pmadapter->pcard_sd->mp_rd_bitmap &
|
if (pmadapter->pcard_sd->mp_rd_bitmap &
|
||||||
(1 << pmadapter->pcard_sd->curr_rd_port)) {
|
(1 << pmadapter->pcard_sd->curr_rd_port)) {
|
||||||
pmadapter->pcard_sd->mp_rd_bitmap &=
|
pmadapter->pcard_sd->mp_rd_bitmap &=
|
||||||
|
@ -264,7 +273,6 @@ static mlan_status wlan_get_wr_port_data(mlan_adapter *pmadapter, t_u8 *pport)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_RESOURCE;
|
return MLAN_STATUS_RESOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTM(MIF_D, "port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n", *pport,
|
PRINTM(MIF_D, "port=%d mp_wr_bitmap=0x%08x -> 0x%08x\n", *pport,
|
||||||
wr_bitmap, pmadapter->pcard_sd->mp_wr_bitmap);
|
wr_bitmap, pmadapter->pcard_sd->mp_wr_bitmap);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -1007,7 +1015,7 @@ static mlan_status wlan_decode_rx_packet(mlan_adapter *pmadapter,
|
||||||
* @param pmadapter A pointer to mlan_adapter structure
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_receive_single_packet(mlan_adapter *pmadapter)
|
static mlan_status wlan_receive_single_packet(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_buffer *pmbuf;
|
mlan_buffer *pmbuf;
|
||||||
t_u8 port;
|
t_u8 port;
|
||||||
|
@ -1050,7 +1058,7 @@ done:
|
||||||
* @param pmadapter A pointer to mlan_adapter structure
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_receive_mp_aggr_buf(mlan_adapter *pmadapter)
|
static mlan_status wlan_receive_mp_aggr_buf(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -1062,6 +1070,7 @@ mlan_status wlan_receive_mp_aggr_buf(mlan_adapter *pmadapter)
|
||||||
t_u32 cmd53_port = 0;
|
t_u32 cmd53_port = 0;
|
||||||
t_u32 i = 0;
|
t_u32 i = 0;
|
||||||
t_u32 port_count = 0;
|
t_u32 port_count = 0;
|
||||||
|
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||||
|
|
||||||
/* do aggr RX now */
|
/* do aggr RX now */
|
||||||
PRINTM(MINFO, "do_rx_aggr: num of packets: %d\n",
|
PRINTM(MINFO, "do_rx_aggr: num of packets: %d\n",
|
||||||
|
@ -1088,11 +1097,13 @@ mlan_status wlan_receive_mp_aggr_buf(mlan_adapter *pmadapter)
|
||||||
mbuf_aggr.data_len = pmadapter->pcard_sd->mpa_rx.buf_len;
|
mbuf_aggr.data_len = pmadapter->pcard_sd->mpa_rx.buf_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (new_mode) {
|
||||||
port_count = bitcount(pmadapter->pcard_sd->mpa_rx.ports) - 1;
|
port_count = bitcount(pmadapter->pcard_sd->mpa_rx.ports) - 1;
|
||||||
/* port_count = pmadapter->mpa_rx.pkt_cnt - 1; */
|
/* port_count = pmadapter->mpa_rx.pkt_cnt - 1; */
|
||||||
cmd53_port = (pmadapter->pcard_sd->ioport | SDIO_MPA_ADDR_BASE |
|
cmd53_port = (pmadapter->pcard_sd->ioport | SDIO_MPA_ADDR_BASE |
|
||||||
(port_count << 8)) +
|
(port_count << 8)) +
|
||||||
pmadapter->pcard_sd->mpa_rx.start_port;
|
pmadapter->pcard_sd->mpa_rx.start_port;
|
||||||
|
}
|
||||||
do {
|
do {
|
||||||
ret = pcb->moal_read_data_sync(pmadapter->pmoal_handle,
|
ret = pcb->moal_read_data_sync(pmadapter->pmoal_handle,
|
||||||
&mbuf_aggr, cmd53_port, 0);
|
&mbuf_aggr, cmd53_port, 0);
|
||||||
|
@ -1208,6 +1219,7 @@ static mlan_status wlan_sdio_card_to_host_mp_aggr(mlan_adapter *pmadapter,
|
||||||
t_u32 pind = 0;
|
t_u32 pind = 0;
|
||||||
t_u32 pkt_type = 0;
|
t_u32 pkt_type = 0;
|
||||||
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
||||||
|
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -1218,8 +1230,8 @@ static mlan_status wlan_sdio_card_to_host_mp_aggr(mlan_adapter *pmadapter,
|
||||||
f_do_rx_cur = 1;
|
f_do_rx_cur = 1;
|
||||||
goto rx_curr_single;
|
goto rx_curr_single;
|
||||||
}
|
}
|
||||||
|
if ((new_mode &&
|
||||||
if (pmadapter->pcard_sd->mp_rd_bitmap & reg->data_port_mask) {
|
(pmadapter->pcard_sd->mp_rd_bitmap & reg->data_port_mask))) {
|
||||||
/* Some more data RX pending */
|
/* Some more data RX pending */
|
||||||
PRINTM(MINFO, "card_2_host_mp_aggr: Not last packet\n");
|
PRINTM(MINFO, "card_2_host_mp_aggr: Not last packet\n");
|
||||||
|
|
||||||
|
@ -1256,10 +1268,10 @@ static mlan_status wlan_sdio_card_to_host_mp_aggr(mlan_adapter *pmadapter,
|
||||||
if (f_aggr_cur) {
|
if (f_aggr_cur) {
|
||||||
PRINTM(MINFO, "Current packet aggregation.\n");
|
PRINTM(MINFO, "Current packet aggregation.\n");
|
||||||
/* Curr pkt can be aggregated */
|
/* Curr pkt can be aggregated */
|
||||||
|
if (new_mode)
|
||||||
MP_RX_AGGR_SETUP(pmadapter, pmbuf, port, rx_len);
|
MP_RX_AGGR_SETUP(pmadapter, pmbuf, port, rx_len);
|
||||||
|
|
||||||
if (MP_RX_AGGR_PKT_LIMIT_REACHED(pmadapter) ||
|
if (MP_RX_AGGR_PKT_LIMIT_REACHED(pmadapter) ||
|
||||||
MP_RX_AGGR_PORT_LIMIT_REACHED(pmadapter)) {
|
((new_mode && MP_RX_AGGR_PORT_LIMIT_REACHED(pmadapter)))) {
|
||||||
PRINTM(MINFO,
|
PRINTM(MINFO,
|
||||||
"card_2_host_mp_aggr: Aggregation Packet limit reached\n");
|
"card_2_host_mp_aggr: Aggregation Packet limit reached\n");
|
||||||
/* No more pkts allowed in Aggr buf, rx it */
|
/* No more pkts allowed in Aggr buf, rx it */
|
||||||
|
@ -1288,6 +1300,7 @@ rx_curr_single:
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
if (new_mode) {
|
||||||
if (pkt_type != MLAN_TYPE_DATA &&
|
if (pkt_type != MLAN_TYPE_DATA &&
|
||||||
pkt_type != MLAN_TYPE_SPA_DATA) {
|
pkt_type != MLAN_TYPE_SPA_DATA) {
|
||||||
PRINTM(MERROR,
|
PRINTM(MERROR,
|
||||||
|
@ -1297,7 +1310,9 @@ rx_curr_single:
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (new_mode)
|
||||||
pmadapter->pcard_sd->mpa_rx_count[0]++;
|
pmadapter->pcard_sd->mpa_rx_count[0]++;
|
||||||
|
|
||||||
wlan_decode_rx_packet(pmadapter, pmbuf, pkt_type, MTRUE);
|
wlan_decode_rx_packet(pmadapter, pmbuf, pkt_type, MTRUE);
|
||||||
|
@ -1305,6 +1320,7 @@ rx_curr_single:
|
||||||
if (f_post_aggr_cur) {
|
if (f_post_aggr_cur) {
|
||||||
PRINTM(MINFO, "Current packet aggregation.\n");
|
PRINTM(MINFO, "Current packet aggregation.\n");
|
||||||
/* Curr pkt can be aggregated */
|
/* Curr pkt can be aggregated */
|
||||||
|
if (new_mode)
|
||||||
MP_RX_AGGR_SETUP(pmadapter, pmbuf, port, rx_len);
|
MP_RX_AGGR_SETUP(pmadapter, pmbuf, port, rx_len);
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
|
@ -1345,7 +1361,8 @@ mlan_status wlan_send_mp_aggr_buf(mlan_adapter *pmadapter)
|
||||||
t_u32 port_count = 0;
|
t_u32 port_count = 0;
|
||||||
mlan_buffer mbuf_aggr;
|
mlan_buffer mbuf_aggr;
|
||||||
t_u8 i = 0;
|
t_u8 i = 0;
|
||||||
t_u8 mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT;
|
t_u8 mp_aggr_pkt_limit = pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||||
|
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -1375,11 +1392,12 @@ mlan_status wlan_send_mp_aggr_buf(mlan_adapter *pmadapter)
|
||||||
mbuf_aggr.data_len = pmadapter->pcard_sd->mpa_tx.buf_len;
|
mbuf_aggr.data_len = pmadapter->pcard_sd->mpa_tx.buf_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (new_mode) {
|
||||||
port_count = bitcount(pmadapter->pcard_sd->mpa_tx.ports) - 1;
|
port_count = bitcount(pmadapter->pcard_sd->mpa_tx.ports) - 1;
|
||||||
cmd53_port = (pmadapter->pcard_sd->ioport | SDIO_MPA_ADDR_BASE |
|
cmd53_port = (pmadapter->pcard_sd->ioport | SDIO_MPA_ADDR_BASE |
|
||||||
(port_count << 8)) +
|
(port_count << 8)) +
|
||||||
pmadapter->pcard_sd->mpa_tx.start_port;
|
pmadapter->pcard_sd->mpa_tx.start_port;
|
||||||
|
}
|
||||||
if (pmadapter->pcard_sd->mpa_tx.pkt_cnt == 1)
|
if (pmadapter->pcard_sd->mpa_tx.pkt_cnt == 1)
|
||||||
cmd53_port = pmadapter->pcard_sd->ioport +
|
cmd53_port = pmadapter->pcard_sd->ioport +
|
||||||
pmadapter->pcard_sd->mpa_tx.start_port;
|
pmadapter->pcard_sd->mpa_tx.start_port;
|
||||||
|
@ -1452,7 +1470,8 @@ static mlan_status wlan_host_to_card_mp_aggr(mlan_adapter *pmadapter,
|
||||||
t_s32 f_precopy_cur_buf = 0;
|
t_s32 f_precopy_cur_buf = 0;
|
||||||
t_s32 f_postcopy_cur_buf = 0;
|
t_s32 f_postcopy_cur_buf = 0;
|
||||||
t_u8 aggr_sg = 0;
|
t_u8 aggr_sg = 0;
|
||||||
t_u8 mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT;
|
t_u8 mp_aggr_pkt_limit = pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||||
|
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -1539,9 +1558,11 @@ static mlan_status wlan_host_to_card_mp_aggr(mlan_adapter *pmadapter,
|
||||||
mbuf->pbuf + mbuf->data_offset,
|
mbuf->pbuf + mbuf->data_offset,
|
||||||
MLAN_SDIO_BLOCK_SIZE, MLAN_SDIO_BLOCK_SIZE);
|
MLAN_SDIO_BLOCK_SIZE, MLAN_SDIO_BLOCK_SIZE);
|
||||||
if (!pmadapter->pcard_sd->mpa_tx.buf) {
|
if (!pmadapter->pcard_sd->mpa_tx.buf) {
|
||||||
|
if (new_mode)
|
||||||
MP_TX_AGGR_BUF_PUT_SG(pmadapter, mbuf, port);
|
MP_TX_AGGR_BUF_PUT_SG(pmadapter, mbuf, port);
|
||||||
aggr_sg = MTRUE;
|
aggr_sg = MTRUE;
|
||||||
} else {
|
} else {
|
||||||
|
if (new_mode)
|
||||||
MP_TX_AGGR_BUF_PUT(pmadapter, mbuf, port);
|
MP_TX_AGGR_BUF_PUT(pmadapter, mbuf, port);
|
||||||
}
|
}
|
||||||
if (MP_TX_AGGR_PKT_LIMIT_REACHED(pmadapter)) {
|
if (MP_TX_AGGR_PKT_LIMIT_REACHED(pmadapter)) {
|
||||||
|
@ -1611,9 +1632,11 @@ tx_curr_single:
|
||||||
mbuf->pbuf + mbuf->data_offset,
|
mbuf->pbuf + mbuf->data_offset,
|
||||||
MLAN_SDIO_BLOCK_SIZE, MLAN_SDIO_BLOCK_SIZE);
|
MLAN_SDIO_BLOCK_SIZE, MLAN_SDIO_BLOCK_SIZE);
|
||||||
if (!pmadapter->pcard_sd->mpa_tx.buf) {
|
if (!pmadapter->pcard_sd->mpa_tx.buf) {
|
||||||
|
if (new_mode)
|
||||||
MP_TX_AGGR_BUF_PUT_SG(pmadapter, mbuf, port);
|
MP_TX_AGGR_BUF_PUT_SG(pmadapter, mbuf, port);
|
||||||
aggr_sg = MTRUE;
|
aggr_sg = MTRUE;
|
||||||
} else {
|
} else {
|
||||||
|
if (new_mode)
|
||||||
MP_TX_AGGR_BUF_PUT(pmadapter, mbuf, port);
|
MP_TX_AGGR_BUF_PUT(pmadapter, mbuf, port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1638,7 +1661,8 @@ tx_curr_single:
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_sdio_check_winner_status(mlan_adapter *pmadapter, t_u32 *val)
|
static mlan_status wlan_sdio_check_winner_status(mlan_adapter *pmadapter,
|
||||||
|
t_u32 *val)
|
||||||
{
|
{
|
||||||
t_u32 winner = 0;
|
t_u32 winner = 0;
|
||||||
pmlan_callbacks pcb;
|
pmlan_callbacks pcb;
|
||||||
|
@ -1668,7 +1692,8 @@ mlan_status wlan_sdio_check_winner_status(mlan_adapter *pmadapter, t_u32 *val)
|
||||||
* @param pollnum Maximum polling number
|
* @param pollnum Maximum polling number
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_sdio_check_fw_status(mlan_adapter *pmadapter, t_u32 pollnum)
|
static mlan_status wlan_sdio_check_fw_status(mlan_adapter *pmadapter,
|
||||||
|
t_u32 pollnum)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u16 firmwarestat = 0;
|
t_u16 firmwarestat = 0;
|
||||||
|
@ -1709,7 +1734,7 @@ done:
|
||||||
* @param pmadapter A pointer to mlan_adapter structure
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_enable_sdio_host_int(pmlan_adapter pmadapter)
|
static mlan_status wlan_enable_sdio_host_int(pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret;
|
mlan_status ret;
|
||||||
t_u8 mask = pmadapter->pcard_sd->reg->host_int_enable;
|
t_u8 mask = pmadapter->pcard_sd->reg->host_int_enable;
|
||||||
|
@ -1728,7 +1753,8 @@ mlan_status wlan_enable_sdio_host_int(pmlan_adapter pmadapter)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_sdio_dnld_fw(pmlan_adapter pmadapter, pmlan_fw_image pmfw)
|
static mlan_status wlan_sdio_dnld_fw(pmlan_adapter pmadapter,
|
||||||
|
pmlan_fw_image pmfw)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 poll_num = 1;
|
t_u32 poll_num = 1;
|
||||||
|
@ -1777,7 +1803,6 @@ mlan_status wlan_sdio_dnld_fw(pmlan_adapter pmadapter, pmlan_fw_image pmfw)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
poll_num = MAX_FIRMWARE_POLL_TRIES;
|
poll_num = MAX_FIRMWARE_POLL_TRIES;
|
||||||
|
|
||||||
/* Check if other interface is downloading */
|
/* Check if other interface is downloading */
|
||||||
ret = wlan_sdio_check_winner_status(pmadapter, &winner);
|
ret = wlan_sdio_check_winner_status(pmadapter, &winner);
|
||||||
if (ret == MLAN_STATUS_FAILURE) {
|
if (ret == MLAN_STATUS_FAILURE) {
|
||||||
|
@ -1875,6 +1900,11 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
pmadapter->pcard_sd->max_ports = MAX_PORT;
|
||||||
|
pmadapter->pcard_sd->mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT;
|
||||||
|
pmadapter->pcard_sd->supports_sdio_new_mode = MTRUE;
|
||||||
|
pmadapter->pcard_sd->mp_tx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX;
|
||||||
|
pmadapter->pcard_sd->mp_rx_aggr_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX;
|
||||||
|
|
||||||
switch (card_type) {
|
switch (card_type) {
|
||||||
#ifdef SD8887
|
#ifdef SD8887
|
||||||
|
@ -1936,13 +1966,13 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
|
||||||
* @param pmadapter A pointer to mlan_adapter structure
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_sdio_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
|
static mlan_status wlan_sdio_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
mlan_buffer mbuf;
|
mlan_buffer mbuf;
|
||||||
t_u32 sdio_ireg = 0;
|
t_u32 sdio_ireg = 0;
|
||||||
t_u8 offset = 0;
|
t_u8 offset = 0;
|
||||||
t_u8 max_mp_regs = pmadapter->pcard_sd->reg->max_mp_regs;
|
int max_mp_regs = pmadapter->pcard_sd->reg->max_mp_regs;
|
||||||
t_u8 host_int_status_reg =
|
t_u8 host_int_status_reg =
|
||||||
pmadapter->pcard_sd->reg->host_int_status_reg;
|
pmadapter->pcard_sd->reg->host_int_status_reg;
|
||||||
|
|
||||||
|
@ -2014,7 +2044,6 @@ static mlan_status wlan_sdio_card_to_host_recovery(mlan_adapter *pmadapter,
|
||||||
t_u32 pkt_type = 0;
|
t_u32 pkt_type = 0;
|
||||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
if (MP_RX_AGGR_IN_PROGRESS(pmadapter)) {
|
if (MP_RX_AGGR_IN_PROGRESS(pmadapter)) {
|
||||||
PRINTM(MDATA, "Recovery:do Rx Aggr\n");
|
PRINTM(MDATA, "Recovery:do Rx Aggr\n");
|
||||||
/* do aggr RX now */
|
/* do aggr RX now */
|
||||||
|
@ -2062,7 +2091,7 @@ done:
|
||||||
* @param pmadapter A pointer to mlan_adapter structure
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -2082,6 +2111,7 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
t_u8 rd_len_p0_u = reg->rd_len_p0_u;
|
t_u8 rd_len_p0_u = reg->rd_len_p0_u;
|
||||||
t_u8 cmd_rd_len_0 = reg->cmd_rd_len_0;
|
t_u8 cmd_rd_len_0 = reg->cmd_rd_len_0;
|
||||||
t_u8 cmd_rd_len_1 = reg->cmd_rd_len_1;
|
t_u8 cmd_rd_len_1 = reg->cmd_rd_len_1;
|
||||||
|
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -2093,6 +2123,7 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
if (!sdio_ireg)
|
if (!sdio_ireg)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
if (new_mode) {
|
||||||
/* check the command port */
|
/* check the command port */
|
||||||
if (sdio_ireg & DN_LD_CMD_PORT_HOST_INT_STATUS) {
|
if (sdio_ireg & DN_LD_CMD_PORT_HOST_INT_STATUS) {
|
||||||
if (pmadapter->cmd_sent)
|
if (pmadapter->cmd_sent)
|
||||||
|
@ -2103,14 +2134,17 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
|
|
||||||
if (sdio_ireg & UP_LD_CMD_PORT_HOST_INT_STATUS) {
|
if (sdio_ireg & UP_LD_CMD_PORT_HOST_INT_STATUS) {
|
||||||
/* read the len of control packet */
|
/* read the len of control packet */
|
||||||
rx_len = ((t_u16)pmadapter->pcard_sd->mp_regs[cmd_rd_len_1])
|
rx_len = ((t_u16)pmadapter->pcard_sd
|
||||||
|
->mp_regs[cmd_rd_len_1])
|
||||||
<< 8;
|
<< 8;
|
||||||
rx_len |= (t_u16)pmadapter->pcard_sd->mp_regs[cmd_rd_len_0];
|
rx_len |= (t_u16)pmadapter->pcard_sd
|
||||||
|
->mp_regs[cmd_rd_len_0];
|
||||||
PRINTM(MINFO, "RX: cmd port rx_len=%u\n", rx_len);
|
PRINTM(MINFO, "RX: cmd port rx_len=%u\n", rx_len);
|
||||||
rx_blocks = (rx_len + MLAN_SDIO_BLOCK_SIZE - 1) /
|
rx_blocks = (rx_len + MLAN_SDIO_BLOCK_SIZE - 1) /
|
||||||
MLAN_SDIO_BLOCK_SIZE;
|
MLAN_SDIO_BLOCK_SIZE;
|
||||||
if (rx_len <= SDIO_INTF_HEADER_LEN ||
|
if (rx_len <= SDIO_INTF_HEADER_LEN ||
|
||||||
(rx_blocks * MLAN_SDIO_BLOCK_SIZE) > ALLOC_BUF_SIZE) {
|
(rx_blocks * MLAN_SDIO_BLOCK_SIZE) >
|
||||||
|
ALLOC_BUF_SIZE) {
|
||||||
PRINTM(MERROR, "invalid rx_len=%d\n", rx_len);
|
PRINTM(MERROR, "invalid rx_len=%d\n", rx_len);
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -2119,7 +2153,8 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
pmbuf = wlan_alloc_mlan_buffer(pmadapter, rx_len, 0,
|
pmbuf = wlan_alloc_mlan_buffer(pmadapter, rx_len, 0,
|
||||||
MOAL_MALLOC_BUFFER);
|
MOAL_MALLOC_BUFFER);
|
||||||
if (pmbuf == MNULL) {
|
if (pmbuf == MNULL) {
|
||||||
PRINTM(MERROR, "Failed to allocate 'mlan_buffer'\n");
|
PRINTM(MERROR,
|
||||||
|
"Failed to allocate 'mlan_buffer'\n");
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -2127,10 +2162,11 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
|
|
||||||
/* Transfer data from card */
|
/* Transfer data from card */
|
||||||
if (MLAN_STATUS_SUCCESS !=
|
if (MLAN_STATUS_SUCCESS !=
|
||||||
wlan_sdio_card_to_host(
|
wlan_sdio_card_to_host(pmadapter, &upld_typ,
|
||||||
pmadapter, &upld_typ, (t_u32 *)&pmadapter->upld_len,
|
(t_u32 *)&pmadapter->upld_len,
|
||||||
pmbuf, rx_len,
|
pmbuf, rx_len,
|
||||||
pmadapter->pcard_sd->ioport | CMD_PORT_SLCT)) {
|
pmadapter->pcard_sd->ioport |
|
||||||
|
CMD_PORT_SLCT)) {
|
||||||
pmadapter->dbg.num_cmdevt_card_to_host_failure++;
|
pmadapter->dbg.num_cmdevt_card_to_host_failure++;
|
||||||
PRINTM(MERROR,
|
PRINTM(MERROR,
|
||||||
"Card-to-host cmd failed: int status=0x%x\n",
|
"Card-to-host cmd failed: int status=0x%x\n",
|
||||||
|
@ -2146,7 +2182,8 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
"receive a wrong packet from CMD PORT. type =0x%x\n",
|
"receive a wrong packet from CMD PORT. type =0x%x\n",
|
||||||
upld_typ);
|
upld_typ);
|
||||||
|
|
||||||
wlan_decode_rx_packet(pmadapter, pmbuf, upld_typ, MFALSE);
|
wlan_decode_rx_packet(pmadapter, pmbuf, upld_typ,
|
||||||
|
MFALSE);
|
||||||
|
|
||||||
/* We might receive data/sleep_cfm at the same time */
|
/* We might receive data/sleep_cfm at the same time */
|
||||||
/* reset data_receive flag to avoid ps_state change */
|
/* reset data_receive flag to avoid ps_state change */
|
||||||
|
@ -2154,6 +2191,7 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
(pmadapter->ps_state == PS_STATE_SLEEP))
|
(pmadapter->ps_state == PS_STATE_SLEEP))
|
||||||
pmadapter->data_received = MFALSE;
|
pmadapter->data_received = MFALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sdio_ireg & DN_LD_HOST_INT_STATUS) {
|
if (sdio_ireg & DN_LD_HOST_INT_STATUS) {
|
||||||
if (pmadapter->pcard_sd->mp_wr_bitmap &
|
if (pmadapter->pcard_sd->mp_wr_bitmap &
|
||||||
|
@ -2164,12 +2202,16 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
pmadapter->pcard_sd->mp_wr_bitmap |=
|
pmadapter->pcard_sd->mp_wr_bitmap |=
|
||||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_u])
|
((t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_u])
|
||||||
<< 8;
|
<< 8;
|
||||||
|
if (new_mode) {
|
||||||
pmadapter->pcard_sd->mp_wr_bitmap |=
|
pmadapter->pcard_sd->mp_wr_bitmap |=
|
||||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_1l])
|
((t_u32)pmadapter->pcard_sd
|
||||||
|
->mp_regs[reg->wr_bitmap_1l])
|
||||||
<< 16;
|
<< 16;
|
||||||
pmadapter->pcard_sd->mp_wr_bitmap |=
|
pmadapter->pcard_sd->mp_wr_bitmap |=
|
||||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_1u])
|
((t_u32)pmadapter->pcard_sd
|
||||||
|
->mp_regs[reg->wr_bitmap_1u])
|
||||||
<< 24;
|
<< 24;
|
||||||
|
}
|
||||||
bit_count = bitcount(pmadapter->pcard_sd->mp_wr_bitmap &
|
bit_count = bitcount(pmadapter->pcard_sd->mp_wr_bitmap &
|
||||||
pmadapter->pcard_sd->mp_data_port_mask);
|
pmadapter->pcard_sd->mp_data_port_mask);
|
||||||
if (bit_count) {
|
if (bit_count) {
|
||||||
|
@ -2199,12 +2241,16 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
pmadapter->pcard_sd->mp_rd_bitmap |=
|
pmadapter->pcard_sd->mp_rd_bitmap |=
|
||||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->rd_bitmap_u])
|
((t_u32)pmadapter->pcard_sd->mp_regs[reg->rd_bitmap_u])
|
||||||
<< 8;
|
<< 8;
|
||||||
|
if (new_mode) {
|
||||||
pmadapter->pcard_sd->mp_rd_bitmap |=
|
pmadapter->pcard_sd->mp_rd_bitmap |=
|
||||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->rd_bitmap_1l])
|
((t_u32)pmadapter->pcard_sd
|
||||||
|
->mp_regs[reg->rd_bitmap_1l])
|
||||||
<< 16;
|
<< 16;
|
||||||
pmadapter->pcard_sd->mp_rd_bitmap |=
|
pmadapter->pcard_sd->mp_rd_bitmap |=
|
||||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->rd_bitmap_1u])
|
((t_u32)pmadapter->pcard_sd
|
||||||
|
->mp_regs[reg->rd_bitmap_1u])
|
||||||
<< 24;
|
<< 24;
|
||||||
|
}
|
||||||
PRINTM(MINTR, "UPLD: rd_bitmap=0x%08x\n",
|
PRINTM(MINTR, "UPLD: rd_bitmap=0x%08x\n",
|
||||||
pmadapter->pcard_sd->mp_rd_bitmap);
|
pmadapter->pcard_sd->mp_rd_bitmap);
|
||||||
|
|
||||||
|
@ -2233,7 +2279,8 @@ mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
rx_len = (t_u16)(rx_blocks * MLAN_SDIO_BLOCK_SIZE);
|
rx_len = (t_u16)(rx_blocks * MLAN_SDIO_BLOCK_SIZE);
|
||||||
if (rx_len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE)
|
|
||||||
|
if ((rx_len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE))
|
||||||
pmbuf = wlan_alloc_mlan_buffer(
|
pmbuf = wlan_alloc_mlan_buffer(
|
||||||
pmadapter, rx_len, 0,
|
pmadapter, rx_len, 0,
|
||||||
MOAL_MALLOC_BUFFER);
|
MOAL_MALLOC_BUFFER);
|
||||||
|
@ -2317,6 +2364,7 @@ mlan_status wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type,
|
||||||
t_u8 port = 0;
|
t_u8 port = 0;
|
||||||
t_u32 cmd53_port = 0;
|
t_u32 cmd53_port = 0;
|
||||||
t_u8 *payload = pmbuf->pbuf + pmbuf->data_offset;
|
t_u8 *payload = pmbuf->pbuf + pmbuf->data_offset;
|
||||||
|
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -2360,7 +2408,9 @@ mlan_status wlan_sdio_host_to_card(mlan_adapter *pmadapter, t_u8 type,
|
||||||
payload, pmbuf->data_len);
|
payload, pmbuf->data_len);
|
||||||
/* Transfer data to card */
|
/* Transfer data to card */
|
||||||
pmbuf->data_len = buf_block_len * blksz;
|
pmbuf->data_len = buf_block_len * blksz;
|
||||||
cmd53_port = (pmadapter->pcard_sd->ioport) | CMD_PORT_SLCT;
|
if (new_mode)
|
||||||
|
cmd53_port =
|
||||||
|
(pmadapter->pcard_sd->ioport) | CMD_PORT_SLCT;
|
||||||
ret = wlan_write_data_sync(pmadapter, pmbuf, cmd53_port);
|
ret = wlan_write_data_sync(pmadapter, pmbuf, cmd53_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2387,7 +2437,7 @@ exit:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(SD9098) || defined(SD9097))
|
#if defined(SD9098) || defined(SD9097)
|
||||||
/**
|
/**
|
||||||
* @brief This function sends vdll data to the card.
|
* @brief This function sends vdll data to the card.
|
||||||
*
|
*
|
||||||
|
@ -2396,7 +2446,8 @@ exit:
|
||||||
* SDIO header)
|
* SDIO header)
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_sdio_send_vdll(mlan_adapter *pmadapter, mlan_buffer *pmbuf)
|
static mlan_status wlan_sdio_send_vdll(mlan_adapter *pmadapter,
|
||||||
|
mlan_buffer *pmbuf)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 buf_block_len;
|
t_u32 buf_block_len;
|
||||||
|
@ -2440,14 +2491,14 @@ mlan_status wlan_sdio_send_vdll(mlan_adapter *pmadapter, mlan_buffer *pmbuf)
|
||||||
* @param tx_param A pointer to mlan_tx_param
|
* @param tx_param A pointer to mlan_tx_param
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_sdio_host_to_card_ext(pmlan_private pmpriv, t_u8 type,
|
static mlan_status wlan_sdio_host_to_card_ext(pmlan_private pmpriv, t_u8 type,
|
||||||
mlan_buffer *pmbuf,
|
mlan_buffer *pmbuf,
|
||||||
mlan_tx_param *tx_param)
|
mlan_tx_param *tx_param)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||||
|
|
||||||
#if (defined(SD9098) || defined(SD9097))
|
#if defined(SD9098) || defined(SD9097)
|
||||||
if (type == MLAN_TYPE_VDLL)
|
if (type == MLAN_TYPE_VDLL)
|
||||||
return wlan_sdio_send_vdll(pmadapter, pmbuf);
|
return wlan_sdio_send_vdll(pmadapter, pmbuf);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2475,7 +2526,7 @@ void wlan_decode_spa_buffer(mlan_adapter *pmadapter, t_u8 *buf, t_u32 len)
|
||||||
t_u8 block_num = 0;
|
t_u8 block_num = 0;
|
||||||
t_u16 block_size = 0;
|
t_u16 block_size = 0;
|
||||||
t_u8 *data;
|
t_u8 *data;
|
||||||
t_u32 pkt_len, pkt_type = 0;
|
t_u32 pkt_len;
|
||||||
mlan_buffer *mbuf_deaggr = MNULL;
|
mlan_buffer *mbuf_deaggr = MNULL;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
@ -2500,8 +2551,6 @@ void wlan_decode_spa_buffer(mlan_adapter *pmadapter, t_u8 *buf, t_u32 len)
|
||||||
}
|
}
|
||||||
pkt_len = wlan_le16_to_cpu(
|
pkt_len = wlan_le16_to_cpu(
|
||||||
*(t_u16 *)(data + OFFSET_OF_SDIO_HEADER));
|
*(t_u16 *)(data + OFFSET_OF_SDIO_HEADER));
|
||||||
pkt_type = wlan_le16_to_cpu(
|
|
||||||
*(t_u16 *)(data + OFFSET_OF_SDIO_HEADER + 2));
|
|
||||||
if ((pkt_len + OFFSET_OF_SDIO_HEADER) > block_size) {
|
if ((pkt_len + OFFSET_OF_SDIO_HEADER) > block_size) {
|
||||||
PRINTM(MERROR,
|
PRINTM(MERROR,
|
||||||
"Error in pkt, pkt_len=%d, block_size=%d\n",
|
"Error in pkt, pkt_len=%d, block_size=%d\n",
|
||||||
|
@ -2566,7 +2615,7 @@ mlan_status wlan_alloc_sdio_mpa_buffers(mlan_adapter *pmadapter,
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
t_u8 mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT;
|
t_u8 mp_aggr_pkt_limit = pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -2669,8 +2718,8 @@ mlan_status wlan_re_alloc_sdio_rx_mpa_buffer(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
t_u8 mp_aggr_pkt_limit = SDIO_MP_AGGR_DEF_PKT_LIMIT;
|
t_u8 mp_aggr_pkt_limit = pmadapter->pcard_sd->mp_aggr_pkt_limit;
|
||||||
t_u32 mpa_rx_buf_size = SDIO_MP_AGGR_BUF_SIZE_MAX;
|
t_u32 mpa_rx_buf_size = pmadapter->pcard_sd->mp_tx_aggr_buf_size;
|
||||||
|
|
||||||
if (pmadapter->pcard_sd->mpa_rx.buf) {
|
if (pmadapter->pcard_sd->mpa_rx.buf) {
|
||||||
pcb->moal_mfree(pmadapter->pmoal_handle,
|
pcb->moal_mfree(pmadapter->pmoal_handle,
|
||||||
|
@ -2740,7 +2789,8 @@ error:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pm_sdio_wakeup_card(pmlan_adapter pmadapter, t_u8 timeout)
|
static mlan_status wlan_pm_sdio_wakeup_card(pmlan_adapter pmadapter,
|
||||||
|
t_u8 timeout)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 age_ts_usec;
|
t_u32 age_ts_usec;
|
||||||
|
@ -2773,7 +2823,7 @@ mlan_status wlan_pm_sdio_wakeup_card(pmlan_adapter pmadapter, t_u8 timeout)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pm_sdio_reset_card(pmlan_adapter pmadapter)
|
static mlan_status wlan_pm_sdio_reset_card(pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -2968,8 +3018,9 @@ done:
|
||||||
* @param pmbuf A pointer to the mlan_buffer
|
* @param pmbuf A pointer to the mlan_buffer
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_sdio_data_evt_complete(pmlan_adapter pmadapter,
|
static mlan_status wlan_sdio_data_evt_complete(pmlan_adapter pmadapter,
|
||||||
mlan_buffer *pmbuf, mlan_status status)
|
mlan_buffer *pmbuf,
|
||||||
|
mlan_status status)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -2986,7 +3037,7 @@ mlan_status wlan_sdio_data_evt_complete(pmlan_adapter pmadapter,
|
||||||
* @param pmbuf A pointer to the mlan_buffer
|
* @param pmbuf A pointer to the mlan_buffer
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_sdio_handle_rx_packet(mlan_adapter *pmadapter,
|
static mlan_status wlan_sdio_handle_rx_packet(mlan_adapter *pmadapter,
|
||||||
pmlan_buffer pmbuf)
|
pmlan_buffer pmbuf)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* driver.
|
* driver.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -130,7 +130,6 @@ Change log:
|
||||||
#define REG_PORT 0
|
#define REG_PORT 0
|
||||||
/** Port for memory */
|
/** Port for memory */
|
||||||
#define MEM_PORT 0x10000
|
#define MEM_PORT 0x10000
|
||||||
|
|
||||||
/** Card Control Registers : cmd53 new mode */
|
/** Card Control Registers : cmd53 new mode */
|
||||||
#define CMD53_NEW_MODE (0x1U << 0)
|
#define CMD53_NEW_MODE (0x1U << 0)
|
||||||
/** Card Control Registers : cmd53 tx len format 1 (0x10) */
|
/** Card Control Registers : cmd53 tx len format 1 (0x10) */
|
||||||
|
@ -204,6 +203,7 @@ Change log:
|
||||||
a->pcard_sd->mpa_tx.ports |= (1 << port); \
|
a->pcard_sd->mpa_tx.ports |= (1 << port); \
|
||||||
a->pcard_sd->mpa_tx.pkt_cnt++; \
|
a->pcard_sd->mpa_tx.pkt_cnt++; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/** SDIO Tx aggregation limit ? */
|
/** SDIO Tx aggregation limit ? */
|
||||||
#define MP_TX_AGGR_PKT_LIMIT_REACHED(a) \
|
#define MP_TX_AGGR_PKT_LIMIT_REACHED(a) \
|
||||||
((a->pcard_sd->mpa_tx.pkt_cnt) == (a->pcard_sd->mpa_tx.pkt_aggr_limit))
|
((a->pcard_sd->mpa_tx.pkt_cnt) == (a->pcard_sd->mpa_tx.pkt_aggr_limit))
|
||||||
|
@ -231,7 +231,7 @@ Change log:
|
||||||
/* note: hw rx wraps round only after port (MAX_PORT-1) */
|
/* note: hw rx wraps round only after port (MAX_PORT-1) */
|
||||||
#define MP_RX_AGGR_PORT_LIMIT_REACHED(a) \
|
#define MP_RX_AGGR_PORT_LIMIT_REACHED(a) \
|
||||||
(((a->pcard_sd->curr_rd_port < a->pcard_sd->mpa_rx.start_port) && \
|
(((a->pcard_sd->curr_rd_port < a->pcard_sd->mpa_rx.start_port) && \
|
||||||
(((MAX_PORT - a->pcard_sd->mpa_rx.start_port) + \
|
(((a->pcard_sd->max_ports - a->pcard_sd->mpa_rx.start_port) + \
|
||||||
a->pcard_sd->curr_rd_port) >= (a->pcard_sd->mp_end_port >> 1))) || \
|
a->pcard_sd->curr_rd_port) >= (a->pcard_sd->mp_end_port >> 1))) || \
|
||||||
((a->pcard_sd->curr_rd_port - a->pcard_sd->mpa_rx.start_port) >= \
|
((a->pcard_sd->curr_rd_port - a->pcard_sd->mpa_rx.start_port) >= \
|
||||||
(a->pcard_sd->mp_end_port >> 1)))
|
(a->pcard_sd->mp_end_port >> 1)))
|
||||||
|
@ -528,6 +528,8 @@ static const struct _mlan_card_info mlan_card_info_sd8987 = {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern mlan_adapter_operations mlan_sdio_ops;
|
||||||
|
|
||||||
/** Probe and initialization function */
|
/** Probe and initialization function */
|
||||||
mlan_status wlan_sdio_probe(pmlan_adapter pmadapter);
|
mlan_status wlan_sdio_probe(pmlan_adapter pmadapter);
|
||||||
mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter);
|
mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains APIs to MOAL module.
|
* @brief This file contains APIs to MOAL module.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -56,7 +56,7 @@ Change log:
|
||||||
Global Variables
|
Global Variables
|
||||||
********************************************************/
|
********************************************************/
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
mlan_operations mlan_sta_ops = {
|
static mlan_operations mlan_sta_ops = {
|
||||||
/* init cmd handler */
|
/* init cmd handler */
|
||||||
wlan_ops_sta_init_cmd,
|
wlan_ops_sta_init_cmd,
|
||||||
/* ioctl handler */
|
/* ioctl handler */
|
||||||
|
@ -76,7 +76,7 @@ mlan_operations mlan_sta_ops = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
mlan_operations mlan_uap_ops = {
|
static mlan_operations mlan_uap_ops = {
|
||||||
/* init cmd handler */
|
/* init cmd handler */
|
||||||
wlan_ops_uap_init_cmd,
|
wlan_ops_uap_init_cmd,
|
||||||
/* ioctl handler */
|
/* ioctl handler */
|
||||||
|
@ -140,7 +140,7 @@ extern mlan_status wlan_get_usb_device(pmlan_adapter pmadapter);
|
||||||
* @param pmadapter A pointer to mlan_adapter structure
|
* @param pmadapter A pointer to mlan_adapter structure
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void wlan_process_pending_ioctl(mlan_adapter *pmadapter)
|
static void wlan_process_pending_ioctl(mlan_adapter *pmadapter)
|
||||||
{
|
{
|
||||||
pmlan_ioctl_req pioctl_buf;
|
pmlan_ioctl_req pioctl_buf;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -192,15 +192,6 @@ void wlan_process_pending_ioctl(mlan_adapter *pmadapter)
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Global Functions
|
Global Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
#ifdef USB
|
|
||||||
extern mlan_adapter_operations mlan_usb_ops;
|
|
||||||
#endif
|
|
||||||
#ifdef PCIE
|
|
||||||
extern mlan_adapter_operations mlan_pcie_ops;
|
|
||||||
#endif
|
|
||||||
#ifdef SDIO
|
|
||||||
extern mlan_adapter_operations mlan_sdio_ops;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function registers MOAL to MLAN module.
|
* @brief This function registers MOAL to MLAN module.
|
||||||
|
@ -327,6 +318,7 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
||||||
MASSERT(pcb->moal_spin_lock);
|
MASSERT(pcb->moal_spin_lock);
|
||||||
MASSERT(pcb->moal_spin_unlock);
|
MASSERT(pcb->moal_spin_unlock);
|
||||||
MASSERT(pcb->moal_hist_data_add);
|
MASSERT(pcb->moal_hist_data_add);
|
||||||
|
MASSERT(pcb->moal_updata_peer_signal);
|
||||||
/* Save pmoal_handle */
|
/* Save pmoal_handle */
|
||||||
pmadapter->pmoal_handle = pmdevice->pmoal_handle;
|
pmadapter->pmoal_handle = pmdevice->pmoal_handle;
|
||||||
|
|
||||||
|
@ -444,7 +436,6 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
||||||
|
|
||||||
pmadapter->multiple_dtim = pmdevice->multi_dtim;
|
pmadapter->multiple_dtim = pmdevice->multi_dtim;
|
||||||
pmadapter->inact_tmo = pmdevice->inact_tmo;
|
pmadapter->inact_tmo = pmdevice->inact_tmo;
|
||||||
pmadapter->init_para.fw_region = pmdevice->fw_region;
|
|
||||||
pmadapter->hs_wake_interval = pmdevice->hs_wake_interval;
|
pmadapter->hs_wake_interval = pmdevice->hs_wake_interval;
|
||||||
if (pmdevice->indication_gpio != 0xff) {
|
if (pmdevice->indication_gpio != 0xff) {
|
||||||
pmadapter->ind_gpio = pmdevice->indication_gpio & 0x0f;
|
pmadapter->ind_gpio = pmdevice->indication_gpio & 0x0f;
|
||||||
|
@ -573,20 +564,20 @@ exit_register:
|
||||||
/**
|
/**
|
||||||
* @brief This function unregisters MOAL from MLAN module.
|
* @brief This function unregisters MOAL from MLAN module.
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to a mlan_device structure
|
* @param padapter A pointer to a mlan_device structure
|
||||||
* allocated in MOAL
|
* allocated in MOAL
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
* The deregistration succeeded.
|
* The deregistration succeeded.
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_unregister(t_void *pmlan_adapter)
|
mlan_status mlan_unregister(t_void *padapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
pmlan_callbacks pcb;
|
pmlan_callbacks pcb;
|
||||||
t_s32 i = 0;
|
t_s32 i = 0;
|
||||||
|
|
||||||
MASSERT(pmlan_adapter);
|
MASSERT(padapter);
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -620,7 +611,7 @@ mlan_status mlan_unregister(t_void *pmlan_adapter)
|
||||||
/**
|
/**
|
||||||
* @brief This function downloads the firmware
|
* @brief This function downloads the firmware
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to a t_void pointer to store
|
* @param padapter A pointer to a t_void pointer to store
|
||||||
* mlan_adapter structure pointer
|
* mlan_adapter structure pointer
|
||||||
* @param pmfw A pointer to firmware image
|
* @param pmfw A pointer to firmware image
|
||||||
*
|
*
|
||||||
|
@ -629,13 +620,13 @@ mlan_status mlan_unregister(t_void *pmlan_adapter)
|
||||||
* MLAN_STATUS_FAILURE
|
* MLAN_STATUS_FAILURE
|
||||||
* The firmware download failed.
|
* The firmware download failed.
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_dnld_fw(t_void *pmlan_adapter, pmlan_fw_image pmfw)
|
mlan_status mlan_dnld_fw(t_void *padapter, pmlan_fw_image pmfw)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
MASSERT(pmlan_adapter);
|
MASSERT(padapter);
|
||||||
|
|
||||||
/* Download helper/firmware */
|
/* Download helper/firmware */
|
||||||
if (pmfw) {
|
if (pmfw) {
|
||||||
|
@ -654,20 +645,20 @@ mlan_status mlan_dnld_fw(t_void *pmlan_adapter, pmlan_fw_image pmfw)
|
||||||
/**
|
/**
|
||||||
* @brief This function pass init param to MLAN
|
* @brief This function pass init param to MLAN
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to a t_void pointer to store
|
* @param padapter A pointer to a t_void pointer to store
|
||||||
* mlan_adapter structure pointer
|
* mlan_adapter structure pointer
|
||||||
* @param pparam A pointer to mlan_init_param structure
|
* @param pparam A pointer to mlan_init_param structure
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_set_init_param(t_void *pmlan_adapter, pmlan_init_param pparam)
|
mlan_status mlan_set_init_param(t_void *padapter, pmlan_init_param pparam)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
MASSERT(pmlan_adapter);
|
MASSERT(padapter);
|
||||||
|
|
||||||
/** Save DPD data in MLAN */
|
/** Save DPD data in MLAN */
|
||||||
if ((pparam->pdpd_data_buf) || (pparam->dpd_data_len > 0)) {
|
if ((pparam->pdpd_data_buf) || (pparam->dpd_data_len > 0)) {
|
||||||
|
@ -691,7 +682,7 @@ mlan_status mlan_set_init_param(t_void *pmlan_adapter, pmlan_init_param pparam)
|
||||||
/**
|
/**
|
||||||
* @brief This function initializes the firmware
|
* @brief This function initializes the firmware
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to a t_void pointer to store
|
* @param padapter A pointer to a t_void pointer to store
|
||||||
* mlan_adapter structure pointer
|
* mlan_adapter structure pointer
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
|
@ -701,13 +692,13 @@ mlan_status mlan_set_init_param(t_void *pmlan_adapter, pmlan_init_param pparam)
|
||||||
* MLAN_STATUS_FAILURE
|
* MLAN_STATUS_FAILURE
|
||||||
* The firmware initialization failed.
|
* The firmware initialization failed.
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_init_fw(t_void *pmlan_adapter)
|
mlan_status mlan_init_fw(t_void *padapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
MASSERT(pmlan_adapter);
|
MASSERT(padapter);
|
||||||
|
|
||||||
pmadapter->hw_status = WlanHardwareStatusGetHwSpec;
|
pmadapter->hw_status = WlanHardwareStatusGetHwSpec;
|
||||||
|
|
||||||
|
@ -722,7 +713,7 @@ mlan_status mlan_init_fw(t_void *pmlan_adapter)
|
||||||
/**
|
/**
|
||||||
* @brief Shutdown firmware
|
* @brief Shutdown firmware
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to mlan_adapter structure
|
* @param padapter A pointer to mlan_adapter structure
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
* The firmware shutdown call succeeded.
|
* The firmware shutdown call succeeded.
|
||||||
|
@ -731,10 +722,10 @@ mlan_status mlan_init_fw(t_void *pmlan_adapter)
|
||||||
* MLAN_STATUS_FAILURE
|
* MLAN_STATUS_FAILURE
|
||||||
* The firmware shutdown call failed.
|
* The firmware shutdown call failed.
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_shutdown_fw(t_void *pmlan_adapter)
|
mlan_status mlan_shutdown_fw(t_void *padapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_PENDING;
|
mlan_status ret = MLAN_STATUS_PENDING;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
pmlan_buffer pmbuf;
|
pmlan_buffer pmbuf;
|
||||||
pmlan_ioctl_req pioctl_buf;
|
pmlan_ioctl_req pioctl_buf;
|
||||||
pmlan_callbacks pcb;
|
pmlan_callbacks pcb;
|
||||||
|
@ -742,7 +733,7 @@ mlan_status mlan_shutdown_fw(t_void *pmlan_adapter)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
MASSERT(pmlan_adapter);
|
MASSERT(padapter);
|
||||||
/* MLAN already shutdown */
|
/* MLAN already shutdown */
|
||||||
if (pmadapter->hw_status == WlanHardwareStatusNotReady) {
|
if (pmadapter->hw_status == WlanHardwareStatusNotReady) {
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -934,23 +925,24 @@ void mlan_block_rx_process(mlan_adapter *pmadapter, t_u8 block)
|
||||||
/**
|
/**
|
||||||
* @brief The receive process
|
* @brief The receive process
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to mlan_adapter structure
|
* @param padapter A pointer to mlan_adapter structure
|
||||||
* @param rx_pkts A pointer to save receive pkts number
|
* @param rx_pkts A pointer to save receive pkts number
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_rx_process(t_void *pmlan_adapter, t_u8 *rx_pkts)
|
mlan_status mlan_rx_process(t_void *padapter, t_u8 *rx_pkts)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
pmlan_callbacks pcb;
|
pmlan_callbacks pcb;
|
||||||
pmlan_buffer pmbuf;
|
pmlan_buffer pmbuf;
|
||||||
t_u8 limit = 0;
|
t_u8 limit = 0;
|
||||||
t_u8 rx_num = 0;
|
t_u8 rx_num = 0;
|
||||||
|
t_u32 in_ts_sec, in_ts_usec;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
MASSERT(pmlan_adapter);
|
MASSERT(padapter);
|
||||||
pcb = &pmadapter->callbacks;
|
pcb = &pmadapter->callbacks;
|
||||||
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->prx_proc_lock);
|
pcb->moal_spin_lock(pmadapter->pmoal_handle, pmadapter->prx_proc_lock);
|
||||||
if (pmadapter->mlan_rx_processing || pmadapter->rx_lock_flag) {
|
if (pmadapter->mlan_rx_processing || pmadapter->rx_lock_flag) {
|
||||||
|
@ -1004,10 +996,15 @@ rx_process_start:
|
||||||
pmadapter->rx_data_queue.plock);
|
pmadapter->rx_data_queue.plock);
|
||||||
|
|
||||||
// rx_trace 6
|
// rx_trace 6
|
||||||
if (pmadapter->tp_state_on)
|
if (pmadapter->tp_state_on) {
|
||||||
pmadapter->callbacks.moal_tp_accounting(
|
pmadapter->callbacks.moal_tp_accounting(
|
||||||
pmadapter->pmoal_handle, pmbuf,
|
pmadapter->pmoal_handle, pmbuf,
|
||||||
6 /*RX_DROP_P2*/);
|
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*/) {
|
if (pmadapter->tp_state_drop_point == 6 /*RX_DROP_P2*/) {
|
||||||
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
pmadapter->ops.data_complete(pmadapter, pmbuf, ret);
|
||||||
goto rx_process_start;
|
goto rx_process_start;
|
||||||
|
@ -1043,19 +1040,19 @@ exit_rx_proc:
|
||||||
/**
|
/**
|
||||||
* @brief The main process
|
* @brief The main process
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to mlan_adapter structure
|
* @param padapter A pointer to mlan_adapter structure
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_main_process(t_void *pmlan_adapter)
|
mlan_status mlan_main_process(t_void *padapter)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
pmlan_callbacks pcb;
|
pmlan_callbacks pcb;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
MASSERT(pmlan_adapter);
|
MASSERT(padapter);
|
||||||
|
|
||||||
pcb = &pmadapter->callbacks;
|
pcb = &pmadapter->callbacks;
|
||||||
|
|
||||||
|
@ -1158,11 +1155,15 @@ process_start:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (pmadapter->data_sent ||
|
if (pmadapter->data_sent ||
|
||||||
|
wlan_is_tdls_link_chan_switching(
|
||||||
|
pmadapter->tdls_status) ||
|
||||||
(wlan_bypass_tx_list_empty(pmadapter) &&
|
(wlan_bypass_tx_list_empty(pmadapter) &&
|
||||||
wlan_wmm_lists_empty(pmadapter)) ||
|
wlan_wmm_lists_empty(pmadapter)) ||
|
||||||
wlan_11h_radar_detected_tx_blocked(pmadapter)) {
|
wlan_11h_radar_detected_tx_blocked(pmadapter)) {
|
||||||
if (pmadapter->cmd_sent ||
|
if (pmadapter->cmd_sent ||
|
||||||
pmadapter->curr_cmd ||
|
pmadapter->curr_cmd ||
|
||||||
|
!wlan_is_send_cmd_allowed(
|
||||||
|
pmadapter->tdls_status) ||
|
||||||
!wlan_is_cmd_pending(pmadapter)) {
|
!wlan_is_cmd_pending(pmadapter)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1219,7 +1220,8 @@ process_start:
|
||||||
pmadapter->vdll_ctrl.pending_block_len);
|
pmadapter->vdll_ctrl.pending_block_len);
|
||||||
pmadapter->vdll_ctrl.pending_block = MNULL;
|
pmadapter->vdll_ctrl.pending_block = MNULL;
|
||||||
}
|
}
|
||||||
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd) {
|
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd &&
|
||||||
|
wlan_is_send_cmd_allowed(pmadapter->tdls_status)) {
|
||||||
if (wlan_exec_next_cmd(pmadapter) ==
|
if (wlan_exec_next_cmd(pmadapter) ==
|
||||||
MLAN_STATUS_FAILURE) {
|
MLAN_STATUS_FAILURE) {
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
|
@ -1229,6 +1231,7 @@ process_start:
|
||||||
|
|
||||||
if (!pmadapter->data_sent &&
|
if (!pmadapter->data_sent &&
|
||||||
!wlan_11h_radar_detected_tx_blocked(pmadapter) &&
|
!wlan_11h_radar_detected_tx_blocked(pmadapter) &&
|
||||||
|
!wlan_is_tdls_link_chan_switching(pmadapter->tdls_status) &&
|
||||||
!wlan_bypass_tx_list_empty(pmadapter)) {
|
!wlan_bypass_tx_list_empty(pmadapter)) {
|
||||||
PRINTM(MINFO, "mlan_send_pkt(): deq(bybass_txq)\n");
|
PRINTM(MINFO, "mlan_send_pkt(): deq(bybass_txq)\n");
|
||||||
wlan_process_bypass_tx(pmadapter);
|
wlan_process_bypass_tx(pmadapter);
|
||||||
|
@ -1242,7 +1245,8 @@ process_start:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pmadapter->data_sent && !wlan_wmm_lists_empty(pmadapter) &&
|
if (!pmadapter->data_sent && !wlan_wmm_lists_empty(pmadapter) &&
|
||||||
!wlan_11h_radar_detected_tx_blocked(pmadapter)) {
|
!wlan_11h_radar_detected_tx_blocked(pmadapter) &&
|
||||||
|
!wlan_is_tdls_link_chan_switching(pmadapter->tdls_status)) {
|
||||||
wlan_wmm_process_tx(pmadapter);
|
wlan_wmm_process_tx(pmadapter);
|
||||||
if (pmadapter->hs_activated == MTRUE) {
|
if (pmadapter->hs_activated == MTRUE) {
|
||||||
pmadapter->is_hs_configured = MFALSE;
|
pmadapter->is_hs_configured = MFALSE;
|
||||||
|
@ -1293,22 +1297,24 @@ exit_main_proc:
|
||||||
/**
|
/**
|
||||||
* @brief Function to send packet
|
* @brief Function to send packet
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to mlan_adapter structure
|
* @param padapter A pointer to mlan_adapter structure
|
||||||
* @param pmbuf A pointer to mlan_buffer structure
|
* @param pmbuf A pointer to mlan_buffer structure
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_PENDING
|
* @return MLAN_STATUS_PENDING
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_send_packet(t_void *pmlan_adapter, pmlan_buffer pmbuf)
|
mlan_status mlan_send_packet(t_void *padapter, pmlan_buffer pmbuf)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_PENDING;
|
mlan_status ret = MLAN_STATUS_PENDING;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
mlan_private *pmpriv;
|
mlan_private *pmpriv;
|
||||||
t_u16 eth_type = 0;
|
t_u16 eth_type = 0;
|
||||||
|
t_u8 ra[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
tdlsStatus_e tdls_status;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
MASSERT(pmlan_adapter && pmbuf);
|
MASSERT(padapter && pmbuf);
|
||||||
|
|
||||||
if (!pmlan_adapter || !pmbuf) {
|
if (!padapter || !pmbuf) {
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1323,9 +1329,19 @@ mlan_status mlan_send_packet(t_void *pmlan_adapter, pmlan_buffer pmbuf)
|
||||||
((eth_type == MLAN_ETHER_PKT_TYPE_EAPOL) ||
|
((eth_type == MLAN_ETHER_PKT_TYPE_EAPOL) ||
|
||||||
(eth_type == MLAN_ETHER_PKT_TYPE_ARP) ||
|
(eth_type == MLAN_ETHER_PKT_TYPE_ARP) ||
|
||||||
(eth_type == MLAN_ETHER_PKT_TYPE_WAPI))) ||
|
(eth_type == MLAN_ETHER_PKT_TYPE_WAPI))) ||
|
||||||
|
(eth_type == MLAN_ETHER_PKT_TYPE_TDLS_ACTION) ||
|
||||||
(pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA)
|
(pmbuf->buf_type == MLAN_BUF_TYPE_RAW_DATA)
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
if (eth_type == MLAN_ETHER_PKT_TYPE_TDLS_ACTION) {
|
||||||
|
memcpy_ext(pmadapter, ra,
|
||||||
|
pmbuf->pbuf + pmbuf->data_offset,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
tdls_status = wlan_get_tdls_link_status(pmpriv, ra);
|
||||||
|
if (MTRUE == wlan_is_tdls_link_setup(tdls_status) ||
|
||||||
|
!pmpriv->media_connected)
|
||||||
|
pmbuf->flags |= MLAN_BUF_FLAG_TDLS;
|
||||||
|
}
|
||||||
if (eth_type == MLAN_ETHER_PKT_TYPE_EAPOL) {
|
if (eth_type == MLAN_ETHER_PKT_TYPE_EAPOL) {
|
||||||
PRINTM_NETINTF(MMSG, pmpriv);
|
PRINTM_NETINTF(MMSG, pmpriv);
|
||||||
PRINTM(MMSG, "wlan: Send EAPOL pkt to " MACSTR "\n",
|
PRINTM(MMSG, "wlan: Send EAPOL pkt to " MACSTR "\n",
|
||||||
|
@ -1391,19 +1407,18 @@ exit:
|
||||||
/**
|
/**
|
||||||
* @brief Packet send completion callback
|
* @brief Packet send completion callback
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to mlan_adapter structure
|
* @param padapter A pointer to mlan_adapter structure
|
||||||
* @param pmbuf A pointer to mlan_buffer structure
|
* @param pmbuf A pointer to mlan_buffer structure
|
||||||
* @param port Data port
|
* @param port Data port
|
||||||
* @param status Callback status
|
* @param status Callback status
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_write_data_async_complete(t_void *pmlan_adapter,
|
mlan_status mlan_write_data_async_complete(t_void *padapter, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port,
|
t_u32 port, mlan_status status)
|
||||||
mlan_status status)
|
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -1424,17 +1439,17 @@ mlan_status mlan_write_data_async_complete(t_void *pmlan_adapter,
|
||||||
/**
|
/**
|
||||||
* @brief Packet receive handler
|
* @brief Packet receive handler
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to mlan_adapter structure
|
* @param padapter A pointer to mlan_adapter structure
|
||||||
* @param pmbuf A pointer to mlan_buffer structure
|
* @param pmbuf A pointer to mlan_buffer structure
|
||||||
* @param port Data port
|
* @param port Data port
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or
|
||||||
* MLAN_STATUS_PENDING
|
* MLAN_STATUS_PENDING
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_recv(t_void *pmlan_adapter, pmlan_buffer pmbuf, t_u32 port)
|
mlan_status mlan_recv(t_void *padapter, pmlan_buffer pmbuf, t_u32 port)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_PENDING;
|
mlan_status ret = MLAN_STATUS_PENDING;
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
t_u8 *pbuf;
|
t_u8 *pbuf;
|
||||||
t_u32 len, recv_type;
|
t_u32 len, recv_type;
|
||||||
t_u32 event_cause;
|
t_u32 event_cause;
|
||||||
|
@ -1445,7 +1460,7 @@ mlan_status mlan_recv(t_void *pmlan_adapter, pmlan_buffer pmbuf, t_u32 port)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
MASSERT(pmlan_adapter && pmbuf);
|
MASSERT(padapter && pmbuf);
|
||||||
|
|
||||||
if (pmadapter->hs_activated == MTRUE)
|
if (pmadapter->hs_activated == MTRUE)
|
||||||
wlan_process_hs_config(pmadapter);
|
wlan_process_hs_config(pmadapter);
|
||||||
|
@ -1576,16 +1591,16 @@ mlan_status mlan_recv(t_void *pmlan_adapter, pmlan_buffer pmbuf, t_u32 port)
|
||||||
/**
|
/**
|
||||||
* @brief Packet receive completion callback handler
|
* @brief Packet receive completion callback handler
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to mlan_adapter structure
|
* @param padapter A pointer to mlan_adapter structure
|
||||||
* @param pmbuf A pointer to mlan_buffer structure
|
* @param pmbuf A pointer to mlan_buffer structure
|
||||||
* @param status Callback status
|
* @param status Callback status
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
mlan_status mlan_recv_packet_complete(t_void *pmlan_adapter, pmlan_buffer pmbuf,
|
mlan_status mlan_recv_packet_complete(t_void *padapter, pmlan_buffer pmbuf,
|
||||||
mlan_status status)
|
mlan_status status)
|
||||||
{
|
{
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
wlan_recv_packet_complete(pmadapter, pmbuf, status);
|
wlan_recv_packet_complete(pmadapter, pmbuf, status);
|
||||||
|
@ -1596,15 +1611,15 @@ mlan_status mlan_recv_packet_complete(t_void *pmlan_adapter, pmlan_buffer pmbuf,
|
||||||
/**
|
/**
|
||||||
* @brief select wmm queue
|
* @brief select wmm queue
|
||||||
*
|
*
|
||||||
* @param pmlan_adapter A pointer to mlan_adapter structure
|
* @param padapter A pointer to mlan_adapter structure
|
||||||
* @param bss_num BSS number
|
* @param bss_num BSS number
|
||||||
* @param tid TID
|
* @param tid TID
|
||||||
*
|
*
|
||||||
* @return wmm queue priority (0 - 3)
|
* @return wmm queue priority (0 - 3)
|
||||||
*/
|
*/
|
||||||
t_u8 mlan_select_wmm_queue(t_void *pmlan_adapter, t_u8 bss_num, t_u8 tid)
|
t_u8 mlan_select_wmm_queue(t_void *padapter, t_u8 bss_num, t_u8 tid)
|
||||||
{
|
{
|
||||||
mlan_adapter *pmadapter = (mlan_adapter *)pmlan_adapter;
|
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||||
pmlan_private pmpriv = pmadapter->priv[bss_num];
|
pmlan_private pmpriv = pmadapter->priv[bss_num];
|
||||||
t_u8 ret;
|
t_u8 ret;
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* it is ready.
|
* it is ready.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -399,6 +399,13 @@ static mlan_status wlan_cmd_mfg_tx_frame(pmlan_private pmpriv,
|
||||||
mcmd->tx_bf = wlan_cpu_to_le32(cfg->tx_bf);
|
mcmd->tx_bf = wlan_cpu_to_le32(cfg->tx_bf);
|
||||||
mcmd->gf_mode = wlan_cpu_to_le32(cfg->gf_mode);
|
mcmd->gf_mode = wlan_cpu_to_le32(cfg->gf_mode);
|
||||||
mcmd->stbc = wlan_cpu_to_le32(cfg->stbc);
|
mcmd->stbc = wlan_cpu_to_le32(cfg->stbc);
|
||||||
|
mcmd->NumPkt = wlan_cpu_to_le32(cfg->NumPkt);
|
||||||
|
mcmd->MaxPE = wlan_cpu_to_le32(cfg->MaxPE);
|
||||||
|
mcmd->BeamChange = wlan_cpu_to_le32(cfg->BeamChange);
|
||||||
|
mcmd->Dcm = wlan_cpu_to_le32(cfg->Dcm);
|
||||||
|
mcmd->Doppler = wlan_cpu_to_le32(cfg->Doppler);
|
||||||
|
mcmd->MidP = wlan_cpu_to_le32(cfg->MidP);
|
||||||
|
mcmd->QNum = wlan_cpu_to_le32(cfg->QNum);
|
||||||
memcpy_ext(pmpriv->adapter, mcmd->bssid, cfg->bssid,
|
memcpy_ext(pmpriv->adapter, mcmd->bssid, cfg->bssid,
|
||||||
MLAN_MAC_ADDR_LENGTH, sizeof(mcmd->bssid));
|
MLAN_MAC_ADDR_LENGTH, sizeof(mcmd->bssid));
|
||||||
}
|
}
|
||||||
|
@ -407,6 +414,42 @@ static mlan_status wlan_cmd_mfg_tx_frame(pmlan_private pmpriv,
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function prepares command of MFG HE TB Tx.
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||||
|
* @param action The action: GET or SET
|
||||||
|
* @param pdata_buf A pointer to data buffer
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_SUCCESS
|
||||||
|
*/
|
||||||
|
|
||||||
|
mlan_status wlan_cmd_mfg_he_tb_tx(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
|
t_u16 action, t_void *pdata_buf)
|
||||||
|
{
|
||||||
|
struct mfg_Cmd_HE_TBTx_t *mcmd =
|
||||||
|
(struct mfg_Cmd_HE_TBTx_t *)&cmd->params.mfg_he_power;
|
||||||
|
struct mfg_Cmd_HE_TBTx_t *cfg = (struct mfg_Cmd_HE_TBTx_t *)pdata_buf;
|
||||||
|
ENTER();
|
||||||
|
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_MFG_COMMAND);
|
||||||
|
cmd->size =
|
||||||
|
wlan_cpu_to_le16(sizeof(struct mfg_Cmd_HE_TBTx_t) + S_DS_GEN);
|
||||||
|
|
||||||
|
mcmd->mfg_cmd = wlan_cpu_to_le32(cfg->mfg_cmd);
|
||||||
|
mcmd->action = wlan_cpu_to_le16(action);
|
||||||
|
if (action == HostCmd_ACT_GEN_SET) {
|
||||||
|
mcmd->enable = wlan_cpu_to_le16(cfg->enable);
|
||||||
|
mcmd->qnum = wlan_cpu_to_le16(cfg->qnum);
|
||||||
|
mcmd->aid = wlan_cpu_to_le16(cfg->aid);
|
||||||
|
mcmd->axq_mu_timer = wlan_cpu_to_le16(cfg->axq_mu_timer);
|
||||||
|
mcmd->tx_power = wlan_cpu_to_le16(cfg->tx_power);
|
||||||
|
}
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function prepares command of MFG cmd.
|
* @brief This function prepares command of MFG cmd.
|
||||||
*
|
*
|
||||||
|
@ -439,6 +482,9 @@ mlan_status wlan_cmd_mfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
case MFG_CMD_TX_FRAME:
|
case MFG_CMD_TX_FRAME:
|
||||||
ret = wlan_cmd_mfg_tx_frame(pmpriv, cmd, action, pdata_buf);
|
ret = wlan_cmd_mfg_tx_frame(pmpriv, cmd, action, pdata_buf);
|
||||||
goto cmd_mfg_done;
|
goto cmd_mfg_done;
|
||||||
|
case MFG_CMD_CONFIG_MAC_HE_TB_TX:
|
||||||
|
ret = wlan_cmd_mfg_he_tb_tx(pmpriv, cmd, action, pdata_buf);
|
||||||
|
goto cmd_mfg_done;
|
||||||
case MFG_CMD_SET_TEST_MODE:
|
case MFG_CMD_SET_TEST_MODE:
|
||||||
case MFG_CMD_UNSET_TEST_MODE:
|
case MFG_CMD_UNSET_TEST_MODE:
|
||||||
case MFG_CMD_TX_ANT:
|
case MFG_CMD_TX_ANT:
|
||||||
|
@ -447,6 +493,7 @@ mlan_status wlan_cmd_mfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||||
case MFG_CMD_CLR_RX_ERR:
|
case MFG_CMD_CLR_RX_ERR:
|
||||||
case MFG_CMD_RF_BAND_AG:
|
case MFG_CMD_RF_BAND_AG:
|
||||||
case MFG_CMD_RF_CHANNELBW:
|
case MFG_CMD_RF_CHANNELBW:
|
||||||
|
case MFG_CMD_RADIO_MODE_CFG:
|
||||||
case MFG_CMD_RFPWR:
|
case MFG_CMD_RFPWR:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1552,6 +1599,495 @@ static mlan_status wlan_cmd_mgmt_ie_list(pmlan_private pmpriv,
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function prepares command of TDLS configuration.
|
||||||
|
*
|
||||||
|
* @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_tdls_config(pmlan_private pmpriv,
|
||||||
|
HostCmd_DS_COMMAND *cmd,
|
||||||
|
t_u16 cmd_action, t_void *pdata_buf)
|
||||||
|
{
|
||||||
|
t_u16 travel_len = 0;
|
||||||
|
mlan_ds_misc_tdls_config *tdls_config = MNULL;
|
||||||
|
tdls_all_config *tdls_all_cfg = MNULL;
|
||||||
|
HostCmd_DS_TDLS_CONFIG *ptdls_config_data =
|
||||||
|
&(cmd->params.tdls_config_data);
|
||||||
|
t_u8 zero_mac[] = {0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TDLS_CONFIG);
|
||||||
|
cmd->size = sizeof(HostCmd_DS_TDLS_CONFIG) + S_DS_GEN;
|
||||||
|
cmd->result = 0;
|
||||||
|
|
||||||
|
tdls_config = (mlan_ds_misc_tdls_config *)pdata_buf;
|
||||||
|
ptdls_config_data->tdls_info.tdls_action =
|
||||||
|
wlan_cpu_to_le16(tdls_config->tdls_action);
|
||||||
|
|
||||||
|
tdls_all_cfg = (tdls_all_config *)tdls_config->tdls_data;
|
||||||
|
|
||||||
|
switch (tdls_config->tdls_action) {
|
||||||
|
case WLAN_TDLS_CONFIG:
|
||||||
|
travel_len = sizeof(tdls_all_cfg->u.tdls_config);
|
||||||
|
tdls_all_cfg->u.tdls_config.enable =
|
||||||
|
wlan_cpu_to_le16(tdls_all_cfg->u.tdls_config.enable);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
&tdls_all_cfg->u.tdls_setup, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_SET_INFO:
|
||||||
|
travel_len = tdls_all_cfg->u.tdls_set.tlv_length;
|
||||||
|
if ((travel_len + sizeof(t_u16)) > MAX_TDLS_DATA_LEN) {
|
||||||
|
PRINTM(MERROR, "TDLS configuration overflow\n");
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_FAILURE;
|
||||||
|
}
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
(t_u8 *)&tdls_all_cfg->u.tdls_set.cap_info,
|
||||||
|
sizeof(t_u16), sizeof(t_u16));
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
(t_u8 *)ptdls_config_data->tdls_info.tdls_data +
|
||||||
|
sizeof(t_u16),
|
||||||
|
&tdls_all_cfg->u.tdls_set.tlv_buffer, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN - sizeof(t_u16));
|
||||||
|
travel_len += sizeof(t_u16);
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_DISCOVERY_REQ:
|
||||||
|
travel_len = MLAN_MAC_ADDR_LENGTH;
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
tdls_all_cfg->u.tdls_discovery.peer_mac_addr,
|
||||||
|
travel_len, MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_SETUP_REQ:
|
||||||
|
travel_len = sizeof(tdls_all_cfg->u.tdls_setup);
|
||||||
|
tdls_all_cfg->u.tdls_setup.setup_timeout = wlan_cpu_to_le32(
|
||||||
|
tdls_all_cfg->u.tdls_setup.setup_timeout);
|
||||||
|
tdls_all_cfg->u.tdls_setup.key_lifetime = wlan_cpu_to_le32(
|
||||||
|
tdls_all_cfg->u.tdls_setup.key_lifetime);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
&tdls_all_cfg->u.tdls_setup, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_TEAR_DOWN_REQ:
|
||||||
|
travel_len = sizeof(tdls_all_cfg->u.tdls_tear_down);
|
||||||
|
tdls_all_cfg->u.tdls_tear_down.reason_code = wlan_cpu_to_le16(
|
||||||
|
tdls_all_cfg->u.tdls_tear_down.reason_code);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
&tdls_all_cfg->u.tdls_tear_down, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_STOP_CHAN_SWITCH:
|
||||||
|
travel_len = MLAN_MAC_ADDR_LENGTH;
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
tdls_all_cfg->u.tdls_stop_chan_switch.peer_mac_addr,
|
||||||
|
travel_len, MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_INIT_CHAN_SWITCH:
|
||||||
|
travel_len = sizeof(tdls_all_cfg->u.tdls_chan_switch);
|
||||||
|
tdls_all_cfg->u.tdls_chan_switch.switch_time = wlan_cpu_to_le16(
|
||||||
|
tdls_all_cfg->u.tdls_chan_switch.switch_time);
|
||||||
|
tdls_all_cfg->u.tdls_chan_switch.switch_timeout =
|
||||||
|
wlan_cpu_to_le16(
|
||||||
|
tdls_all_cfg->u.tdls_chan_switch.switch_timeout);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
&tdls_all_cfg->u.tdls_chan_switch, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_CS_PARAMS:
|
||||||
|
travel_len = sizeof(tdls_all_cfg->u.tdls_cs_params);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
&tdls_all_cfg->u.tdls_cs_params, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_CS_DISABLE:
|
||||||
|
travel_len = sizeof(tdls_all_cfg->u.tdls_disable_cs);
|
||||||
|
tdls_all_cfg->u.tdls_disable_cs.data =
|
||||||
|
wlan_cpu_to_le16(tdls_all_cfg->u.tdls_disable_cs.data);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
&tdls_all_cfg->u.tdls_disable_cs, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_POWER_MODE:
|
||||||
|
travel_len = sizeof(tdls_all_cfg->u.tdls_power_mode);
|
||||||
|
tdls_all_cfg->u.tdls_power_mode.power_mode = wlan_cpu_to_le16(
|
||||||
|
tdls_all_cfg->u.tdls_power_mode.power_mode);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
&tdls_all_cfg->u.tdls_power_mode, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_LINK_STATUS:
|
||||||
|
travel_len = 0;
|
||||||
|
if (memcmp(pmpriv->adapter,
|
||||||
|
tdls_all_cfg->u.tdls_link_status_req.peer_mac_addr,
|
||||||
|
zero_mac, sizeof(zero_mac))) {
|
||||||
|
travel_len =
|
||||||
|
sizeof(tdls_all_cfg->u.tdls_link_status_req);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
tdls_all_cfg->u.tdls_link_status_req
|
||||||
|
.peer_mac_addr,
|
||||||
|
travel_len, MAX_TDLS_DATA_LEN);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_DEBUG_ALLOW_WEAK_SECURITY:
|
||||||
|
case WLAN_TDLS_DEBUG_SETUP_SAME_LINK:
|
||||||
|
case WLAN_TDLS_DEBUG_FAIL_SETUP_CONFIRM:
|
||||||
|
case WLAN_TDLS_DEBUG_WRONG_BSS:
|
||||||
|
case WLAN_TDLS_DEBUG_SETUP_PROHIBITED:
|
||||||
|
case WLAN_TDLS_DEBUG_HIGHER_LOWER_MAC:
|
||||||
|
case WLAN_TDLS_DEBUG_IGNORE_KEY_EXPIRY:
|
||||||
|
case WLAN_TDLS_DEBUG_STOP_RX:
|
||||||
|
case WLAN_TDLS_DEBUG_CS_RET_IM:
|
||||||
|
travel_len = sizeof(tdls_all_cfg->u.tdls_debug_data);
|
||||||
|
tdls_all_cfg->u.tdls_debug_data.debug_data = wlan_cpu_to_le16(
|
||||||
|
tdls_all_cfg->u.tdls_debug_data.debug_data);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
ptdls_config_data->tdls_info.tdls_data,
|
||||||
|
&tdls_all_cfg->u.tdls_debug_data, travel_len,
|
||||||
|
MAX_TDLS_DATA_LEN);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd->size += travel_len;
|
||||||
|
cmd->size -= MAX_TDLS_DATA_LEN;
|
||||||
|
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function prepares command of TDLS create/config/delete
|
||||||
|
*
|
||||||
|
* @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_tdls_oper(pmlan_private pmpriv,
|
||||||
|
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
||||||
|
t_void *pdata_buf)
|
||||||
|
{
|
||||||
|
t_u16 travel_len = 0;
|
||||||
|
mlan_ds_misc_tdls_oper *tdls_oper = MNULL;
|
||||||
|
HostCmd_DS_TDLS_OPER *ptdls_oper = &(cmd->params.tdls_oper_data);
|
||||||
|
sta_node *sta_ptr;
|
||||||
|
t_u8 *pos;
|
||||||
|
MrvlIEtypes_RatesParamSet_t *Rate_tlv = MNULL;
|
||||||
|
MrvlIETypes_HTCap_t *HTcap_tlv = MNULL;
|
||||||
|
MrvlIETypes_HTInfo_t *HTInfo_tlv = MNULL;
|
||||||
|
MrvlIETypes_2040BSSCo_t *BSSCo = MNULL;
|
||||||
|
MrvlIETypes_ExtCap_t *ExCap = MNULL;
|
||||||
|
MrvlIEtypes_RsnParamSet_t *Rsn_ie = MNULL;
|
||||||
|
MrvlIETypes_qosinfo_t *qos_info = MNULL;
|
||||||
|
MrvlIETypes_LinkIDElement_t *LinkID = MNULL;
|
||||||
|
BSSDescriptor_t *pbss_desc = &pmpriv->curr_bss_params.bss_descriptor;
|
||||||
|
MrvlIETypes_VHTCap_t *VHTcap_tlv = MNULL;
|
||||||
|
MrvlIETypes_VHTOprat_t *VHTOper_tlv = MNULL;
|
||||||
|
MrvlIETypes_AID_t *AidInfo = MNULL;
|
||||||
|
MrvlIEtypes_TDLS_Idle_Timeout_t *TdlsIdleTimeout = MNULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_TDLS_OPERATION);
|
||||||
|
cmd->size = sizeof(HostCmd_DS_TDLS_OPER) + S_DS_GEN;
|
||||||
|
cmd->result = 0;
|
||||||
|
|
||||||
|
tdls_oper = (mlan_ds_misc_tdls_oper *)pdata_buf;
|
||||||
|
ptdls_oper->reason = 0;
|
||||||
|
memcpy_ext(pmpriv->adapter, ptdls_oper->peer_mac, tdls_oper->peer_mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
sta_ptr = wlan_get_station_entry(pmpriv, tdls_oper->peer_mac);
|
||||||
|
pos = (t_u8 *)ptdls_oper + sizeof(HostCmd_DS_TDLS_OPER);
|
||||||
|
switch (tdls_oper->tdls_action) {
|
||||||
|
case WLAN_TDLS_CREATE_LINK:
|
||||||
|
if (sta_ptr)
|
||||||
|
sta_ptr->status = TDLS_SETUP_INPROGRESS;
|
||||||
|
ptdls_oper->tdls_action = wlan_cpu_to_le16(TDLS_CREATE);
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_CONFIG_LINK:
|
||||||
|
if (sta_ptr) {
|
||||||
|
ptdls_oper->tdls_action = wlan_cpu_to_le16(TDLS_CONFIG);
|
||||||
|
/*capability*/
|
||||||
|
*(t_u16 *)pos = wlan_cpu_to_le16(sta_ptr->capability);
|
||||||
|
travel_len += sizeof(sta_ptr->capability);
|
||||||
|
|
||||||
|
/*supported rate*/
|
||||||
|
Rate_tlv = (MrvlIEtypes_RatesParamSet_t *)(pos +
|
||||||
|
travel_len);
|
||||||
|
Rate_tlv->header.type =
|
||||||
|
wlan_cpu_to_le16(TLV_TYPE_RATES);
|
||||||
|
Rate_tlv->header.len =
|
||||||
|
wlan_cpu_to_le16(sta_ptr->rate_len);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
pos + travel_len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t),
|
||||||
|
sta_ptr->support_rate, sta_ptr->rate_len,
|
||||||
|
sta_ptr->rate_len);
|
||||||
|
travel_len +=
|
||||||
|
sizeof(MrvlIEtypesHeader_t) + sta_ptr->rate_len;
|
||||||
|
|
||||||
|
/*Extended capability */
|
||||||
|
if (sta_ptr->ExtCap.ieee_hdr.element_id ==
|
||||||
|
EXT_CAPABILITY) {
|
||||||
|
ExCap = (MrvlIETypes_ExtCap_t *)(pos +
|
||||||
|
travel_len);
|
||||||
|
ExCap->header.type =
|
||||||
|
wlan_cpu_to_le16(TLV_TYPE_EXTCAP);
|
||||||
|
ExCap->header.len = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->ExtCap.ieee_hdr.len);
|
||||||
|
memcpy_ext(pmpriv->adapter, &ExCap->ext_cap,
|
||||||
|
&sta_ptr->ExtCap.ext_cap,
|
||||||
|
sta_ptr->ExtCap.ieee_hdr.len,
|
||||||
|
sta_ptr->ExtCap.ieee_hdr.len);
|
||||||
|
travel_len += sta_ptr->ExtCap.ieee_hdr.len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t);
|
||||||
|
}
|
||||||
|
if (ExCap) {
|
||||||
|
if (pmpriv->host_tdls_uapsd_support &&
|
||||||
|
ISSUPP_EXTCAP_TDLS_UAPSD(ExCap->ext_cap)) {
|
||||||
|
/* qos_info */
|
||||||
|
qos_info =
|
||||||
|
(MrvlIETypes_qosinfo_t
|
||||||
|
*)(pos + travel_len);
|
||||||
|
qos_info->header.type =
|
||||||
|
wlan_cpu_to_le16(QOS_INFO);
|
||||||
|
qos_info->header.len =
|
||||||
|
wlan_cpu_to_le16(sizeof(t_u8));
|
||||||
|
qos_info->qos_info = sta_ptr->qos_info;
|
||||||
|
travel_len +=
|
||||||
|
sizeof(MrvlIETypes_qosinfo_t);
|
||||||
|
} else {
|
||||||
|
RESET_EXTCAP_TDLS_UAPSD(ExCap->ext_cap);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(pmpriv->host_tdls_cs_support &&
|
||||||
|
ISSUPP_EXTCAP_TDLS_CHAN_SWITCH(
|
||||||
|
ExCap->ext_cap)))
|
||||||
|
RESET_EXTCAP_TDLS_CHAN_SWITCH(
|
||||||
|
ExCap->ext_cap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*RSN ie*/
|
||||||
|
if (sta_ptr->rsn_ie.ieee_hdr.element_id == RSN_IE) {
|
||||||
|
Rsn_ie = (MrvlIEtypes_RsnParamSet_t
|
||||||
|
*)(pos + travel_len);
|
||||||
|
Rsn_ie->header.type = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->rsn_ie.ieee_hdr.element_id);
|
||||||
|
Rsn_ie->header.len = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->rsn_ie.ieee_hdr.len);
|
||||||
|
memcpy_ext(pmpriv->adapter, Rsn_ie->rsn_ie,
|
||||||
|
sta_ptr->rsn_ie.data,
|
||||||
|
sta_ptr->rsn_ie.ieee_hdr.len,
|
||||||
|
sta_ptr->rsn_ie.ieee_hdr.len);
|
||||||
|
travel_len += sta_ptr->rsn_ie.ieee_hdr.len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t);
|
||||||
|
}
|
||||||
|
/*Link ID*/
|
||||||
|
if (sta_ptr->link_ie.element_id == LINK_ID) {
|
||||||
|
LinkID = (MrvlIETypes_LinkIDElement_t
|
||||||
|
*)(pos + travel_len);
|
||||||
|
LinkID->header.type = wlan_cpu_to_le16(LINK_ID);
|
||||||
|
LinkID->header.len =
|
||||||
|
wlan_cpu_to_le16(sta_ptr->link_ie.len);
|
||||||
|
memcpy_ext(pmpriv->adapter, &LinkID->bssid,
|
||||||
|
&sta_ptr->link_ie.bssid,
|
||||||
|
sta_ptr->link_ie.len,
|
||||||
|
sizeof(LinkID->bssid));
|
||||||
|
travel_len += sta_ptr->link_ie.len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t);
|
||||||
|
}
|
||||||
|
/*HT capability*/
|
||||||
|
if (sta_ptr->HTcap.ieee_hdr.element_id ==
|
||||||
|
HT_CAPABILITY) {
|
||||||
|
HTcap_tlv = (MrvlIETypes_HTCap_t *)(pos +
|
||||||
|
travel_len);
|
||||||
|
HTcap_tlv->header.type =
|
||||||
|
wlan_cpu_to_le16(TLV_TYPE_HT_CAP);
|
||||||
|
HTcap_tlv->header.len = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->HTcap.ieee_hdr.len);
|
||||||
|
memcpy_ext(pmpriv->adapter, &HTcap_tlv->ht_cap,
|
||||||
|
&sta_ptr->HTcap.ht_cap,
|
||||||
|
sta_ptr->HTcap.ieee_hdr.len,
|
||||||
|
sizeof(HTcap_tlv->ht_cap));
|
||||||
|
travel_len += sta_ptr->HTcap.ieee_hdr.len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t);
|
||||||
|
}
|
||||||
|
if (HTcap_tlv) {
|
||||||
|
if (pmpriv->host_tdls_cs_support &&
|
||||||
|
(pmpriv->adapter->fw_bands & BAND_A))
|
||||||
|
wlan_fill_ht_cap_tlv(pmpriv, HTcap_tlv,
|
||||||
|
BAND_A, MFALSE);
|
||||||
|
else
|
||||||
|
wlan_fill_ht_cap_tlv(
|
||||||
|
pmpriv, HTcap_tlv,
|
||||||
|
pbss_desc->bss_band, MFALSE);
|
||||||
|
DBG_HEXDUMP(MCMD_D, "FW htcap",
|
||||||
|
(t_u8 *)HTcap_tlv,
|
||||||
|
sizeof(MrvlIETypes_HTCap_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*HT info*/
|
||||||
|
if (sta_ptr->HTInfo.ieee_hdr.element_id ==
|
||||||
|
HT_OPERATION) {
|
||||||
|
HTInfo_tlv =
|
||||||
|
(MrvlIETypes_HTInfo_t *)(pos +
|
||||||
|
travel_len);
|
||||||
|
HTInfo_tlv->header.type =
|
||||||
|
wlan_cpu_to_le16(TLV_TYPE_HT_INFO);
|
||||||
|
HTInfo_tlv->header.len = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->HTInfo.ieee_hdr.len);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
&HTInfo_tlv->ht_info,
|
||||||
|
&sta_ptr->HTInfo.ht_info,
|
||||||
|
sta_ptr->HTInfo.ieee_hdr.len,
|
||||||
|
sizeof(HTInfo_tlv->ht_info));
|
||||||
|
travel_len += sta_ptr->HTInfo.ieee_hdr.len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t);
|
||||||
|
DBG_HEXDUMP(MCMD_D, "HT Info",
|
||||||
|
(t_u8 *)HTInfo_tlv,
|
||||||
|
sizeof(MrvlIETypes_HTInfo_t));
|
||||||
|
}
|
||||||
|
/*20/40 BSS co-exist*/
|
||||||
|
if (sta_ptr->BSSCO_20_40.ieee_hdr.element_id ==
|
||||||
|
BSSCO_2040) {
|
||||||
|
BSSCo = (MrvlIETypes_2040BSSCo_t *)(pos +
|
||||||
|
travel_len);
|
||||||
|
BSSCo->header.type = wlan_cpu_to_le16(
|
||||||
|
TLV_TYPE_2040BSS_COEXISTENCE);
|
||||||
|
BSSCo->header.len = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->BSSCO_20_40.ieee_hdr.len);
|
||||||
|
memcpy_ext(pmpriv->adapter, &BSSCo->bss_co_2040,
|
||||||
|
&sta_ptr->BSSCO_20_40.bss_co_2040,
|
||||||
|
sta_ptr->BSSCO_20_40.ieee_hdr.len,
|
||||||
|
sizeof(BSSCo->bss_co_2040));
|
||||||
|
travel_len +=
|
||||||
|
sta_ptr->BSSCO_20_40.ieee_hdr.len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t);
|
||||||
|
}
|
||||||
|
/* Check if we need enable the 11AC */
|
||||||
|
if (sta_ptr && sta_ptr->vht_oprat.ieee_hdr.element_id ==
|
||||||
|
VHT_OPERATION) {
|
||||||
|
/** AID */
|
||||||
|
if (sta_ptr->aid_info.ieee_hdr.element_id ==
|
||||||
|
AID_INFO) {
|
||||||
|
AidInfo = (MrvlIETypes_AID_t
|
||||||
|
*)(pos + travel_len);
|
||||||
|
AidInfo->header.type =
|
||||||
|
wlan_cpu_to_le16(AID_INFO);
|
||||||
|
AidInfo->header.len = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->aid_info.ieee_hdr.len);
|
||||||
|
AidInfo->AID = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->aid_info.AID);
|
||||||
|
}
|
||||||
|
/* Vht capability */
|
||||||
|
if (sta_ptr->vht_cap.ieee_hdr.element_id ==
|
||||||
|
VHT_CAPABILITY) {
|
||||||
|
VHTcap_tlv =
|
||||||
|
(MrvlIETypes_VHTCap_t
|
||||||
|
*)(pos + travel_len);
|
||||||
|
VHTcap_tlv->header.type =
|
||||||
|
wlan_cpu_to_le16(
|
||||||
|
VHT_CAPABILITY);
|
||||||
|
VHTcap_tlv->header
|
||||||
|
.len = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->vht_cap.ieee_hdr.len);
|
||||||
|
memcpy_ext(
|
||||||
|
pmpriv->adapter,
|
||||||
|
&VHTcap_tlv->vht_cap,
|
||||||
|
&sta_ptr->vht_cap.vht_cap,
|
||||||
|
sta_ptr->vht_cap.ieee_hdr.len,
|
||||||
|
sizeof(VHTcap_tlv->vht_cap));
|
||||||
|
travel_len +=
|
||||||
|
sta_ptr->vht_cap.ieee_hdr.len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t);
|
||||||
|
}
|
||||||
|
if (VHTcap_tlv) {
|
||||||
|
wlan_fill_vht_cap_tlv(
|
||||||
|
pmpriv, VHTcap_tlv,
|
||||||
|
pbss_desc->bss_band, MTRUE,
|
||||||
|
MTRUE);
|
||||||
|
DBG_HEXDUMP(
|
||||||
|
MCMD_D, "FW Vhtcap",
|
||||||
|
(t_u8 *)VHTcap_tlv,
|
||||||
|
sizeof(MrvlIETypes_VHTCap_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Vht operation*/
|
||||||
|
VHTOper_tlv =
|
||||||
|
(MrvlIETypes_VHTOprat_t *)(pos +
|
||||||
|
travel_len);
|
||||||
|
VHTOper_tlv->header.type =
|
||||||
|
wlan_cpu_to_le16(VHT_OPERATION);
|
||||||
|
VHTOper_tlv->header.len = wlan_cpu_to_le16(
|
||||||
|
sta_ptr->vht_oprat.ieee_hdr.len);
|
||||||
|
memcpy_ext(pmpriv->adapter,
|
||||||
|
&VHTOper_tlv->chan_width,
|
||||||
|
&sta_ptr->vht_oprat.chan_width,
|
||||||
|
sta_ptr->vht_oprat.ieee_hdr.len,
|
||||||
|
sizeof(VHTOper_tlv->chan_width));
|
||||||
|
VHTOper_tlv->basic_MCS_map = wlan_cpu_to_le16(
|
||||||
|
VHTOper_tlv->basic_MCS_map);
|
||||||
|
travel_len += sta_ptr->vht_oprat.ieee_hdr.len +
|
||||||
|
sizeof(MrvlIEtypesHeader_t);
|
||||||
|
DBG_HEXDUMP(MCMD_D, "VHT operation",
|
||||||
|
(t_u8 *)VHTOper_tlv,
|
||||||
|
sizeof(MrvlIETypes_VHTOprat_t));
|
||||||
|
}
|
||||||
|
TdlsIdleTimeout =
|
||||||
|
(MrvlIEtypes_TDLS_Idle_Timeout_t *)(pos +
|
||||||
|
travel_len);
|
||||||
|
TdlsIdleTimeout->header.type =
|
||||||
|
wlan_cpu_to_le16(TLV_TYPE_TDLS_IDLE_TIMEOUT);
|
||||||
|
TdlsIdleTimeout->header.len =
|
||||||
|
sizeof(TdlsIdleTimeout->value);
|
||||||
|
TdlsIdleTimeout->header.len =
|
||||||
|
wlan_cpu_to_le16(TdlsIdleTimeout->header.len);
|
||||||
|
TdlsIdleTimeout->value =
|
||||||
|
wlan_cpu_to_le16(pmpriv->tdls_idle_time);
|
||||||
|
travel_len += sizeof(MrvlIEtypes_TDLS_Idle_Timeout_t);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_DISABLE_LINK:
|
||||||
|
ptdls_oper->tdls_action = wlan_cpu_to_le16(TDLS_DELETE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
cmd->size += travel_len;
|
||||||
|
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function prepares system clock cfg command
|
* @brief This function prepares system clock cfg command
|
||||||
*
|
*
|
||||||
|
@ -2004,9 +2540,9 @@ static mlan_status wlan_cmd_dfs_repeater_cfg(pmlan_private pmpriv,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_cmd_coalesce_config(pmlan_private pmpriv,
|
static mlan_status wlan_cmd_coalesce_config(pmlan_private pmpriv,
|
||||||
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
HostCmd_DS_COMMAND *cmd,
|
||||||
t_void *pdata_buf)
|
t_u16 cmd_action, t_void *pdata_buf)
|
||||||
{
|
{
|
||||||
HostCmd_DS_COALESCE_CONFIG *coalesce_config =
|
HostCmd_DS_COALESCE_CONFIG *coalesce_config =
|
||||||
&cmd->params.coalesce_config;
|
&cmd->params.coalesce_config;
|
||||||
|
@ -2319,7 +2855,7 @@ static mlan_status wlan_cmd_auto_tx(pmlan_private pmpriv,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_is_cmd_allowed(mlan_private *priv, t_u16 cmd_no)
|
static mlan_status wlan_is_cmd_allowed(mlan_private *priv, t_u16 cmd_no)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
@ -2437,6 +2973,10 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
||||||
ret = wlan_cmd_ssu(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
ret = wlan_cmd_ssu(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
case HostCmd_CMD_HAL_PHY_CFG:
|
||||||
|
ret = wlan_cmd_hal_phy_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||||
|
pdata_buf);
|
||||||
|
break;
|
||||||
case HOST_CMD_PMIC_CONFIGURE:
|
case HOST_CMD_PMIC_CONFIGURE:
|
||||||
cmd_ptr->command = wlan_cpu_to_le16(cmd_no);
|
cmd_ptr->command = wlan_cpu_to_le16(cmd_no);
|
||||||
cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN);
|
cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN);
|
||||||
|
@ -2640,6 +3180,14 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
||||||
ret = wlan_cmd_mgmt_ie_list(pmpriv, cmd_ptr, cmd_action,
|
ret = wlan_cmd_mgmt_ie_list(pmpriv, cmd_ptr, cmd_action,
|
||||||
pdata_buf);
|
pdata_buf);
|
||||||
break;
|
break;
|
||||||
|
case HostCmd_CMD_TDLS_CONFIG:
|
||||||
|
ret = wlan_cmd_tdls_config(pmpriv, cmd_ptr, cmd_action,
|
||||||
|
pdata_buf);
|
||||||
|
break;
|
||||||
|
case HostCmd_CMD_TDLS_OPERATION:
|
||||||
|
ret = wlan_cmd_tdls_oper(pmpriv, cmd_ptr, cmd_action,
|
||||||
|
pdata_buf);
|
||||||
|
break;
|
||||||
case HostCmd_CMD_802_11_SCAN_EXT:
|
case HostCmd_CMD_802_11_SCAN_EXT:
|
||||||
ret = wlan_cmd_802_11_scan_ext(pmpriv, cmd_ptr, pdata_buf);
|
ret = wlan_cmd_802_11_scan_ext(pmpriv, cmd_ptr, pdata_buf);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* responses generated by firmware.
|
* responses generated by firmware.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -49,6 +49,86 @@
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* Local Functions
|
* Local Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
/**
|
||||||
|
* @brief This function handles the command response error for TDLS operation
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
wlan_process_cmdreps_error_tdls_operation(mlan_private *pmpriv,
|
||||||
|
HostCmd_DS_COMMAND *resp,
|
||||||
|
mlan_ioctl_req *pioctl_buf)
|
||||||
|
{
|
||||||
|
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||||
|
HostCmd_DS_TDLS_OPER *ptdls_oper_data = &(resp->params.tdls_oper_data);
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
t_u16 reason;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
ptdls_oper_data->tdls_action =
|
||||||
|
wlan_le16_to_cpu(ptdls_oper_data->tdls_action);
|
||||||
|
reason = wlan_le16_to_cpu(ptdls_oper_data->reason);
|
||||||
|
sta_ptr = wlan_get_station_entry(pmpriv, ptdls_oper_data->peer_mac);
|
||||||
|
switch (ptdls_oper_data->tdls_action) {
|
||||||
|
case TDLS_CREATE:
|
||||||
|
/* TDLS create command error */
|
||||||
|
if (reason != TDLS_LINK_EXISTS && sta_ptr) {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"TDLS CREATE operation: cmd error reason %d\n",
|
||||||
|
reason);
|
||||||
|
sta_ptr->status = TDLS_SETUP_FAILURE;
|
||||||
|
}
|
||||||
|
if (reason == TDLS_LINK_EXISTS && pioctl_buf)
|
||||||
|
pioctl_buf->status_code = MLAN_STATUS_SUCCESS;
|
||||||
|
break;
|
||||||
|
case TDLS_CONFIG:
|
||||||
|
/* TDLS config command error */
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"TDLS CONFIG operation: command error, reason %d\n",
|
||||||
|
reason);
|
||||||
|
if (sta_ptr)
|
||||||
|
sta_ptr->status = TDLS_SETUP_FAILURE;
|
||||||
|
break;
|
||||||
|
case TDLS_DELETE:
|
||||||
|
/* TDLS delete command error */
|
||||||
|
wlan_restore_tdls_packets(pmpriv, ptdls_oper_data->peer_mac,
|
||||||
|
TDLS_TEAR_DOWN);
|
||||||
|
if (sta_ptr) {
|
||||||
|
/**tdls cs stop*/
|
||||||
|
if (ISSUPP_EXTCAP_TDLS_CHAN_SWITCH(
|
||||||
|
sta_ptr->ExtCap.ext_cap))
|
||||||
|
wlan_tdls_config(pmpriv, MFALSE);
|
||||||
|
if (sta_ptr->is_11n_enabled) {
|
||||||
|
wlan_cleanup_reorder_tbl(
|
||||||
|
pmpriv, ptdls_oper_data->peer_mac);
|
||||||
|
wlan_11n_cleanup_txbastream_tbl(
|
||||||
|
pmpriv, ptdls_oper_data->peer_mac);
|
||||||
|
}
|
||||||
|
if (sta_ptr->status >= TDLS_SETUP_INPROGRESS)
|
||||||
|
wlan_delete_station_entry(
|
||||||
|
pmpriv, ptdls_oper_data->peer_mac);
|
||||||
|
}
|
||||||
|
if (wlan_is_station_list_empty(pmpriv) == MTRUE)
|
||||||
|
pmadapter->tdls_status = TDLS_NOT_SETUP;
|
||||||
|
else
|
||||||
|
pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL;
|
||||||
|
|
||||||
|
if (reason == TDLS_LINK_NONEXISTENT) {
|
||||||
|
if (pioctl_buf)
|
||||||
|
pioctl_buf->status_code = MLAN_STATUS_SUCCESS;
|
||||||
|
} else {
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"TDLS DELETE operation: cmd error, reason %d\n",
|
||||||
|
reason);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function handles the command response error
|
* @brief This function handles the command response error
|
||||||
|
@ -66,6 +146,10 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
||||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||||
pmlan_ioctl_req pscan_ioctl_req = MNULL;
|
pmlan_ioctl_req pscan_ioctl_req = MNULL;
|
||||||
mlan_callbacks *pcb = MNULL;
|
mlan_callbacks *pcb = MNULL;
|
||||||
|
tdls_all_config *tdls_all_cfg = MNULL;
|
||||||
|
HostCmd_DS_TDLS_CONFIG *ptdls_config_data =
|
||||||
|
&(resp->params.tdls_config_data);
|
||||||
|
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
t_s32 i = 0;
|
t_s32 i = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -121,6 +205,37 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
||||||
case HostCmd_CMD_MAC_CONTROL:
|
case HostCmd_CMD_MAC_CONTROL:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case HostCmd_CMD_TDLS_CONFIG:
|
||||||
|
ptdls_config_data->tdls_info.tdls_action = wlan_le16_to_cpu(
|
||||||
|
ptdls_config_data->tdls_info.tdls_action);
|
||||||
|
switch (ptdls_config_data->tdls_info.tdls_action) {
|
||||||
|
case WLAN_TDLS_SETUP_REQ:
|
||||||
|
/* TDLS link setup error ;display error in logs */
|
||||||
|
tdls_all_cfg =
|
||||||
|
(tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
PRINTM(MERROR, "TDLS Setup Failed, error %d\n",
|
||||||
|
wlan_le16_to_cpu(tdls_all_cfg->u.tdls_cmd_resp
|
||||||
|
.reason_code));
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_INIT_CHAN_SWITCH:
|
||||||
|
tdls_all_cfg =
|
||||||
|
(tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
PRINTM(MERROR,
|
||||||
|
"TDLS init channel switch failed," MACSTR
|
||||||
|
": reason=%d\n",
|
||||||
|
MAC2STR(tdls_all_cfg->u.tdls_cmd_resp
|
||||||
|
.peer_mac_addr),
|
||||||
|
wlan_le16_to_cpu(tdls_all_cfg->u.tdls_cmd_resp
|
||||||
|
.reason_code));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HostCmd_CMD_TDLS_OPERATION:
|
||||||
|
wlan_process_cmdreps_error_tdls_operation(pmpriv, resp,
|
||||||
|
pioctl_buf);
|
||||||
|
break;
|
||||||
case HostCmd_CMD_PACKET_AGGR_CTRL:
|
case HostCmd_CMD_PACKET_AGGR_CTRL:
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
if (IS_USB(pmadapter->card_type)) {
|
if (IS_USB(pmadapter->card_type)) {
|
||||||
|
@ -619,6 +734,14 @@ static mlan_status wlan_ret_get_log(pmlan_private pmpriv,
|
||||||
wlan_le32_to_cpu(pget_log->channel_number);
|
wlan_le32_to_cpu(pget_log->channel_number);
|
||||||
pget_info->param.stats.channel_switch_mode =
|
pget_info->param.stats.channel_switch_mode =
|
||||||
wlan_le32_to_cpu(pget_log->channel_switch_mode);
|
wlan_le32_to_cpu(pget_log->channel_switch_mode);
|
||||||
|
pget_info->param.stats.rx_reset_mac_recovery_cnt =
|
||||||
|
wlan_le32_to_cpu(pget_log->rx_reset_mac_recovery_cnt);
|
||||||
|
pget_info->param.stats.rx_Isr2_NotDone_Cnt =
|
||||||
|
wlan_le32_to_cpu(pget_log->rx_Isr2_NotDone_Cnt);
|
||||||
|
pget_info->param.stats.gdma_abort_cnt =
|
||||||
|
wlan_le32_to_cpu(pget_log->gdma_abort_cnt);
|
||||||
|
pget_info->param.stats.g_reset_rx_mac_cnt =
|
||||||
|
wlan_le32_to_cpu(pget_log->g_reset_rx_mac_cnt);
|
||||||
if (pmpriv->adapter->getlog_enable) {
|
if (pmpriv->adapter->getlog_enable) {
|
||||||
pget_info->param.stats.tx_frag_cnt =
|
pget_info->param.stats.tx_frag_cnt =
|
||||||
wlan_le32_to_cpu(pget_log->tx_frag_cnt);
|
wlan_le32_to_cpu(pget_log->tx_frag_cnt);
|
||||||
|
@ -991,6 +1114,7 @@ static mlan_status wlan_ret_802_11_sleep_period(pmlan_private pmpriv,
|
||||||
MLAN_SUB_COMMAND_SIZE;
|
MLAN_SUB_COMMAND_SIZE;
|
||||||
}
|
}
|
||||||
pmpriv->adapter->sleep_period.period = sleep_pd;
|
pmpriv->adapter->sleep_period.period = sleep_pd;
|
||||||
|
pmpriv->adapter->saved_sleep_period.period = sleep_pd;
|
||||||
|
|
||||||
pmpriv->adapter->pps_uapsd_mode = MFALSE;
|
pmpriv->adapter->pps_uapsd_mode = MFALSE;
|
||||||
if ((pmpriv->adapter->sleep_period.period != 0) &&
|
if ((pmpriv->adapter->sleep_period.period != 0) &&
|
||||||
|
@ -1551,6 +1675,349 @@ static mlan_status wlan_ret_mgmt_ie_list(pmlan_private pmpriv,
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function enable/disable tdls powermode
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param powermode 1--enable, 0--disable
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static void wlan_set_tdls_powermode(pmlan_private pmpriv, t_u8 powermode)
|
||||||
|
{
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
if (powermode) {
|
||||||
|
pmpriv->wmm_qosinfo = DEFAULT_TDLS_WMM_QOS_INFO;
|
||||||
|
if (!pmpriv->adapter->sleep_period.period)
|
||||||
|
pmpriv->adapter->sleep_period.period =
|
||||||
|
DEFAULT_TDLS_SLEEP_PERIOD;
|
||||||
|
} else {
|
||||||
|
pmpriv->wmm_qosinfo = pmpriv->saved_wmm_qosinfo;
|
||||||
|
pmpriv->adapter->sleep_period.period =
|
||||||
|
pmpriv->adapter->saved_sleep_period.period;
|
||||||
|
}
|
||||||
|
pmpriv->adapter->pps_uapsd_mode = MFALSE;
|
||||||
|
if ((pmpriv->adapter->sleep_period.period != 0) &&
|
||||||
|
(pmpriv->adapter->sleep_period.period !=
|
||||||
|
SLEEP_PERIOD_RESERVED_FF)) {
|
||||||
|
pmpriv->adapter->gen_null_pkt = MTRUE;
|
||||||
|
} else {
|
||||||
|
pmpriv->adapter->delay_null_pkt = MFALSE;
|
||||||
|
pmpriv->adapter->gen_null_pkt = MFALSE;
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles the command response of TDLS_CONFIG
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||||
|
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
|
*/
|
||||||
|
static mlan_status wlan_ret_tdls_config(pmlan_private pmpriv,
|
||||||
|
HostCmd_DS_COMMAND *resp,
|
||||||
|
mlan_ioctl_req *pioctl_buf)
|
||||||
|
{
|
||||||
|
t_u8 i = 0;
|
||||||
|
t_u16 link_length = 0, final_data_rate = 0;
|
||||||
|
mlan_ds_misc_cfg *misc = MNULL;
|
||||||
|
tdls_all_config *tdls_all_cfg = MNULL;
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
HostCmd_DS_TDLS_CONFIG *ptdls_config_data =
|
||||||
|
&(resp->params.tdls_config_data);
|
||||||
|
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||||
|
tdls_each_link_status *link_ptr = MNULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
ptdls_config_data->tdls_info.tdls_action =
|
||||||
|
wlan_le16_to_cpu(ptdls_config_data->tdls_info.tdls_action);
|
||||||
|
switch (ptdls_config_data->tdls_info.tdls_action) {
|
||||||
|
case WLAN_TDLS_CONFIG:
|
||||||
|
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||||
|
tdls_all_cfg = (tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
if (pmpriv->host_tdls_cs_support ||
|
||||||
|
pmpriv->host_tdls_uapsd_support)
|
||||||
|
break;
|
||||||
|
if (wlan_le16_to_cpu(tdls_all_cfg->u.tdls_config.enable) == 0) {
|
||||||
|
PRINTM(MINFO, "TDLS disable successful.\n");
|
||||||
|
wlan_delete_station_list(pmpriv);
|
||||||
|
pmadapter->tdls_status = TDLS_NOT_SETUP;
|
||||||
|
if (pmpriv->saved_wmm_qosinfo)
|
||||||
|
pmpriv->wmm_qosinfo = pmpriv->saved_wmm_qosinfo;
|
||||||
|
if (pmadapter->saved_sleep_period.period)
|
||||||
|
pmadapter->sleep_period.period =
|
||||||
|
pmadapter->saved_sleep_period.period;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_SET_INFO:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_DISCOVERY_REQ:
|
||||||
|
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||||
|
tdls_all_cfg = (tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
tdls_all_cfg->u.tdls_discovery_resp.payload_len =
|
||||||
|
wlan_le16_to_cpu(
|
||||||
|
tdls_all_cfg->u.tdls_discovery_resp.payload_len);
|
||||||
|
tdls_all_cfg->u.tdls_discovery_resp.cap_info = wlan_le16_to_cpu(
|
||||||
|
tdls_all_cfg->u.tdls_discovery_resp.cap_info);
|
||||||
|
memcpy_ext(pmpriv->adapter, &misc->param.tdls_config,
|
||||||
|
&ptdls_config_data->tdls_info,
|
||||||
|
(resp->size - S_DS_GEN),
|
||||||
|
sizeof(mlan_ds_misc_tdls_config));
|
||||||
|
PRINTM(MCMND, "TDLS_DISCOVERY_REQ: " MACSTR "\n",
|
||||||
|
MAC2STR(tdls_all_cfg->u.tdls_discovery_resp
|
||||||
|
.peer_mac_addr));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_SETUP_REQ:
|
||||||
|
/*
|
||||||
|
* TDLS link being setup, block all data for this Peer
|
||||||
|
*/
|
||||||
|
tdls_all_cfg = (tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
PRINTM(MCMND, "TDLS_SETUP_REQ: " MACSTR "\n",
|
||||||
|
MAC2STR(tdls_all_cfg->u.tdls_setup.peer_mac_addr));
|
||||||
|
sta_ptr = wlan_get_station_entry(
|
||||||
|
pmpriv, tdls_all_cfg->u.tdls_setup.peer_mac_addr);
|
||||||
|
if (!sta_ptr) {
|
||||||
|
sta_ptr = wlan_add_station_entry(
|
||||||
|
pmpriv,
|
||||||
|
tdls_all_cfg->u.tdls_setup.peer_mac_addr);
|
||||||
|
if (sta_ptr) {
|
||||||
|
sta_ptr->status = TDLS_SETUP_INPROGRESS;
|
||||||
|
wlan_hold_tdls_packets(
|
||||||
|
pmpriv, tdls_all_cfg->u.tdls_setup
|
||||||
|
.peer_mac_addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_TEAR_DOWN_REQ:
|
||||||
|
/*
|
||||||
|
* TDLS link torn down, open data ports if blocked
|
||||||
|
*/
|
||||||
|
tdls_all_cfg = (tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
wlan_restore_tdls_packets(
|
||||||
|
pmpriv, tdls_all_cfg->u.tdls_tear_down.peer_mac_addr,
|
||||||
|
TDLS_TEAR_DOWN);
|
||||||
|
PRINTM(MCMND, "TDLS_TEARDOWN_REQ: " MACSTR "\n",
|
||||||
|
MAC2STR(tdls_all_cfg->u.tdls_tear_down.peer_mac_addr));
|
||||||
|
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) {
|
||||||
|
wlan_cleanup_reorder_tbl(
|
||||||
|
pmpriv, tdls_all_cfg->u.tdls_tear_down
|
||||||
|
.peer_mac_addr);
|
||||||
|
wlan_11n_cleanup_txbastream_tbl(
|
||||||
|
pmpriv, tdls_all_cfg->u.tdls_tear_down
|
||||||
|
.peer_mac_addr);
|
||||||
|
}
|
||||||
|
wlan_delete_station_entry(
|
||||||
|
pmpriv,
|
||||||
|
tdls_all_cfg->u.tdls_tear_down.peer_mac_addr);
|
||||||
|
if (MTRUE == wlan_is_station_list_empty(pmpriv))
|
||||||
|
pmadapter->tdls_status = TDLS_NOT_SETUP;
|
||||||
|
else
|
||||||
|
pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_INIT_CHAN_SWITCH:
|
||||||
|
tdls_all_cfg = (tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
PRINTM(MCMND,
|
||||||
|
"TDLS_INIT_CHANNEL_SWITCH: " MACSTR
|
||||||
|
" chan=%d periodicity=%d\n",
|
||||||
|
MAC2STR(tdls_all_cfg->u.tdls_chan_switch.peer_mac_addr),
|
||||||
|
(int)tdls_all_cfg->u.tdls_chan_switch.primary_channel,
|
||||||
|
(int)tdls_all_cfg->u.tdls_chan_switch.periodicity);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WLAN_TDLS_LINK_STATUS:
|
||||||
|
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||||
|
tdls_all_cfg = (tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
tdls_all_cfg->u.tdls_link_status_resp.payload_len =
|
||||||
|
wlan_le16_to_cpu(tdls_all_cfg->u.tdls_link_status_resp
|
||||||
|
.payload_len);
|
||||||
|
link_ptr = tdls_all_cfg->u.tdls_link_status_resp.link_stats;
|
||||||
|
for (i = 0;
|
||||||
|
i < tdls_all_cfg->u.tdls_link_status_resp.active_links;
|
||||||
|
i++) {
|
||||||
|
link_ptr->active_channel =
|
||||||
|
wlan_le32_to_cpu(link_ptr->active_channel);
|
||||||
|
link_ptr->data_rssi_last =
|
||||||
|
wlan_le16_to_cpu(link_ptr->data_rssi_last);
|
||||||
|
link_ptr->data_nf_last =
|
||||||
|
wlan_le16_to_cpu(link_ptr->data_nf_last);
|
||||||
|
link_ptr->data_rssi_avg =
|
||||||
|
wlan_le16_to_cpu(link_ptr->data_rssi_avg);
|
||||||
|
link_ptr->data_nf_avg =
|
||||||
|
wlan_le16_to_cpu(link_ptr->data_nf_avg);
|
||||||
|
link_length = sizeof(tdls_each_link_status);
|
||||||
|
/* adjust as per open or secure network */
|
||||||
|
if (link_ptr->link_flags & 0x02) {
|
||||||
|
link_ptr->key_lifetime = wlan_le32_to_cpu(
|
||||||
|
link_ptr->key_lifetime);
|
||||||
|
link_length += link_ptr->key_length;
|
||||||
|
} else {
|
||||||
|
link_length -=
|
||||||
|
sizeof(link_ptr->security_method) +
|
||||||
|
sizeof(link_ptr->key_lifetime) +
|
||||||
|
sizeof(link_ptr->key_length);
|
||||||
|
}
|
||||||
|
final_data_rate = (t_u16)wlan_index_to_data_rate(
|
||||||
|
pmadapter, link_ptr->u.rate_info.tx_data_rate,
|
||||||
|
link_ptr->u.rate_info.tx_rate_htinfo, 0);
|
||||||
|
link_ptr->u.final_data_rate = final_data_rate / 2;
|
||||||
|
|
||||||
|
link_ptr =
|
||||||
|
(tdls_each_link_status *)(((t_u8 *)link_ptr) +
|
||||||
|
link_length);
|
||||||
|
}
|
||||||
|
memcpy_ext(pmpriv->adapter, &misc->param.tdls_config,
|
||||||
|
&ptdls_config_data->tdls_info,
|
||||||
|
(resp->size - S_DS_GEN),
|
||||||
|
sizeof(mlan_ds_misc_tdls_config));
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_POWER_MODE:
|
||||||
|
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||||
|
tdls_all_cfg = (tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
tdls_all_cfg->u.tdls_power_mode.power_mode = wlan_le16_to_cpu(
|
||||||
|
tdls_all_cfg->u.tdls_power_mode.power_mode);
|
||||||
|
wlan_set_tdls_powermode(
|
||||||
|
pmpriv,
|
||||||
|
(t_u8)tdls_all_cfg->u.tdls_power_mode.power_mode);
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_STOP_CHAN_SWITCH:
|
||||||
|
tdls_all_cfg = (tdls_all_config *)
|
||||||
|
ptdls_config_data->tdls_info.tdls_data;
|
||||||
|
PRINTM(MCMND, "TDLS_STOP_CHANNEL_SWITCH: " MACSTR "\n",
|
||||||
|
MAC2STR(tdls_all_cfg->u.tdls_stop_chan_switch
|
||||||
|
.peer_mac_addr));
|
||||||
|
break;
|
||||||
|
case WLAN_TDLS_CS_PARAMS:
|
||||||
|
case WLAN_TDLS_CS_DISABLE:
|
||||||
|
case WLAN_TDLS_DEBUG_STOP_RX:
|
||||||
|
case WLAN_TDLS_DEBUG_ALLOW_WEAK_SECURITY:
|
||||||
|
case WLAN_TDLS_DEBUG_SETUP_SAME_LINK:
|
||||||
|
case WLAN_TDLS_DEBUG_FAIL_SETUP_CONFIRM:
|
||||||
|
case WLAN_TDLS_DEBUG_WRONG_BSS:
|
||||||
|
case WLAN_TDLS_DEBUG_SETUP_PROHIBITED:
|
||||||
|
case WLAN_TDLS_DEBUG_HIGHER_LOWER_MAC:
|
||||||
|
case WLAN_TDLS_DEBUG_IGNORE_KEY_EXPIRY:
|
||||||
|
case WLAN_TDLS_DEBUG_CS_RET_IM:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (pioctl_buf)
|
||||||
|
pioctl_buf->status_code = MLAN_ERROR_CMD_RESP_FAIL;
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles the command response of TDLS_OPERATION
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||||
|
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
|
*/
|
||||||
|
static mlan_status wlan_ret_tdls_oper(pmlan_private pmpriv,
|
||||||
|
HostCmd_DS_COMMAND *resp,
|
||||||
|
mlan_ioctl_req *pioctl_buf)
|
||||||
|
{
|
||||||
|
HostCmd_DS_TDLS_OPER *ptdls_oper = &(resp->params.tdls_oper_data);
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
t_u16 reason = 0;
|
||||||
|
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
ptdls_oper->tdls_action = wlan_le16_to_cpu(ptdls_oper->tdls_action);
|
||||||
|
|
||||||
|
sta_ptr = wlan_get_station_entry(pmpriv, ptdls_oper->peer_mac);
|
||||||
|
reason = wlan_le16_to_cpu(ptdls_oper->reason);
|
||||||
|
switch (ptdls_oper->tdls_action) {
|
||||||
|
case TDLS_CREATE:
|
||||||
|
if (reason) {
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"TDLS: create link " MACSTR " fail, reason=%d\n",
|
||||||
|
MAC2STR(ptdls_oper->peer_mac), reason);
|
||||||
|
if (reason != TDLS_LINK_EXISTS && sta_ptr)
|
||||||
|
sta_ptr->status = TDLS_SETUP_FAILURE;
|
||||||
|
} else {
|
||||||
|
PRINTM(MMSG, "TDLS: create link " MACSTR " success\n",
|
||||||
|
MAC2STR(ptdls_oper->peer_mac), reason);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TDLS_CONFIG:
|
||||||
|
if (reason) {
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"TDLS: Config link " MACSTR " fail, reason=%d\n",
|
||||||
|
MAC2STR(ptdls_oper->peer_mac), reason);
|
||||||
|
if (sta_ptr)
|
||||||
|
sta_ptr->status = TDLS_SETUP_FAILURE;
|
||||||
|
} else {
|
||||||
|
PRINTM(MMSG, "TDLS: Config link " MACSTR " success\n",
|
||||||
|
MAC2STR(ptdls_oper->peer_mac));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TDLS_DELETE:
|
||||||
|
wlan_restore_tdls_packets(pmpriv, ptdls_oper->peer_mac,
|
||||||
|
TDLS_TEAR_DOWN);
|
||||||
|
if (sta_ptr) {
|
||||||
|
/**tdls cs stop*/
|
||||||
|
if (ISSUPP_EXTCAP_TDLS_CHAN_SWITCH(
|
||||||
|
sta_ptr->ExtCap.ext_cap))
|
||||||
|
wlan_tdls_config(pmpriv, MFALSE);
|
||||||
|
if (sta_ptr->is_11n_enabled) {
|
||||||
|
wlan_cleanup_reorder_tbl(pmpriv,
|
||||||
|
ptdls_oper->peer_mac);
|
||||||
|
wlan_11n_cleanup_txbastream_tbl(
|
||||||
|
pmpriv, ptdls_oper->peer_mac);
|
||||||
|
}
|
||||||
|
if (sta_ptr->status >= TDLS_SETUP_INPROGRESS)
|
||||||
|
wlan_delete_station_entry(pmpriv,
|
||||||
|
ptdls_oper->peer_mac);
|
||||||
|
}
|
||||||
|
if (MTRUE == wlan_is_station_list_empty(pmpriv))
|
||||||
|
pmadapter->tdls_status = TDLS_NOT_SETUP;
|
||||||
|
else
|
||||||
|
pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL;
|
||||||
|
|
||||||
|
if (reason)
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"TDLS: Delete link " MACSTR " fail, reason=%d\n",
|
||||||
|
MAC2STR(ptdls_oper->peer_mac), reason);
|
||||||
|
else
|
||||||
|
PRINTM(MMSG, "TDLS: Delete link " MACSTR " success\n",
|
||||||
|
MAC2STR(ptdls_oper->peer_mac));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function handles the command response of sysclock
|
* @brief This function handles the command response of sysclock
|
||||||
*
|
*
|
||||||
|
@ -1938,7 +2405,7 @@ static mlan_status wlan_ret_dfs_repeater_cfg(pmlan_private pmpriv,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_ret_coalesce_config(pmlan_private pmpriv,
|
static mlan_status wlan_ret_coalesce_config(pmlan_private pmpriv,
|
||||||
HostCmd_DS_COMMAND *resp,
|
HostCmd_DS_COMMAND *resp,
|
||||||
mlan_ioctl_req *pioctl_buf)
|
mlan_ioctl_req *pioctl_buf)
|
||||||
{
|
{
|
||||||
|
@ -1947,7 +2414,7 @@ mlan_status wlan_ret_coalesce_config(pmlan_private pmpriv,
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
mlan_status wlan_ret_get_sensor_temp(pmlan_private pmpriv,
|
static mlan_status wlan_ret_get_sensor_temp(pmlan_private pmpriv,
|
||||||
const HostCmd_DS_COMMAND *resp,
|
const HostCmd_DS_COMMAND *resp,
|
||||||
mlan_ioctl_req *pioctl_buf)
|
mlan_ioctl_req *pioctl_buf)
|
||||||
{
|
{
|
||||||
|
@ -2238,6 +2705,13 @@ static mlan_status wlan_ret_mfg_tx_frame(pmlan_private pmpriv,
|
||||||
cfg->tx_bf = wlan_le32_to_cpu(mcmd->tx_bf);
|
cfg->tx_bf = wlan_le32_to_cpu(mcmd->tx_bf);
|
||||||
cfg->gf_mode = wlan_le32_to_cpu(mcmd->gf_mode);
|
cfg->gf_mode = wlan_le32_to_cpu(mcmd->gf_mode);
|
||||||
cfg->stbc = wlan_le32_to_cpu(mcmd->stbc);
|
cfg->stbc = wlan_le32_to_cpu(mcmd->stbc);
|
||||||
|
cfg->NumPkt = wlan_le32_to_cpu(mcmd->NumPkt);
|
||||||
|
cfg->MaxPE = wlan_le32_to_cpu(mcmd->MaxPE);
|
||||||
|
cfg->BeamChange = wlan_le32_to_cpu(mcmd->BeamChange);
|
||||||
|
cfg->Dcm = wlan_le32_to_cpu(mcmd->Dcm);
|
||||||
|
cfg->Doppler = wlan_le32_to_cpu(mcmd->Doppler);
|
||||||
|
cfg->MidP = wlan_le32_to_cpu(mcmd->MidP);
|
||||||
|
cfg->QNum = wlan_le32_to_cpu(mcmd->QNum);
|
||||||
memcpy_ext(pmpriv->adapter, cfg->bssid, mcmd->bssid,
|
memcpy_ext(pmpriv->adapter, cfg->bssid, mcmd->bssid,
|
||||||
MLAN_MAC_ADDR_LENGTH, sizeof(cfg->bssid));
|
MLAN_MAC_ADDR_LENGTH, sizeof(cfg->bssid));
|
||||||
|
|
||||||
|
@ -2245,6 +2719,43 @@ static mlan_status wlan_ret_mfg_tx_frame(pmlan_private pmpriv,
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function prepares command resp of MFG HE TB Tx
|
||||||
|
*
|
||||||
|
* @param pmpriv A pointer to mlan_private structure
|
||||||
|
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||||
|
* @param pioctl_buf A pointer to mlan_ioctl_req structure
|
||||||
|
*
|
||||||
|
* @return MLAN_STATUS_SUCCESS
|
||||||
|
*/
|
||||||
|
|
||||||
|
static mlan_status wlan_ret_mfg_he_tb_tx(pmlan_private pmpriv,
|
||||||
|
HostCmd_DS_COMMAND *resp,
|
||||||
|
mlan_ioctl_req *pioctl_buf)
|
||||||
|
{
|
||||||
|
mlan_ds_misc_cfg *misc = MNULL;
|
||||||
|
struct mfg_Cmd_HE_TBTx_t *mcmd =
|
||||||
|
(struct mfg_Cmd_HE_TBTx_t *)&resp->params.mfg_he_power;
|
||||||
|
struct mfg_Cmd_HE_TBTx_t *cfg = MNULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
if (!pioctl_buf) {
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_FAILURE;
|
||||||
|
}
|
||||||
|
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||||
|
cfg = (struct mfg_Cmd_HE_TBTx_t *)&misc->param.mfg_he_power;
|
||||||
|
|
||||||
|
cfg->enable = wlan_le16_to_cpu(mcmd->enable);
|
||||||
|
cfg->qnum = wlan_le16_to_cpu(mcmd->qnum);
|
||||||
|
cfg->aid = wlan_le16_to_cpu(mcmd->aid);
|
||||||
|
cfg->axq_mu_timer = wlan_le16_to_cpu(mcmd->axq_mu_timer);
|
||||||
|
cfg->tx_power = wlan_le16_to_cpu(mcmd->tx_power);
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function prepares command resp of MFG Cmd
|
* @brief This function prepares command resp of MFG Cmd
|
||||||
*
|
*
|
||||||
|
@ -2275,6 +2786,9 @@ mlan_status wlan_ret_mfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
case MFG_CMD_TX_FRAME:
|
case MFG_CMD_TX_FRAME:
|
||||||
ret = wlan_ret_mfg_tx_frame(pmpriv, resp, pioctl_buf);
|
ret = wlan_ret_mfg_tx_frame(pmpriv, resp, pioctl_buf);
|
||||||
goto cmd_mfg_done;
|
goto cmd_mfg_done;
|
||||||
|
case MFG_CMD_CONFIG_MAC_HE_TB_TX:
|
||||||
|
ret = wlan_ret_mfg_he_tb_tx(pmpriv, resp, pioctl_buf);
|
||||||
|
goto cmd_mfg_done;
|
||||||
case MFG_CMD_SET_TEST_MODE:
|
case MFG_CMD_SET_TEST_MODE:
|
||||||
case MFG_CMD_UNSET_TEST_MODE:
|
case MFG_CMD_UNSET_TEST_MODE:
|
||||||
case MFG_CMD_TX_ANT:
|
case MFG_CMD_TX_ANT:
|
||||||
|
@ -2283,6 +2797,7 @@ mlan_status wlan_ret_mfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||||
case MFG_CMD_CLR_RX_ERR:
|
case MFG_CMD_CLR_RX_ERR:
|
||||||
case MFG_CMD_RF_BAND_AG:
|
case MFG_CMD_RF_BAND_AG:
|
||||||
case MFG_CMD_RF_CHANNELBW:
|
case MFG_CMD_RF_CHANNELBW:
|
||||||
|
case MFG_CMD_RADIO_MODE_CFG:
|
||||||
case MFG_CMD_RFPWR:
|
case MFG_CMD_RFPWR:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -2510,15 +3025,18 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
||||||
pmadapter->pcard_sd->reg->data_port_mask;
|
pmadapter->pcard_sd->reg->data_port_mask;
|
||||||
|
|
||||||
for (ctr = 1;
|
for (ctr = 1;
|
||||||
ctr <= MAX_PORT - pmadapter->pcard_sd->mp_end_port;
|
ctr <= pmadapter->pcard_sd->max_ports -
|
||||||
|
pmadapter->pcard_sd->mp_end_port;
|
||||||
ctr++) {
|
ctr++) {
|
||||||
pmadapter->pcard_sd->mp_data_port_mask &=
|
pmadapter->pcard_sd->mp_data_port_mask &=
|
||||||
~(1 << (MAX_PORT - ctr));
|
~(1 << (pmadapter->pcard_sd->max_ports -
|
||||||
|
ctr));
|
||||||
}
|
}
|
||||||
|
|
||||||
pmadapter->pcard_sd->curr_wr_port = 0;
|
pmadapter->pcard_sd->curr_wr_port =
|
||||||
|
pmadapter->pcard_sd->reg->start_wr_port;
|
||||||
pmadapter->pcard_sd->mpa_tx.pkt_aggr_limit =
|
pmadapter->pcard_sd->mpa_tx.pkt_aggr_limit =
|
||||||
MIN(SDIO_MP_AGGR_DEF_PKT_LIMIT,
|
MIN(pmadapter->pcard_sd->mp_aggr_pkt_limit,
|
||||||
(pmadapter->pcard_sd->mp_end_port >> 1));
|
(pmadapter->pcard_sd->mp_end_port >> 1));
|
||||||
PRINTM(MCMND, "end port %d, data port mask %x\n",
|
PRINTM(MCMND, "end port %d, data port mask %x\n",
|
||||||
wlan_le16_to_cpu(
|
wlan_le16_to_cpu(
|
||||||
|
@ -2562,6 +3080,12 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
||||||
case HostCmd_CMD_MGMT_IE_LIST:
|
case HostCmd_CMD_MGMT_IE_LIST:
|
||||||
ret = wlan_ret_mgmt_ie_list(pmpriv, resp, pioctl_buf);
|
ret = wlan_ret_mgmt_ie_list(pmpriv, resp, pioctl_buf);
|
||||||
break;
|
break;
|
||||||
|
case HostCmd_CMD_TDLS_CONFIG:
|
||||||
|
ret = wlan_ret_tdls_config(pmpriv, resp, pioctl_buf);
|
||||||
|
break;
|
||||||
|
case HostCmd_CMD_TDLS_OPERATION:
|
||||||
|
ret = wlan_ret_tdls_oper(pmpriv, resp, pioctl_buf);
|
||||||
|
break;
|
||||||
case HostCmd_CMD_11N_CFG:
|
case HostCmd_CMD_11N_CFG:
|
||||||
ret = wlan_ret_11n_cfg(pmpriv, resp, pioctl_buf);
|
ret = wlan_ret_11n_cfg(pmpriv, resp, pioctl_buf);
|
||||||
break;
|
break;
|
||||||
|
@ -2722,6 +3246,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
||||||
ret = wlan_ret_dot11mc_unassoc_ftm_cfg(pmpriv, resp,
|
ret = wlan_ret_dot11mc_unassoc_ftm_cfg(pmpriv, resp,
|
||||||
pioctl_buf);
|
pioctl_buf);
|
||||||
break;
|
break;
|
||||||
|
case HostCmd_CMD_HAL_PHY_CFG:
|
||||||
|
ret = wlan_ret_hal_phy_cfg(pmpriv, resp, pioctl_buf);
|
||||||
|
break;
|
||||||
case HostCmd_CMD_RATE_ADAPT_CFG:
|
case HostCmd_CMD_RATE_ADAPT_CFG:
|
||||||
ret = wlan_ret_rate_adapt_cfg(pmpriv, resp, pioctl_buf);
|
ret = wlan_ret_rate_adapt_cfg(pmpriv, resp, pioctl_buf);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains MLAN event handling.
|
* @brief This file contains MLAN event handling.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -65,6 +65,272 @@ static t_void wlan_handle_disconnect_event(pmlan_private pmpriv)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function will parse the TDLS event for further wlan action
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param pevent A pointer to event buf
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static void wlan_parse_tdls_event(pmlan_private priv, pmlan_buffer pevent)
|
||||||
|
{
|
||||||
|
Event_tdls_generic *tdls_event =
|
||||||
|
(Event_tdls_generic *)(pevent->pbuf + pevent->data_offset +
|
||||||
|
sizeof(mlan_event_id));
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
pmlan_adapter pmadapter = priv->adapter;
|
||||||
|
t_u8 i = 0;
|
||||||
|
IEEEtypes_HTCap_t *pht_cap = MNULL;
|
||||||
|
t_u16 ie_len = 0;
|
||||||
|
mlan_ds_misc_tdls_oper tdls_oper;
|
||||||
|
t_u8 event_buf[100];
|
||||||
|
mlan_event *ptdls_event = (mlan_event *)event_buf;
|
||||||
|
tdls_tear_down_event *tdls_evt =
|
||||||
|
(tdls_tear_down_event *)ptdls_event->event_buf;
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
/* reason code is not mandatory, hence less by sizeof(t_u16) */
|
||||||
|
if (pevent->data_len < (sizeof(Event_tdls_generic) - sizeof(t_u16) -
|
||||||
|
sizeof(mlan_event_id))) {
|
||||||
|
PRINTM(MERROR, "Invalid length %d for TDLS event\n",
|
||||||
|
pevent->data_len);
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sta_ptr = wlan_get_station_entry(priv, tdls_event->peer_mac_addr);
|
||||||
|
PRINTM(MEVENT, "TDLS_EVENT: %d " MACSTR "\n",
|
||||||
|
wlan_le16_to_cpu(tdls_event->event_type),
|
||||||
|
MAC2STR(tdls_event->peer_mac_addr));
|
||||||
|
switch (wlan_le16_to_cpu(tdls_event->event_type)) {
|
||||||
|
case TDLS_EVENT_TYPE_SETUP_REQ:
|
||||||
|
if (sta_ptr == MNULL) {
|
||||||
|
sta_ptr = wlan_add_station_entry(
|
||||||
|
priv, tdls_event->peer_mac_addr);
|
||||||
|
if (sta_ptr) {
|
||||||
|
sta_ptr->status = TDLS_SETUP_INPROGRESS;
|
||||||
|
wlan_hold_tdls_packets(
|
||||||
|
priv, tdls_event->peer_mac_addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TDLS_EVENT_TYPE_LINK_ESTABLISHED:
|
||||||
|
if (sta_ptr) {
|
||||||
|
sta_ptr->status = TDLS_SETUP_COMPLETE;
|
||||||
|
/* parse the TLV for station's capability */
|
||||||
|
ie_len = wlan_le16_to_cpu(
|
||||||
|
tdls_event->u.ie_data.ie_length);
|
||||||
|
if (ie_len) {
|
||||||
|
pht_cap = (IEEEtypes_HTCap_t *)
|
||||||
|
wlan_get_specific_ie(
|
||||||
|
priv,
|
||||||
|
tdls_event->u.ie_data.ie_ptr,
|
||||||
|
ie_len, HT_CAPABILITY, 0);
|
||||||
|
if (pht_cap) {
|
||||||
|
sta_ptr->is_11n_enabled = MTRUE;
|
||||||
|
if (GETHT_MAXAMSDU(
|
||||||
|
pht_cap->ht_cap.ht_cap_info))
|
||||||
|
sta_ptr->max_amsdu =
|
||||||
|
MLAN_TX_DATA_BUF_SIZE_8K;
|
||||||
|
else
|
||||||
|
sta_ptr->max_amsdu =
|
||||||
|
MLAN_TX_DATA_BUF_SIZE_4K;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < MAX_NUM_TID; i++) {
|
||||||
|
if (sta_ptr->is_11n_enabled)
|
||||||
|
sta_ptr->ampdu_sta[i] =
|
||||||
|
priv->aggr_prio_tbl[i]
|
||||||
|
.ampdu_user;
|
||||||
|
else
|
||||||
|
sta_ptr->ampdu_sta[i] =
|
||||||
|
BA_STREAM_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
memset(priv->adapter, sta_ptr->rx_seq, 0xff,
|
||||||
|
sizeof(sta_ptr->rx_seq));
|
||||||
|
wlan_restore_tdls_packets(priv,
|
||||||
|
tdls_event->peer_mac_addr,
|
||||||
|
TDLS_SETUP_COMPLETE);
|
||||||
|
pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TDLS_EVENT_TYPE_SETUP_FAILURE:
|
||||||
|
wlan_restore_tdls_packets(priv, tdls_event->peer_mac_addr,
|
||||||
|
TDLS_SETUP_FAILURE);
|
||||||
|
if (sta_ptr)
|
||||||
|
wlan_delete_station_entry(priv,
|
||||||
|
tdls_event->peer_mac_addr);
|
||||||
|
if (MTRUE == wlan_is_station_list_empty(priv))
|
||||||
|
pmadapter->tdls_status = TDLS_NOT_SETUP;
|
||||||
|
else
|
||||||
|
pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL;
|
||||||
|
break;
|
||||||
|
case TDLS_EVENT_TYPE_LINK_TORN_DOWN:
|
||||||
|
if (sta_ptr) {
|
||||||
|
if (sta_ptr->external_tdls) {
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"Receive TDLS TEAR DOWN event, Disable TDLS LINK\n");
|
||||||
|
pmadapter->tdls_status = TDLS_TEAR_DOWN;
|
||||||
|
memset(pmadapter, &tdls_oper, 0,
|
||||||
|
sizeof(tdls_oper));
|
||||||
|
tdls_oper.tdls_action = WLAN_TDLS_DISABLE_LINK;
|
||||||
|
memcpy_ext(priv->adapter, tdls_oper.peer_mac,
|
||||||
|
tdls_event->peer_mac_addr,
|
||||||
|
MLAN_MAC_ADDR_LENGTH,
|
||||||
|
MLAN_MAC_ADDR_LENGTH);
|
||||||
|
/* Send command to firmware to delete tdls
|
||||||
|
* link*/
|
||||||
|
wlan_prepare_cmd(priv,
|
||||||
|
HostCmd_CMD_TDLS_OPERATION,
|
||||||
|
HostCmd_ACT_GEN_SET, 0,
|
||||||
|
(t_void *)MNULL, &tdls_oper);
|
||||||
|
ptdls_event->bss_index = priv->bss_index;
|
||||||
|
ptdls_event->event_id =
|
||||||
|
MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ;
|
||||||
|
ptdls_event->event_len =
|
||||||
|
sizeof(tdls_tear_down_event);
|
||||||
|
memcpy_ext(priv->adapter,
|
||||||
|
(t_u8 *)tdls_evt->peer_mac_addr,
|
||||||
|
tdls_event->peer_mac_addr,
|
||||||
|
MLAN_MAC_ADDR_LENGTH,
|
||||||
|
MLAN_MAC_ADDR_LENGTH);
|
||||||
|
tdls_evt->reason_code = wlan_le16_to_cpu(
|
||||||
|
tdls_event->u.reason_code);
|
||||||
|
wlan_recv_event(
|
||||||
|
priv,
|
||||||
|
MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ,
|
||||||
|
ptdls_event);
|
||||||
|
/* Signal MOAL to trigger mlan_main_process */
|
||||||
|
wlan_recv_event(
|
||||||
|
priv, MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||||
|
MNULL);
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
wlan_restore_tdls_packets(priv,
|
||||||
|
tdls_event->peer_mac_addr,
|
||||||
|
TDLS_TEAR_DOWN);
|
||||||
|
if (sta_ptr->is_11n_enabled) {
|
||||||
|
wlan_cleanup_reorder_tbl(
|
||||||
|
priv, tdls_event->peer_mac_addr);
|
||||||
|
wlan_11n_cleanup_txbastream_tbl(
|
||||||
|
priv, tdls_event->peer_mac_addr);
|
||||||
|
}
|
||||||
|
wlan_delete_station_entry(priv,
|
||||||
|
tdls_event->peer_mac_addr);
|
||||||
|
if (MTRUE == wlan_is_station_list_empty(priv))
|
||||||
|
pmadapter->tdls_status = TDLS_NOT_SETUP;
|
||||||
|
else
|
||||||
|
pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TDLS_EVENT_TYPE_CHAN_SWITCH_RESULT:
|
||||||
|
PRINTM(MEVENT,
|
||||||
|
"TDLS_CHAN_SWITCH_RESULT: status=0x%x, reason=0x%x current_channel=%d\n",
|
||||||
|
tdls_event->u.switch_result.status,
|
||||||
|
tdls_event->u.switch_result.reason,
|
||||||
|
(int)tdls_event->u.switch_result.current_channel);
|
||||||
|
if (tdls_event->u.switch_result.status == MLAN_STATUS_SUCCESS) {
|
||||||
|
if (tdls_event->u.switch_result.current_channel ==
|
||||||
|
TDLS_BASE_CHANNEL) {
|
||||||
|
/* enable traffic to AP */
|
||||||
|
if (pmadapter->tdls_status !=
|
||||||
|
TDLS_IN_BASE_CHANNEL) {
|
||||||
|
wlan_update_non_tdls_ralist(
|
||||||
|
priv, tdls_event->peer_mac_addr,
|
||||||
|
MFALSE);
|
||||||
|
pmadapter->tdls_status =
|
||||||
|
TDLS_IN_BASE_CHANNEL;
|
||||||
|
}
|
||||||
|
} else if (tdls_event->u.switch_result.current_channel ==
|
||||||
|
TDLS_OFF_CHANNEL) {
|
||||||
|
/* pause traffic to AP */
|
||||||
|
if (pmadapter->tdls_status !=
|
||||||
|
TDLS_IN_OFF_CHANNEL) {
|
||||||
|
wlan_update_non_tdls_ralist(
|
||||||
|
priv, tdls_event->peer_mac_addr,
|
||||||
|
MTRUE);
|
||||||
|
pmadapter->tdls_status =
|
||||||
|
TDLS_IN_OFF_CHANNEL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (tdls_event->u.switch_result.current_channel ==
|
||||||
|
TDLS_BASE_CHANNEL)
|
||||||
|
pmadapter->tdls_status = TDLS_IN_BASE_CHANNEL;
|
||||||
|
else if (tdls_event->u.switch_result.current_channel ==
|
||||||
|
TDLS_OFF_CHANNEL)
|
||||||
|
pmadapter->tdls_status = TDLS_IN_OFF_CHANNEL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TDLS_EVENT_TYPE_START_CHAN_SWITCH:
|
||||||
|
PRINTM(MEVENT, "TDLS start channel switch....\n");
|
||||||
|
pmadapter->tdls_status = TDLS_SWITCHING_CHANNEL;
|
||||||
|
break;
|
||||||
|
case TDLS_EVENT_TYPE_CHAN_SWITCH_STOPPED:
|
||||||
|
PRINTM(MEVENT, "TDLS channel switch stopped, reason=%d\n",
|
||||||
|
tdls_event->u.cs_stop_reason);
|
||||||
|
break;
|
||||||
|
case TDLS_EVENT_TYPE_DEBUG:
|
||||||
|
case TDLS_EVENT_TYPE_PACKET:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
PRINTM(MERROR, "unknown event type %d\n",
|
||||||
|
wlan_le16_to_cpu(tdls_event->event_type));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function send the tdls teardown request event.
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static void wlan_send_tdls_tear_down_request(pmlan_private priv)
|
||||||
|
{
|
||||||
|
t_u8 event_buf[100];
|
||||||
|
mlan_event *ptdls_event = (mlan_event *)event_buf;
|
||||||
|
tdls_tear_down_event *tdls_evt =
|
||||||
|
(tdls_tear_down_event *)ptdls_event->event_buf;
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
sta_ptr = (sta_node *)util_peek_list(
|
||||||
|
priv->adapter->pmoal_handle, &priv->sta_list,
|
||||||
|
priv->adapter->callbacks.moal_spin_lock,
|
||||||
|
priv->adapter->callbacks.moal_spin_unlock);
|
||||||
|
if (!sta_ptr) {
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
while (sta_ptr != (sta_node *)&priv->sta_list) {
|
||||||
|
if (sta_ptr->external_tdls) {
|
||||||
|
ptdls_event->bss_index = priv->bss_index;
|
||||||
|
ptdls_event->event_id =
|
||||||
|
MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ;
|
||||||
|
ptdls_event->event_len = sizeof(tdls_tear_down_event);
|
||||||
|
memcpy_ext(priv->adapter,
|
||||||
|
(t_u8 *)tdls_evt->peer_mac_addr,
|
||||||
|
sta_ptr->mac_addr, MLAN_MAC_ADDR_LENGTH,
|
||||||
|
MLAN_MAC_ADDR_LENGTH);
|
||||||
|
tdls_evt->reason_code =
|
||||||
|
MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED;
|
||||||
|
wlan_recv_event(priv,
|
||||||
|
MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ,
|
||||||
|
ptdls_event);
|
||||||
|
}
|
||||||
|
sta_ptr = sta_ptr->pnext;
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Global Functions
|
Global Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
@ -170,6 +436,11 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
||||||
memset(pmadapter, &priv->curr_bss_params, 0x00,
|
memset(pmadapter, &priv->curr_bss_params, 0x00,
|
||||||
sizeof(priv->curr_bss_params));
|
sizeof(priv->curr_bss_params));
|
||||||
}
|
}
|
||||||
|
wlan_send_tdls_tear_down_request(priv);
|
||||||
|
wlan_delete_station_list(priv);
|
||||||
|
pmadapter->tdls_status = TDLS_NOT_SETUP;
|
||||||
|
priv->wmm_qosinfo = priv->saved_wmm_qosinfo;
|
||||||
|
pmadapter->sleep_period.period = pmadapter->saved_sleep_period.period;
|
||||||
pmadapter->tx_lock_flag = MFALSE;
|
pmadapter->tx_lock_flag = MFALSE;
|
||||||
pmadapter->pps_uapsd_mode = MFALSE;
|
pmadapter->pps_uapsd_mode = MFALSE;
|
||||||
pmadapter->delay_null_pkt = MFALSE;
|
pmadapter->delay_null_pkt = MFALSE;
|
||||||
|
@ -194,6 +465,11 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pmadapter->pending_disconnect_priv) {
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pevent->bss_index = priv->bss_index;
|
pevent->bss_index = priv->bss_index;
|
||||||
pevent->event_id = MLAN_EVENT_ID_FW_DISCONNECTED;
|
pevent->event_id = MLAN_EVENT_ID_FW_DISCONNECTED;
|
||||||
pevent->event_len = sizeof(priv->disconnect_reason_code);
|
pevent->event_len = sizeof(priv->disconnect_reason_code);
|
||||||
|
@ -258,6 +534,8 @@ static void wlan_process_sta_tx_pause_event(pmlan_private priv,
|
||||||
(MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset +
|
(MrvlIEtypesHeader_t *)(pevent->pbuf + pevent->data_offset +
|
||||||
sizeof(t_u32));
|
sizeof(t_u32));
|
||||||
MrvlIEtypes_tx_pause_t *tx_pause_tlv;
|
MrvlIEtypes_tx_pause_t *tx_pause_tlv;
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
tdlsStatus_e status;
|
||||||
t_u8 *bssid = MNULL;
|
t_u8 *bssid = MNULL;
|
||||||
ENTER();
|
ENTER();
|
||||||
if (priv->media_connected)
|
if (priv->media_connected)
|
||||||
|
@ -284,6 +562,27 @@ static void wlan_process_sta_tx_pause_event(pmlan_private priv,
|
||||||
priv->tx_pause = MTRUE;
|
priv->tx_pause = MTRUE;
|
||||||
else
|
else
|
||||||
priv->tx_pause = MFALSE;
|
priv->tx_pause = MFALSE;
|
||||||
|
} else {
|
||||||
|
status = wlan_get_tdls_link_status(
|
||||||
|
priv, tx_pause_tlv->peermac);
|
||||||
|
if (MTRUE == wlan_is_tdls_link_setup(status)) {
|
||||||
|
sta_ptr = wlan_get_station_entry(
|
||||||
|
priv, tx_pause_tlv->peermac);
|
||||||
|
if (sta_ptr) {
|
||||||
|
if (sta_ptr->tx_pause !=
|
||||||
|
tx_pause_tlv->tx_pause) {
|
||||||
|
sta_ptr->tx_pause =
|
||||||
|
tx_pause_tlv
|
||||||
|
->tx_pause;
|
||||||
|
wlan_update_ralist_tx_pause(
|
||||||
|
priv,
|
||||||
|
tx_pause_tlv
|
||||||
|
->peermac,
|
||||||
|
tx_pause_tlv
|
||||||
|
->tx_pause);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len);
|
tlv_buf_left -= (sizeof(MrvlIEtypesHeader_t) + tlv_len);
|
||||||
|
@ -711,7 +1010,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
||||||
PRINTM(MEVENT, "EVENT: Measurement Report Ready (%#x)\n",
|
PRINTM(MEVENT, "EVENT: Measurement Report Ready (%#x)\n",
|
||||||
eventcause);
|
eventcause);
|
||||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_MEASUREMENT_REPORT,
|
ret = wlan_prepare_cmd(priv, HostCmd_CMD_MEASUREMENT_REPORT,
|
||||||
HostCmd_ACT_GEN_SET, 0, 0, MNULL);
|
HostCmd_ACT_GEN_SET, 0, MNULL, MNULL);
|
||||||
break;
|
break;
|
||||||
case EVENT_WMM_STATUS_CHANGE:
|
case EVENT_WMM_STATUS_CHANGE:
|
||||||
if (pmbuf &&
|
if (pmbuf &&
|
||||||
|
@ -908,6 +1207,17 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
||||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED,
|
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_REMAIN_ON_CHAN_EXPIRED,
|
||||||
MNULL);
|
MNULL);
|
||||||
break;
|
break;
|
||||||
|
case EVENT_TDLS_GENERIC_EVENT:
|
||||||
|
PRINTM(MEVENT, "EVENT: TDLS event %d\n", eventcause);
|
||||||
|
wlan_parse_tdls_event(pmpriv, pmbuf);
|
||||||
|
pevent->bss_index = pmpriv->bss_index;
|
||||||
|
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);
|
||||||
|
break;
|
||||||
|
|
||||||
case EVENT_TX_DATA_PAUSE:
|
case EVENT_TX_DATA_PAUSE:
|
||||||
PRINTM(MEVENT, "EVENT: TX_DATA_PAUSE\n");
|
PRINTM(MEVENT, "EVENT: TX_DATA_PAUSE\n");
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the functions for station ioctl.
|
* @brief This file contains the functions for station ioctl.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -1377,7 +1377,7 @@ static mlan_status wlan_query_passphrase(mlan_private *priv,
|
||||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success,
|
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success,
|
||||||
* otherwise fail
|
* otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_bss_ioctl_find_bss(pmlan_adapter pmadapter,
|
static mlan_status wlan_bss_ioctl_find_bss(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
@ -1421,7 +1421,7 @@ mlan_status wlan_bss_ioctl_find_bss(pmlan_adapter pmadapter,
|
||||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success,
|
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success,
|
||||||
* otherwise fail
|
* otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_bss_ioctl_find_bssid(pmlan_adapter pmadapter,
|
static mlan_status wlan_bss_ioctl_find_bssid(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
@ -1455,7 +1455,8 @@ mlan_status wlan_bss_ioctl_find_bssid(pmlan_adapter pmadapter,
|
||||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success,
|
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success,
|
||||||
* otherwise fail
|
* otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_bss_ioctl_bss_11d_check_channel(pmlan_adapter pmadapter,
|
static mlan_status
|
||||||
|
wlan_bss_ioctl_bss_11d_check_channel(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -2716,7 +2717,7 @@ static mlan_status wlan_sec_ioctl_encrypt_mode(pmlan_adapter pmadapter,
|
||||||
*
|
*
|
||||||
* @return random charactor
|
* @return random charactor
|
||||||
*/
|
*/
|
||||||
t_u8 wlan_get_random_charactor(pmlan_adapter pmadapter)
|
static t_u8 wlan_get_random_charactor(pmlan_adapter pmadapter)
|
||||||
{
|
{
|
||||||
t_u32 sec, usec;
|
t_u32 sec, usec;
|
||||||
t_u8 ch = 0;
|
t_u8 ch = 0;
|
||||||
|
@ -2842,7 +2843,8 @@ static mlan_status wlan_sec_ioctl_set_wep_key(pmlan_adapter pmadapter,
|
||||||
else
|
else
|
||||||
sec->param.encrypt_key.key_len =
|
sec->param.encrypt_key.key_len =
|
||||||
WEP_104_BIT_LEN;
|
WEP_104_BIT_LEN;
|
||||||
for (i = 0; i < sec->param.encrypt_key.key_len;
|
for (i = 0;
|
||||||
|
i < (int)sec->param.encrypt_key.key_len;
|
||||||
i++)
|
i++)
|
||||||
sec->param.encrypt_key.key_material[i] =
|
sec->param.encrypt_key.key_material[i] =
|
||||||
wlan_get_random_charactor(
|
wlan_get_random_charactor(
|
||||||
|
@ -4239,12 +4241,11 @@ static mlan_status wlan_misc_ioctl_soft_reset(pmlan_adapter pmadapter,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_PENDING -- success, otherwise fail
|
* @return MLAN_STATUS_PENDING -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_ioctl_thermal(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_ioctl_thermal(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_ds_misc_cfg *misc = MNULL;
|
|
||||||
t_u16 cmd_action = 0;
|
t_u16 cmd_action = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
@ -4259,7 +4260,6 @@ mlan_status wlan_misc_ioctl_thermal(pmlan_adapter pmadapter,
|
||||||
return MLAN_STATUS_RESOURCE;
|
return MLAN_STATUS_RESOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
|
||||||
if (pioctl_req->action == MLAN_ACT_SET) {
|
if (pioctl_req->action == MLAN_ACT_SET) {
|
||||||
PRINTM(MERROR, "Thermal reading setting is not allowed!\n");
|
PRINTM(MERROR, "Thermal reading setting is not allowed!\n");
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -4287,7 +4287,7 @@ mlan_status wlan_misc_ioctl_thermal(pmlan_adapter pmadapter,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_PENDING -- success, otherwise fail
|
* @return MLAN_STATUS_PENDING -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_ioctl_subscribe_evt(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_ioctl_subscribe_evt(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
@ -4319,110 +4319,6 @@ mlan_status wlan_misc_ioctl_subscribe_evt(pmlan_adapter pmadapter,
|
||||||
#define FLTR_BUF_IP_OFFSET_2_IP_1 9
|
#define FLTR_BUF_IP_OFFSET_2_IP_1 9
|
||||||
#define FLTR_BUF_IP_OFFSET_2_IP_2 26
|
#define FLTR_BUF_IP_OFFSET_2_IP_2 26
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enable/Disable Auto ARP resonse
|
|
||||||
*
|
|
||||||
* @param pmadapter A pointer to mlan_adapter structure
|
|
||||||
* @param pioctl_req A pointer to ioctl request buffer
|
|
||||||
* @param ipv4_addr ipv4 Address
|
|
||||||
* @param num_ipv4 Number of ipv4 Addresses
|
|
||||||
*
|
|
||||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
|
||||||
*/
|
|
||||||
mlan_status wlan_ipaddr_auto_arp_resp(pmlan_adapter pmadapter,
|
|
||||||
pmlan_ioctl_req pioctl_req,
|
|
||||||
t_u32 *ipv4_addr, t_u8 num_ipv4)
|
|
||||||
{
|
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
|
||||||
HostCmd_DS_GEN *hostcmd_hdr;
|
|
||||||
HostCmd_DS_MEF_CFG *mefcmd;
|
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
|
||||||
mlan_ds_misc_cmd *hostcmd;
|
|
||||||
t_u32 buf_len = 0;
|
|
||||||
t_u8 *buf, *filter;
|
|
||||||
|
|
||||||
t_u8 fltr_buf[] = {0x01, 0x10, 0x21, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x08, 0x06, 0x02, 0x02, 0x14, 0x00, 0x00,
|
|
||||||
0x00, 0x01, 0x41, 0x01, 0x00, 0x00, 0x00, 0x01,
|
|
||||||
0xc0, 0xa8, 0x01, 0x6d, 0x04, 0x02, 0x2e, 0x00,
|
|
||||||
0x00, 0x00, 0x01, 0x41, 0x44};
|
|
||||||
t_u8 fltr_buf_2_ip[] = {0x01, 0x10, 0x33, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0xc0, 0xa8, 0x01, 0x6d, 0x04, 0x02, 0x2e,
|
|
||||||
0x00, 0x00, 0x00, 0x01, 0x41, 0x01, 0x00, 0x00,
|
|
||||||
0x00, 0x01, 0xc0, 0xa8, 0x02, 0x6d, 0x04, 0x02,
|
|
||||||
0x2e, 0x00, 0x00, 0x00, 0x01, 0x41, 0x45, 0x01,
|
|
||||||
0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x02, 0x02,
|
|
||||||
0x14, 0x00, 0x00, 0x00, 0x01, 0x41, 0x44};
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
ret = pcb->moal_malloc(pmadapter->pmoal_handle,
|
|
||||||
sizeof(mlan_ds_misc_cmd), MLAN_MEM_DEF,
|
|
||||||
(t_u8 **)&hostcmd);
|
|
||||||
|
|
||||||
if (ret != MLAN_STATUS_SUCCESS || hostcmd == MNULL) {
|
|
||||||
PRINTM(MERROR, "Failed to allocate hostcmd buffer\n");
|
|
||||||
pioctl_req->status_code = MLAN_ERROR_NO_MEM;
|
|
||||||
LEAVE();
|
|
||||||
return MLAN_STATUS_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(pmpriv->adapter, hostcmd, 0, sizeof(mlan_ds_misc_cmd));
|
|
||||||
buf = hostcmd->cmd;
|
|
||||||
|
|
||||||
/* Prepare hostcmd buffer */
|
|
||||||
hostcmd_hdr = (HostCmd_DS_GEN *)(buf);
|
|
||||||
hostcmd_hdr->command = wlan_cpu_to_le16(HostCmd_CMD_MEF_CFG);
|
|
||||||
mefcmd = (HostCmd_DS_MEF_CFG *)(buf + S_DS_GEN);
|
|
||||||
buf_len = S_DS_GEN;
|
|
||||||
|
|
||||||
if (!ipv4_addr) {
|
|
||||||
PRINTM(MINFO, "Disable Auto ARP Response\n");
|
|
||||||
mefcmd->criteria = wlan_cpu_to_le32(0);
|
|
||||||
mefcmd->nentries = wlan_cpu_to_le16(0);
|
|
||||||
buf_len += sizeof(HostCmd_DS_MEF_CFG);
|
|
||||||
} else {
|
|
||||||
/* Event bit (bit2) of HS conditions should be masked out */
|
|
||||||
mefcmd->criteria = wlan_cpu_to_le32(
|
|
||||||
pmpriv->adapter->hs_cfg.conditions & ~MBIT(2));
|
|
||||||
mefcmd->nentries = wlan_cpu_to_le16(1);
|
|
||||||
buf_len += sizeof(HostCmd_DS_MEF_CFG);
|
|
||||||
filter = buf + buf_len;
|
|
||||||
if (num_ipv4 == 1) {
|
|
||||||
memcpy_ext(pmpriv->adapter, filter, fltr_buf,
|
|
||||||
sizeof(fltr_buf), sizeof(fltr_buf));
|
|
||||||
memcpy_ext(pmpriv->adapter, &filter[FLTR_BUF_IP_OFFSET],
|
|
||||||
&ipv4_addr[0], sizeof(t_u32), sizeof(t_u32));
|
|
||||||
buf_len += sizeof(fltr_buf);
|
|
||||||
} else if (num_ipv4 >= 2) {
|
|
||||||
memcpy_ext(pmpriv->adapter, filter, fltr_buf_2_ip,
|
|
||||||
sizeof(fltr_buf_2_ip),
|
|
||||||
sizeof(fltr_buf_2_ip));
|
|
||||||
memcpy_ext(pmpriv->adapter,
|
|
||||||
&filter[FLTR_BUF_IP_OFFSET_2_IP_1],
|
|
||||||
&ipv4_addr[0], sizeof(t_u32), sizeof(t_u32));
|
|
||||||
memcpy_ext(pmpriv->adapter,
|
|
||||||
&filter[FLTR_BUF_IP_OFFSET_2_IP_2],
|
|
||||||
&ipv4_addr[1], sizeof(t_u32), sizeof(t_u32));
|
|
||||||
buf_len += sizeof(fltr_buf_2_ip);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hostcmd_hdr->size = wlan_cpu_to_le16(buf_len);
|
|
||||||
hostcmd->len = buf_len;
|
|
||||||
|
|
||||||
/* Send command to firmware */
|
|
||||||
ret = wlan_prepare_cmd(pmpriv, 0, 0, 0, (t_void *)pioctl_req,
|
|
||||||
(t_void *)hostcmd);
|
|
||||||
if (ret == MLAN_STATUS_SUCCESS)
|
|
||||||
ret = MLAN_STATUS_PENDING;
|
|
||||||
|
|
||||||
pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)hostcmd);
|
|
||||||
|
|
||||||
LEAVE();
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MEF configuration
|
* @brief MEF configuration
|
||||||
*
|
*
|
||||||
|
@ -4431,7 +4327,7 @@ mlan_status wlan_ipaddr_auto_arp_resp(pmlan_adapter pmadapter,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_ioctl_mef_cfg(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_ioctl_mef_cfg(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4540,7 +4436,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_ioctl_ipaddr_cfg(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_ioctl_ipaddr_cfg(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
@ -4559,7 +4455,7 @@ mlan_status wlan_misc_ioctl_ipaddr_cfg(pmlan_adapter pmadapter,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* only one IP is supported in current firmware */
|
/* only one IP is supported in current firmware */
|
||||||
for (i = 0; i < misc->param.ipaddr_cfg.ip_addr_num; i++) {
|
for (i = 0; i < (int)misc->param.ipaddr_cfg.ip_addr_num; i++) {
|
||||||
memcpy_ext(pmadapter, &ipv4_addr[i],
|
memcpy_ext(pmadapter, &ipv4_addr[i],
|
||||||
misc->param.ipaddr_cfg.ip_addr[i], sizeof(t_u32),
|
misc->param.ipaddr_cfg.ip_addr[i], sizeof(t_u32),
|
||||||
sizeof(t_u32));
|
sizeof(t_u32));
|
||||||
|
@ -4594,7 +4490,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_ioctl_cfp_code_cfg(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_ioctl_cfp_code_cfg(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4682,7 +4578,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_ioctl_country_code(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_ioctl_country_code(pmlan_adapter pmadapter,
|
||||||
mlan_ioctl_req *pioctl_req)
|
mlan_ioctl_req *pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4751,7 +4647,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_pmfcfg(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_pmfcfg(pmlan_adapter pmadapter,
|
||||||
mlan_ioctl_req *pioctl_req)
|
mlan_ioctl_req *pioctl_req)
|
||||||
{
|
{
|
||||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
@ -4829,18 +4725,15 @@ mlan_status wlan_misc_ioctl_tp_state(pmlan_adapter pmadapter,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_ds_misc_cfg *misc = MNULL;
|
|
||||||
t_u16 cmd_action = 0;
|
t_u16 cmd_action = 0;
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
|
||||||
|
|
||||||
if (pioctl_req->action == MLAN_ACT_GET)
|
if (pioctl_req->action == MLAN_ACT_GET)
|
||||||
cmd_action = HostCmd_ACT_GEN_GET;
|
cmd_action = HostCmd_ACT_GEN_GET;
|
||||||
else {
|
else {
|
||||||
|
@ -4868,7 +4761,7 @@ mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
* @return MLAN_STATUS_SUCCESS --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_ioctl_gtk_rekey_offload(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_ioctl_gtk_rekey_offload(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4914,7 +4807,7 @@ mlan_status wlan_misc_ioctl_gtk_rekey_offload(pmlan_adapter pmadapter,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_misc_cloud_keep_alive(pmlan_adapter pmadapter,
|
static mlan_status wlan_misc_cloud_keep_alive(pmlan_adapter pmadapter,
|
||||||
mlan_ioctl_req *pioctl_req)
|
mlan_ioctl_req *pioctl_req)
|
||||||
{
|
{
|
||||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
@ -5022,6 +4915,21 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
||||||
status = wlan_misc_ioctl_custom_ie_list(pmadapter, pioctl_req,
|
status = wlan_misc_ioctl_custom_ie_list(pmadapter, pioctl_req,
|
||||||
MTRUE);
|
MTRUE);
|
||||||
break;
|
break;
|
||||||
|
case MLAN_OID_MISC_TDLS_CONFIG:
|
||||||
|
status = wlan_misc_ioctl_tdls_config(pmadapter, pioctl_req);
|
||||||
|
break;
|
||||||
|
case MLAN_OID_MISC_TDLS_OPER:
|
||||||
|
status = wlan_misc_ioctl_tdls_oper(pmadapter, pioctl_req);
|
||||||
|
break;
|
||||||
|
case MLAN_OID_MISC_GET_TDLS_IES:
|
||||||
|
status = wlan_misc_ioctl_tdls_get_ies(pmadapter, pioctl_req);
|
||||||
|
break;
|
||||||
|
case MLAN_OID_MISC_TDLS_CS_CHANNEL:
|
||||||
|
status = wlan_misc_ioctl_tdls_cs_channel(pmadapter, pioctl_req);
|
||||||
|
break;
|
||||||
|
case MLAN_OID_MISC_TDLS_IDLE_TIME:
|
||||||
|
status = wlan_misc_ioctl_tdls_idle_time(pmadapter, pioctl_req);
|
||||||
|
break;
|
||||||
|
|
||||||
case MLAN_OID_MISC_MAC_CONTROL:
|
case MLAN_OID_MISC_MAC_CONTROL:
|
||||||
status = wlan_misc_ioctl_mac_control(pmadapter, pioctl_req);
|
status = wlan_misc_ioctl_mac_control(pmadapter, pioctl_req);
|
||||||
|
@ -5160,6 +5068,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
||||||
status = wlan_misc_ssu(pmadapter, pioctl_req);
|
status = wlan_misc_ssu(pmadapter, pioctl_req);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
case MLAN_OID_MISC_HAL_PHY_CFG:
|
||||||
|
status = wlan_misc_hal_phy_cfg(pmadapter, pioctl_req);
|
||||||
|
break;
|
||||||
case MLAN_OID_MISC_RX_ABORT_CFG:
|
case MLAN_OID_MISC_RX_ABORT_CFG:
|
||||||
status = wlan_misc_ioctl_rxabortcfg(pmadapter, pioctl_req);
|
status = wlan_misc_ioctl_rxabortcfg(pmadapter, pioctl_req);
|
||||||
break;
|
break;
|
||||||
|
@ -5189,6 +5100,7 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
||||||
case MLAN_OID_MISC_RF_TEST_GENERIC:
|
case MLAN_OID_MISC_RF_TEST_GENERIC:
|
||||||
case MLAN_OID_MISC_RF_TEST_TX_CONT:
|
case MLAN_OID_MISC_RF_TEST_TX_CONT:
|
||||||
case MLAN_OID_MISC_RF_TEST_TX_FRAME:
|
case MLAN_OID_MISC_RF_TEST_TX_FRAME:
|
||||||
|
case MLAN_OID_MISC_RF_TEST_HE_POWER:
|
||||||
status = wlan_misc_ioctl_rf_test_cfg(pmadapter, pioctl_req);
|
status = wlan_misc_ioctl_rf_test_cfg(pmadapter, pioctl_req);
|
||||||
break;
|
break;
|
||||||
case MLAN_OID_MISC_ARB_CONFIG:
|
case MLAN_OID_MISC_ARB_CONFIG:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* module.
|
* module.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -157,6 +157,208 @@ static t_u8 discard_gratuitous_ARP_msg(RxPacketHdr_t *prx_pkt,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function process tdls action frame
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private structure
|
||||||
|
* @param pbuf A pointer to tdls action frame buffer
|
||||||
|
* @param len len of tdls action frame buffer
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
||||||
|
{
|
||||||
|
sta_node *sta_ptr = MNULL;
|
||||||
|
IEEEtypes_VendorHeader_t *pvendor_ie = MNULL;
|
||||||
|
const t_u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
|
||||||
|
t_u8 *peer;
|
||||||
|
t_u8 *pos, *end;
|
||||||
|
t_u8 action;
|
||||||
|
int ie_len = 0;
|
||||||
|
t_u8 i;
|
||||||
|
int rate_len;
|
||||||
|
|
||||||
|
#define TDLS_PAYLOAD_TYPE 2
|
||||||
|
#define TDLS_CATEGORY 0x0c
|
||||||
|
#define TDLS_REQ_FIX_LEN 6
|
||||||
|
#define TDLS_RESP_FIX_LEN 8
|
||||||
|
#define TDLS_CONFIRM_FIX_LEN 6
|
||||||
|
if (len < (sizeof(EthII_Hdr_t) + 3))
|
||||||
|
return;
|
||||||
|
if (*(t_u8 *)(pbuf + sizeof(EthII_Hdr_t)) != TDLS_PAYLOAD_TYPE)
|
||||||
|
/*TDLS payload type = 2*/
|
||||||
|
return;
|
||||||
|
if (*(t_u8 *)(pbuf + sizeof(EthII_Hdr_t) + 1) != TDLS_CATEGORY)
|
||||||
|
/*TDLS category = 0xc */
|
||||||
|
return;
|
||||||
|
peer = pbuf + MLAN_MAC_ADDR_LENGTH;
|
||||||
|
|
||||||
|
action = *(t_u8 *)(pbuf + sizeof(EthII_Hdr_t) + 2);
|
||||||
|
/*2= payload type + category*/
|
||||||
|
|
||||||
|
if (action > TDLS_SETUP_CONFIRM) {
|
||||||
|
/*just handle TDLS setup request/response/confirm */
|
||||||
|
PRINTM(MMSG, "Recv TDLS Action: peer=" MACSTR ", action=%d\n",
|
||||||
|
MAC2STR(peer), action);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sta_ptr = wlan_add_station_entry(priv, peer);
|
||||||
|
if (!sta_ptr)
|
||||||
|
return;
|
||||||
|
if (action == TDLS_SETUP_REQUEST) { /*setup request*/
|
||||||
|
sta_ptr->status = TDLS_NOT_SETUP;
|
||||||
|
PRINTM(MMSG, "Recv TDLS SETUP Request: peer=" MACSTR "\n",
|
||||||
|
MAC2STR(peer));
|
||||||
|
wlan_hold_tdls_packets(priv, peer);
|
||||||
|
if (len < (sizeof(EthII_Hdr_t) + TDLS_REQ_FIX_LEN))
|
||||||
|
return;
|
||||||
|
pos = pbuf + sizeof(EthII_Hdr_t) + 4;
|
||||||
|
/*payload 1+ category 1 + action 1 +dialog 1*/
|
||||||
|
sta_ptr->capability = mlan_ntohs(*(t_u16 *)pos);
|
||||||
|
ie_len = len - sizeof(EthII_Hdr_t) - TDLS_REQ_FIX_LEN;
|
||||||
|
pos += 2;
|
||||||
|
} else if (action == 1) { /*setup respons*/
|
||||||
|
PRINTM(MMSG, "Recv TDLS SETUP Response: peer=" MACSTR "\n",
|
||||||
|
MAC2STR(peer));
|
||||||
|
if (len < (sizeof(EthII_Hdr_t) + TDLS_RESP_FIX_LEN))
|
||||||
|
return;
|
||||||
|
pos = pbuf + sizeof(EthII_Hdr_t) + 6;
|
||||||
|
/*payload 1+ category 1 + action 1 +dialog 1 +status 2*/
|
||||||
|
sta_ptr->capability = mlan_ntohs(*(t_u16 *)pos);
|
||||||
|
ie_len = len - sizeof(EthII_Hdr_t) - TDLS_RESP_FIX_LEN;
|
||||||
|
pos += 2;
|
||||||
|
} else { /*setup confirm*/
|
||||||
|
PRINTM(MMSG, "Recv TDLS SETUP Confirm: peer=" MACSTR "\n",
|
||||||
|
MAC2STR(peer));
|
||||||
|
if (len < (sizeof(EthII_Hdr_t) + TDLS_CONFIRM_FIX_LEN))
|
||||||
|
return;
|
||||||
|
pos = pbuf + sizeof(EthII_Hdr_t) + TDLS_CONFIRM_FIX_LEN;
|
||||||
|
/*payload 1+ category 1 + action 1 +dialog 1 + status 2*/
|
||||||
|
ie_len = len - sizeof(EthII_Hdr_t) - TDLS_CONFIRM_FIX_LEN;
|
||||||
|
}
|
||||||
|
for (end = pos + ie_len; pos + 1 < end; pos += 2 + pos[1]) {
|
||||||
|
if (pos + 2 + pos[1] > end)
|
||||||
|
break;
|
||||||
|
switch (*pos) {
|
||||||
|
case SUPPORTED_RATES:
|
||||||
|
sta_ptr->rate_len =
|
||||||
|
MIN(pos[1], sizeof(sta_ptr->support_rate));
|
||||||
|
for (i = 0; i < sta_ptr->rate_len; i++)
|
||||||
|
sta_ptr->support_rate[i] = pos[2 + i];
|
||||||
|
break;
|
||||||
|
case EXTENDED_SUPPORTED_RATES:
|
||||||
|
rate_len = MIN(pos[1], sizeof(sta_ptr->support_rate) -
|
||||||
|
sta_ptr->rate_len);
|
||||||
|
for (i = 0; i < rate_len; i++)
|
||||||
|
sta_ptr->support_rate[sta_ptr->rate_len + i] =
|
||||||
|
pos[2 + i];
|
||||||
|
sta_ptr->rate_len += rate_len;
|
||||||
|
break;
|
||||||
|
case HT_CAPABILITY:
|
||||||
|
memcpy_ext(priv->adapter, (t_u8 *)&sta_ptr->HTcap, pos,
|
||||||
|
sizeof(IEEEtypes_HTCap_t),
|
||||||
|
sizeof(IEEEtypes_HTCap_t));
|
||||||
|
sta_ptr->is_11n_enabled = 1;
|
||||||
|
DBG_HEXDUMP(MDAT_D, "TDLS HT capability",
|
||||||
|
(t_u8 *)(&sta_ptr->HTcap),
|
||||||
|
MIN(sizeof(IEEEtypes_HTCap_t),
|
||||||
|
MAX_DATA_DUMP_LEN));
|
||||||
|
break;
|
||||||
|
case HT_OPERATION:
|
||||||
|
memcpy_ext(priv->adapter, &sta_ptr->HTInfo, pos,
|
||||||
|
sizeof(IEEEtypes_HTInfo_t),
|
||||||
|
sizeof(IEEEtypes_HTInfo_t));
|
||||||
|
DBG_HEXDUMP(MDAT_D, "TDLS HT info",
|
||||||
|
(t_u8 *)(&sta_ptr->HTInfo),
|
||||||
|
MIN(sizeof(IEEEtypes_HTInfo_t),
|
||||||
|
MAX_DATA_DUMP_LEN));
|
||||||
|
break;
|
||||||
|
case BSSCO_2040:
|
||||||
|
memcpy_ext(priv->adapter, (t_u8 *)&sta_ptr->BSSCO_20_40,
|
||||||
|
pos, sizeof(IEEEtypes_2040BSSCo_t),
|
||||||
|
sizeof(IEEEtypes_2040BSSCo_t));
|
||||||
|
break;
|
||||||
|
case EXT_CAPABILITY:
|
||||||
|
sta_ptr->ExtCap.ieee_hdr.len =
|
||||||
|
MIN(pos[1], sizeof(ExtCap_t));
|
||||||
|
memcpy_ext(priv->adapter, (t_u8 *)&sta_ptr->ExtCap, pos,
|
||||||
|
sta_ptr->ExtCap.ieee_hdr.len +
|
||||||
|
sizeof(IEEEtypes_Header_t),
|
||||||
|
sizeof(IEEEtypes_ExtCap_t));
|
||||||
|
DBG_HEXDUMP(MDAT_D, "TDLS Extended capability",
|
||||||
|
(t_u8 *)(&sta_ptr->ExtCap),
|
||||||
|
sta_ptr->ExtCap.ieee_hdr.len + 2);
|
||||||
|
break;
|
||||||
|
case RSN_IE:
|
||||||
|
sta_ptr->rsn_ie.ieee_hdr.len =
|
||||||
|
MIN(pos[1], IEEE_MAX_IE_SIZE -
|
||||||
|
sizeof(IEEEtypes_Header_t));
|
||||||
|
memcpy_ext(priv->adapter, (t_u8 *)&sta_ptr->rsn_ie, pos,
|
||||||
|
sta_ptr->rsn_ie.ieee_hdr.len +
|
||||||
|
sizeof(IEEEtypes_Header_t),
|
||||||
|
sizeof(IEEEtypes_Generic_t));
|
||||||
|
DBG_HEXDUMP(MDAT_D, "TDLS Rsn ie ",
|
||||||
|
(t_u8 *)(&sta_ptr->rsn_ie),
|
||||||
|
sta_ptr->rsn_ie.ieee_hdr.len +
|
||||||
|
sizeof(IEEEtypes_Header_t));
|
||||||
|
break;
|
||||||
|
case QOS_INFO:
|
||||||
|
sta_ptr->qos_info = pos[2];
|
||||||
|
PRINTM(MDAT_D, "TDLS qos info %x\n", sta_ptr->qos_info);
|
||||||
|
break;
|
||||||
|
case VENDOR_SPECIFIC_221:
|
||||||
|
pvendor_ie = (IEEEtypes_VendorHeader_t *)pos;
|
||||||
|
if (!memcmp(priv->adapter, pvendor_ie->oui, wmm_oui,
|
||||||
|
sizeof(wmm_oui))) {
|
||||||
|
sta_ptr->qos_info = pos[8]; /** qos info in wmm
|
||||||
|
parameters in
|
||||||
|
response and
|
||||||
|
confirm */
|
||||||
|
PRINTM(MDAT_D, "TDLS qos info %x\n",
|
||||||
|
sta_ptr->qos_info);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LINK_ID:
|
||||||
|
memcpy_ext(priv->adapter, (t_u8 *)&sta_ptr->link_ie,
|
||||||
|
pos, sizeof(IEEEtypes_LinkIDElement_t),
|
||||||
|
sizeof(IEEEtypes_LinkIDElement_t));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VHT_CAPABILITY:
|
||||||
|
memcpy_ext(priv->adapter, (t_u8 *)&sta_ptr->vht_cap,
|
||||||
|
pos, sizeof(IEEEtypes_VHTCap_t),
|
||||||
|
sizeof(IEEEtypes_VHTCap_t));
|
||||||
|
sta_ptr->is_11ac_enabled = 1;
|
||||||
|
DBG_HEXDUMP(MDAT_D, "TDLS VHT capability",
|
||||||
|
(t_u8 *)(&sta_ptr->vht_cap),
|
||||||
|
MIN(sizeof(IEEEtypes_VHTCap_t),
|
||||||
|
MAX_DATA_DUMP_LEN));
|
||||||
|
break;
|
||||||
|
case VHT_OPERATION:
|
||||||
|
memcpy_ext(priv->adapter, (t_u8 *)&sta_ptr->vht_oprat,
|
||||||
|
pos, sizeof(IEEEtypes_VHTOprat_t),
|
||||||
|
sizeof(IEEEtypes_VHTOprat_t));
|
||||||
|
DBG_HEXDUMP(MDAT_D, "TDLS VHT Operation",
|
||||||
|
(t_u8 *)(&sta_ptr->vht_oprat),
|
||||||
|
MIN(sizeof(IEEEtypes_VHTOprat_t),
|
||||||
|
MAX_DATA_DUMP_LEN));
|
||||||
|
break;
|
||||||
|
case AID_INFO:
|
||||||
|
memcpy_ext(priv->adapter, (t_u8 *)&sta_ptr->aid_info,
|
||||||
|
pos, sizeof(IEEEtypes_AID_t),
|
||||||
|
sizeof(IEEEtypes_AID_t));
|
||||||
|
DBG_HEXDUMP(MDAT_D, "TDLS AID Info",
|
||||||
|
(t_u8 *)(&sta_ptr->aid_info),
|
||||||
|
MIN(sizeof(IEEEtypes_AID_t),
|
||||||
|
MAX_DATA_DUMP_LEN));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function processes received packet and forwards it
|
* @brief This function processes received packet and forwards it
|
||||||
* to kernel/upper layer
|
* to kernel/upper layer
|
||||||
|
@ -180,6 +382,7 @@ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
0x00, 0x00, 0xf8};
|
0x00, 0x00, 0xf8};
|
||||||
t_u8 appletalk_aarp_type[2] = {0x80, 0xf3};
|
t_u8 appletalk_aarp_type[2] = {0x80, 0xf3};
|
||||||
t_u8 ipx_snap_type[2] = {0x81, 0x37};
|
t_u8 ipx_snap_type[2] = {0x81, 0x37};
|
||||||
|
t_u8 tdls_action_type[2] = {0x89, 0x0d};
|
||||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||||
t_u8 eapol_type[2] = {0x88, 0x8e};
|
t_u8 eapol_type[2] = {0x88, 0x8e};
|
||||||
#endif
|
#endif
|
||||||
|
@ -265,6 +468,12 @@ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
"Bypass sending Gratuitous ARP frame to Kernel.\n");
|
"Bypass sending Gratuitous ARP frame to Kernel.\n");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
if (!memcmp(pmadapter, &prx_pkt->eth803_hdr.h803_len,
|
||||||
|
tdls_action_type, sizeof(tdls_action_type))) {
|
||||||
|
wlan_process_tdls_action_frame(
|
||||||
|
priv, ((t_u8 *)prx_pd + prx_pd->rx_pkt_offset),
|
||||||
|
prx_pd->rx_pkt_length);
|
||||||
|
}
|
||||||
/* Chop off the RxPD */
|
/* Chop off the RxPD */
|
||||||
hdr_chop = (t_u32)((t_ptr)&prx_pkt->eth803_hdr - (t_ptr)prx_pd);
|
hdr_chop = (t_u32)((t_ptr)&prx_pkt->eth803_hdr - (t_ptr)prx_pd);
|
||||||
}
|
}
|
||||||
|
@ -423,7 +632,8 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
||||||
* If the packet is not an unicast packet then send the packet
|
* If the packet is not an unicast packet then send the packet
|
||||||
* directly to os. Don't pass thru rx reordering
|
* directly to os. Don't pass thru rx reordering
|
||||||
*/
|
*/
|
||||||
if ((!IS_11N_ENABLED(priv)) ||
|
if ((!IS_11N_ENABLED(priv) &&
|
||||||
|
!(prx_pd->flags & RXPD_FLAG_PKT_DIRECT_LINK)) ||
|
||||||
memcmp(priv->adapter, priv->curr_addr,
|
memcmp(priv->adapter, priv->curr_addr,
|
||||||
prx_pkt->eth803_hdr.dest_addr, MLAN_MAC_ADDR_LENGTH)) {
|
prx_pkt->eth803_hdr.dest_addr, MLAN_MAC_ADDR_LENGTH)) {
|
||||||
priv->snr = prx_pd->snr;
|
priv->snr = prx_pd->snr;
|
||||||
|
@ -432,7 +642,8 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (queuing_ra_based(priv)) {
|
if (queuing_ra_based(priv) ||
|
||||||
|
(prx_pd->flags & RXPD_FLAG_PKT_DIRECT_LINK)) {
|
||||||
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
||||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
if (prx_pd->priority < MAX_NUM_TID) {
|
if (prx_pd->priority < MAX_NUM_TID) {
|
||||||
|
@ -444,6 +655,14 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
||||||
prx_pd->seq_num;
|
prx_pd->seq_num;
|
||||||
sta_ptr->snr = prx_pd->snr;
|
sta_ptr->snr = prx_pd->snr;
|
||||||
sta_ptr->nf = prx_pd->nf;
|
sta_ptr->nf = prx_pd->nf;
|
||||||
|
if (prx_pd->flags & RXPD_FLAG_PKT_DIRECT_LINK) {
|
||||||
|
pmadapter->callbacks
|
||||||
|
.moal_updata_peer_signal(
|
||||||
|
pmadapter->pmoal_handle,
|
||||||
|
pmbuf->bss_index, ta,
|
||||||
|
prx_pd->snr,
|
||||||
|
prx_pd->nf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!sta_ptr || !sta_ptr->is_11n_enabled) {
|
if (!sta_ptr || !sta_ptr->is_11n_enabled) {
|
||||||
wlan_process_rx_packet(pmadapter, pmbuf);
|
wlan_process_rx_packet(pmadapter, pmbuf);
|
||||||
|
|
|
@ -125,6 +125,8 @@ t_void *wlan_ops_sta_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
||||||
MRVDRV_TxPD_POWER_MGMT_LAST_PACKET;
|
MRVDRV_TxPD_POWER_MGMT_LAST_PACKET;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (pmbuf->flags & MLAN_BUF_FLAG_TDLS)
|
||||||
|
plocal_tx_pd->flags |= MRVDRV_TxPD_FLAGS_TDLS_PACKET;
|
||||||
/* Offset of actual data */
|
/* Offset of actual data */
|
||||||
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
plocal_tx_pd->tx_pkt_offset = (t_u16)(
|
||||||
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
(t_ptr)pmbuf->pbuf + pmbuf->data_offset - (t_ptr)plocal_tx_pd);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* @brief This file contains the handling of TX/RX in MLAN
|
* @brief This file contains the handling of TX/RX in MLAN
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2009-2020 NXP
|
* Copyright 2009-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -259,7 +259,6 @@ mlan_status wlan_recv_packet_complete(pmlan_adapter pmadapter,
|
||||||
pmlan_buffer pmbuf, mlan_status status)
|
pmlan_buffer pmbuf, mlan_status status)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb;
|
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -269,7 +268,6 @@ mlan_status wlan_recv_packet_complete(pmlan_adapter pmadapter,
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pcb = &pmadapter->callbacks;
|
|
||||||
MASSERT(pmbuf->bss_index < pmadapter->priv_num);
|
MASSERT(pmbuf->bss_index < pmadapter->priv_num);
|
||||||
|
|
||||||
if (pmbuf->pparent) {
|
if (pmbuf->pparent) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the handling of AP mode command and event
|
* @brief This file contains the handling of AP mode command and event
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2009-2020 NXP
|
* Copyright 2009-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -59,7 +59,7 @@ Change log:
|
||||||
* @param pdata_buf A pointer to data buffer
|
* @param pdata_buf A pointer to data buffer
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_cmd_set_get_band_steering_cfg(pmlan_private pmpriv,
|
static mlan_status wlan_cmd_set_get_band_steering_cfg(pmlan_private pmpriv,
|
||||||
HostCmd_DS_COMMAND *cmd,
|
HostCmd_DS_COMMAND *cmd,
|
||||||
t_u16 cmd_action,
|
t_u16 cmd_action,
|
||||||
t_void *pdata_buf)
|
t_void *pdata_buf)
|
||||||
|
@ -90,7 +90,8 @@ mlan_status wlan_cmd_set_get_band_steering_cfg(pmlan_private pmpriv,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_ret_set_get_band_steering_cfg(mlan_private *pmpriv,
|
static mlan_status
|
||||||
|
wlan_ret_set_get_band_steering_cfg(mlan_private *pmpriv,
|
||||||
HostCmd_DS_COMMAND *resp,
|
HostCmd_DS_COMMAND *resp,
|
||||||
mlan_ioctl_req *pioctl_buf)
|
mlan_ioctl_req *pioctl_buf)
|
||||||
{
|
{
|
||||||
|
@ -123,7 +124,7 @@ mlan_status wlan_ret_set_get_band_steering_cfg(mlan_private *pmpriv,
|
||||||
* @param pdata_buf A pointer to data buffer
|
* @param pdata_buf A pointer to data buffer
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_cmd_set_get_beacon_stuck_cfg(IN pmlan_private pmpriv,
|
static mlan_status wlan_cmd_set_get_beacon_stuck_cfg(IN pmlan_private pmpriv,
|
||||||
IN HostCmd_DS_COMMAND *cmd,
|
IN HostCmd_DS_COMMAND *cmd,
|
||||||
IN t_u16 cmd_action,
|
IN t_u16 cmd_action,
|
||||||
IN t_void *pdata_buf)
|
IN t_void *pdata_buf)
|
||||||
|
@ -154,7 +155,7 @@ mlan_status wlan_cmd_set_get_beacon_stuck_cfg(IN pmlan_private pmpriv,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_ret_set_get_beacon_stuck_cfg(mlan_private *pmpriv,
|
static mlan_status wlan_ret_set_get_beacon_stuck_cfg(mlan_private *pmpriv,
|
||||||
HostCmd_DS_COMMAND *resp,
|
HostCmd_DS_COMMAND *resp,
|
||||||
mlan_ioctl_req *pioctl_buf)
|
mlan_ioctl_req *pioctl_buf)
|
||||||
{
|
{
|
||||||
|
@ -324,7 +325,7 @@ static mlan_status uap_process_cmdresp_error(mlan_private *pmpriv,
|
||||||
*
|
*
|
||||||
* @return A pointer to structure sta_node
|
* @return A pointer to structure sta_node
|
||||||
*/
|
*/
|
||||||
void wlan_notify_station_deauth(mlan_private *priv)
|
static void wlan_notify_station_deauth(mlan_private *priv)
|
||||||
{
|
{
|
||||||
sta_node *sta_ptr;
|
sta_node *sta_ptr;
|
||||||
t_u8 event_buf[100];
|
t_u8 event_buf[100];
|
||||||
|
@ -2390,7 +2391,7 @@ static mlan_status wlan_uap_ret_sys_config(pmlan_private pmpriv,
|
||||||
mlan_ioctl_req *pioctl_buf)
|
mlan_ioctl_req *pioctl_buf)
|
||||||
{
|
{
|
||||||
int resp_len = 0, travel_len = 0;
|
int resp_len = 0, travel_len = 0;
|
||||||
int i = 0;
|
t_u32 i = 0;
|
||||||
custom_ie *cptr;
|
custom_ie *cptr;
|
||||||
HostCmd_DS_SYS_CONFIG *sys_config =
|
HostCmd_DS_SYS_CONFIG *sys_config =
|
||||||
(HostCmd_DS_SYS_CONFIG *)&resp->params.sys_config;
|
(HostCmd_DS_SYS_CONFIG *)&resp->params.sys_config;
|
||||||
|
@ -2532,7 +2533,7 @@ static mlan_status wlan_uap_ret_sys_config(pmlan_private pmpriv,
|
||||||
0;
|
0;
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
i <
|
i <
|
||||||
wlan_le16_to_cpu(
|
(int)wlan_le16_to_cpu(
|
||||||
tlv_chan_list->header.len) /
|
tlv_chan_list->header.len) /
|
||||||
sizeof(ChanScanParamSet_t);
|
sizeof(ChanScanParamSet_t);
|
||||||
i++) {
|
i++) {
|
||||||
|
@ -2634,7 +2635,7 @@ static mlan_status wlan_uap_ret_sys_config(pmlan_private pmpriv,
|
||||||
cust_ie->ie_data_list[0]
|
cust_ie->ie_data_list[0]
|
||||||
.ie_index);
|
.ie_index);
|
||||||
|
|
||||||
while (resp_len > sizeof(t_u16)) {
|
while (resp_len > (int)sizeof(t_u16)) {
|
||||||
cptr = (custom_ie
|
cptr = (custom_ie
|
||||||
*)(((t_u8 *)cust_ie
|
*)(((t_u8 *)cust_ie
|
||||||
->ie_data_list) +
|
->ie_data_list) +
|
||||||
|
@ -3168,6 +3169,14 @@ static mlan_status wlan_uap_ret_get_log(pmlan_private pmpriv,
|
||||||
wlan_le32_to_cpu(pget_log->channel_number);
|
wlan_le32_to_cpu(pget_log->channel_number);
|
||||||
pget_info->param.stats.channel_switch_mode =
|
pget_info->param.stats.channel_switch_mode =
|
||||||
wlan_le32_to_cpu(pget_log->channel_switch_mode);
|
wlan_le32_to_cpu(pget_log->channel_switch_mode);
|
||||||
|
pget_info->param.stats.rx_reset_mac_recovery_cnt =
|
||||||
|
wlan_le32_to_cpu(pget_log->rx_reset_mac_recovery_cnt);
|
||||||
|
pget_info->param.stats.rx_Isr2_NotDone_Cnt =
|
||||||
|
wlan_le32_to_cpu(pget_log->rx_Isr2_NotDone_Cnt);
|
||||||
|
pget_info->param.stats.gdma_abort_cnt =
|
||||||
|
wlan_le32_to_cpu(pget_log->gdma_abort_cnt);
|
||||||
|
pget_info->param.stats.g_reset_rx_mac_cnt =
|
||||||
|
wlan_le32_to_cpu(pget_log->g_reset_rx_mac_cnt);
|
||||||
if (pmpriv->adapter->getlog_enable) {
|
if (pmpriv->adapter->getlog_enable) {
|
||||||
pget_info->param.stats.tx_frag_cnt =
|
pget_info->param.stats.tx_frag_cnt =
|
||||||
wlan_le32_to_cpu(pget_log->tx_frag_cnt);
|
wlan_le32_to_cpu(pget_log->tx_frag_cnt);
|
||||||
|
@ -3592,7 +3601,7 @@ static mlan_status wlan_uap_ret_sta_list(pmlan_private pmpriv,
|
||||||
} else
|
} else
|
||||||
info->param.sta_list.info[i].bandmode = 0xFF;
|
info->param.sta_list.info[i].bandmode = 0xFF;
|
||||||
pioctl_buf->data_read_written +=
|
pioctl_buf->data_read_written +=
|
||||||
sizeof(sta_info) +
|
sizeof(sta_info_data) +
|
||||||
info->param.sta_list.info[i].ie_len;
|
info->param.sta_list.info[i].ie_len;
|
||||||
buf += sizeof(MrvlIEtypes_sta_info_t) +
|
buf += sizeof(MrvlIEtypes_sta_info_t) +
|
||||||
info->param.sta_list.info[i].ie_len;
|
info->param.sta_list.info[i].ie_len;
|
||||||
|
@ -3922,7 +3931,7 @@ static t_u32 wlan_process_sta_assoc_event(pmlan_private priv,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_ret_cmd_uap_acs_scan(pmlan_private pmpriv,
|
static mlan_status wlan_ret_cmd_uap_acs_scan(pmlan_private pmpriv,
|
||||||
const HostCmd_DS_COMMAND *resp,
|
const HostCmd_DS_COMMAND *resp,
|
||||||
mlan_ioctl_req *pioctl_buf)
|
mlan_ioctl_req *pioctl_buf)
|
||||||
{
|
{
|
||||||
|
@ -4046,7 +4055,8 @@ static mlan_status wlan_uap_ret_oper_ctrl(pmlan_private pmpriv,
|
||||||
* @return MTRUE/MFALSE
|
* @return MTRUE/MFALSE
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
t_u8 wlan_check_11B_support_rates(MrvlIEtypes_RatesParamSet_t *prates_tlv)
|
static t_u8
|
||||||
|
wlan_check_11B_support_rates(MrvlIEtypes_RatesParamSet_t *prates_tlv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
t_u8 rate;
|
t_u8 rate;
|
||||||
|
@ -4090,7 +4100,7 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
||||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||||
MrvlIETypes_HTCap_t *phtcap;
|
MrvlIETypes_HTCap_t *phtcap;
|
||||||
MrvlIETypes_VHTCap_t *pvhtcap;
|
MrvlIETypes_VHTCap_t *pvhtcap;
|
||||||
MrvlIEtypes_Extension_t *pext_tlv;
|
MrvlIEtypes_Extension_t *pext_tlv = MNULL;
|
||||||
MrvlIEtypes_StaFlag_t *pstaflag;
|
MrvlIEtypes_StaFlag_t *pstaflag;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -4199,6 +4209,8 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
||||||
if (pext_tlv->ext_id == HE_CAPABILITY) {
|
if (pext_tlv->ext_id == HE_CAPABILITY) {
|
||||||
sta_ptr->is_11ax_enabled = MTRUE;
|
sta_ptr->is_11ax_enabled = MTRUE;
|
||||||
PRINTM(MCMND, "STA supports 11ax\n");
|
PRINTM(MCMND, "STA supports 11ax\n");
|
||||||
|
} else {
|
||||||
|
pext_tlv = MNULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -4216,6 +4228,22 @@ static mlan_status wlan_uap_cmd_add_station(pmlan_private pmpriv,
|
||||||
travel_len += sizeof(MrvlIEtypesHeader_t) + tlv_len;
|
travel_len += sizeof(MrvlIEtypesHeader_t) + tlv_len;
|
||||||
tlv_buf_left -= sizeof(MrvlIEtypesHeader_t) + tlv_len;
|
tlv_buf_left -= sizeof(MrvlIEtypesHeader_t) + tlv_len;
|
||||||
}
|
}
|
||||||
|
if (sta_ptr->is_11ax_enabled) {
|
||||||
|
if (pext_tlv == MNULL) {
|
||||||
|
tlv = (MrvlIEtypesHeader_t *)pos;
|
||||||
|
tlv->type = wlan_cpu_to_le16(EXTENSION);
|
||||||
|
tlv->len = wlan_cpu_to_le16(
|
||||||
|
MIN(sta_ptr->he_cap.ieee_hdr.len,
|
||||||
|
sizeof(IEEEtypes_HECap_t) -
|
||||||
|
sizeof(IEEEtypes_Header_t)));
|
||||||
|
|
||||||
|
pos += sizeof(MrvlIEtypesHeader_t);
|
||||||
|
memcpy_ext(pmadapter, pos,
|
||||||
|
(t_u8 *)&sta_ptr->he_cap.ext_id, tlv->len,
|
||||||
|
tlv->len);
|
||||||
|
travel_len += sizeof(MrvlIEtypesHeader_t) + tlv->len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sta_ptr->is_11n_enabled) {
|
if (sta_ptr->is_11n_enabled) {
|
||||||
if (pmpriv->uap_channel <= 14)
|
if (pmpriv->uap_channel <= 14)
|
||||||
|
@ -4625,6 +4653,10 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
||||||
ret = wlan_cmd_set_get_beacon_stuck_cfg(pmpriv, cmd_ptr,
|
ret = wlan_cmd_set_get_beacon_stuck_cfg(pmpriv, cmd_ptr,
|
||||||
cmd_action, pdata_buf);
|
cmd_action, pdata_buf);
|
||||||
break;
|
break;
|
||||||
|
case HostCmd_CMD_HAL_PHY_CFG:
|
||||||
|
ret = wlan_cmd_hal_phy_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||||
|
pdata_buf);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no);
|
PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no);
|
||||||
if (pioctl_req)
|
if (pioctl_req)
|
||||||
|
@ -4816,15 +4848,18 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
||||||
pmadapter->pcard_sd->reg->data_port_mask;
|
pmadapter->pcard_sd->reg->data_port_mask;
|
||||||
|
|
||||||
for (ctr = 1;
|
for (ctr = 1;
|
||||||
ctr <= MAX_PORT - pmadapter->pcard_sd->mp_end_port;
|
ctr <= pmadapter->pcard_sd->max_ports -
|
||||||
|
pmadapter->pcard_sd->mp_end_port;
|
||||||
ctr++) {
|
ctr++) {
|
||||||
pmadapter->pcard_sd->mp_data_port_mask &=
|
pmadapter->pcard_sd->mp_data_port_mask &=
|
||||||
~(1 << (MAX_PORT - ctr));
|
~(1 << (pmadapter->pcard_sd->max_ports -
|
||||||
|
ctr));
|
||||||
}
|
}
|
||||||
|
|
||||||
pmadapter->pcard_sd->curr_wr_port = 0;
|
pmadapter->pcard_sd->curr_wr_port =
|
||||||
|
pmadapter->pcard_sd->reg->start_wr_port;
|
||||||
pmadapter->pcard_sd->mpa_tx.pkt_aggr_limit =
|
pmadapter->pcard_sd->mpa_tx.pkt_aggr_limit =
|
||||||
MIN(SDIO_MP_AGGR_DEF_PKT_LIMIT,
|
MIN(pmadapter->pcard_sd->mp_aggr_pkt_limit,
|
||||||
(pmadapter->pcard_sd->mp_end_port >> 1));
|
(pmadapter->pcard_sd->mp_end_port >> 1));
|
||||||
PRINTM(MCMND, "end port %d, data port mask %x\n",
|
PRINTM(MCMND, "end port %d, data port mask %x\n",
|
||||||
wlan_le16_to_cpu(
|
wlan_le16_to_cpu(
|
||||||
|
@ -4975,6 +5010,9 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
||||||
ret = wlan_ret_dot11mc_unassoc_ftm_cfg(pmpriv, resp,
|
ret = wlan_ret_dot11mc_unassoc_ftm_cfg(pmpriv, resp,
|
||||||
pioctl_buf);
|
pioctl_buf);
|
||||||
break;
|
break;
|
||||||
|
case HostCmd_CMD_HAL_PHY_CFG:
|
||||||
|
ret = wlan_ret_hal_phy_cfg(pmpriv, resp, pioctl_buf);
|
||||||
|
break;
|
||||||
case HostCmd_CMD_RATE_ADAPT_CFG:
|
case HostCmd_CMD_RATE_ADAPT_CFG:
|
||||||
ret = wlan_ret_rate_adapt_cfg(pmpriv, resp, pioctl_buf);
|
ret = wlan_ret_rate_adapt_cfg(pmpriv, resp, pioctl_buf);
|
||||||
break;
|
break;
|
||||||
|
@ -5520,7 +5558,8 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_PENDING or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_uap_set_uap_max_sta(pmlan_private pmpriv, t_u8 uap_max_sta)
|
static mlan_status wlan_uap_set_uap_max_sta(pmlan_private pmpriv,
|
||||||
|
t_u8 uap_max_sta)
|
||||||
{
|
{
|
||||||
MrvlIEtypes_uap_max_sta_cnt_t tlv_uap_max_sta;
|
MrvlIEtypes_uap_max_sta_cnt_t tlv_uap_max_sta;
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the handling of AP mode ioctls
|
* @brief This file contains the handling of AP mode ioctls
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2009-2020 NXP
|
* Copyright 2009-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -42,7 +42,6 @@ Change log:
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Global Variables
|
Global Variables
|
||||||
********************************************************/
|
********************************************************/
|
||||||
extern t_u8 tos_to_tid_inv[];
|
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Local Functions
|
Local Functions
|
||||||
|
@ -342,6 +341,9 @@ static mlan_status wlan_uap_bss_ioctl_reset(pmlan_adapter pmadapter,
|
||||||
pmpriv->aggr_prio_tbl[i].amsdu = tos_to_tid_inv[i];
|
pmpriv->aggr_prio_tbl[i].amsdu = tos_to_tid_inv[i];
|
||||||
pmpriv->addba_reject[i] = ADDBA_RSP_STATUS_ACCEPT;
|
pmpriv->addba_reject[i] = ADDBA_RSP_STATUS_ACCEPT;
|
||||||
}
|
}
|
||||||
|
pmpriv->aggr_prio_tbl[6].amsdu = BA_STREAM_NOT_ALLOWED;
|
||||||
|
pmpriv->aggr_prio_tbl[7].amsdu = BA_STREAM_NOT_ALLOWED;
|
||||||
|
|
||||||
pmpriv->aggr_prio_tbl[6].ampdu_user =
|
pmpriv->aggr_prio_tbl[6].ampdu_user =
|
||||||
pmpriv->aggr_prio_tbl[7].ampdu_user = BA_STREAM_NOT_ALLOWED;
|
pmpriv->aggr_prio_tbl[7].ampdu_user = BA_STREAM_NOT_ALLOWED;
|
||||||
pmpriv->addba_reject[6] = pmpriv->addba_reject[7] =
|
pmpriv->addba_reject[6] = pmpriv->addba_reject[7] =
|
||||||
|
@ -371,7 +373,7 @@ static mlan_status wlan_uap_bss_ioctl_reset(pmlan_adapter pmadapter,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_uap_bss_ioctl_add_station(pmlan_adapter pmadapter,
|
static mlan_status wlan_uap_bss_ioctl_add_station(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
@ -437,13 +439,11 @@ static mlan_status wlan_uap_bss_ioctl_uap_wmm_param(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
mlan_ds_bss *bss = MNULL;
|
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u16 cmd_action = 0;
|
t_u16 cmd_action = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
bss = (mlan_ds_bss *)pioctl_req->pbuf;
|
|
||||||
if (pioctl_req->action == MLAN_ACT_SET)
|
if (pioctl_req->action == MLAN_ACT_SET)
|
||||||
cmd_action = HostCmd_ACT_GEN_SET;
|
cmd_action = HostCmd_ACT_GEN_SET;
|
||||||
else
|
else
|
||||||
|
@ -472,13 +472,11 @@ wlan_uap_bss_ioctl_uap_scan_channels(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
mlan_ds_bss *bss = MNULL;
|
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u16 cmd_action = 0;
|
t_u16 cmd_action = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
bss = (mlan_ds_bss *)pioctl_req->pbuf;
|
|
||||||
if (pioctl_req->action == MLAN_ACT_SET)
|
if (pioctl_req->action == MLAN_ACT_SET)
|
||||||
cmd_action = HostCmd_ACT_GEN_SET;
|
cmd_action = HostCmd_ACT_GEN_SET;
|
||||||
else
|
else
|
||||||
|
@ -506,13 +504,11 @@ static mlan_status wlan_uap_bss_ioctl_uap_channel(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
mlan_ds_bss *bss = MNULL;
|
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u16 cmd_action = 0;
|
t_u16 cmd_action = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
bss = (mlan_ds_bss *)pioctl_req->pbuf;
|
|
||||||
if (pioctl_req->action == MLAN_ACT_SET)
|
if (pioctl_req->action == MLAN_ACT_SET)
|
||||||
cmd_action = HostCmd_ACT_GEN_SET;
|
cmd_action = HostCmd_ACT_GEN_SET;
|
||||||
else
|
else
|
||||||
|
@ -540,7 +536,6 @@ static mlan_status wlan_uap_bss_ioctl_uap_oper_ctrl(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
mlan_ds_bss *bss = MNULL;
|
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u16 cmd_action = 0;
|
t_u16 cmd_action = 0;
|
||||||
|
|
||||||
|
@ -548,7 +543,6 @@ static mlan_status wlan_uap_bss_ioctl_uap_oper_ctrl(pmlan_adapter pmadapter,
|
||||||
|
|
||||||
if (pmadapter->fw_ver == HOST_API_VERSION_V15 &&
|
if (pmadapter->fw_ver == HOST_API_VERSION_V15 &&
|
||||||
pmadapter->fw_min_ver >= FW_MINOR_VERSION_1) {
|
pmadapter->fw_min_ver >= FW_MINOR_VERSION_1) {
|
||||||
bss = (mlan_ds_bss *)pioctl_req->pbuf;
|
|
||||||
if (pioctl_req->action == MLAN_ACT_SET)
|
if (pioctl_req->action == MLAN_ACT_SET)
|
||||||
cmd_action = HostCmd_ACT_GEN_SET;
|
cmd_action = HostCmd_ACT_GEN_SET;
|
||||||
else
|
else
|
||||||
|
@ -1763,7 +1757,7 @@ mlan_status wlan_uap_get_beacon_dtim(pmlan_private pmpriv)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_uap_snmp_mib_ctrl_deauth(pmlan_adapter pmadapter,
|
static mlan_status wlan_uap_snmp_mib_ctrl_deauth(pmlan_adapter pmadapter,
|
||||||
pmlan_ioctl_req pioctl_req)
|
pmlan_ioctl_req pioctl_req)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||||
|
@ -2072,6 +2066,8 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
||||||
if (misc->sub_command == MLAN_OID_MISC_DOT11MC_UNASSOC_FTM_CFG)
|
if (misc->sub_command == MLAN_OID_MISC_DOT11MC_UNASSOC_FTM_CFG)
|
||||||
status = wlan_misc_ioctl_dot11mc_unassoc_ftm_cfg(
|
status = wlan_misc_ioctl_dot11mc_unassoc_ftm_cfg(
|
||||||
pmadapter, pioctl_req);
|
pmadapter, pioctl_req);
|
||||||
|
if (misc->sub_command == MLAN_OID_MISC_HAL_PHY_CFG)
|
||||||
|
status = wlan_misc_hal_phy_cfg(pmadapter, pioctl_req);
|
||||||
if (misc->sub_command == MLAN_OID_MISC_RATE_ADAPT_CFG)
|
if (misc->sub_command == MLAN_OID_MISC_RATE_ADAPT_CFG)
|
||||||
status = wlan_misc_ioctl_rate_adapt_cfg(pmadapter,
|
status = wlan_misc_ioctl_rate_adapt_cfg(pmadapter,
|
||||||
pioctl_req);
|
pioctl_req);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains AP mode transmit and receive functions
|
* @brief This file contains AP mode transmit and receive functions
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2009-2020 NXP
|
* Copyright 2009-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains USB specific code
|
* @brief This file contains USB specific code
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -99,7 +99,8 @@ static const struct _mlan_card_info mlan_card_info_usb9097 = {
|
||||||
* @param rev_id A pointer to chip revision id
|
* @param rev_id A pointer to chip revision id
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_usb_check_revision(mlan_adapter *pmadapter, t_u32 *rev_id)
|
static mlan_status wlan_usb_check_revision(mlan_adapter *pmadapter,
|
||||||
|
t_u32 *rev_id)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||||
|
@ -416,7 +417,7 @@ static int wlan_usb_deaggr_rx_num_pkts(pmlan_adapter pmadapter, t_u8 *pdata,
|
||||||
RxPD *prx_pd;
|
RxPD *prx_pd;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
while (aggr_pkt_len >= sizeof(RxPD)) {
|
while (aggr_pkt_len >= (int)sizeof(RxPD)) {
|
||||||
prx_pd = (RxPD *)pdata;
|
prx_pd = (RxPD *)pdata;
|
||||||
pkt_len = wlan_le16_to_cpu(prx_pd->rx_pkt_length) +
|
pkt_len = wlan_le16_to_cpu(prx_pd->rx_pkt_length) +
|
||||||
wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
||||||
|
@ -771,7 +772,8 @@ mlan_status wlan_get_usb_device(pmlan_adapter pmadapter)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_usb_dnld_fw(pmlan_adapter pmadapter, pmlan_fw_image pmfw)
|
static mlan_status wlan_usb_dnld_fw(pmlan_adapter pmadapter,
|
||||||
|
pmlan_fw_image pmfw)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
@ -813,7 +815,7 @@ mlan_status wlan_usb_deaggr_rx_pkt(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
wlan_le16_to_cpu(prx_pd->rx_pkt_offset);
|
||||||
/* if non-aggregate, just send through, don’t process here */
|
/* if non-aggregate, just send through, don’t process here */
|
||||||
aggr_len = pmbuf->data_len;
|
aggr_len = pmbuf->data_len;
|
||||||
if ((aggr_len == curr_pkt_len) ||
|
if ((aggr_len == (t_s32)curr_pkt_len) ||
|
||||||
(wlan_usb_deaggr_rx_num_pkts(pmadapter, pdata, aggr_len) == 1) ||
|
(wlan_usb_deaggr_rx_num_pkts(pmadapter, pdata, aggr_len) == 1) ||
|
||||||
(pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable != MTRUE)) {
|
(pmadapter->pcard_usb->usb_rx_deaggr.aggr_ctrl.enable != MTRUE)) {
|
||||||
ret = wlan_handle_rx_packet(pmadapter, pmbuf);
|
ret = wlan_handle_rx_packet(pmadapter, pmbuf);
|
||||||
|
@ -821,7 +823,7 @@ mlan_status wlan_usb_deaggr_rx_pkt(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (aggr_len >= sizeof(RxPD)) {
|
while (aggr_len >= (t_s32)sizeof(RxPD)) {
|
||||||
/* check for (all-zeroes) termination RxPD */
|
/* check for (all-zeroes) termination RxPD */
|
||||||
if (!memcmp(pmadapter, pdata, zero_rx_pd, sizeof(RxPD))) {
|
if (!memcmp(pmadapter, pdata, zero_rx_pd, sizeof(RxPD))) {
|
||||||
break;
|
break;
|
||||||
|
@ -855,7 +857,7 @@ mlan_status wlan_usb_deaggr_rx_pkt(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* last block has no padding bytes */
|
/* last block has no padding bytes */
|
||||||
if (aggr_len == curr_pkt_len) {
|
if (aggr_len == (t_s32)curr_pkt_len) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,7 +892,7 @@ mlan_status wlan_usb_deaggr_rx_pkt(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
*
|
*
|
||||||
* @return MTRUE/MFALSE
|
* @return MTRUE/MFALSE
|
||||||
*/
|
*/
|
||||||
t_u8 wlan_is_port_tx_paused(pmlan_adapter pmadapter,
|
static t_u8 wlan_is_port_tx_paused(pmlan_adapter pmadapter,
|
||||||
usb_tx_aggr_params *pusb_tx_aggr)
|
usb_tx_aggr_params *pusb_tx_aggr)
|
||||||
{
|
{
|
||||||
mlan_private *pmpriv = MNULL;
|
mlan_private *pmpriv = MNULL;
|
||||||
|
@ -1097,7 +1099,8 @@ mlan_status wlan_usb_host_to_card_aggr(pmlan_adapter pmadapter,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_pm_usb_wakeup_card(pmlan_adapter pmadapter, t_u8 timeout)
|
static mlan_status wlan_pm_usb_wakeup_card(pmlan_adapter pmadapter,
|
||||||
|
t_u8 timeout)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 age_ts_usec;
|
t_u32 age_ts_usec;
|
||||||
|
@ -1135,8 +1138,9 @@ mlan_status wlan_pm_usb_wakeup_card(pmlan_adapter pmadapter, t_u8 timeout)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
static mlan_status wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
||||||
mlan_buffer *pmbuf, mlan_tx_param *tx_param)
|
mlan_buffer *pmbuf,
|
||||||
|
mlan_tx_param *tx_param)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
usb_tx_aggr_params *pusb_tx_aggr = MNULL;
|
usb_tx_aggr_params *pusb_tx_aggr = MNULL;
|
||||||
|
@ -1200,8 +1204,9 @@ mlan_status wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
||||||
* @param pmbuf A pointer to the mlan_buffer
|
* @param pmbuf A pointer to the mlan_buffer
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_usb_cmdevt_complete(pmlan_adapter pmadapter,
|
static mlan_status wlan_usb_cmdevt_complete(pmlan_adapter pmadapter,
|
||||||
mlan_buffer *pmbuf, mlan_status status)
|
mlan_buffer *pmbuf,
|
||||||
|
mlan_status status)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -1219,7 +1224,8 @@ mlan_status wlan_usb_cmdevt_complete(pmlan_adapter pmadapter,
|
||||||
* @param pmbuf A pointer to the mlan_buffer
|
* @param pmbuf A pointer to the mlan_buffer
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_usb_data_complete(pmlan_adapter pmadapter, mlan_buffer *pmbuf,
|
static mlan_status wlan_usb_data_complete(pmlan_adapter pmadapter,
|
||||||
|
mlan_buffer *pmbuf,
|
||||||
mlan_status status)
|
mlan_status status)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
@ -1238,7 +1244,7 @@ mlan_status wlan_usb_data_complete(pmlan_adapter pmadapter, mlan_buffer *pmbuf,
|
||||||
* @param pmbuf A pointer to the mlan_buffer
|
* @param pmbuf A pointer to the mlan_buffer
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
mlan_status wlan_usb_handle_rx_packet(mlan_adapter *pmadapter,
|
static mlan_status wlan_usb_handle_rx_packet(mlan_adapter *pmadapter,
|
||||||
pmlan_buffer pmbuf)
|
pmlan_buffer pmbuf)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* spinlock and timer defines.
|
* spinlock and timer defines.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -47,6 +47,9 @@ typedef struct _mlan_list_head {
|
||||||
t_void *plock;
|
t_void *plock;
|
||||||
} mlan_list_head, *pmlan_list_head;
|
} mlan_list_head, *pmlan_list_head;
|
||||||
|
|
||||||
|
/** MLAN MNULL pointer */
|
||||||
|
#define MNULL ((void *)0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function initializes a list without locking
|
* @brief This function initializes a list without locking
|
||||||
*
|
*
|
||||||
|
@ -78,7 +81,7 @@ static INLINE t_void util_init_list_head(
|
||||||
if (lock_required)
|
if (lock_required)
|
||||||
moal_init_lock(pmoal_handle, &phead->plock);
|
moal_init_lock(pmoal_handle, &phead->plock);
|
||||||
else
|
else
|
||||||
phead->plock = 0;
|
phead->plock = MNULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -93,7 +96,7 @@ static INLINE t_void util_free_list_head(
|
||||||
t_void *pmoal_handle, pmlan_list_head phead,
|
t_void *pmoal_handle, pmlan_list_head phead,
|
||||||
mlan_status (*moal_free_lock)(t_void *handle, t_void *plock))
|
mlan_status (*moal_free_lock)(t_void *handle, t_void *plock))
|
||||||
{
|
{
|
||||||
phead->pprev = phead->pnext = 0;
|
phead->pprev = phead->pnext = MNULL;
|
||||||
if (phead->plock)
|
if (phead->plock)
|
||||||
moal_free_lock(pmoal_handle, phead->plock);
|
moal_free_lock(pmoal_handle, phead->plock);
|
||||||
}
|
}
|
||||||
|
@ -112,7 +115,7 @@ util_peek_list(t_void *pmoal_handle, pmlan_list_head phead,
|
||||||
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
mlan_status (*moal_spin_lock)(t_void *handle, t_void *plock),
|
||||||
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
mlan_status (*moal_spin_unlock)(t_void *handle, t_void *plock))
|
||||||
{
|
{
|
||||||
pmlan_linked_list pnode = 0;
|
pmlan_linked_list pnode = MNULL;
|
||||||
|
|
||||||
if (moal_spin_lock)
|
if (moal_spin_lock)
|
||||||
moal_spin_lock(pmoal_handle, phead->plock);
|
moal_spin_lock(pmoal_handle, phead->plock);
|
||||||
|
@ -204,7 +207,7 @@ static INLINE t_void util_unlink_list(
|
||||||
pmy_next->pprev = pmy_prev;
|
pmy_next->pprev = pmy_prev;
|
||||||
pmy_prev->pnext = pmy_next;
|
pmy_prev->pnext = pmy_next;
|
||||||
|
|
||||||
pnode->pnext = pnode->pprev = 0;
|
pnode->pnext = pnode->pprev = MNULL;
|
||||||
if (moal_spin_unlock)
|
if (moal_spin_unlock)
|
||||||
moal_spin_unlock(pmoal_handle, phead->plock);
|
moal_spin_unlock(pmoal_handle, phead->plock);
|
||||||
}
|
}
|
||||||
|
@ -229,9 +232,9 @@ static INLINE pmlan_linked_list util_dequeue_list(
|
||||||
moal_spin_lock(pmoal_handle, phead->plock);
|
moal_spin_lock(pmoal_handle, phead->plock);
|
||||||
pnode = phead->pnext;
|
pnode = phead->pnext;
|
||||||
if (pnode && (pnode != (pmlan_linked_list)phead))
|
if (pnode && (pnode != (pmlan_linked_list)phead))
|
||||||
util_unlink_list(pmoal_handle, phead, pnode, 0, 0);
|
util_unlink_list(pmoal_handle, phead, pnode, MNULL, MNULL);
|
||||||
else
|
else
|
||||||
pnode = 0;
|
pnode = MNULL;
|
||||||
if (moal_spin_unlock)
|
if (moal_spin_unlock)
|
||||||
moal_spin_unlock(pmoal_handle, phead->plock);
|
moal_spin_unlock(pmoal_handle, phead->plock);
|
||||||
return pnode;
|
return pnode;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains functions for WMM.
|
* @brief This file contains functions for WMM.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -97,7 +97,7 @@ static const t_u8 wmm_aci_to_qidx_map[] = {WMM_AC_BE, WMM_AC_BK, WMM_AC_VI,
|
||||||
* This table will be used to store the tid values based on ACs.
|
* This table will be used to store the tid values based on ACs.
|
||||||
* It is initialized to default values per TID.
|
* It is initialized to default values per TID.
|
||||||
*/
|
*/
|
||||||
t_u8 tos_to_tid[] = {
|
static t_u8 tos_to_tid[] = {
|
||||||
/* TID DSCP_P2 DSCP_P1 DSCP_P0 WMM_AC */
|
/* TID DSCP_P2 DSCP_P1 DSCP_P0 WMM_AC */
|
||||||
0x01, /* 0 1 0 AC_BK */
|
0x01, /* 0 1 0 AC_BK */
|
||||||
0x02, /* 0 0 0 AC_BK */
|
0x02, /* 0 0 0 AC_BK */
|
||||||
|
@ -124,7 +124,7 @@ t_u8 tos_to_tid_inv[] = {0x02, /* from tos_to_tid[2] = 0 */
|
||||||
* change and will be used to copy back the default values to tos_to_tid in
|
* change and will be used to copy back the default values to tos_to_tid in
|
||||||
* case of disconnect.
|
* case of disconnect.
|
||||||
*/
|
*/
|
||||||
const t_u8 ac_to_tid[4][2] = {{1, 2}, {0, 3}, {4, 5}, {6, 7}};
|
t_u8 ac_to_tid[4][2] = {{1, 2}, {0, 3}, {4, 5}, {6, 7}};
|
||||||
|
|
||||||
/* Map of TOS UP values to WMM AC */
|
/* Map of TOS UP values to WMM AC */
|
||||||
static const mlan_wmm_ac_e tos_to_ac[] = {WMM_AC_BE, WMM_AC_BK, WMM_AC_BK,
|
static const mlan_wmm_ac_e tos_to_ac[] = {WMM_AC_BE, WMM_AC_BK, WMM_AC_BK,
|
||||||
|
@ -208,6 +208,53 @@ done:
|
||||||
return ra_list;
|
return ra_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Add packet to TDLS pending TX queue
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param pmbuf Pointer to the mlan_buffer data struct
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static t_void wlan_add_buf_tdls_txqueue(pmlan_private priv, pmlan_buffer pmbuf)
|
||||||
|
{
|
||||||
|
mlan_adapter *pmadapter = priv->adapter;
|
||||||
|
ENTER();
|
||||||
|
util_enqueue_list_tail(pmadapter->pmoal_handle, &priv->tdls_pending_txq,
|
||||||
|
(pmlan_linked_list)pmbuf,
|
||||||
|
pmadapter->callbacks.moal_spin_lock,
|
||||||
|
pmadapter->callbacks.moal_spin_unlock);
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clean up the tdls pending TX queue
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static t_void wlan_cleanup_tdls_txq(pmlan_private priv)
|
||||||
|
{
|
||||||
|
pmlan_buffer pmbuf;
|
||||||
|
mlan_adapter *pmadapter = priv->adapter;
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||||
|
priv->tdls_pending_txq.plock);
|
||||||
|
while ((pmbuf = (pmlan_buffer)util_peek_list(pmadapter->pmoal_handle,
|
||||||
|
&priv->tdls_pending_txq,
|
||||||
|
MNULL, MNULL))) {
|
||||||
|
util_unlink_list(pmadapter->pmoal_handle,
|
||||||
|
&priv->tdls_pending_txq,
|
||||||
|
(pmlan_linked_list)pmbuf, MNULL, MNULL);
|
||||||
|
wlan_write_data_complete(pmadapter, pmbuf, MLAN_STATUS_FAILURE);
|
||||||
|
}
|
||||||
|
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||||
|
priv->tdls_pending_txq.plock);
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Map ACs to TID
|
* @brief Map ACs to TID
|
||||||
*
|
*
|
||||||
|
@ -1203,6 +1250,200 @@ t_u16 wlan_update_ralist_tx_pause(pmlan_private priv, t_u8 *mac, t_u8 tx_pause)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
|
/**
|
||||||
|
* @brief update tx_pause flag in none tdls ra_list
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param mac peer mac address
|
||||||
|
* @param tx_pause tx_pause flag (0/1)
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
t_void wlan_update_non_tdls_ralist(mlan_private *priv, t_u8 *mac, t_u8 tx_pause)
|
||||||
|
{
|
||||||
|
raListTbl *ra_list;
|
||||||
|
int i;
|
||||||
|
pmlan_adapter pmadapter = priv->adapter;
|
||||||
|
t_u32 pkt_cnt = 0;
|
||||||
|
t_u32 tx_pkts_queued = 0;
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||||
|
priv->wmm.ra_list_spinlock);
|
||||||
|
for (i = 0; i < MAX_NUM_TID; ++i) {
|
||||||
|
ra_list = (raListTbl *)util_peek_list(
|
||||||
|
priv->adapter->pmoal_handle,
|
||||||
|
&priv->wmm.tid_tbl_ptr[i].ra_list, MNULL, MNULL);
|
||||||
|
while (ra_list &&
|
||||||
|
(ra_list !=
|
||||||
|
(raListTbl *)&priv->wmm.tid_tbl_ptr[i].ra_list)) {
|
||||||
|
if (memcmp(priv->adapter, ra_list->ra, mac,
|
||||||
|
MLAN_MAC_ADDR_LENGTH) &&
|
||||||
|
ra_list->tx_pause != tx_pause) {
|
||||||
|
pkt_cnt += ra_list->total_pkts;
|
||||||
|
ra_list->tx_pause = tx_pause;
|
||||||
|
if (tx_pause)
|
||||||
|
priv->wmm.pkts_paused[i] +=
|
||||||
|
ra_list->total_pkts;
|
||||||
|
else
|
||||||
|
priv->wmm.pkts_paused[i] -=
|
||||||
|
ra_list->total_pkts;
|
||||||
|
}
|
||||||
|
ra_list = ra_list->pnext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pkt_cnt) {
|
||||||
|
tx_pkts_queued = util_scalar_read(pmadapter->pmoal_handle,
|
||||||
|
&priv->wmm.tx_pkts_queued,
|
||||||
|
MNULL, MNULL);
|
||||||
|
if (tx_pause)
|
||||||
|
tx_pkts_queued -= pkt_cnt;
|
||||||
|
else
|
||||||
|
tx_pkts_queued += pkt_cnt;
|
||||||
|
util_scalar_write(priv->adapter->pmoal_handle,
|
||||||
|
&priv->wmm.tx_pkts_queued, tx_pkts_queued,
|
||||||
|
MNULL, MNULL);
|
||||||
|
util_scalar_write(priv->adapter->pmoal_handle,
|
||||||
|
&priv->wmm.highest_queued_prio, HIGH_PRIO_TID,
|
||||||
|
MNULL, MNULL);
|
||||||
|
}
|
||||||
|
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||||
|
priv->wmm.ra_list_spinlock);
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief find tdls buffer from ralist
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param ralist A pointer to ralistTbl
|
||||||
|
* @param mac TDLS peer mac address
|
||||||
|
*
|
||||||
|
* @return pmlan_buffer or MNULL
|
||||||
|
*/
|
||||||
|
static pmlan_buffer wlan_find_tdls_packets(mlan_private *priv,
|
||||||
|
raListTbl *ra_list, t_u8 *mac)
|
||||||
|
{
|
||||||
|
pmlan_buffer pmbuf = MNULL;
|
||||||
|
mlan_adapter *pmadapter = priv->adapter;
|
||||||
|
t_u8 ra[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
ENTER();
|
||||||
|
pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle,
|
||||||
|
&ra_list->buf_head, MNULL, MNULL);
|
||||||
|
if (!pmbuf) {
|
||||||
|
LEAVE();
|
||||||
|
return MNULL;
|
||||||
|
}
|
||||||
|
while (pmbuf != (pmlan_buffer)&ra_list->buf_head) {
|
||||||
|
memcpy_ext(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
if (!memcmp(priv->adapter, ra, mac, MLAN_MAC_ADDR_LENGTH)) {
|
||||||
|
LEAVE();
|
||||||
|
return pmbuf;
|
||||||
|
}
|
||||||
|
pmbuf = pmbuf->pnext;
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
return MNULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief find tdls buffer from tdls pending queue
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param mac TDLS peer mac address
|
||||||
|
*
|
||||||
|
* @return pmlan_buffer or MNULL
|
||||||
|
*/
|
||||||
|
static pmlan_buffer wlan_find_packets_tdls_txq(mlan_private *priv, t_u8 *mac)
|
||||||
|
{
|
||||||
|
pmlan_buffer pmbuf = MNULL;
|
||||||
|
mlan_adapter *pmadapter = priv->adapter;
|
||||||
|
t_u8 ra[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
ENTER();
|
||||||
|
pmbuf = (pmlan_buffer)util_peek_list(priv->adapter->pmoal_handle,
|
||||||
|
&priv->tdls_pending_txq, MNULL,
|
||||||
|
MNULL);
|
||||||
|
if (!pmbuf) {
|
||||||
|
LEAVE();
|
||||||
|
return MNULL;
|
||||||
|
}
|
||||||
|
while (pmbuf != (pmlan_buffer)&priv->tdls_pending_txq) {
|
||||||
|
memcpy_ext(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
if (!memcmp(priv->adapter, ra, mac, MLAN_MAC_ADDR_LENGTH)) {
|
||||||
|
LEAVE();
|
||||||
|
return pmbuf;
|
||||||
|
}
|
||||||
|
pmbuf = pmbuf->pnext;
|
||||||
|
}
|
||||||
|
LEAVE();
|
||||||
|
return MNULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Remove TDLS ralist and move packets to AP's ralist
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param mac TDLS peer mac address
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static t_void wlan_wmm_delete_tdls_ralist(pmlan_private priv, t_u8 *mac)
|
||||||
|
{
|
||||||
|
raListTbl *ra_list;
|
||||||
|
raListTbl *ra_list_ap = MNULL;
|
||||||
|
int i;
|
||||||
|
pmlan_adapter pmadapter = priv->adapter;
|
||||||
|
pmlan_buffer pmbuf;
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_NUM_TID; ++i) {
|
||||||
|
ra_list = wlan_wmm_get_ralist_node(priv, i, mac);
|
||||||
|
if (ra_list) {
|
||||||
|
PRINTM(MDATA, "delete TDLS ralist %p\n", ra_list);
|
||||||
|
ra_list_ap = (raListTbl *)util_peek_list(
|
||||||
|
pmadapter->pmoal_handle,
|
||||||
|
&priv->wmm.tid_tbl_ptr[i].ra_list, MNULL,
|
||||||
|
MNULL);
|
||||||
|
if (!ra_list_ap) {
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
while ((pmbuf = (pmlan_buffer)util_peek_list(
|
||||||
|
pmadapter->pmoal_handle,
|
||||||
|
&ra_list->buf_head, MNULL, MNULL))) {
|
||||||
|
util_unlink_list(pmadapter->pmoal_handle,
|
||||||
|
&ra_list->buf_head,
|
||||||
|
(pmlan_linked_list)pmbuf,
|
||||||
|
MNULL, MNULL);
|
||||||
|
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||||
|
&ra_list_ap->buf_head,
|
||||||
|
(pmlan_linked_list)pmbuf,
|
||||||
|
MNULL, MNULL);
|
||||||
|
ra_list_ap->total_pkts++;
|
||||||
|
ra_list_ap->packet_count++;
|
||||||
|
}
|
||||||
|
util_free_list_head(
|
||||||
|
(t_void *)pmadapter->pmoal_handle,
|
||||||
|
&ra_list->buf_head,
|
||||||
|
pmadapter->callbacks.moal_free_lock);
|
||||||
|
|
||||||
|
util_unlink_list(pmadapter->pmoal_handle,
|
||||||
|
&priv->wmm.tid_tbl_ptr[i].ra_list,
|
||||||
|
(pmlan_linked_list)ra_list, MNULL,
|
||||||
|
MNULL);
|
||||||
|
pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle,
|
||||||
|
(t_u8 *)ra_list);
|
||||||
|
if (priv->wmm.tid_tbl_ptr[i].ra_list_curr == ra_list)
|
||||||
|
priv->wmm.tid_tbl_ptr[i].ra_list_curr =
|
||||||
|
ra_list_ap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
#endif /* STA_SUPPORT */
|
#endif /* STA_SUPPORT */
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Global Functions
|
Global Functions
|
||||||
|
@ -1257,6 +1498,9 @@ t_void wlan_clean_txrx(pmlan_private priv)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
wlan_cleanup_bypass_txq(priv);
|
wlan_cleanup_bypass_txq(priv);
|
||||||
|
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) {
|
||||||
|
wlan_cleanup_tdls_txq(priv);
|
||||||
|
}
|
||||||
wlan_11n_cleanup_reorder_tbl(priv);
|
wlan_11n_cleanup_reorder_tbl(priv);
|
||||||
wlan_11n_deleteall_txbastream_tbl(priv);
|
wlan_11n_deleteall_txbastream_tbl(priv);
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
|
@ -1440,6 +1684,7 @@ void wlan_ralist_add(mlan_private *priv, t_u8 *ra)
|
||||||
int i;
|
int i;
|
||||||
raListTbl *ra_list;
|
raListTbl *ra_list;
|
||||||
pmlan_adapter pmadapter = priv->adapter;
|
pmlan_adapter pmadapter = priv->adapter;
|
||||||
|
tdlsStatus_e status;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -1457,11 +1702,24 @@ void wlan_ralist_add(mlan_private *priv, t_u8 *ra)
|
||||||
ra_list->max_amsdu =
|
ra_list->max_amsdu =
|
||||||
get_station_max_amsdu_size(priv, ra);
|
get_station_max_amsdu_size(priv, ra);
|
||||||
ra_list->tx_pause = wlan_is_tx_pause(priv, ra);
|
ra_list->tx_pause = wlan_is_tx_pause(priv, ra);
|
||||||
|
} else {
|
||||||
|
ra_list->is_tdls_link = MFALSE;
|
||||||
|
ra_list->tx_pause = MFALSE;
|
||||||
|
status = wlan_get_tdls_link_status(priv, ra);
|
||||||
|
if (MTRUE == wlan_is_tdls_link_setup(status)) {
|
||||||
|
ra_list->is_11n_enabled =
|
||||||
|
is_station_11n_enabled(priv, ra);
|
||||||
|
if (ra_list->is_11n_enabled)
|
||||||
|
ra_list->max_amsdu =
|
||||||
|
get_station_max_amsdu_size(priv,
|
||||||
|
ra);
|
||||||
|
ra_list->is_tdls_link = MTRUE;
|
||||||
} else {
|
} else {
|
||||||
ra_list->is_11n_enabled = IS_11N_ENABLED(priv);
|
ra_list->is_11n_enabled = IS_11N_ENABLED(priv);
|
||||||
if (ra_list->is_11n_enabled)
|
if (ra_list->is_11n_enabled)
|
||||||
ra_list->max_amsdu = priv->max_amsdu;
|
ra_list->max_amsdu = priv->max_amsdu;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PRINTM_NETINTF(MDATA, priv);
|
PRINTM_NETINTF(MDATA, priv);
|
||||||
PRINTM(MDATA, "ralist %p: is_11n_enabled=%d max_amsdu=%d\n",
|
PRINTM(MDATA, "ralist %p: is_11n_enabled=%d max_amsdu=%d\n",
|
||||||
|
@ -1641,7 +1899,7 @@ mlan_status wlan_cmd_wmm_status_change(pmlan_private priv)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
ret = wlan_prepare_cmd(priv, HostCmd_CMD_WMM_GET_STATUS, 0, 0, 0,
|
ret = wlan_prepare_cmd(priv, HostCmd_CMD_WMM_GET_STATUS, 0, 0, MNULL,
|
||||||
MNULL);
|
MNULL);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1826,6 +2084,7 @@ t_void wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
t_u32 tid;
|
t_u32 tid;
|
||||||
raListTbl *ra_list;
|
raListTbl *ra_list;
|
||||||
t_u8 ra[MLAN_MAC_ADDR_LENGTH], tid_down;
|
t_u8 ra[MLAN_MAC_ADDR_LENGTH], tid_down;
|
||||||
|
tdlsStatus_e status;
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
psta_node sta_ptr = MNULL;
|
psta_node sta_ptr = MNULL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1849,9 +2108,24 @@ t_void wlan_wmm_add_buf_txqueue(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
||||||
association we just don't have to call get_queue_raptr, we will have
|
association we just don't have to call get_queue_raptr, we will have
|
||||||
only 1 raptr for a tid in case of infra */
|
only 1 raptr for a tid in case of infra */
|
||||||
if (!queuing_ra_based(priv)) {
|
if (!queuing_ra_based(priv)) {
|
||||||
|
memcpy_ext(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset,
|
||||||
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
status = wlan_get_tdls_link_status(priv, ra);
|
||||||
|
if (MTRUE == wlan_is_tdls_link_setup(status)) {
|
||||||
|
ra_list = wlan_wmm_get_queue_raptr(priv, tid_down, ra);
|
||||||
|
pmbuf->flags |= MLAN_BUF_FLAG_TDLS;
|
||||||
|
} else if (status == TDLS_SETUP_INPROGRESS) {
|
||||||
|
wlan_add_buf_tdls_txqueue(priv, pmbuf);
|
||||||
|
pmadapter->callbacks.moal_spin_unlock(
|
||||||
|
pmadapter->pmoal_handle,
|
||||||
|
priv->wmm.ra_list_spinlock);
|
||||||
|
LEAVE();
|
||||||
|
return;
|
||||||
|
} else
|
||||||
ra_list = (raListTbl *)util_peek_list(
|
ra_list = (raListTbl *)util_peek_list(
|
||||||
pmadapter->pmoal_handle,
|
pmadapter->pmoal_handle,
|
||||||
&priv->wmm.tid_tbl_ptr[tid_down].ra_list, MNULL, MNULL);
|
&priv->wmm.tid_tbl_ptr[tid_down].ra_list, MNULL,
|
||||||
|
MNULL);
|
||||||
} else {
|
} else {
|
||||||
memcpy_ext(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset,
|
memcpy_ext(pmadapter, ra, pmbuf->pbuf + pmbuf->data_offset,
|
||||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||||
|
@ -1962,10 +2236,10 @@ mlan_status wlan_ret_wmm_get_status(pmlan_private priv, t_u8 *ptlv,
|
||||||
PRINTM(MINFO, "WMM: WMM_GET_STATUS cmdresp received: %d\n", resp_len);
|
PRINTM(MINFO, "WMM: WMM_GET_STATUS cmdresp received: %d\n", resp_len);
|
||||||
HEXDUMP("CMD_RESP: WMM_GET_STATUS", pcurrent, resp_len);
|
HEXDUMP("CMD_RESP: WMM_GET_STATUS", pcurrent, resp_len);
|
||||||
|
|
||||||
while (resp_len >= sizeof(ptlv_hdr->header)) {
|
while (resp_len >= (int)sizeof(ptlv_hdr->header)) {
|
||||||
ptlv_hdr = (MrvlIEtypes_Data_t *)pcurrent;
|
ptlv_hdr = (MrvlIEtypes_Data_t *)pcurrent;
|
||||||
tlv_len = wlan_le16_to_cpu(ptlv_hdr->header.len);
|
tlv_len = wlan_le16_to_cpu(ptlv_hdr->header.len);
|
||||||
if ((tlv_len + sizeof(ptlv_hdr->header)) > resp_len) {
|
if ((int)(tlv_len + sizeof(ptlv_hdr->header)) > resp_len) {
|
||||||
PRINTM(MERROR,
|
PRINTM(MERROR,
|
||||||
"WMM get status: Error in processing TLV buffer\n");
|
"WMM get status: Error in processing TLV buffer\n");
|
||||||
resp_len = 0;
|
resp_len = 0;
|
||||||
|
@ -2188,7 +2462,13 @@ t_u8 wlan_wmm_compute_driver_packet_delay(pmlan_private priv,
|
||||||
|
|
||||||
priv->adapter->callbacks.moal_get_system_time(
|
priv->adapter->callbacks.moal_get_system_time(
|
||||||
priv->adapter->pmoal_handle, &out_ts_sec, &out_ts_usec);
|
priv->adapter->pmoal_handle, &out_ts_sec, &out_ts_usec);
|
||||||
|
if (priv->adapter->tp_state_on) {
|
||||||
|
pmbuf->out_ts_sec = out_ts_sec;
|
||||||
|
pmbuf->out_ts_usec = out_ts_usec;
|
||||||
|
if (pmbuf->in_ts_sec)
|
||||||
|
priv->adapter->callbacks.moal_tp_accounting(
|
||||||
|
priv->adapter->pmoal_handle, pmbuf, 11);
|
||||||
|
}
|
||||||
queue_delay = (t_s32)(out_ts_sec - pmbuf->in_ts_sec) * 1000;
|
queue_delay = (t_s32)(out_ts_sec - pmbuf->in_ts_sec) * 1000;
|
||||||
queue_delay += (t_s32)(out_ts_usec - pmbuf->in_ts_usec) / 1000;
|
queue_delay += (t_s32)(out_ts_usec - pmbuf->in_ts_usec) / 1000;
|
||||||
|
|
||||||
|
@ -2198,7 +2478,8 @@ t_u8 wlan_wmm_compute_driver_packet_delay(pmlan_private priv,
|
||||||
*
|
*
|
||||||
* Pass max value if queue_delay is beyond the uint8 range
|
* Pass max value if queue_delay is beyond the uint8 range
|
||||||
*/
|
*/
|
||||||
ret_val = (t_u8)(MIN(queue_delay, priv->wmm.drv_pkt_delay_max) >> 1);
|
ret_val = (t_u8)(MIN(queue_delay, (t_s32)priv->wmm.drv_pkt_delay_max) >>
|
||||||
|
1);
|
||||||
|
|
||||||
PRINTM(MINFO, "WMM: Pkt Delay: %d ms, %d ms sent to FW\n", queue_delay,
|
PRINTM(MINFO, "WMM: Pkt Delay: %d ms, %d ms sent to FW\n", queue_delay,
|
||||||
ret_val);
|
ret_val);
|
||||||
|
@ -2420,6 +2701,125 @@ t_void wlan_wmm_delete_peer_ralist(pmlan_private priv, t_u8 *mac)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
|
/**
|
||||||
|
* @brief Hold TDLS packets to tdls pending queue
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param mac station mac address
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
t_void wlan_hold_tdls_packets(pmlan_private priv, t_u8 *mac)
|
||||||
|
{
|
||||||
|
pmlan_buffer pmbuf;
|
||||||
|
mlan_adapter *pmadapter = priv->adapter;
|
||||||
|
raListTbl *ra_list = MNULL;
|
||||||
|
t_u8 i;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||||
|
priv->wmm.ra_list_spinlock);
|
||||||
|
PRINTM(MDATA, "wlan_hold_tdls_packets: " MACSTR "\n", MAC2STR(mac));
|
||||||
|
for (i = 0; i < MAX_NUM_TID; ++i) {
|
||||||
|
ra_list = (raListTbl *)util_peek_list(
|
||||||
|
pmadapter->pmoal_handle,
|
||||||
|
&priv->wmm.tid_tbl_ptr[i].ra_list, MNULL, MNULL);
|
||||||
|
if (ra_list) {
|
||||||
|
while ((pmbuf = wlan_find_tdls_packets(priv, ra_list,
|
||||||
|
mac))) {
|
||||||
|
util_unlink_list(pmadapter->pmoal_handle,
|
||||||
|
&ra_list->buf_head,
|
||||||
|
(pmlan_linked_list)pmbuf,
|
||||||
|
MNULL, MNULL);
|
||||||
|
ra_list->total_pkts--;
|
||||||
|
priv->wmm.pkts_queued[i]--;
|
||||||
|
util_scalar_decrement(pmadapter->pmoal_handle,
|
||||||
|
&priv->wmm.tx_pkts_queued,
|
||||||
|
MNULL, MNULL);
|
||||||
|
ra_list->packet_count--;
|
||||||
|
wlan_add_buf_tdls_txqueue(priv, pmbuf);
|
||||||
|
PRINTM(MDATA, "hold tdls packet=%p\n", pmbuf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||||
|
priv->wmm.ra_list_spinlock);
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief move TDLS packets back to ralist
|
||||||
|
*
|
||||||
|
* @param priv A pointer to mlan_private
|
||||||
|
* @param mac TDLS peer mac address
|
||||||
|
* @param status tdlsStatus
|
||||||
|
*
|
||||||
|
* @return pmlan_buffer or MNULL
|
||||||
|
*/
|
||||||
|
t_void wlan_restore_tdls_packets(pmlan_private priv, t_u8 *mac,
|
||||||
|
tdlsStatus_e status)
|
||||||
|
{
|
||||||
|
pmlan_buffer pmbuf;
|
||||||
|
mlan_adapter *pmadapter = priv->adapter;
|
||||||
|
raListTbl *ra_list = MNULL;
|
||||||
|
t_u32 tid;
|
||||||
|
t_u32 tid_down;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
PRINTM(MDATA, "wlan_restore_tdls_packets: " MACSTR " status=%d\n",
|
||||||
|
MAC2STR(mac), status);
|
||||||
|
|
||||||
|
pmadapter->callbacks.moal_spin_lock(pmadapter->pmoal_handle,
|
||||||
|
priv->wmm.ra_list_spinlock);
|
||||||
|
|
||||||
|
while ((pmbuf = wlan_find_packets_tdls_txq(priv, mac))) {
|
||||||
|
util_unlink_list(pmadapter->pmoal_handle,
|
||||||
|
&priv->tdls_pending_txq,
|
||||||
|
(pmlan_linked_list)pmbuf, MNULL, MNULL);
|
||||||
|
tid = pmbuf->priority;
|
||||||
|
tid_down = wlan_wmm_downgrade_tid(priv, tid);
|
||||||
|
if (status == TDLS_SETUP_COMPLETE) {
|
||||||
|
ra_list = wlan_wmm_get_queue_raptr(priv, tid_down, mac);
|
||||||
|
pmbuf->flags |= MLAN_BUF_FLAG_TDLS;
|
||||||
|
} else {
|
||||||
|
ra_list = (raListTbl *)util_peek_list(
|
||||||
|
pmadapter->pmoal_handle,
|
||||||
|
&priv->wmm.tid_tbl_ptr[tid_down].ra_list, MNULL,
|
||||||
|
MNULL);
|
||||||
|
pmbuf->flags &= ~MLAN_BUF_FLAG_TDLS;
|
||||||
|
}
|
||||||
|
if (!ra_list) {
|
||||||
|
PRINTM_NETINTF(MWARN, priv);
|
||||||
|
PRINTM(MWARN,
|
||||||
|
"Drop packet %p, ra_list=%p media_connected=%d\n",
|
||||||
|
pmbuf, ra_list, priv->media_connected);
|
||||||
|
wlan_write_data_complete(pmadapter, pmbuf,
|
||||||
|
MLAN_STATUS_FAILURE);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
PRINTM_NETINTF(MDATA, priv);
|
||||||
|
PRINTM(MDATA,
|
||||||
|
"ADD TDLS pkt %p (priority=%d) back to ra_list %p\n",
|
||||||
|
pmbuf, pmbuf->priority, ra_list);
|
||||||
|
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||||
|
&ra_list->buf_head,
|
||||||
|
(pmlan_linked_list)pmbuf, MNULL, MNULL);
|
||||||
|
ra_list->total_pkts++;
|
||||||
|
ra_list->packet_count++;
|
||||||
|
priv->wmm.pkts_queued[tid_down]++;
|
||||||
|
util_scalar_increment(pmadapter->pmoal_handle,
|
||||||
|
&priv->wmm.tx_pkts_queued, MNULL, MNULL);
|
||||||
|
util_scalar_conditional_write(
|
||||||
|
pmadapter->pmoal_handle, &priv->wmm.highest_queued_prio,
|
||||||
|
MLAN_SCALAR_COND_LESS_THAN, tos_to_tid_inv[tid_down],
|
||||||
|
tos_to_tid_inv[tid_down], MNULL, MNULL);
|
||||||
|
}
|
||||||
|
if (status != TDLS_SETUP_COMPLETE)
|
||||||
|
wlan_wmm_delete_tdls_ralist(priv, mac);
|
||||||
|
pmadapter->callbacks.moal_spin_unlock(pmadapter->pmoal_handle,
|
||||||
|
priv->wmm.ra_list_spinlock);
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function prepares the command of ADDTS
|
* @brief This function prepares the command of ADDTS
|
||||||
|
@ -2784,6 +3184,7 @@ static mlan_status wlan_wmm_ioctl_qos(pmlan_adapter pmadapter,
|
||||||
wmm->param.qos_cfg = pmpriv->wmm_qosinfo;
|
wmm->param.qos_cfg = pmpriv->wmm_qosinfo;
|
||||||
else {
|
else {
|
||||||
pmpriv->wmm_qosinfo = wmm->param.qos_cfg;
|
pmpriv->wmm_qosinfo = wmm->param.qos_cfg;
|
||||||
|
pmpriv->saved_wmm_qosinfo = wmm->param.qos_cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
pioctl_req->data_read_written = sizeof(t_u8) + MLAN_SUB_COMMAND_SIZE;
|
pioctl_req->data_read_written = sizeof(t_u8) + MLAN_SUB_COMMAND_SIZE;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* of wmm functionalities
|
* of wmm functionalities
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -225,6 +225,9 @@ extern mlan_status wlan_ret_wmm_queue_stats(pmlan_private pmpriv,
|
||||||
extern mlan_status wlan_ret_wmm_ts_status(pmlan_private pmpriv,
|
extern mlan_status wlan_ret_wmm_ts_status(pmlan_private pmpriv,
|
||||||
HostCmd_DS_COMMAND *resp,
|
HostCmd_DS_COMMAND *resp,
|
||||||
mlan_ioctl_req *pioctl_buf);
|
mlan_ioctl_req *pioctl_buf);
|
||||||
|
|
||||||
|
extern t_u8 tos_to_tid_inv[];
|
||||||
|
extern t_u8 ac_to_tid[4][2];
|
||||||
#endif /* STA_SUPPORT */
|
#endif /* STA_SUPPORT */
|
||||||
|
|
||||||
/** WMM QUEUE_CONFIG command handler */
|
/** WMM QUEUE_CONFIG command handler */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file declares the generic data structures and APIs.
|
* @brief This file declares the generic data structures and APIs.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
#define _MLAN_DECL_H_
|
#define _MLAN_DECL_H_
|
||||||
|
|
||||||
/** MLAN release version */
|
/** MLAN release version */
|
||||||
#define MLAN_RELEASE_VERSION "214"
|
#define MLAN_RELEASE_VERSION "241"
|
||||||
|
|
||||||
/** Re-define generic data types for MLAN/MOAL */
|
/** Re-define generic data types for MLAN/MOAL */
|
||||||
/** Signed char (1-byte) */
|
/** Signed char (1-byte) */
|
||||||
|
@ -233,12 +233,12 @@ typedef t_s32 t_sval;
|
||||||
/** MU beamformer */
|
/** MU beamformer */
|
||||||
#define DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK (MBIT(19))
|
#define DEFALUT_11AC_CAP_BEAMFORMING_RESET_MASK (MBIT(19))
|
||||||
|
|
||||||
/** Size of rx data buffer 4096+256 */
|
/** Size of rx data buffer 3839+256 */
|
||||||
#define MLAN_RX_DATA_BUF_SIZE 4352
|
#define MLAN_RX_DATA_BUF_SIZE 4096
|
||||||
|
|
||||||
/** Size of command buffer */
|
/** Size of command buffer */
|
||||||
/** because cal_data_size 2.4 k */
|
/** because cal_data_size 2.4 k */
|
||||||
#define MRVDRV_SIZE_OF_CMD_BUFFER (4 * 1024)
|
#define MRVDRV_SIZE_OF_CMD_BUFFER (3 * 1024)
|
||||||
/** Size of rx command buffer */
|
/** Size of rx command buffer */
|
||||||
#define MLAN_RX_CMD_BUF_SIZE MRVDRV_SIZE_OF_CMD_BUFFER
|
#define MLAN_RX_CMD_BUF_SIZE MRVDRV_SIZE_OF_CMD_BUFFER
|
||||||
/** Upload size */
|
/** Upload size */
|
||||||
|
@ -330,6 +330,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define ALLOC_BUF_SIZE MLAN_RX_DATA_BUF_SIZE
|
#define ALLOC_BUF_SIZE MLAN_RX_DATA_BUF_SIZE
|
||||||
/** SDIO MP aggr pkt limit */
|
/** SDIO MP aggr pkt limit */
|
||||||
#define SDIO_MP_AGGR_DEF_PKT_LIMIT (16)
|
#define SDIO_MP_AGGR_DEF_PKT_LIMIT (16)
|
||||||
|
/** SDIO MP aggr pkt limit 8 */
|
||||||
|
#define SDIO_MP_AGGR_DEF_PKT_LIMIT_8 (8)
|
||||||
/** max SDIO MP aggr pkt limit */
|
/** max SDIO MP aggr pkt limit */
|
||||||
#define SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX (16)
|
#define SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX (16)
|
||||||
|
|
||||||
|
@ -365,6 +367,10 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_TYPE_9097 0x07
|
#define CARD_TYPE_9097 0x07
|
||||||
/** 8978 card type */
|
/** 8978 card type */
|
||||||
#define CARD_TYPE_8978 0x08
|
#define CARD_TYPE_8978 0x08
|
||||||
|
/** 9177 card type */
|
||||||
|
#define CARD_TYPE_9177 0x09
|
||||||
|
/** 8801 card type */
|
||||||
|
#define CARD_TYPE_8801 0x0a
|
||||||
|
|
||||||
/** 9098 A0 reverion num */
|
/** 9098 A0 reverion num */
|
||||||
#define CHIP_9098_REV_A0 1
|
#define CHIP_9098_REV_A0 1
|
||||||
|
@ -392,6 +398,10 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_TYPE_SD9097 (CARD_TYPE_9097 | (INTF_SD << 8))
|
#define CARD_TYPE_SD9097 (CARD_TYPE_9097 | (INTF_SD << 8))
|
||||||
/** SD9098 card type */
|
/** SD9098 card type */
|
||||||
#define CARD_TYPE_SD9098 (CARD_TYPE_9098 | (INTF_SD << 8))
|
#define CARD_TYPE_SD9098 (CARD_TYPE_9098 | (INTF_SD << 8))
|
||||||
|
/** SD9177 card type */
|
||||||
|
#define CARD_TYPE_SD9177 (CARD_TYPE_9177 | (INTF_SD << 8))
|
||||||
|
/** SD8801 card type */
|
||||||
|
#define CARD_TYPE_SD8801 (CARD_TYPE_8801 | (INTF_SD << 8))
|
||||||
|
|
||||||
#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct))
|
#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct))
|
||||||
#define IS_SD8897(ct) (CARD_TYPE_SD8897 == (ct))
|
#define IS_SD8897(ct) (CARD_TYPE_SD8897 == (ct))
|
||||||
|
@ -401,6 +411,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define IS_SD8987(ct) (CARD_TYPE_SD8987 == (ct))
|
#define IS_SD8987(ct) (CARD_TYPE_SD8987 == (ct))
|
||||||
#define IS_SD9097(ct) (CARD_TYPE_SD9097 == (ct))
|
#define IS_SD9097(ct) (CARD_TYPE_SD9097 == (ct))
|
||||||
#define IS_SD9098(ct) (CARD_TYPE_SD9098 == (ct))
|
#define IS_SD9098(ct) (CARD_TYPE_SD9098 == (ct))
|
||||||
|
#define IS_SD9177(ct) (CARD_TYPE_SD9177 == (ct))
|
||||||
|
#define IS_SD8801(ct) (CARD_TYPE_SD8801 == (ct))
|
||||||
|
|
||||||
/** SD8887 Card */
|
/** SD8887 Card */
|
||||||
#define CARD_SD8887 "SD8887"
|
#define CARD_SD8887 "SD8887"
|
||||||
|
@ -418,6 +430,10 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_SD9097 "SD9097"
|
#define CARD_SD9097 "SD9097"
|
||||||
/** SD9098 Card */
|
/** SD9098 Card */
|
||||||
#define CARD_SD9098 "SD9098"
|
#define CARD_SD9098 "SD9098"
|
||||||
|
/** SD9177 Card */
|
||||||
|
#define CARD_SD9177 "SD9177"
|
||||||
|
/** SD9177 Card */
|
||||||
|
#define CARD_SD8801 "SD9177"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
|
@ -445,9 +461,13 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_PCIE9000S "PCIE9000S"
|
#define CARD_PCIE9000S "PCIE9000S"
|
||||||
/** PCIE9098 Card */
|
/** PCIE9098 Card */
|
||||||
#define CARD_PCIE9098 "PCIE9098"
|
#define CARD_PCIE9098 "PCIE9098"
|
||||||
|
/** PCIEAW690 Card */
|
||||||
|
#define CARD_PCIEAW690 "PCIEAW690"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
|
/** USB8801 card type */
|
||||||
|
#define CARD_TYPE_USB8801 (CARD_TYPE_8801 | (INTF_USB << 8))
|
||||||
/** USB8897 card type */
|
/** USB8897 card type */
|
||||||
#define CARD_TYPE_USB8897 (CARD_TYPE_8897 | (INTF_USB << 8))
|
#define CARD_TYPE_USB8897 (CARD_TYPE_8897 | (INTF_USB << 8))
|
||||||
/** USB8997 card type */
|
/** USB8997 card type */
|
||||||
|
@ -459,12 +479,15 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
/** USB9097 card type */
|
/** USB9097 card type */
|
||||||
#define CARD_TYPE_USB9097 (CARD_TYPE_9097 | (INTF_USB << 8))
|
#define CARD_TYPE_USB9097 (CARD_TYPE_9097 | (INTF_USB << 8))
|
||||||
|
|
||||||
|
#define IS_USB8801(ct) (CARD_TYPE_USB8801 == (ct))
|
||||||
#define IS_USB8897(ct) (CARD_TYPE_USB8897 == (ct))
|
#define IS_USB8897(ct) (CARD_TYPE_USB8897 == (ct))
|
||||||
#define IS_USB8997(ct) (CARD_TYPE_USB8997 == (ct))
|
#define IS_USB8997(ct) (CARD_TYPE_USB8997 == (ct))
|
||||||
#define IS_USB8978(ct) (CARD_TYPE_USB8978 == (ct))
|
#define IS_USB8978(ct) (CARD_TYPE_USB8978 == (ct))
|
||||||
#define IS_USB9098(ct) (CARD_TYPE_USB9098 == (ct))
|
#define IS_USB9098(ct) (CARD_TYPE_USB9098 == (ct))
|
||||||
#define IS_USB9097(ct) (CARD_TYPE_USB9097 == (ct))
|
#define IS_USB9097(ct) (CARD_TYPE_USB9097 == (ct))
|
||||||
|
|
||||||
|
/** USB8801 Card */
|
||||||
|
#define CARD_USB8801 "USB8801"
|
||||||
/** USB8897 Card */
|
/** USB8897 Card */
|
||||||
#define CARD_USB8897 "USB8897"
|
#define CARD_USB8897 "USB8897"
|
||||||
/** USB8997 Card */
|
/** USB8997 Card */
|
||||||
|
@ -477,6 +500,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define CARD_USB9097 "USB9097"
|
#define CARD_USB9097 "USB9097"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define IS_CARD8801(ct) (CARD_TYPE_8801 == ((ct)&0xf))
|
||||||
#define IS_CARD8887(ct) (CARD_TYPE_8887 == ((ct)&0xf))
|
#define IS_CARD8887(ct) (CARD_TYPE_8887 == ((ct)&0xf))
|
||||||
#define IS_CARD8897(ct) (CARD_TYPE_8897 == ((ct)&0xf))
|
#define IS_CARD8897(ct) (CARD_TYPE_8897 == ((ct)&0xf))
|
||||||
#define IS_CARD8977(ct) (CARD_TYPE_8977 == ((ct)&0xf))
|
#define IS_CARD8977(ct) (CARD_TYPE_8977 == ((ct)&0xf))
|
||||||
|
@ -484,6 +508,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
#define IS_CARD8987(ct) (CARD_TYPE_8987 == ((ct)&0xf))
|
#define IS_CARD8987(ct) (CARD_TYPE_8987 == ((ct)&0xf))
|
||||||
#define IS_CARD9098(ct) (CARD_TYPE_9098 == ((ct)&0xf))
|
#define IS_CARD9098(ct) (CARD_TYPE_9098 == ((ct)&0xf))
|
||||||
#define IS_CARD9097(ct) (CARD_TYPE_9097 == ((ct)&0xf))
|
#define IS_CARD9097(ct) (CARD_TYPE_9097 == ((ct)&0xf))
|
||||||
|
#define IS_CARD9177(ct) (CARD_TYPE_9177 == ((ct)&0xf))
|
||||||
|
|
||||||
typedef struct _card_type_entry {
|
typedef struct _card_type_entry {
|
||||||
t_u16 card_type;
|
t_u16 card_type;
|
||||||
|
@ -534,6 +559,9 @@ typedef enum {
|
||||||
#define MLAN_BUF_FLAG_USB_TX_AGGR MBIT(7)
|
#define MLAN_BUF_FLAG_USB_TX_AGGR MBIT(7)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** Buffer flag for TDLS */
|
||||||
|
#define MLAN_BUF_FLAG_TDLS MBIT(8)
|
||||||
|
|
||||||
/** Buffer flag for TCP_ACK */
|
/** Buffer flag for TCP_ACK */
|
||||||
#define MLAN_BUF_FLAG_TCP_ACK MBIT(9)
|
#define MLAN_BUF_FLAG_TCP_ACK MBIT(9)
|
||||||
|
|
||||||
|
@ -745,6 +773,7 @@ typedef enum _mlan_event_id {
|
||||||
MLAN_EVENT_ID_DRV_BGSCAN_RESULT = 0x80000013,
|
MLAN_EVENT_ID_DRV_BGSCAN_RESULT = 0x80000013,
|
||||||
MLAN_EVENT_ID_DRV_FLUSH_RX_WORK = 0x80000015,
|
MLAN_EVENT_ID_DRV_FLUSH_RX_WORK = 0x80000015,
|
||||||
MLAN_EVENT_ID_DRV_DEFER_RX_WORK = 0x80000016,
|
MLAN_EVENT_ID_DRV_DEFER_RX_WORK = 0x80000016,
|
||||||
|
MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ = 0x80000017,
|
||||||
MLAN_EVENT_ID_DRV_FT_RESPONSE = 0x80000018,
|
MLAN_EVENT_ID_DRV_FT_RESPONSE = 0x80000018,
|
||||||
MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK = 0x80000019,
|
MLAN_EVENT_ID_DRV_FLUSH_MAIN_WORK = 0x80000019,
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
|
@ -918,7 +947,7 @@ typedef MLAN_PACK_START struct _chan_band_info {
|
||||||
t_u8 center_chan;
|
t_u8 center_chan;
|
||||||
/** dfs channel flag */
|
/** dfs channel flag */
|
||||||
t_u8 is_dfs_chan;
|
t_u8 is_dfs_chan;
|
||||||
} MLAN_PACK_END chan_band_info, *pchan_band_info;
|
} MLAN_PACK_END chan_band_info;
|
||||||
|
|
||||||
/** Channel usability flags */
|
/** Channel usability flags */
|
||||||
#define NXP_CHANNEL_NO_OFDM MBIT(9)
|
#define NXP_CHANNEL_NO_OFDM MBIT(9)
|
||||||
|
@ -1109,7 +1138,10 @@ typedef struct _mlan_buffer {
|
||||||
t_u32 out_ts_usec;
|
t_u32 out_ts_usec;
|
||||||
/** tx_seq_num */
|
/** tx_seq_num */
|
||||||
t_u32 tx_seq_num;
|
t_u32 tx_seq_num;
|
||||||
|
/** Time stamp when packet is deque from rx_q(seconds) */
|
||||||
|
t_u32 extra_ts_sec;
|
||||||
|
/** Time stamp when packet is dequed from rx_q(micro seconds) */
|
||||||
|
t_u32 extra_ts_usec;
|
||||||
/** Fields below are valid for MLAN module only */
|
/** Fields below are valid for MLAN module only */
|
||||||
/** Pointer to parent mlan_buffer */
|
/** Pointer to parent mlan_buffer */
|
||||||
struct _mlan_buffer *pparent;
|
struct _mlan_buffer *pparent;
|
||||||
|
@ -1121,9 +1153,10 @@ typedef struct _mlan_buffer {
|
||||||
} u;
|
} u;
|
||||||
} mlan_buffer, *pmlan_buffer, **ppmlan_buffer;
|
} mlan_buffer, *pmlan_buffer, **ppmlan_buffer;
|
||||||
|
|
||||||
/** mlan_fw_info data structure */
|
/** mlan_hw_info data structure */
|
||||||
typedef struct _mlan_hw_info {
|
typedef struct _mlan_hw_info {
|
||||||
t_u32 fw_cap;
|
t_u32 fw_cap;
|
||||||
|
t_u32 fw_cap_ext;
|
||||||
} mlan_hw_info, *pmlan_hw_info;
|
} mlan_hw_info, *pmlan_hw_info;
|
||||||
|
|
||||||
/** mlan_bss_attr data structure */
|
/** mlan_bss_attr data structure */
|
||||||
|
@ -1262,6 +1295,242 @@ typedef MLAN_PACK_START struct _tlvbuf_custom_ie {
|
||||||
tlvbuf_max_mgmt_ie max_mgmt_ie;
|
tlvbuf_max_mgmt_ie max_mgmt_ie;
|
||||||
} MLAN_PACK_END mlan_ds_misc_custom_ie;
|
} MLAN_PACK_END mlan_ds_misc_custom_ie;
|
||||||
|
|
||||||
|
/** Max TDLS config data length */
|
||||||
|
#define MAX_TDLS_DATA_LEN 1024
|
||||||
|
|
||||||
|
/** Action commands for TDLS enable/disable */
|
||||||
|
#define WLAN_TDLS_CONFIG 0x00
|
||||||
|
/** Action commands for TDLS configuration :Set */
|
||||||
|
#define WLAN_TDLS_SET_INFO 0x01
|
||||||
|
/** Action commands for TDLS configuration :Discovery Request */
|
||||||
|
#define WLAN_TDLS_DISCOVERY_REQ 0x02
|
||||||
|
/** Action commands for TDLS configuration :Setup Request */
|
||||||
|
#define WLAN_TDLS_SETUP_REQ 0x03
|
||||||
|
/** Action commands for TDLS configuration :Tear down Request */
|
||||||
|
#define WLAN_TDLS_TEAR_DOWN_REQ 0x04
|
||||||
|
/** Action ID for TDLS power mode */
|
||||||
|
#define WLAN_TDLS_POWER_MODE 0x05
|
||||||
|
/**Action ID for init TDLS Channel Switch*/
|
||||||
|
#define WLAN_TDLS_INIT_CHAN_SWITCH 0x06
|
||||||
|
/** Action ID for stop TDLS Channel Switch */
|
||||||
|
#define WLAN_TDLS_STOP_CHAN_SWITCH 0x07
|
||||||
|
/** Action ID for configure CS related parameters */
|
||||||
|
#define WLAN_TDLS_CS_PARAMS 0x08
|
||||||
|
/** Action ID for Disable CS */
|
||||||
|
#define WLAN_TDLS_CS_DISABLE 0x09
|
||||||
|
/** Action ID for TDLS link status */
|
||||||
|
#define WLAN_TDLS_LINK_STATUS 0x0A
|
||||||
|
/** Action ID for Host TDLS config uapsd and CS */
|
||||||
|
#define WLAN_HOST_TDLS_CONFIG 0x0D
|
||||||
|
/** Action ID for TDLS CS immediate return */
|
||||||
|
#define WLAN_TDLS_DEBUG_CS_RET_IM 0xFFF7
|
||||||
|
/** Action ID for TDLS Stop RX */
|
||||||
|
#define WLAN_TDLS_DEBUG_STOP_RX 0xFFF8
|
||||||
|
/** Action ID for TDLS Allow weak security for links establish */
|
||||||
|
#define WLAN_TDLS_DEBUG_ALLOW_WEAK_SECURITY 0xFFF9
|
||||||
|
/** Action ID for TDLS Ignore key lifetime expiry */
|
||||||
|
#define WLAN_TDLS_DEBUG_IGNORE_KEY_EXPIRY 0xFFFA
|
||||||
|
/** Action ID for TDLS Higher/Lower mac Test */
|
||||||
|
#define WLAN_TDLS_DEBUG_HIGHER_LOWER_MAC 0xFFFB
|
||||||
|
/** Action ID for TDLS Prohibited Test */
|
||||||
|
#define WLAN_TDLS_DEBUG_SETUP_PROHIBITED 0xFFFC
|
||||||
|
/** Action ID for TDLS Existing link Test */
|
||||||
|
#define WLAN_TDLS_DEBUG_SETUP_SAME_LINK 0xFFFD
|
||||||
|
/** Action ID for TDLS Fail Setup Confirm */
|
||||||
|
#define WLAN_TDLS_DEBUG_FAIL_SETUP_CONFIRM 0xFFFE
|
||||||
|
/** Action commands for TDLS debug: Wrong BSS Request */
|
||||||
|
#define WLAN_TDLS_DEBUG_WRONG_BSS 0xFFFF
|
||||||
|
|
||||||
|
/** tdls each link rate information */
|
||||||
|
typedef MLAN_PACK_START struct _tdls_link_rate_info {
|
||||||
|
/** Tx Data Rate */
|
||||||
|
t_u8 tx_data_rate;
|
||||||
|
/** Tx Rate HT info*/
|
||||||
|
t_u8 tx_rate_htinfo;
|
||||||
|
} MLAN_PACK_END tdls_link_rate_info;
|
||||||
|
|
||||||
|
/** tdls each link status */
|
||||||
|
typedef MLAN_PACK_START struct _tdls_each_link_status {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** Link Flags */
|
||||||
|
t_u8 link_flags;
|
||||||
|
/** Traffic Status */
|
||||||
|
t_u8 traffic_status;
|
||||||
|
/** Tx Failure Count */
|
||||||
|
t_u8 tx_fail_count;
|
||||||
|
/** Channel Number */
|
||||||
|
t_u32 active_channel;
|
||||||
|
/** Last Data RSSI in dBm */
|
||||||
|
t_s16 data_rssi_last;
|
||||||
|
/** Last Data NF in dBm */
|
||||||
|
t_s16 data_nf_last;
|
||||||
|
/** AVG DATA RSSI in dBm */
|
||||||
|
t_s16 data_rssi_avg;
|
||||||
|
/** AVG DATA NF in dBm */
|
||||||
|
t_s16 data_nf_avg;
|
||||||
|
union {
|
||||||
|
/** tdls rate info */
|
||||||
|
tdls_link_rate_info rate_info;
|
||||||
|
/** tdls link final rate*/
|
||||||
|
t_u16 final_data_rate;
|
||||||
|
} u;
|
||||||
|
/** Security Method */
|
||||||
|
t_u8 security_method;
|
||||||
|
/** Key Lifetime in milliseconds */
|
||||||
|
t_u32 key_lifetime;
|
||||||
|
/** Key Length */
|
||||||
|
t_u8 key_length;
|
||||||
|
/** actual key */
|
||||||
|
t_u8 key[];
|
||||||
|
} MLAN_PACK_END tdls_each_link_status;
|
||||||
|
|
||||||
|
/** TDLS configuration data */
|
||||||
|
typedef MLAN_PACK_START struct _tdls_all_config {
|
||||||
|
union {
|
||||||
|
/** TDLS state enable disable */
|
||||||
|
MLAN_PACK_START struct _tdls_config {
|
||||||
|
/** enable or disable */
|
||||||
|
t_u16 enable;
|
||||||
|
} MLAN_PACK_END tdls_config;
|
||||||
|
/** Host tdls config */
|
||||||
|
MLAN_PACK_START struct _host_tdls_cfg {
|
||||||
|
/** support uapsd */
|
||||||
|
t_u8 uapsd_support;
|
||||||
|
/** channel_switch */
|
||||||
|
t_u8 cs_support;
|
||||||
|
/** TLV length */
|
||||||
|
t_u16 tlv_len;
|
||||||
|
/** tdls info */
|
||||||
|
t_u8 tlv_buffer[];
|
||||||
|
} MLAN_PACK_END host_tdls_cfg;
|
||||||
|
/** TDLS set info */
|
||||||
|
MLAN_PACK_START struct _tdls_set_data {
|
||||||
|
/** (tlv + capInfo) length */
|
||||||
|
t_u16 tlv_length;
|
||||||
|
/** Cap Info */
|
||||||
|
t_u16 cap_info;
|
||||||
|
/** TLV buffer */
|
||||||
|
t_u8 tlv_buffer[];
|
||||||
|
} MLAN_PACK_END tdls_set;
|
||||||
|
|
||||||
|
/** TDLS discovery and others having mac argument */
|
||||||
|
MLAN_PACK_START struct _tdls_discovery_data {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END tdls_discovery, tdls_stop_chan_switch,
|
||||||
|
tdls_link_status_req;
|
||||||
|
|
||||||
|
/** TDLS discovery Response */
|
||||||
|
MLAN_PACK_START struct _tdls_discovery_resp {
|
||||||
|
/** payload length */
|
||||||
|
t_u16 payload_len;
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** RSSI */
|
||||||
|
t_s8 rssi;
|
||||||
|
/** Cap Info */
|
||||||
|
t_u16 cap_info;
|
||||||
|
/** TLV buffer */
|
||||||
|
t_u8 tlv_buffer[];
|
||||||
|
} MLAN_PACK_END tdls_discovery_resp;
|
||||||
|
|
||||||
|
/** TDLS setup request */
|
||||||
|
MLAN_PACK_START struct _tdls_setup_data {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** timeout value in milliseconds */
|
||||||
|
t_u32 setup_timeout;
|
||||||
|
/** key lifetime in milliseconds */
|
||||||
|
t_u32 key_lifetime;
|
||||||
|
} MLAN_PACK_END tdls_setup;
|
||||||
|
|
||||||
|
/** TDLS tear down info */
|
||||||
|
MLAN_PACK_START struct _tdls_tear_down_data {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** reason code */
|
||||||
|
t_u16 reason_code;
|
||||||
|
} MLAN_PACK_END tdls_tear_down, tdls_cmd_resp;
|
||||||
|
|
||||||
|
/** TDLS power mode info */
|
||||||
|
MLAN_PACK_START struct _tdls_power_mode_data {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** Power Mode */
|
||||||
|
t_u16 power_mode;
|
||||||
|
} MLAN_PACK_END tdls_power_mode;
|
||||||
|
|
||||||
|
/** TDLS channel switch info */
|
||||||
|
MLAN_PACK_START struct _tdls_chan_switch {
|
||||||
|
/** peer mac Address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** Channel Switch primary channel no */
|
||||||
|
t_u8 primary_channel;
|
||||||
|
/** Channel Switch secondary channel offset */
|
||||||
|
t_u8 secondary_channel_offset;
|
||||||
|
/** Channel Switch Band */
|
||||||
|
t_u8 band;
|
||||||
|
/** Channel Switch time in milliseconds */
|
||||||
|
t_u16 switch_time;
|
||||||
|
/** Channel Switch timeout in milliseconds */
|
||||||
|
t_u16 switch_timeout;
|
||||||
|
/** Channel Regulatory class*/
|
||||||
|
t_u8 regulatory_class;
|
||||||
|
/** peridicity flag*/
|
||||||
|
t_u8 periodicity;
|
||||||
|
} MLAN_PACK_END tdls_chan_switch;
|
||||||
|
|
||||||
|
/** TDLS channel switch paramters */
|
||||||
|
MLAN_PACK_START struct _tdls_cs_params {
|
||||||
|
/** unit time, multiples of 10ms */
|
||||||
|
t_u8 unit_time;
|
||||||
|
/** threshold for other link */
|
||||||
|
t_u8 threshold_otherlink;
|
||||||
|
/** threshold for direct link */
|
||||||
|
t_u8 threshold_directlink;
|
||||||
|
} MLAN_PACK_END tdls_cs_params;
|
||||||
|
|
||||||
|
/** tdls disable channel switch */
|
||||||
|
MLAN_PACK_START struct _tdls_disable_cs {
|
||||||
|
/** Data*/
|
||||||
|
t_u16 data;
|
||||||
|
} MLAN_PACK_END tdls_disable_cs;
|
||||||
|
/** TDLS debug data */
|
||||||
|
MLAN_PACK_START struct _tdls_debug_data {
|
||||||
|
/** debug data */
|
||||||
|
t_u16 debug_data;
|
||||||
|
} MLAN_PACK_END tdls_debug_data;
|
||||||
|
|
||||||
|
/** TDLS link status Response */
|
||||||
|
MLAN_PACK_START struct _tdls_link_status_resp {
|
||||||
|
/** payload length */
|
||||||
|
t_u16 payload_len;
|
||||||
|
/** number of links */
|
||||||
|
t_u8 active_links;
|
||||||
|
/** structure for link status */
|
||||||
|
tdls_each_link_status link_stats[1];
|
||||||
|
} MLAN_PACK_END tdls_link_status_resp;
|
||||||
|
|
||||||
|
} u;
|
||||||
|
} MLAN_PACK_END tdls_all_config;
|
||||||
|
|
||||||
|
/** TDLS configuration buffer */
|
||||||
|
typedef MLAN_PACK_START struct _buf_tdls_config {
|
||||||
|
/** TDLS Action */
|
||||||
|
t_u16 tdls_action;
|
||||||
|
/** TDLS data */
|
||||||
|
t_u8 tdls_data[MAX_TDLS_DATA_LEN];
|
||||||
|
} MLAN_PACK_END mlan_ds_misc_tdls_config;
|
||||||
|
|
||||||
|
/** Event structure for tear down */
|
||||||
|
typedef struct _tdls_tear_down_event {
|
||||||
|
/** Peer mac address */
|
||||||
|
t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** Reason code */
|
||||||
|
t_u16 reason_code;
|
||||||
|
} tdls_tear_down_event;
|
||||||
|
|
||||||
/** channel width */
|
/** channel width */
|
||||||
typedef enum wifi_channel_width {
|
typedef enum wifi_channel_width {
|
||||||
WIFI_CHAN_WIDTH_20 = 0,
|
WIFI_CHAN_WIDTH_20 = 0,
|
||||||
|
@ -1614,160 +1883,149 @@ typedef struct _sta_stats {
|
||||||
/** mlan_callbacks data structure */
|
/** mlan_callbacks data structure */
|
||||||
typedef struct _mlan_callbacks {
|
typedef struct _mlan_callbacks {
|
||||||
/** moal_get_fw_data */
|
/** moal_get_fw_data */
|
||||||
mlan_status (*moal_get_fw_data)(t_void *pmoal_handle, t_u32 offset,
|
mlan_status (*moal_get_fw_data)(t_void *pmoal, t_u32 offset, t_u32 len,
|
||||||
t_u32 len, t_u8 *pbuf);
|
|
||||||
mlan_status (*moal_get_vdll_data)(t_void *pmoal_handle, t_u32 len,
|
|
||||||
t_u8 *pbuf);
|
t_u8 *pbuf);
|
||||||
|
mlan_status (*moal_get_vdll_data)(t_void *pmoal, t_u32 len, t_u8 *pbuf);
|
||||||
/** moal_get_hw_spec_complete */
|
/** moal_get_hw_spec_complete */
|
||||||
mlan_status (*moal_get_hw_spec_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_get_hw_spec_complete)(t_void *pmoal,
|
||||||
mlan_status status,
|
mlan_status status,
|
||||||
pmlan_hw_info phw,
|
pmlan_hw_info phw,
|
||||||
pmlan_bss_tbl ptbl);
|
pmlan_bss_tbl ptbl);
|
||||||
/** moal_init_fw_complete */
|
/** moal_init_fw_complete */
|
||||||
mlan_status (*moal_init_fw_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_init_fw_complete)(t_void *pmoal, mlan_status status);
|
||||||
mlan_status status);
|
|
||||||
/** moal_shutdown_fw_complete */
|
/** moal_shutdown_fw_complete */
|
||||||
mlan_status (*moal_shutdown_fw_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_shutdown_fw_complete)(t_void *pmoal,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
/** moal_send_packet_complete */
|
/** moal_send_packet_complete */
|
||||||
mlan_status (*moal_send_packet_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_send_packet_complete)(t_void *pmoal,
|
||||||
pmlan_buffer pmbuf,
|
pmlan_buffer pmbuf,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
/** moal_recv_complete */
|
/** moal_recv_complete */
|
||||||
mlan_status (*moal_recv_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_recv_complete)(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port,
|
t_u32 port, mlan_status status);
|
||||||
mlan_status status);
|
|
||||||
/** moal_recv_packet */
|
/** moal_recv_packet */
|
||||||
mlan_status (*moal_recv_packet)(t_void *pmoal_handle,
|
mlan_status (*moal_recv_packet)(t_void *pmoal, pmlan_buffer pmbuf);
|
||||||
pmlan_buffer pmbuf);
|
|
||||||
/** moal_recv_event */
|
/** moal_recv_event */
|
||||||
mlan_status (*moal_recv_event)(t_void *pmoal_handle,
|
mlan_status (*moal_recv_event)(t_void *pmoal, pmlan_event pmevent);
|
||||||
pmlan_event pmevent);
|
|
||||||
/** moal_ioctl_complete */
|
/** moal_ioctl_complete */
|
||||||
mlan_status (*moal_ioctl_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_ioctl_complete)(t_void *pmoal,
|
||||||
pmlan_ioctl_req pioctl_req,
|
pmlan_ioctl_req pioctl_req,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
|
|
||||||
/** moal_alloc_mlan_buffer */
|
/** moal_alloc_mlan_buffer */
|
||||||
mlan_status (*moal_alloc_mlan_buffer)(t_void *pmoal_handle, t_u32 size,
|
mlan_status (*moal_alloc_mlan_buffer)(t_void *pmoal, t_u32 size,
|
||||||
ppmlan_buffer pmbuf);
|
ppmlan_buffer pmbuf);
|
||||||
/** moal_free_mlan_buffer */
|
/** moal_free_mlan_buffer */
|
||||||
mlan_status (*moal_free_mlan_buffer)(t_void *pmoal_handle,
|
mlan_status (*moal_free_mlan_buffer)(t_void *pmoal, pmlan_buffer pmbuf);
|
||||||
pmlan_buffer pmbuf);
|
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
/** moal_write_data_async */
|
/** moal_write_data_async */
|
||||||
mlan_status (*moal_write_data_async)(t_void *pmoal_handle,
|
mlan_status (*moal_write_data_async)(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port);
|
t_u32 port);
|
||||||
#endif /* USB */
|
#endif /* USB */
|
||||||
#if defined(SDIO) || defined(PCIE)
|
#if defined(SDIO) || defined(PCIE)
|
||||||
/** moal_write_reg */
|
/** moal_write_reg */
|
||||||
mlan_status (*moal_write_reg)(t_void *pmoal_handle, t_u32 reg,
|
mlan_status (*moal_write_reg)(t_void *pmoal, t_u32 reg, t_u32 data);
|
||||||
t_u32 data);
|
|
||||||
/** moal_read_reg */
|
/** moal_read_reg */
|
||||||
mlan_status (*moal_read_reg)(t_void *pmoal_handle, t_u32 reg,
|
mlan_status (*moal_read_reg)(t_void *pmoal, t_u32 reg, t_u32 *data);
|
||||||
t_u32 *data);
|
|
||||||
#endif /* SDIO || PCIE */
|
#endif /* SDIO || PCIE */
|
||||||
/** moal_write_data_sync */
|
/** moal_write_data_sync */
|
||||||
mlan_status (*moal_write_data_sync)(t_void *pmoal_handle,
|
mlan_status (*moal_write_data_sync)(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port,
|
t_u32 port, t_u32 timeout);
|
||||||
t_u32 timeout);
|
|
||||||
/** moal_read_data_sync */
|
/** moal_read_data_sync */
|
||||||
mlan_status (*moal_read_data_sync)(t_void *pmoal_handle,
|
mlan_status (*moal_read_data_sync)(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
pmlan_buffer pmbuf, t_u32 port,
|
t_u32 port, t_u32 timeout);
|
||||||
t_u32 timeout);
|
|
||||||
/** moal_malloc */
|
/** moal_malloc */
|
||||||
mlan_status (*moal_malloc)(t_void *pmoal_handle, t_u32 size, t_u32 flag,
|
mlan_status (*moal_malloc)(t_void *pmoal, t_u32 size, t_u32 flag,
|
||||||
t_u8 **ppbuf);
|
t_u8 **ppbuf);
|
||||||
/** moal_mfree */
|
/** moal_mfree */
|
||||||
mlan_status (*moal_mfree)(t_void *pmoal_handle, t_u8 *pbuf);
|
mlan_status (*moal_mfree)(t_void *pmoal, t_u8 *pbuf);
|
||||||
/** moal_vmalloc */
|
/** moal_vmalloc */
|
||||||
mlan_status (*moal_vmalloc)(t_void *pmoal_handle, t_u32 size,
|
mlan_status (*moal_vmalloc)(t_void *pmoal, t_u32 size, t_u8 **ppbuf);
|
||||||
t_u8 **ppbuf);
|
|
||||||
/** moal_vfree */
|
/** moal_vfree */
|
||||||
mlan_status (*moal_vfree)(t_void *pmoal_handle, t_u8 *pbuf);
|
mlan_status (*moal_vfree)(t_void *pmoal, t_u8 *pbuf);
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
/** moal_malloc_consistent */
|
/** moal_malloc_consistent */
|
||||||
mlan_status (*moal_malloc_consistent)(t_void *pmoal_handle, t_u32 size,
|
mlan_status (*moal_malloc_consistent)(t_void *pmoal, t_u32 size,
|
||||||
t_u8 **ppbuf, t_u64 *pbuf_pa);
|
t_u8 **ppbuf, t_u64 *pbuf_pa);
|
||||||
/** moal_mfree_consistent */
|
/** moal_mfree_consistent */
|
||||||
mlan_status (*moal_mfree_consistent)(t_void *pmoal_handle, t_u32 size,
|
mlan_status (*moal_mfree_consistent)(t_void *pmoal, t_u32 size,
|
||||||
t_u8 *pbuf, t_u64 buf_pa);
|
t_u8 *pbuf, t_u64 buf_pa);
|
||||||
/** moal_map_memory */
|
/** moal_map_memory */
|
||||||
mlan_status (*moal_map_memory)(t_void *pmoal_handle, t_u8 *pbuf,
|
mlan_status (*moal_map_memory)(t_void *pmoal, t_u8 *pbuf,
|
||||||
t_u64 *pbuf_pa, t_u32 size, t_u32 flag);
|
t_u64 *pbuf_pa, t_u32 size, t_u32 flag);
|
||||||
/** moal_unmap_memory */
|
/** moal_unmap_memory */
|
||||||
mlan_status (*moal_unmap_memory)(t_void *pmoal_handle, t_u8 *pbuf,
|
mlan_status (*moal_unmap_memory)(t_void *pmoal, t_u8 *pbuf,
|
||||||
t_u64 buf_pa, t_u32 size, t_u32 flag);
|
t_u64 buf_pa, t_u32 size, t_u32 flag);
|
||||||
#endif /* PCIE */
|
#endif /* PCIE */
|
||||||
/** moal_memset */
|
/** moal_memset */
|
||||||
t_void *(*moal_memset)(t_void *pmoal_handle, t_void *pmem, t_u8 byte,
|
t_void *(*moal_memset)(t_void *pmoal, t_void *pmem, t_u8 byte,
|
||||||
t_u32 num);
|
t_u32 num);
|
||||||
/** moal_memcpy */
|
/** moal_memcpy */
|
||||||
t_void *(*moal_memcpy)(t_void *pmoal_handle, t_void *pdest,
|
t_void *(*moal_memcpy)(t_void *pmoal, t_void *pdest, const t_void *psrc,
|
||||||
const t_void *psrc, t_u32 num);
|
t_u32 num);
|
||||||
/** moal_memcpy_ext */
|
/** moal_memcpy_ext */
|
||||||
t_void *(*moal_memcpy_ext)(t_void *pmoal_handle, t_void *pdest,
|
t_void *(*moal_memcpy_ext)(t_void *pmoal, t_void *pdest,
|
||||||
const t_void *psrc, t_u32 num,
|
const t_void *psrc, t_u32 num,
|
||||||
t_u32 dest_size);
|
t_u32 dest_size);
|
||||||
/** moal_memmove */
|
/** moal_memmove */
|
||||||
t_void *(*moal_memmove)(t_void *pmoal_handle, t_void *pdest,
|
t_void *(*moal_memmove)(t_void *pmoal, t_void *pdest,
|
||||||
const t_void *psrc, t_u32 num);
|
const t_void *psrc, t_u32 num);
|
||||||
/** moal_memcmp */
|
/** moal_memcmp */
|
||||||
t_s32 (*moal_memcmp)(t_void *pmoal_handle, const t_void *pmem1,
|
t_s32 (*moal_memcmp)(t_void *pmoal, const t_void *pmem1,
|
||||||
const t_void *pmem2, t_u32 num);
|
const t_void *pmem2, t_u32 num);
|
||||||
/** moal_udelay */
|
/** moal_udelay */
|
||||||
t_void (*moal_udelay)(t_void *pmoal_handle, t_u32 udelay);
|
t_void (*moal_udelay)(t_void *pmoal, t_u32 udelay);
|
||||||
/** moal_usleep_range */
|
/** moal_usleep_range */
|
||||||
t_void (*moal_usleep_range)(t_void *pmoal_handle, t_u32 min_delay,
|
t_void (*moal_usleep_range)(t_void *pmoal, t_u32 min_delay,
|
||||||
t_u32 max_delay);
|
t_u32 max_delay);
|
||||||
/** moal_get_boot_ktime */
|
/** moal_get_boot_ktime */
|
||||||
mlan_status (*moal_get_boot_ktime)(t_void *pmoal_handle, t_u64 *pnsec);
|
mlan_status (*moal_get_boot_ktime)(t_void *pmoal, t_u64 *pnsec);
|
||||||
/** moal_get_system_time */
|
/** moal_get_system_time */
|
||||||
mlan_status (*moal_get_system_time)(t_void *pmoal_handle, t_u32 *psec,
|
mlan_status (*moal_get_system_time)(t_void *pmoal, t_u32 *psec,
|
||||||
t_u32 *pusec);
|
t_u32 *pusec);
|
||||||
/** moal_init_timer*/
|
/** moal_init_timer*/
|
||||||
mlan_status (*moal_init_timer)(t_void *pmoal_handle, t_void **pptimer,
|
mlan_status (*moal_init_timer)(t_void *pmoal, t_void **pptimer,
|
||||||
IN t_void (*callback)(t_void *pcontext),
|
IN t_void (*callback)(t_void *pcontext),
|
||||||
t_void *pcontext);
|
t_void *pcontext);
|
||||||
/** moal_free_timer */
|
/** moal_free_timer */
|
||||||
mlan_status (*moal_free_timer)(t_void *pmoal_handle, t_void *ptimer);
|
mlan_status (*moal_free_timer)(t_void *pmoal, t_void *ptimer);
|
||||||
/** moal_start_timer*/
|
/** moal_start_timer*/
|
||||||
mlan_status (*moal_start_timer)(t_void *pmoal_handle, t_void *ptimer,
|
mlan_status (*moal_start_timer)(t_void *pmoal, t_void *ptimer,
|
||||||
t_u8 periodic, t_u32 msec);
|
t_u8 periodic, t_u32 msec);
|
||||||
/** moal_stop_timer*/
|
/** moal_stop_timer*/
|
||||||
mlan_status (*moal_stop_timer)(t_void *pmoal_handle, t_void *ptimer);
|
mlan_status (*moal_stop_timer)(t_void *pmoal, t_void *ptimer);
|
||||||
/** moal_init_lock */
|
/** moal_init_lock */
|
||||||
mlan_status (*moal_init_lock)(t_void *pmoal_handle, t_void **pplock);
|
mlan_status (*moal_init_lock)(t_void *pmoal, t_void **pplock);
|
||||||
/** moal_free_lock */
|
/** moal_free_lock */
|
||||||
mlan_status (*moal_free_lock)(t_void *pmoal_handle, t_void *plock);
|
mlan_status (*moal_free_lock)(t_void *pmoal, t_void *plock);
|
||||||
/** moal_spin_lock */
|
/** moal_spin_lock */
|
||||||
mlan_status (*moal_spin_lock)(t_void *pmoal_handle, t_void *plock);
|
mlan_status (*moal_spin_lock)(t_void *pmoal, t_void *plock);
|
||||||
/** moal_spin_unlock */
|
/** moal_spin_unlock */
|
||||||
mlan_status (*moal_spin_unlock)(t_void *pmoal_handle, t_void *plock);
|
mlan_status (*moal_spin_unlock)(t_void *pmoal, t_void *plock);
|
||||||
/** moal_print */
|
/** moal_print */
|
||||||
t_void (*moal_print)(t_void *pmoal_handle, t_u32 level, char *pformat,
|
t_void (*moal_print)(t_void *pmoal, t_u32 level, char *pformat, IN...);
|
||||||
IN...);
|
|
||||||
/** moal_print_netintf */
|
/** moal_print_netintf */
|
||||||
t_void (*moal_print_netintf)(t_void *pmoal_handle, t_u32 bss_index,
|
t_void (*moal_print_netintf)(t_void *pmoal, t_u32 bss_index,
|
||||||
t_u32 level);
|
t_u32 level);
|
||||||
/** moal_assert */
|
/** moal_assert */
|
||||||
t_void (*moal_assert)(t_void *pmoal_handle, t_u32 cond);
|
t_void (*moal_assert)(t_void *pmoal, t_u32 cond);
|
||||||
|
|
||||||
/** moal_hist_data_add */
|
/** moal_hist_data_add */
|
||||||
t_void (*moal_hist_data_add)(t_void *pmoal_handle, t_u32 bss_index,
|
t_void (*moal_hist_data_add)(t_void *pmoal, t_u32 bss_index,
|
||||||
t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
t_u16 rx_rate, t_s8 snr, t_s8 nflr,
|
||||||
t_u8 antenna);
|
t_u8 antenna);
|
||||||
|
t_void (*moal_updata_peer_signal)(t_void *pmoal, t_u32 bss_index,
|
||||||
|
t_u8 *peer_addr, t_s8 snr, t_s8 nflr);
|
||||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||||
mlan_status (*moal_wait_hostcmd_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_wait_hostcmd_complete)(t_void *pmoal,
|
||||||
t_u32 bss_index);
|
t_u32 bss_index);
|
||||||
mlan_status (*moal_notify_hostcmd_complete)(t_void *pmoal_handle,
|
mlan_status (*moal_notify_hostcmd_complete)(t_void *pmoal,
|
||||||
t_u32 bss_index);
|
t_u32 bss_index);
|
||||||
#endif
|
#endif
|
||||||
void (*moal_tp_accounting)(t_void *pmoal_handle, t_void *buf,
|
void (*moal_tp_accounting)(t_void *pmoal, t_void *buf,
|
||||||
t_u32 drop_point);
|
t_u32 drop_point);
|
||||||
void (*moal_tp_accounting_rx_param)(t_void *pmoal_handle,
|
void (*moal_tp_accounting_rx_param)(t_void *pmoal, unsigned int type,
|
||||||
unsigned int type,
|
|
||||||
unsigned int rsvd1);
|
unsigned int rsvd1);
|
||||||
|
|
||||||
} mlan_callbacks, *pmlan_callbacks;
|
} mlan_callbacks, *pmlan_callbacks;
|
||||||
|
@ -1899,8 +2157,6 @@ typedef struct _mlan_device {
|
||||||
/** Tx data endpoint address */
|
/** Tx data endpoint address */
|
||||||
t_u8 tx_data_ep;
|
t_u8 tx_data_ep;
|
||||||
#endif
|
#endif
|
||||||
/** fw region */
|
|
||||||
t_bool fw_region;
|
|
||||||
/** passive to active scan */
|
/** passive to active scan */
|
||||||
t_u8 passive_to_active_scan;
|
t_u8 passive_to_active_scan;
|
||||||
/** uap max supported station per chip */
|
/** uap max supported station per chip */
|
||||||
|
@ -1919,51 +2175,50 @@ MLAN_API mlan_status mlan_register(pmlan_device pmdevice,
|
||||||
t_void **ppmlan_adapter);
|
t_void **ppmlan_adapter);
|
||||||
|
|
||||||
/** Un-registration */
|
/** Un-registration */
|
||||||
MLAN_API mlan_status mlan_unregister(t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_unregister(t_void *padapter);
|
||||||
|
|
||||||
/** Firmware Downloading */
|
/** Firmware Downloading */
|
||||||
MLAN_API mlan_status mlan_dnld_fw(t_void *pmlan_adapter, pmlan_fw_image pmfw);
|
MLAN_API mlan_status mlan_dnld_fw(t_void *padapter, pmlan_fw_image pmfw);
|
||||||
|
|
||||||
/** Custom data pass API */
|
/** Custom data pass API */
|
||||||
MLAN_API mlan_status mlan_set_init_param(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_set_init_param(t_void *padapter,
|
||||||
pmlan_init_param pparam);
|
pmlan_init_param pparam);
|
||||||
|
|
||||||
/** Firmware Initialization */
|
/** Firmware Initialization */
|
||||||
MLAN_API mlan_status mlan_init_fw(t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_init_fw(t_void *padapter);
|
||||||
|
|
||||||
/** Firmware Shutdown */
|
/** Firmware Shutdown */
|
||||||
MLAN_API mlan_status mlan_shutdown_fw(t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_shutdown_fw(t_void *padapter);
|
||||||
|
|
||||||
/** Main Process */
|
/** Main Process */
|
||||||
MLAN_API mlan_status mlan_main_process(t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_main_process(t_void *padapter);
|
||||||
|
|
||||||
/** Rx process */
|
/** Rx process */
|
||||||
mlan_status mlan_rx_process(t_void *pmlan_adapter, t_u8 *rx_pkts);
|
mlan_status mlan_rx_process(t_void *padapter, t_u8 *rx_pkts);
|
||||||
|
|
||||||
/** Packet Transmission */
|
/** Packet Transmission */
|
||||||
MLAN_API mlan_status mlan_send_packet(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_send_packet(t_void *padapter, pmlan_buffer pmbuf);
|
||||||
pmlan_buffer pmbuf);
|
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
/** mlan_write_data_async_complete */
|
/** mlan_write_data_async_complete */
|
||||||
MLAN_API mlan_status mlan_write_data_async_complete(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_write_data_async_complete(t_void *padapter,
|
||||||
pmlan_buffer pmbuf,
|
pmlan_buffer pmbuf,
|
||||||
t_u32 port,
|
t_u32 port,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
|
|
||||||
/** Packet Reception */
|
/** Packet Reception */
|
||||||
MLAN_API mlan_status mlan_recv(t_void *pmlan_adapter, pmlan_buffer pmbuf,
|
MLAN_API mlan_status mlan_recv(t_void *padapter, pmlan_buffer pmbuf,
|
||||||
t_u32 port);
|
t_u32 port);
|
||||||
#endif /* USB */
|
#endif /* USB */
|
||||||
|
|
||||||
/** Packet Reception complete callback */
|
/** Packet Reception complete callback */
|
||||||
MLAN_API mlan_status mlan_recv_packet_complete(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_recv_packet_complete(t_void *padapter,
|
||||||
pmlan_buffer pmbuf,
|
pmlan_buffer pmbuf,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
|
|
||||||
#if defined(SDIO) || defined(PCIE)
|
#if defined(SDIO) || defined(PCIE)
|
||||||
/** interrupt handler */
|
/** interrupt handler */
|
||||||
MLAN_API mlan_status mlan_interrupt(t_u16 msg_id, t_void *pmlan_adapter);
|
MLAN_API mlan_status mlan_interrupt(t_u16 msg_id, t_void *padapter);
|
||||||
|
|
||||||
#if defined(SYSKT)
|
#if defined(SYSKT)
|
||||||
/** GPIO IRQ callback function */
|
/** GPIO IRQ callback function */
|
||||||
|
@ -1971,7 +2226,7 @@ MLAN_API t_void mlan_hs_callback(t_void *pctx);
|
||||||
#endif /* SYSKT_MULTI || SYSKT */
|
#endif /* SYSKT_MULTI || SYSKT */
|
||||||
#endif /* SDIO || PCIE */
|
#endif /* SDIO || PCIE */
|
||||||
|
|
||||||
MLAN_API t_void mlan_pm_wakeup_card(t_void *pmlan_adapter, t_u8 keep_wakeup);
|
MLAN_API t_void mlan_pm_wakeup_card(t_void *padapter, t_u8 keep_wakeup);
|
||||||
|
|
||||||
MLAN_API t_u8 mlan_is_main_process_running(t_void *adapter);
|
MLAN_API t_u8 mlan_is_main_process_running(t_void *adapter);
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
|
@ -1979,10 +2234,8 @@ MLAN_API t_void mlan_set_int_mode(t_void *adapter, t_u32 int_mode,
|
||||||
t_u8 func_num);
|
t_u8 func_num);
|
||||||
#endif
|
#endif
|
||||||
/** mlan ioctl */
|
/** mlan ioctl */
|
||||||
MLAN_API mlan_status mlan_ioctl(t_void *pmlan_adapter,
|
MLAN_API mlan_status mlan_ioctl(t_void *padapter, pmlan_ioctl_req pioctl_req);
|
||||||
pmlan_ioctl_req pioctl_req);
|
|
||||||
/** mlan select wmm queue */
|
/** mlan select wmm queue */
|
||||||
MLAN_API t_u8 mlan_select_wmm_queue(t_void *pmlan_adapter, t_u8 bss_num,
|
MLAN_API t_u8 mlan_select_wmm_queue(t_void *padapter, t_u8 bss_num, t_u8 tid);
|
||||||
t_u8 tid);
|
|
||||||
|
|
||||||
#endif /* !_MLAN_DECL_H_ */
|
#endif /* !_MLAN_DECL_H_ */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* definitions used in MLAN and MOAL module.
|
* definitions used in MLAN and MOAL module.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -100,6 +100,7 @@ typedef MLAN_PACK_START enum _IEEEtypes_ElementId_e {
|
||||||
NONTX_BSSID_CAP = 83,
|
NONTX_BSSID_CAP = 83,
|
||||||
MBSSID_INDEX = 85,
|
MBSSID_INDEX = 85,
|
||||||
EXT_CAPABILITY = 127,
|
EXT_CAPABILITY = 127,
|
||||||
|
LINK_ID = 101,
|
||||||
/*IEEE802.11r*/
|
/*IEEE802.11r*/
|
||||||
MOBILITY_DOMAIN = 54,
|
MOBILITY_DOMAIN = 54,
|
||||||
FAST_BSS_TRANSITION = 55,
|
FAST_BSS_TRANSITION = 55,
|
||||||
|
@ -734,25 +735,27 @@ typedef MLAN_PACK_START struct {
|
||||||
t_u8 Schedule : 1;
|
t_u8 Schedule : 1;
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
// IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /*
|
||||||
Legacy/Trigg
|
// !Legacy/Trigg*/
|
||||||
*/
|
t_u8 PowerSaveBehavior : 1;
|
||||||
t_u8 Aggregation : 1; /* ! Reserved */
|
t_u8 Aggregation : 1; /* ! Reserved */
|
||||||
t_u8 AccessPolicy2 : 1; /* ! */
|
t_u8 AccessPolicy2 : 1; /* ! */
|
||||||
t_u8 AccessPolicy1 : 1; /* ! */
|
t_u8 AccessPolicy1 : 1; /* ! */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
||||||
t_u8 TID : 4; /* ! Unique identifier */
|
t_u8 TID : 4; /* ! Unique identifier */
|
||||||
IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
||||||
|
t_u8 TrafficType : 1;
|
||||||
#else
|
#else
|
||||||
IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
||||||
|
t_u8 TrafficType : 1;
|
||||||
t_u8 TID : 4; /* ! Unique identifier */
|
t_u8 TID : 4; /* ! Unique identifier */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
||||||
t_u8 AccessPolicy1 : 1; /* ! */
|
t_u8 AccessPolicy1 : 1; /* ! */
|
||||||
t_u8 AccessPolicy2 : 1; /* ! */
|
t_u8 AccessPolicy2 : 1; /* ! */
|
||||||
t_u8 Aggregation : 1; /* ! Reserved */
|
t_u8 Aggregation : 1; /* ! Reserved */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
// IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /* !
|
||||||
Legacy/Trigg
|
// Legacy/Trigg*/
|
||||||
*/
|
t_u8 PowerSaveBehavior : 1;
|
||||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||||
t_u8 Schedule : 1;
|
t_u8 Schedule : 1;
|
||||||
|
@ -938,6 +941,20 @@ typedef MLAN_PACK_START struct _IEEEtypes_CountryInfoFullSet_t {
|
||||||
|
|
||||||
#endif /* STA_SUPPORT */
|
#endif /* STA_SUPPORT */
|
||||||
|
|
||||||
|
/** Data structure for Link ID */
|
||||||
|
typedef MLAN_PACK_START struct _IEEEtypes_LinkIDElement_t {
|
||||||
|
/** Element ID */
|
||||||
|
t_u8 element_id;
|
||||||
|
/** Length */
|
||||||
|
t_u8 len;
|
||||||
|
/** bssid */
|
||||||
|
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** initial sta address */
|
||||||
|
t_u8 init_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** respose sta address */
|
||||||
|
t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END IEEEtypes_LinkIDElement_t, *pIEEEtypes_LinkIDElement_t;
|
||||||
|
|
||||||
/** HT Capabilities Data */
|
/** HT Capabilities Data */
|
||||||
typedef struct MLAN_PACK_START _HTCap_t {
|
typedef struct MLAN_PACK_START _HTCap_t {
|
||||||
/** HT Capabilities Info field */
|
/** HT Capabilities Info field */
|
||||||
|
@ -1025,6 +1042,53 @@ typedef MLAN_PACK_START struct _IEEEtypes_HTInfo_t {
|
||||||
HTInfo_t ht_info;
|
HTInfo_t ht_info;
|
||||||
} MLAN_PACK_END IEEEtypes_HTInfo_t, *pIEEEtypes_HTInfo_t;
|
} 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;
|
||||||
/** 20/40 BSS Coexistence IE */
|
/** 20/40 BSS Coexistence IE */
|
||||||
typedef MLAN_PACK_START struct _IEEEtypes_2040BSSCo_t {
|
typedef MLAN_PACK_START struct _IEEEtypes_2040BSSCo_t {
|
||||||
/** Generic IE header */
|
/** Generic IE header */
|
||||||
|
@ -1221,6 +1285,40 @@ typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
||||||
/** PPE Thresholds (optional) */
|
/** PPE Thresholds (optional) */
|
||||||
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
|
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
|
||||||
|
|
||||||
|
/** default channel switch count */
|
||||||
|
#define DEF_CHAN_SWITCH_COUNT 5
|
||||||
|
|
||||||
|
/* IEEE Channel Switch Announcement Element (7.3.2.20) */
|
||||||
|
/**
|
||||||
|
* Provided in beacons and probe responses. Used to advertise when
|
||||||
|
* and to which channel it is changing to. Only starting STAs in
|
||||||
|
* an IBSS and APs are allowed to originate a chan switch element.
|
||||||
|
*/
|
||||||
|
typedef MLAN_PACK_START struct {
|
||||||
|
t_u8 element_id; /**< IEEE Element ID = 37 */
|
||||||
|
t_u8 len; /**< Element length after id and len */
|
||||||
|
t_u8 chan_switch_mode; /**< STA should not transmit any frames if 1 */
|
||||||
|
t_u8 new_channel_num; /**< Channel # that AP/IBSS is moving to */
|
||||||
|
t_u8 chan_switch_count; /**< # of TBTTs before channel switch */
|
||||||
|
|
||||||
|
} MLAN_PACK_END IEEEtypes_ChanSwitchAnn_t;
|
||||||
|
|
||||||
|
/** data structure for extended channel switch */
|
||||||
|
typedef MLAN_PACK_START struct {
|
||||||
|
/** IEEE element ID = 60 */
|
||||||
|
t_u8 element_id;
|
||||||
|
/** Element length after id and len, set to 4 */
|
||||||
|
t_u8 len;
|
||||||
|
/** STA should not transmit any frames if 1 */
|
||||||
|
t_u8 chan_switch_mode;
|
||||||
|
/** Operate class # that AP/IBSS is moving to */
|
||||||
|
t_u8 new_oper_class;
|
||||||
|
/** Channel # that AP/IBSS is moving to */
|
||||||
|
t_u8 new_channel_num;
|
||||||
|
/** of TBTTs before channel switch */
|
||||||
|
t_u8 chan_switch_count;
|
||||||
|
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
|
||||||
|
|
||||||
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
|
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
|
||||||
#define WLAN_11H_MAX_SUBBANDS 5
|
#define WLAN_11H_MAX_SUBBANDS 5
|
||||||
|
|
||||||
|
@ -1276,40 +1374,6 @@ typedef MLAN_PACK_START struct {
|
||||||
|
|
||||||
} MLAN_PACK_END IEEEtypes_SupportedChannels_t;
|
} MLAN_PACK_END IEEEtypes_SupportedChannels_t;
|
||||||
|
|
||||||
/** default channel switch count */
|
|
||||||
#define DEF_CHAN_SWITCH_COUNT 5
|
|
||||||
|
|
||||||
/* IEEE Channel Switch Announcement Element (7.3.2.20) */
|
|
||||||
/**
|
|
||||||
* Provided in beacons and probe responses. Used to advertise when
|
|
||||||
* and to which channel it is changing to. Only starting STAs in
|
|
||||||
* an IBSS and APs are allowed to originate a chan switch element.
|
|
||||||
*/
|
|
||||||
typedef MLAN_PACK_START struct {
|
|
||||||
t_u8 element_id; /**< IEEE Element ID = 37 */
|
|
||||||
t_u8 len; /**< Element length after id and len */
|
|
||||||
t_u8 chan_switch_mode; /**< STA should not transmit any frames if 1 */
|
|
||||||
t_u8 new_channel_num; /**< Channel # that AP/IBSS is moving to */
|
|
||||||
t_u8 chan_switch_count; /**< # of TBTTs before channel switch */
|
|
||||||
|
|
||||||
} MLAN_PACK_END IEEEtypes_ChanSwitchAnn_t;
|
|
||||||
|
|
||||||
/** data structure for extended channel switch */
|
|
||||||
typedef MLAN_PACK_START struct {
|
|
||||||
/** IEEE element ID = 60 */
|
|
||||||
t_u8 element_id;
|
|
||||||
/** Element length after id and len, set to 4 */
|
|
||||||
t_u8 len;
|
|
||||||
/** STA should not transmit any frames if 1 */
|
|
||||||
t_u8 chan_switch_mode;
|
|
||||||
/** Operate class # that AP/IBSS is moving to */
|
|
||||||
t_u8 new_oper_class;
|
|
||||||
/** Channel # that AP/IBSS is moving to */
|
|
||||||
t_u8 new_channel_num;
|
|
||||||
/** of TBTTs before channel switch */
|
|
||||||
t_u8 chan_switch_count;
|
|
||||||
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
|
|
||||||
|
|
||||||
/* IEEE Wide Bandwidth Channel Switch Element */
|
/* IEEE Wide Bandwidth Channel Switch Element */
|
||||||
/**
|
/**
|
||||||
* Provided in beacons and probe responses. Used to advertise when
|
* Provided in beacons and probe responses. Used to advertise when
|
||||||
|
@ -1444,6 +1508,50 @@ typedef struct {
|
||||||
|
|
||||||
} wlan_11h_bss_info_t;
|
} wlan_11h_bss_info_t;
|
||||||
|
|
||||||
|
/** Ethernet packet type for TDLS */
|
||||||
|
#define MLAN_ETHER_PKT_TYPE_TDLS_ACTION (0x890D)
|
||||||
|
|
||||||
|
/*802.11z TDLS action frame type and strcuct */
|
||||||
|
typedef MLAN_PACK_START struct {
|
||||||
|
/*link indentifier ie =101*/
|
||||||
|
t_u8 element_id;
|
||||||
|
/*len = 18*/
|
||||||
|
t_u8 len;
|
||||||
|
/** bssid */
|
||||||
|
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** init sta mac address */
|
||||||
|
t_u8 init_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** resp sta mac address */
|
||||||
|
t_u8 resp_sta[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
} MLAN_PACK_END IEEEtypes_tdls_linkie;
|
||||||
|
|
||||||
|
/** action code for tdls setup request */
|
||||||
|
#define TDLS_SETUP_REQUEST 0
|
||||||
|
/** action code for tdls setup response */
|
||||||
|
#define TDLS_SETUP_RESPONSE 1
|
||||||
|
/** action code for tdls setup confirm */
|
||||||
|
#define TDLS_SETUP_CONFIRM 2
|
||||||
|
/** action code for tdls tear down */
|
||||||
|
#define TDLS_TEARDOWN 3
|
||||||
|
/** action code for tdls traffic indication */
|
||||||
|
#define TDLS_PEER_TRAFFIC_INDICATION 4
|
||||||
|
/** action code for tdls channel switch request */
|
||||||
|
#define TDLS_CHANNEL_SWITCH_REQUEST 5
|
||||||
|
/** action code for tdls channel switch response */
|
||||||
|
#define TDLS_CHANNEL_SWITCH_RESPONSE 6
|
||||||
|
/** action code for tdls psm request */
|
||||||
|
#define TDLS_PEER_PSM_REQUEST 7
|
||||||
|
/** action code for tdls psm response */
|
||||||
|
#define TDLS_PEER_PSM_RESPONSE 8
|
||||||
|
/** action code for tdls traffic response */
|
||||||
|
#define TDLS_PEER_TRAFFIC_RESPONSE 9
|
||||||
|
/** action code for tdls discovery request */
|
||||||
|
#define TDLS_DISCOVERY_REQUEST 10
|
||||||
|
/** action code for TDLS discovery response */
|
||||||
|
#define TDLS_DISCOVERY_RESPONSE 14
|
||||||
|
/** category public */
|
||||||
|
#define CATEGORY_PUBLIC 4
|
||||||
|
|
||||||
/** action code for 20/40 BSS Coexsitence Management frame */
|
/** action code for 20/40 BSS Coexsitence Management frame */
|
||||||
#define BSS_20_40_COEX 0
|
#define BSS_20_40_COEX 0
|
||||||
|
|
||||||
|
@ -1799,6 +1907,10 @@ typedef struct _BSSDescriptor_t {
|
||||||
IEEEtypes_HTInfo_t *pht_info;
|
IEEEtypes_HTInfo_t *pht_info;
|
||||||
/** HT Information Offset */
|
/** HT Information Offset */
|
||||||
t_u16 ht_info_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;
|
||||||
/** 20/40 BSS Coexistence IE */
|
/** 20/40 BSS Coexistence IE */
|
||||||
IEEEtypes_2040BSSCo_t *pbss_co_2040;
|
IEEEtypes_2040BSSCo_t *pbss_co_2040;
|
||||||
/** 20/40 BSS Coexistence Offset */
|
/** 20/40 BSS Coexistence Offset */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file declares the IOCTL data structures and APIs.
|
* @brief This file declares the IOCTL data structures and APIs.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -198,6 +198,7 @@ enum _mlan_ioctl_req_id {
|
||||||
MLAN_OID_11N_CFG_DELBA = 0x000C000C,
|
MLAN_OID_11N_CFG_DELBA = 0x000C000C,
|
||||||
MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D,
|
MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D,
|
||||||
MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E,
|
MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E,
|
||||||
|
MLAN_OID_11N_CFG_TX_AGGR_CTRL = 0x000C000F,
|
||||||
MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM = 0x000C0010,
|
MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM = 0x000C0010,
|
||||||
MLAN_OID_11N_CFG_MIN_BA_THRESHOLD = 0x000C0011,
|
MLAN_OID_11N_CFG_MIN_BA_THRESHOLD = 0x000C0011,
|
||||||
|
|
||||||
|
@ -257,6 +258,7 @@ enum _mlan_ioctl_req_id {
|
||||||
MLAN_OID_MISC_ASSOC_RSP = 0x0020000C,
|
MLAN_OID_MISC_ASSOC_RSP = 0x0020000C,
|
||||||
MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D,
|
MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D,
|
||||||
MLAN_OID_MISC_CUSTOM_IE = 0x0020000F,
|
MLAN_OID_MISC_CUSTOM_IE = 0x0020000F,
|
||||||
|
MLAN_OID_MISC_TDLS_CONFIG = 0x00200010,
|
||||||
MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012,
|
MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012,
|
||||||
MLAN_OID_MISC_IP_ADDR = 0x00200013,
|
MLAN_OID_MISC_IP_ADDR = 0x00200013,
|
||||||
MLAN_OID_MISC_MAC_CONTROL = 0x00200014,
|
MLAN_OID_MISC_MAC_CONTROL = 0x00200014,
|
||||||
|
@ -284,13 +286,17 @@ enum _mlan_ioctl_req_id {
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025,
|
MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025,
|
||||||
#endif
|
#endif
|
||||||
|
MLAN_OID_MISC_TDLS_OPER = 0x00200026,
|
||||||
|
MLAN_OID_MISC_GET_TDLS_IES = 0x00200027,
|
||||||
MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029,
|
MLAN_OID_MISC_LOW_PWR_MODE = 0x00200029,
|
||||||
MLAN_OID_MISC_MEF_FLT_CFG = 0x0020002A,
|
MLAN_OID_MISC_MEF_FLT_CFG = 0x0020002A,
|
||||||
MLAN_OID_MISC_DFS_REAPTER_MODE = 0x0020002B,
|
MLAN_OID_MISC_DFS_REAPTER_MODE = 0x0020002B,
|
||||||
#ifdef RX_PACKET_COALESCE
|
#ifdef RX_PACKET_COALESCE
|
||||||
MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C,
|
MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C,
|
||||||
#endif
|
#endif
|
||||||
|
MLAN_OID_MISC_TDLS_CS_CHANNEL = 0x0020002D,
|
||||||
MLAN_OID_MISC_COALESCE_CFG = 0x0020002E,
|
MLAN_OID_MISC_COALESCE_CFG = 0x0020002E,
|
||||||
|
MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F,
|
||||||
MLAN_OID_MISC_GET_SENSOR_TEMP = 0x00200030,
|
MLAN_OID_MISC_GET_SENSOR_TEMP = 0x00200030,
|
||||||
MLAN_OID_MISC_GTK_REKEY_OFFLOAD = 0x00200037,
|
MLAN_OID_MISC_GTK_REKEY_OFFLOAD = 0x00200037,
|
||||||
MLAN_OID_MISC_OPER_CLASS = 0x00200038,
|
MLAN_OID_MISC_OPER_CLASS = 0x00200038,
|
||||||
|
@ -332,6 +338,8 @@ enum _mlan_ioctl_req_id {
|
||||||
MLAN_OID_MISC_RANGE_EXT = 0x0020007B,
|
MLAN_OID_MISC_RANGE_EXT = 0x0020007B,
|
||||||
MLAN_OID_MISC_DOT11MC_UNASSOC_FTM_CFG = 0x0020007C,
|
MLAN_OID_MISC_DOT11MC_UNASSOC_FTM_CFG = 0x0020007C,
|
||||||
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
||||||
|
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
||||||
|
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Sub command size */
|
/** Sub command size */
|
||||||
|
@ -1618,6 +1626,14 @@ typedef struct _mlan_ds_get_stats {
|
||||||
t_u32 channel_number;
|
t_u32 channel_number;
|
||||||
/** Channel Switch Mode */
|
/** Channel Switch Mode */
|
||||||
t_u32 channel_switch_mode;
|
t_u32 channel_switch_mode;
|
||||||
|
/** Reset Rx Mac Count */
|
||||||
|
t_u32 rx_reset_mac_recovery_cnt;
|
||||||
|
/** ISR2 Not Done Count*/
|
||||||
|
t_u32 rx_Isr2_NotDone_Cnt;
|
||||||
|
/** GDMA Abort Count */
|
||||||
|
t_u32 gdma_abort_cnt;
|
||||||
|
/** Rx Reset MAC Count */
|
||||||
|
t_u32 g_reset_rx_mac_cnt;
|
||||||
} mlan_ds_get_stats, *pmlan_ds_get_stats;
|
} mlan_ds_get_stats, *pmlan_ds_get_stats;
|
||||||
|
|
||||||
/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */
|
/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */
|
||||||
|
@ -2087,13 +2103,27 @@ typedef struct {
|
||||||
#define SDIO_MP_DBG_NUM 10
|
#define SDIO_MP_DBG_NUM 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCIE
|
|
||||||
#define MLAN_MAX_TXRX_BD 0x20
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Maximum size of IEEE Information Elements */
|
/** Maximum size of IEEE Information Elements */
|
||||||
#define IEEE_MAX_IE_SIZE 256
|
#define IEEE_MAX_IE_SIZE 256
|
||||||
|
|
||||||
|
/** support up to 8 TDLS peer */
|
||||||
|
#define MLAN_MAX_TDLS_PEER_SUPPORTED 8
|
||||||
|
/** TDLS peer info */
|
||||||
|
typedef struct _tdls_peer_info {
|
||||||
|
/** station mac address */
|
||||||
|
t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** SNR */
|
||||||
|
t_s8 snr;
|
||||||
|
/** Noise Floor */
|
||||||
|
t_s8 nf;
|
||||||
|
/** Extended Capabilities IE */
|
||||||
|
t_u8 ext_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** HT Capabilities IE */
|
||||||
|
t_u8 ht_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** VHT Capabilities IE */
|
||||||
|
t_u8 vht_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
} tdls_peer_info;
|
||||||
|
|
||||||
/** max ralist num */
|
/** max ralist num */
|
||||||
#define MLAN_MAX_RALIST_NUM 8
|
#define MLAN_MAX_RALIST_NUM 8
|
||||||
/** ralist info */
|
/** ralist info */
|
||||||
|
@ -2132,6 +2162,10 @@ typedef struct _mlan_debug_info {
|
||||||
t_u32 rx_tbl_num;
|
t_u32 rx_tbl_num;
|
||||||
/** Rx reorder table*/
|
/** Rx reorder table*/
|
||||||
rx_reorder_tbl rx_tbl[MLAN_MAX_RX_BASTREAM_SUPPORTED];
|
rx_reorder_tbl rx_tbl[MLAN_MAX_RX_BASTREAM_SUPPORTED];
|
||||||
|
/** TDLS peer number */
|
||||||
|
t_u32 tdls_peer_num;
|
||||||
|
/** TDLS peer list*/
|
||||||
|
tdls_peer_info tdls_peer_list[MLAN_MAX_TDLS_PEER_SUPPORTED];
|
||||||
/** ralist num */
|
/** ralist num */
|
||||||
t_u32 ralist_num;
|
t_u32 ralist_num;
|
||||||
/** ralist info */
|
/** ralist info */
|
||||||
|
@ -2281,6 +2315,8 @@ typedef struct _mlan_debug_info {
|
||||||
t_u32 dnld_cmd_in_secs;
|
t_u32 dnld_cmd_in_secs;
|
||||||
/** Corresponds to data_sent member of mlan_adapter */
|
/** Corresponds to data_sent member of mlan_adapter */
|
||||||
t_u8 data_sent;
|
t_u8 data_sent;
|
||||||
|
/** Corresponds to data_sent_cnt member of mlan_adapter */
|
||||||
|
t_u32 data_sent_cnt;
|
||||||
/** Corresponds to cmd_sent member of mlan_adapter */
|
/** Corresponds to cmd_sent member of mlan_adapter */
|
||||||
t_u8 cmd_sent;
|
t_u8 cmd_sent;
|
||||||
/** SDIO multiple port read bitmap */
|
/** SDIO multiple port read bitmap */
|
||||||
|
@ -2304,8 +2340,8 @@ typedef struct _mlan_debug_info {
|
||||||
t_u32 eventbd_rdptr;
|
t_u32 eventbd_rdptr;
|
||||||
/** PCIE eventbd write pointer */
|
/** PCIE eventbd write pointer */
|
||||||
t_u32 eventbd_wrptr;
|
t_u32 eventbd_wrptr;
|
||||||
/** Last pkt size in transmit */
|
/** txrx_bd_size */
|
||||||
t_u32 last_tx_pkt_size[MLAN_MAX_TXRX_BD];
|
t_u16 txrx_bd_size;
|
||||||
/** txbd ring vbase */
|
/** txbd ring vbase */
|
||||||
t_u8 *txbd_ring_vbase;
|
t_u8 *txbd_ring_vbase;
|
||||||
/** txbd ring size */
|
/** txbd ring size */
|
||||||
|
@ -2350,7 +2386,7 @@ typedef struct _mlan_debug_info {
|
||||||
#define MAX_NUM_CLIENTS MAX_STA_COUNT
|
#define MAX_NUM_CLIENTS MAX_STA_COUNT
|
||||||
|
|
||||||
/** station info */
|
/** station info */
|
||||||
typedef struct _sta_info {
|
typedef struct _sta_info_data {
|
||||||
/** STA MAC address */
|
/** STA MAC address */
|
||||||
t_u8 mac_address[MLAN_MAC_ADDR_LENGTH];
|
t_u8 mac_address[MLAN_MAC_ADDR_LENGTH];
|
||||||
/** Power mgmt status */
|
/** Power mgmt status */
|
||||||
|
@ -2365,14 +2401,14 @@ typedef struct _sta_info {
|
||||||
t_u16 ie_len;
|
t_u16 ie_len;
|
||||||
/** ie buffer */
|
/** ie buffer */
|
||||||
t_u8 ie_buf[];
|
t_u8 ie_buf[];
|
||||||
} sta_info;
|
} sta_info_data;
|
||||||
|
|
||||||
/** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */
|
/** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */
|
||||||
typedef struct _mlan_ds_sta_list {
|
typedef struct _mlan_ds_sta_list {
|
||||||
/** station count */
|
/** station count */
|
||||||
t_u16 sta_count;
|
t_u16 sta_count;
|
||||||
/** station list */
|
/** station list */
|
||||||
sta_info info[MAX_NUM_CLIENTS];
|
sta_info_data info[MAX_NUM_CLIENTS];
|
||||||
} mlan_ds_sta_list, *pmlan_ds_sta_list;
|
} mlan_ds_sta_list, *pmlan_ds_sta_list;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3681,6 +3717,8 @@ typedef struct _mlan_ds_11n_cfg {
|
||||||
mlan_ds_reject_addba_req reject_addba_req;
|
mlan_ds_reject_addba_req reject_addba_req;
|
||||||
/** Control coex RX window size configuration */
|
/** Control coex RX window size configuration */
|
||||||
t_u32 coex_rx_winsize;
|
t_u32 coex_rx_winsize;
|
||||||
|
/** Control TX AMPDU configuration */
|
||||||
|
t_u32 txaggrctrl;
|
||||||
/** aggrprirotity table for MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM */
|
/** aggrprirotity table for MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM */
|
||||||
mlan_ds_ibss_ampdu_param ibss_ampdu;
|
mlan_ds_ibss_ampdu_param ibss_ampdu;
|
||||||
/** Minimum BA Threshold for MLAN_OID_11N_CFG_MIN_BA_THRESHOLD
|
/** Minimum BA Threshold for MLAN_OID_11N_CFG_MIN_BA_THRESHOLD
|
||||||
|
@ -4519,7 +4557,7 @@ typedef struct _mlan_ds_misc_otp_user_data {
|
||||||
t_u8 user_data[MAX_OTP_USER_DATA_LEN];
|
t_u8 user_data[MAX_OTP_USER_DATA_LEN];
|
||||||
} mlan_ds_misc_otp_user_data;
|
} mlan_ds_misc_otp_user_data;
|
||||||
|
|
||||||
typedef struct _aggr_ctrl {
|
typedef struct _aggr_ctrl_cfg {
|
||||||
/** Enable */
|
/** Enable */
|
||||||
t_u16 enable;
|
t_u16 enable;
|
||||||
/** Aggregation alignment */
|
/** Aggregation alignment */
|
||||||
|
@ -4530,18 +4568,18 @@ typedef struct _aggr_ctrl {
|
||||||
t_u16 aggr_max_num;
|
t_u16 aggr_max_num;
|
||||||
/** Aggrgation timeout, in microseconds */
|
/** Aggrgation timeout, in microseconds */
|
||||||
t_u16 aggr_tmo;
|
t_u16 aggr_tmo;
|
||||||
} aggr_ctrl;
|
} aggr_ctrl_cfg;
|
||||||
|
|
||||||
/** Type definition of mlan_ds_misc_aggr_ctrl
|
/** Type definition of mlan_ds_misc_aggr_ctrl
|
||||||
* for MLAN_OID_MISC_AGGR_CTRL
|
* for MLAN_OID_MISC_AGGR_CTRL
|
||||||
*/
|
*/
|
||||||
typedef struct _mlan_ds_misc_aggr_ctrl {
|
typedef struct _mlan_ds_misc_aggr_ctrl {
|
||||||
/** Tx aggregation control */
|
/** Tx aggregation control */
|
||||||
aggr_ctrl tx;
|
aggr_ctrl_cfg tx;
|
||||||
} mlan_ds_misc_aggr_ctrl;
|
} mlan_ds_misc_aggr_ctrl;
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
typedef struct _usb_aggr_ctrl {
|
typedef struct _usb_aggr_ctrl_cfg {
|
||||||
/** Enable */
|
/** Enable */
|
||||||
t_u16 enable;
|
t_u16 enable;
|
||||||
/** Aggregation mode */
|
/** Aggregation mode */
|
||||||
|
@ -4552,16 +4590,16 @@ typedef struct _usb_aggr_ctrl {
|
||||||
t_u16 aggr_max;
|
t_u16 aggr_max;
|
||||||
/** Aggrgation timeout, in microseconds */
|
/** Aggrgation timeout, in microseconds */
|
||||||
t_u16 aggr_tmo;
|
t_u16 aggr_tmo;
|
||||||
} usb_aggr_ctrl;
|
} usb_aggr_ctrl_cfg;
|
||||||
|
|
||||||
/** Type definition of mlan_ds_misc_usb_aggr_ctrl
|
/** Type definition of mlan_ds_misc_usb_aggr_ctrl
|
||||||
* for MLAN_OID_MISC_USB_AGGR_CTRL
|
* for MLAN_OID_MISC_USB_AGGR_CTRL
|
||||||
*/
|
*/
|
||||||
typedef struct _mlan_ds_misc_usb_aggr_ctrl {
|
typedef struct _mlan_ds_misc_usb_aggr_ctrl {
|
||||||
/** Tx aggregation control */
|
/** Tx aggregation control */
|
||||||
usb_aggr_ctrl tx_aggr_ctrl;
|
usb_aggr_ctrl_cfg tx_aggr_ctrl;
|
||||||
/** Rx deaggregation control */
|
/** Rx deaggregation control */
|
||||||
usb_aggr_ctrl rx_deaggr_ctrl;
|
usb_aggr_ctrl_cfg rx_deaggr_ctrl;
|
||||||
} mlan_ds_misc_usb_aggr_ctrl;
|
} mlan_ds_misc_usb_aggr_ctrl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4605,6 +4643,85 @@ typedef struct _mlan_ds_misc_pmfcfg {
|
||||||
#define MAX_SSID_NUM 16
|
#define MAX_SSID_NUM 16
|
||||||
#define MAX_AP_LIST 8
|
#define MAX_AP_LIST 8
|
||||||
|
|
||||||
|
/**Action ID for TDLS disable link*/
|
||||||
|
#define WLAN_TDLS_DISABLE_LINK 0x00
|
||||||
|
/**Action ID for TDLS enable link*/
|
||||||
|
#define WLAN_TDLS_ENABLE_LINK 0x01
|
||||||
|
/**Action ID for TDLS create link*/
|
||||||
|
#define WLAN_TDLS_CREATE_LINK 0x02
|
||||||
|
/**Action ID for TDLS config link*/
|
||||||
|
#define WLAN_TDLS_CONFIG_LINK 0x03
|
||||||
|
/*reason code*/
|
||||||
|
#define MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26
|
||||||
|
/** TDLS operation buffer */
|
||||||
|
typedef struct _mlan_ds_misc_tdls_oper {
|
||||||
|
/** TDLS Action */
|
||||||
|
t_u16 tdls_action;
|
||||||
|
/** TDLS peer address */
|
||||||
|
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** peer capability */
|
||||||
|
t_u16 capability;
|
||||||
|
/** peer qos info */
|
||||||
|
t_u8 qos_info;
|
||||||
|
/** peer extend capability */
|
||||||
|
t_u8 *ext_capab;
|
||||||
|
/** extend capability len */
|
||||||
|
t_u8 ext_capab_len;
|
||||||
|
/** support rates */
|
||||||
|
t_u8 *supported_rates;
|
||||||
|
/** supported rates len */
|
||||||
|
t_u8 supported_rates_len;
|
||||||
|
/** peer ht_cap */
|
||||||
|
t_u8 *ht_capa;
|
||||||
|
/** peer vht capability */
|
||||||
|
t_u8 *vht_cap;
|
||||||
|
} mlan_ds_misc_tdls_oper;
|
||||||
|
|
||||||
|
/** flag for TDLS extcap */
|
||||||
|
#define TDLS_IE_FLAGS_EXTCAP 0x0001
|
||||||
|
/** flag for TDLS HTCAP */
|
||||||
|
#define TDLS_IE_FLAGS_HTCAP 0x0002
|
||||||
|
/** flag for TDLS HTINFO */
|
||||||
|
#define TDLS_IE_FLAGS_HTINFO 0x0004
|
||||||
|
/** flag for TDLS VHTCAP */
|
||||||
|
#define TDLS_IE_FLAGS_VHTCAP 0x0008
|
||||||
|
/** flag for TDLS VHTOPRAT */
|
||||||
|
#define TDLS_IE_FLAGS_VHTOPRAT 0x0010
|
||||||
|
/** flag for TDLS AID inof */
|
||||||
|
#define TDLS_IE_FLAGS_AID 0x0020
|
||||||
|
/** flag for TDLS Supported channels and regulatory class IE*/
|
||||||
|
#define TDLS_IE_FLAGS_SUPP_CS_IE 0x0040
|
||||||
|
/** flag for TDLS Qos info */
|
||||||
|
#define TDLS_IE_FLAGS_QOS_INFO 0x0080
|
||||||
|
/** flag for TDLS SETUP */
|
||||||
|
#define TDLS_IE_FLAGS_SETUP 0x0100
|
||||||
|
|
||||||
|
/** TDLS ie buffer */
|
||||||
|
typedef struct _mlan_ds_misc_tdls_ies {
|
||||||
|
/** TDLS peer address */
|
||||||
|
t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
/** flags for request IEs */
|
||||||
|
t_u16 flags;
|
||||||
|
/** Qos info */
|
||||||
|
t_u8 QosInfo;
|
||||||
|
/** Extended Capabilities IE */
|
||||||
|
t_u8 ext_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** HT Capabilities IE */
|
||||||
|
t_u8 ht_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** HT Information IE */
|
||||||
|
t_u8 ht_info[IEEE_MAX_IE_SIZE];
|
||||||
|
/** VHT Capabilities IE */
|
||||||
|
t_u8 vht_cap[IEEE_MAX_IE_SIZE];
|
||||||
|
/** VHT Operations IE */
|
||||||
|
t_u8 vht_oprat[IEEE_MAX_IE_SIZE];
|
||||||
|
/** aid Info */
|
||||||
|
t_u8 aid_info[IEEE_MAX_IE_SIZE];
|
||||||
|
/** supported channels */
|
||||||
|
t_u8 supp_chan[IEEE_MAX_IE_SIZE];
|
||||||
|
/** supported regulatory class */
|
||||||
|
t_u8 regulatory_class[IEEE_MAX_IE_SIZE];
|
||||||
|
} mlan_ds_misc_tdls_ies;
|
||||||
|
|
||||||
#ifdef RX_PACKET_COALESCE
|
#ifdef RX_PACKET_COALESCE
|
||||||
typedef struct _mlan_ds_misc_rx_packet_coalesce {
|
typedef struct _mlan_ds_misc_rx_packet_coalesce {
|
||||||
/** packet threshold */
|
/** packet threshold */
|
||||||
|
@ -4855,6 +4972,13 @@ typedef struct _mlan_ds_ssu_params {
|
||||||
} mlan_ds_ssu_params;
|
} mlan_ds_ssu_params;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef MLAN_PACK_START struct _mlan_ds_hal_phy_cfg_params {
|
||||||
|
/** 11b pwr spectral density mask enable/disable */
|
||||||
|
t_u8 dot11b_psd_mask_cfg;
|
||||||
|
/** reserved fields for future hal/phy cfg use */
|
||||||
|
t_u8 reserved[7];
|
||||||
|
} MLAN_PACK_END mlan_ds_hal_phy_cfg_params;
|
||||||
|
|
||||||
#define MAX_NUM_MAC 2
|
#define MAX_NUM_MAC 2
|
||||||
/** Type definition of mlan_ds_misc_mapping_policy */
|
/** Type definition of mlan_ds_misc_mapping_policy */
|
||||||
typedef struct _mlan_ds_misc_mapping_policy {
|
typedef struct _mlan_ds_misc_mapping_policy {
|
||||||
|
@ -4914,6 +5038,8 @@ typedef struct _mlan_ds_misc_chan_trpc_cfg {
|
||||||
#define MFG_CMD_RFPWR 0x1033
|
#define MFG_CMD_RFPWR 0x1033
|
||||||
#define MFG_CMD_RF_BAND_AG 0x1034
|
#define MFG_CMD_RF_BAND_AG 0x1034
|
||||||
#define MFG_CMD_RF_CHANNELBW 0x1044
|
#define MFG_CMD_RF_CHANNELBW 0x1044
|
||||||
|
#define MFG_CMD_RADIO_MODE_CFG 0x1211
|
||||||
|
#define MFG_CMD_CONFIG_MAC_HE_TB_TX 0x110A
|
||||||
/** MFG CMD generic cfg */
|
/** MFG CMD generic cfg */
|
||||||
struct MLAN_PACK_START mfg_cmd_generic_cfg {
|
struct MLAN_PACK_START mfg_cmd_generic_cfg {
|
||||||
/** MFG command code */
|
/** MFG command code */
|
||||||
|
@ -4972,6 +5098,21 @@ struct MLAN_PACK_START mfg_cmd_tx_frame2 {
|
||||||
t_u32 stbc;
|
t_u32 stbc;
|
||||||
/** power id */
|
/** power id */
|
||||||
t_u32 rsvd[2];
|
t_u32 rsvd[2];
|
||||||
|
/** NumPkt */
|
||||||
|
t_u32 NumPkt;
|
||||||
|
/** MaxPE */
|
||||||
|
t_u32 MaxPE;
|
||||||
|
/** BeamChange */
|
||||||
|
t_u32 BeamChange;
|
||||||
|
/** Dcm */
|
||||||
|
t_u32 Dcm;
|
||||||
|
/** Doppler */
|
||||||
|
t_u32 Doppler;
|
||||||
|
/** MidP */
|
||||||
|
t_u32 MidP;
|
||||||
|
/** QNum */
|
||||||
|
t_u32 QNum;
|
||||||
|
|
||||||
} MLAN_PACK_END;
|
} MLAN_PACK_END;
|
||||||
|
|
||||||
/* MFG CMD Tx Continuous */
|
/* MFG CMD Tx Continuous */
|
||||||
|
@ -5000,6 +5141,27 @@ struct MLAN_PACK_START mfg_cmd_tx_cont {
|
||||||
t_u32 rsvd;
|
t_u32 rsvd;
|
||||||
} MLAN_PACK_END;
|
} MLAN_PACK_END;
|
||||||
|
|
||||||
|
struct MLAN_PACK_START mfg_Cmd_HE_TBTx_t {
|
||||||
|
/** MFG command code */
|
||||||
|
t_u32 mfg_cmd;
|
||||||
|
/** Action */
|
||||||
|
t_u16 action;
|
||||||
|
/** Device ID */
|
||||||
|
t_u16 device_id;
|
||||||
|
/** MFG Error code */
|
||||||
|
t_u32 error;
|
||||||
|
/** Enable Tx */
|
||||||
|
t_u16 enable;
|
||||||
|
/** Q num */
|
||||||
|
t_u16 qnum;
|
||||||
|
/** AID */
|
||||||
|
t_u16 aid;
|
||||||
|
/** AXQ Mu Timer */
|
||||||
|
t_u16 axq_mu_timer;
|
||||||
|
/** Tx Power */
|
||||||
|
t_u16 tx_power;
|
||||||
|
} MLAN_PACK_END;
|
||||||
|
|
||||||
typedef struct _mlan_ds_misc_chnrgpwr_cfg {
|
typedef struct _mlan_ds_misc_chnrgpwr_cfg {
|
||||||
/** length */
|
/** length */
|
||||||
t_u16 length;
|
t_u16 length;
|
||||||
|
@ -5043,8 +5205,17 @@ typedef struct _mlan_ds_misc_cfg {
|
||||||
t_u32 func_init_shutdown;
|
t_u32 func_init_shutdown;
|
||||||
/** Custom IE for MLAN_OID_MISC_CUSTOM_IE */
|
/** Custom IE for MLAN_OID_MISC_CUSTOM_IE */
|
||||||
mlan_ds_misc_custom_ie cust_ie;
|
mlan_ds_misc_custom_ie cust_ie;
|
||||||
|
t_u16 tdls_idle_time;
|
||||||
/** Config dynamic bandwidth*/
|
/** Config dynamic bandwidth*/
|
||||||
t_u16 dyn_bw;
|
t_u16 dyn_bw;
|
||||||
|
/** TDLS configuration for MLAN_OID_MISC_TDLS_CONFIG */
|
||||||
|
mlan_ds_misc_tdls_config tdls_config;
|
||||||
|
/** TDLS operation for MLAN_OID_MISC_TDLS_OPER */
|
||||||
|
mlan_ds_misc_tdls_oper tdls_oper;
|
||||||
|
/** TDLS ies for MLAN_OID_MISC_GET_TDLS_IES */
|
||||||
|
mlan_ds_misc_tdls_ies tdls_ies;
|
||||||
|
/**tdls cs off channel*/
|
||||||
|
t_u8 tdls_cs_channel;
|
||||||
/** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */
|
/** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */
|
||||||
mlan_ds_misc_tx_datapause tx_datapause;
|
mlan_ds_misc_tx_datapause tx_datapause;
|
||||||
/** IP address configuration */
|
/** IP address configuration */
|
||||||
|
@ -5131,11 +5302,13 @@ typedef struct _mlan_ds_misc_cfg {
|
||||||
struct mfg_cmd_generic_cfg mfg_generic_cfg;
|
struct mfg_cmd_generic_cfg mfg_generic_cfg;
|
||||||
struct mfg_cmd_tx_cont mfg_tx_cont;
|
struct mfg_cmd_tx_cont mfg_tx_cont;
|
||||||
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
struct mfg_cmd_tx_frame2 mfg_tx_frame2;
|
||||||
|
struct mfg_Cmd_HE_TBTx_t mfg_he_power;
|
||||||
mlan_ds_misc_arb_cfg arb_cfg;
|
mlan_ds_misc_arb_cfg arb_cfg;
|
||||||
mlan_ds_misc_cfp_tbl cfp;
|
mlan_ds_misc_cfp_tbl cfp;
|
||||||
t_u8 range_ext_mode;
|
t_u8 range_ext_mode;
|
||||||
mlan_ds_misc_dot11mc_unassoc_ftm_cfg dot11mc_unassoc_ftm_cfg;
|
mlan_ds_misc_dot11mc_unassoc_ftm_cfg dot11mc_unassoc_ftm_cfg;
|
||||||
mlan_ds_misc_tp_state tp_state;
|
mlan_ds_misc_tp_state tp_state;
|
||||||
|
mlan_ds_hal_phy_cfg_params hal_phy_cfg_params;
|
||||||
} param;
|
} param;
|
||||||
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the functions for CFG80211.
|
* @brief This file contains the functions for CFG80211.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2011-2020 NXP
|
* Copyright 2011-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -1265,9 +1265,9 @@ int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
if (rts_thr == MLAN_FRAG_RTS_DISABLED)
|
if (rts_thr == (int)MLAN_FRAG_RTS_DISABLED)
|
||||||
rts_thr = MLAN_RTS_MAX_VALUE;
|
rts_thr = MLAN_RTS_MAX_VALUE;
|
||||||
if (frag_thr == MLAN_FRAG_RTS_DISABLED)
|
if (frag_thr == (int)MLAN_FRAG_RTS_DISABLED)
|
||||||
frag_thr = MLAN_FRAG_MAX_VALUE;
|
frag_thr = MLAN_FRAG_MAX_VALUE;
|
||||||
|
|
||||||
#ifdef UAP_CFG80211
|
#ifdef UAP_CFG80211
|
||||||
|
@ -1980,7 +1980,7 @@ static int woal_fill_coalesce_rule_info(struct cfg80211_coalesce_rules *crule,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_set_coalesce(moal_private *priv, t_u16 action,
|
static mlan_status woal_set_coalesce(moal_private *priv, t_u16 action,
|
||||||
mlan_ds_coalesce_cfg *coalesce_cfg)
|
mlan_ds_coalesce_cfg *coalesce_cfg)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -2301,7 +2301,6 @@ done:
|
||||||
*/
|
*/
|
||||||
void woal_mgmt_frame_register(moal_private *priv, u16 frame_type, bool reg)
|
void woal_mgmt_frame_register(moal_private *priv, u16 frame_type, bool reg)
|
||||||
{
|
{
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
|
||||||
t_u32 mgmt_subtype_mask = 0x0;
|
t_u32 mgmt_subtype_mask = 0x0;
|
||||||
t_u32 last_mgmt_subtype_mask = priv->mgmt_subtype_mask;
|
t_u32 last_mgmt_subtype_mask = priv->mgmt_subtype_mask;
|
||||||
|
|
||||||
|
@ -2333,8 +2332,8 @@ void woal_mgmt_frame_register(moal_private *priv, u16 frame_type, bool reg)
|
||||||
* Note that this callback may not sleep, and cannot run
|
* Note that this callback may not sleep, and cannot run
|
||||||
* concurrently with itself.
|
* concurrently with itself.
|
||||||
*/
|
*/
|
||||||
status = woal_reg_rx_mgmt_ind(priv, MLAN_ACT_SET,
|
woal_reg_rx_mgmt_ind(priv, MLAN_ACT_SET, &mgmt_subtype_mask,
|
||||||
&mgmt_subtype_mask, MOAL_NO_WAIT);
|
MOAL_NO_WAIT);
|
||||||
priv->mgmt_subtype_mask = last_mgmt_subtype_mask;
|
priv->mgmt_subtype_mask = last_mgmt_subtype_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2904,7 +2903,7 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
||||||
{
|
{
|
||||||
mlan_ioctl_req *ioctl_req = NULL;
|
mlan_ioctl_req *ioctl_req = NULL;
|
||||||
mlan_ds_misc_cfg *misc = NULL;
|
mlan_ds_misc_cfg *misc = NULL;
|
||||||
mlan_ds_misc_custom_ie *custom_ie = NULL;
|
mlan_ds_misc_custom_ie *pcustom_ie = NULL;
|
||||||
t_u8 *pos = NULL;
|
t_u8 *pos = NULL;
|
||||||
t_u16 len = 0;
|
t_u16 len = 0;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -2912,17 +2911,17 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
custom_ie = kzalloc(sizeof(mlan_ds_misc_custom_ie), GFP_KERNEL);
|
pcustom_ie = kzalloc(sizeof(mlan_ds_misc_custom_ie), GFP_KERNEL);
|
||||||
if (!custom_ie) {
|
if (!pcustom_ie) {
|
||||||
PRINTM(MERROR, "Fail to allocate custome_ie\n");
|
PRINTM(MERROR, "Fail to allocate custome_ie\n");
|
||||||
status = MLAN_STATUS_FAILURE;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
custom_ie->type = TLV_TYPE_MGMT_IE;
|
pcustom_ie->type = TLV_TYPE_MGMT_IE;
|
||||||
|
|
||||||
pos = (t_u8 *)custom_ie->ie_data_list;
|
pos = (t_u8 *)pcustom_ie->ie_data_list;
|
||||||
remain_len = sizeof(custom_ie->ie_data_list);
|
remain_len = sizeof(pcustom_ie->ie_data_list);
|
||||||
if (beacon_ies_data) {
|
if (beacon_ies_data) {
|
||||||
len = sizeof(*beacon_ies_data) - MAX_IE_SIZE +
|
len = sizeof(*beacon_ies_data) - MAX_IE_SIZE +
|
||||||
beacon_ies_data->ie_length;
|
beacon_ies_data->ie_length;
|
||||||
|
@ -2930,7 +2929,7 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
||||||
remain_len);
|
remain_len);
|
||||||
pos += len;
|
pos += len;
|
||||||
remain_len -= len;
|
remain_len -= len;
|
||||||
custom_ie->len += len;
|
pcustom_ie->len += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (proberesp_ies_data) {
|
if (proberesp_ies_data) {
|
||||||
|
@ -2940,7 +2939,7 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
||||||
remain_len);
|
remain_len);
|
||||||
pos += len;
|
pos += len;
|
||||||
remain_len -= len;
|
remain_len -= len;
|
||||||
custom_ie->len += len;
|
pcustom_ie->len += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assocresp_ies_data) {
|
if (assocresp_ies_data) {
|
||||||
|
@ -2950,7 +2949,7 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
||||||
remain_len);
|
remain_len);
|
||||||
pos += len;
|
pos += len;
|
||||||
remain_len -= len;
|
remain_len -= len;
|
||||||
custom_ie->len += len;
|
pcustom_ie->len += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (probereq_ies_data) {
|
if (probereq_ies_data) {
|
||||||
|
@ -2960,7 +2959,7 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
||||||
remain_len);
|
remain_len);
|
||||||
pos += len;
|
pos += len;
|
||||||
remain_len -= len;
|
remain_len -= len;
|
||||||
custom_ie->len += len;
|
pcustom_ie->len += len;
|
||||||
}
|
}
|
||||||
ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||||
if (ioctl_req == NULL) {
|
if (ioctl_req == NULL) {
|
||||||
|
@ -2974,7 +2973,7 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
||||||
ioctl_req->req_id = MLAN_IOCTL_MISC_CFG;
|
ioctl_req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||||
ioctl_req->action = MLAN_ACT_SET;
|
ioctl_req->action = MLAN_ACT_SET;
|
||||||
|
|
||||||
moal_memcpy_ext(priv->phandle, &misc->param.cust_ie, custom_ie,
|
moal_memcpy_ext(priv->phandle, &misc->param.cust_ie, pcustom_ie,
|
||||||
sizeof(mlan_ds_misc_custom_ie),
|
sizeof(mlan_ds_misc_custom_ie),
|
||||||
sizeof(mlan_ds_misc_custom_ie));
|
sizeof(mlan_ds_misc_custom_ie));
|
||||||
|
|
||||||
|
@ -3025,7 +3024,7 @@ woal_cfg80211_custom_ie(moal_private *priv, custom_ie *beacon_ies_data,
|
||||||
done:
|
done:
|
||||||
if (status != MLAN_STATUS_PENDING)
|
if (status != MLAN_STATUS_PENDING)
|
||||||
kfree(ioctl_req);
|
kfree(ioctl_req);
|
||||||
kfree(custom_ie);
|
kfree(pcustom_ie);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -3174,7 +3173,7 @@ static t_u16 woal_get_specific_ie(const t_u8 *ie, int len, t_u8 *ie_out,
|
||||||
wps_oui[3]) {
|
wps_oui[3]) {
|
||||||
if (mask & IE_MASK_WPS) {
|
if (mask & IE_MASK_WPS) {
|
||||||
if ((out_len + length + 2) <
|
if ((out_len + length + 2) <
|
||||||
ie_out_len) {
|
(int)ie_out_len) {
|
||||||
moal_memcpy_ext(
|
moal_memcpy_ext(
|
||||||
NULL, ie_out + out_len,
|
NULL, ie_out + out_len,
|
||||||
pos, length + 2,
|
pos, length + 2,
|
||||||
|
@ -3192,7 +3191,7 @@ static t_u16 woal_get_specific_ie(const t_u8 *ie, int len, t_u8 *ie_out,
|
||||||
wfd_oui[3]) {
|
wfd_oui[3]) {
|
||||||
if (mask & IE_MASK_WFD) {
|
if (mask & IE_MASK_WFD) {
|
||||||
if ((out_len + length + 2) <
|
if ((out_len + length + 2) <
|
||||||
ie_out_len) {
|
(int)ie_out_len) {
|
||||||
moal_memcpy_ext(
|
moal_memcpy_ext(
|
||||||
NULL, ie_out + out_len,
|
NULL, ie_out + out_len,
|
||||||
pos, length + 2,
|
pos, length + 2,
|
||||||
|
@ -3205,7 +3204,7 @@ static t_u16 woal_get_specific_ie(const t_u8 *ie, int len, t_u8 *ie_out,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (mask & IE_MASK_VENDOR) {
|
} else if (mask & IE_MASK_VENDOR) {
|
||||||
if ((out_len + length + 2) < ie_out_len) {
|
if ((out_len + length + 2) < (int)ie_out_len) {
|
||||||
moal_memcpy_ext(NULL, ie_out + out_len,
|
moal_memcpy_ext(NULL, ie_out + out_len,
|
||||||
pos, length + 2,
|
pos, length + 2,
|
||||||
ie_out_len - out_len);
|
ie_out_len - out_len);
|
||||||
|
@ -3240,11 +3239,9 @@ static t_u8 woal_find_ie(const t_u8 *ie, int len, const t_u8 *spec_ie,
|
||||||
int left_len = len;
|
int left_len = len;
|
||||||
const t_u8 *pos = ie;
|
const t_u8 *pos = ie;
|
||||||
int length;
|
int length;
|
||||||
t_u8 id = 0;
|
|
||||||
|
|
||||||
while (left_len >= 2) {
|
while (left_len >= 2) {
|
||||||
length = *(pos + 1);
|
length = *(pos + 1);
|
||||||
id = *pos;
|
|
||||||
if ((length + 2) > left_len)
|
if ((length + 2) > left_len)
|
||||||
break;
|
break;
|
||||||
if ((length + 2) == spec_len) {
|
if ((length + 2) == spec_len) {
|
||||||
|
@ -3309,7 +3306,7 @@ static t_u16 woal_filter_beacon_ies(moal_private *priv, const t_u8 *ie, int len,
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case COUNTRY_INFO:
|
case COUNTRY_INFO:
|
||||||
enable_11d = MTRUE;
|
enable_11d = MTRUE;
|
||||||
if ((out_len + length + 2) < ie_out_len) {
|
if ((out_len + length + 2) < (int)ie_out_len) {
|
||||||
moal_memcpy_ext(priv->phandle, ie_out + out_len,
|
moal_memcpy_ext(priv->phandle, ie_out + out_len,
|
||||||
pos, length + 2,
|
pos, length + 2,
|
||||||
ie_out_len - out_len);
|
ie_out_len - out_len);
|
||||||
|
@ -3324,7 +3321,7 @@ static t_u16 woal_filter_beacon_ies(moal_private *priv, const t_u8 *ie, int len,
|
||||||
case VHT_CAPABILITY:
|
case VHT_CAPABILITY:
|
||||||
case VHT_OPERATION:
|
case VHT_OPERATION:
|
||||||
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME)) {
|
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME)) {
|
||||||
if ((out_len + length + 2) < ie_out_len) {
|
if ((out_len + length + 2) < (int)ie_out_len) {
|
||||||
moal_memcpy_ext(priv->phandle,
|
moal_memcpy_ext(priv->phandle,
|
||||||
ie_out + out_len, pos,
|
ie_out + out_len, pos,
|
||||||
length + 2,
|
length + 2,
|
||||||
|
@ -3352,7 +3349,7 @@ static t_u16 woal_filter_beacon_ies(moal_private *priv, const t_u8 *ie, int len,
|
||||||
!moal_extflg_isset(priv->phandle, EXT_HOST_MLME))
|
!moal_extflg_isset(priv->phandle, EXT_HOST_MLME))
|
||||||
break;
|
break;
|
||||||
else {
|
else {
|
||||||
if ((out_len + length + 2) < ie_out_len) {
|
if ((out_len + length + 2) < (int)ie_out_len) {
|
||||||
moal_memcpy_ext(priv->phandle,
|
moal_memcpy_ext(priv->phandle,
|
||||||
ie_out + out_len, pos,
|
ie_out + out_len, pos,
|
||||||
length + 2,
|
length + 2,
|
||||||
|
@ -3376,7 +3373,7 @@ static t_u16 woal_filter_beacon_ies(moal_private *priv, const t_u8 *ie, int len,
|
||||||
"Fail to set EXTCAP IE\n");
|
"Fail to set EXTCAP IE\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((out_len + length + 2) < ie_out_len) {
|
if ((out_len + length + 2) < (int)ie_out_len) {
|
||||||
moal_memcpy_ext(priv->phandle, ie_out + out_len,
|
moal_memcpy_ext(priv->phandle, ie_out + out_len,
|
||||||
pos, length + 2,
|
pos, length + 2,
|
||||||
ie_out_len - out_len);
|
ie_out_len - out_len);
|
||||||
|
@ -3420,7 +3417,7 @@ static t_u16 woal_filter_beacon_ies(moal_private *priv, const t_u8 *ie, int len,
|
||||||
// filter out vendor IE
|
// filter out vendor IE
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((out_len + length + 2) < ie_out_len) {
|
if ((out_len + length + 2) < (int)ie_out_len) {
|
||||||
moal_memcpy_ext(priv->phandle, ie_out + out_len,
|
moal_memcpy_ext(priv->phandle, ie_out + out_len,
|
||||||
pos, length + 2,
|
pos, length + 2,
|
||||||
ie_out_len - out_len);
|
ie_out_len - out_len);
|
||||||
|
@ -3431,7 +3428,7 @@ static t_u16 woal_filter_beacon_ies(moal_private *priv, const t_u8 *ie, int len,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ((out_len + length + 2) < ie_out_len) {
|
if ((out_len + length + 2) < (int)ie_out_len) {
|
||||||
moal_memcpy_ext(priv->phandle, ie_out + out_len,
|
moal_memcpy_ext(priv->phandle, ie_out + out_len,
|
||||||
pos, length + 2,
|
pos, length + 2,
|
||||||
ie_out_len - out_len);
|
ie_out_len - out_len);
|
||||||
|
@ -3460,7 +3457,7 @@ static t_u16 woal_filter_beacon_ies(moal_private *priv, const t_u8 *ie, int len,
|
||||||
*
|
*
|
||||||
* @return MTRUE/MFALSE
|
* @return MTRUE/MFALSE
|
||||||
*/
|
*/
|
||||||
t_u8 is_selected_registrar_on(const t_u8 *ie, int len)
|
static t_u8 is_selected_registrar_on(const t_u8 *ie, int len)
|
||||||
{
|
{
|
||||||
#define WPS_IE_FIX_LEN 6
|
#define WPS_IE_FIX_LEN 6
|
||||||
#define TLV_ID_SELECTED_REGISTRAR 0x1041
|
#define TLV_ID_SELECTED_REGISTRAR 0x1041
|
||||||
|
@ -3470,7 +3467,7 @@ t_u8 is_selected_registrar_on(const t_u8 *ie, int len)
|
||||||
u16 tlv_type, tlv_len;
|
u16 tlv_type, tlv_len;
|
||||||
u8 *pos = NULL;
|
u8 *pos = NULL;
|
||||||
|
|
||||||
while (left_len > sizeof(TLV_Generic_t)) {
|
while (left_len > (int)sizeof(TLV_Generic_t)) {
|
||||||
tlv_type = ntohs(tlv->type);
|
tlv_type = ntohs(tlv->type);
|
||||||
tlv_len = ntohs(tlv->len);
|
tlv_len = ntohs(tlv->len);
|
||||||
if (tlv_type == TLV_ID_SELECTED_REGISTRAR) {
|
if (tlv_type == TLV_ID_SELECTED_REGISTRAR) {
|
||||||
|
@ -4213,8 +4210,8 @@ Bit75: 0x1 (Rx 1024-QAM Support < 242-tone RU)
|
||||||
#define UAP_HE_MAC_CAP0_MASK 0x00
|
#define UAP_HE_MAC_CAP0_MASK 0x00
|
||||||
#define UAP_HE_MAC_CAP1_MASK 0x00
|
#define UAP_HE_MAC_CAP1_MASK 0x00
|
||||||
#define UAP_HE_MAC_CAP2_MASK 0x00
|
#define UAP_HE_MAC_CAP2_MASK 0x00
|
||||||
#define UAP_HE_MAC_CAP3_MASK 0x00
|
#define UAP_HE_MAC_CAP3_MASK 0x02
|
||||||
#define UAP_HE_MAC_CAP4_MASK 0x02
|
#define UAP_HE_MAC_CAP4_MASK 0x00
|
||||||
#define UAP_HE_MAC_CAP5_MASK 0x00
|
#define UAP_HE_MAC_CAP5_MASK 0x00
|
||||||
#define UAP_HE_PHY_CAP0_MASK 0x04
|
#define UAP_HE_PHY_CAP0_MASK 0x04
|
||||||
#define UAP_HE_PHY_CAP1_MASK 0x23
|
#define UAP_HE_PHY_CAP1_MASK 0x23
|
||||||
|
@ -4261,8 +4258,8 @@ Bit75: 0x1 (Rx 1024-QAM Support < 242-tone RU)
|
||||||
#define UAP_HE_2G_MAC_CAP0_MASK 0x00
|
#define UAP_HE_2G_MAC_CAP0_MASK 0x00
|
||||||
#define UAP_HE_2G_MAC_CAP1_MASK 0x00
|
#define UAP_HE_2G_MAC_CAP1_MASK 0x00
|
||||||
#define UAP_HE_2G_MAC_CAP2_MASK 0x00
|
#define UAP_HE_2G_MAC_CAP2_MASK 0x00
|
||||||
#define UAP_HE_2G_MAC_CAP3_MASK 0x00
|
#define UAP_HE_2G_MAC_CAP3_MASK 0x02
|
||||||
#define UAP_HE_2G_MAC_CAP4_MASK 0x02
|
#define UAP_HE_2G_MAC_CAP4_MASK 0x00
|
||||||
#define UAP_HE_2G_MAC_CAP5_MASK 0x00
|
#define UAP_HE_2G_MAC_CAP5_MASK 0x00
|
||||||
#define UAP_HE_2G_PHY_CAP0_MASK 0x04
|
#define UAP_HE_2G_PHY_CAP0_MASK 0x04
|
||||||
#define UAP_HE_2G_PHY_CAP1_MASK 0x20
|
#define UAP_HE_2G_PHY_CAP1_MASK 0x20
|
||||||
|
@ -4616,6 +4613,67 @@ void woal_cfg80211_notify_channel(moal_private *priv,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
/**
|
||||||
|
* @brief Notify cfg80211 supplicant ant cfg changed
|
||||||
|
*
|
||||||
|
* @param priv A pointer moal_private structure
|
||||||
|
* @param wiphy A pointer structure wiphy
|
||||||
|
* @param radio A pointer to radio cfg structure
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
void woal_cfg80211_notify_antcfg(moal_private *priv, struct wiphy *wiphy,
|
||||||
|
mlan_ds_radio_cfg *radio)
|
||||||
|
{
|
||||||
|
if (IS_STA_OR_UAP_CFG80211(priv->phandle->params.cfg80211_wext) &&
|
||||||
|
wiphy) {
|
||||||
|
if (wiphy->bands[IEEE80211_BAND_2GHZ]) {
|
||||||
|
if (((radio->param.ant_cfg.tx_antenna & 0xFF) != 3 &&
|
||||||
|
(radio->param.ant_cfg.tx_antenna & 0xFF) != 0) ||
|
||||||
|
((radio->param.ant_cfg.rx_antenna & 0xFF) != 3 &&
|
||||||
|
(radio->param.ant_cfg.rx_antenna & 0xFF) != 0))
|
||||||
|
wiphy->bands[IEEE80211_BAND_2GHZ]
|
||||||
|
->ht_cap.mcs.rx_mask[1] = 0;
|
||||||
|
else if ((radio->param.ant_cfg.tx_antenna & 0xFF) ==
|
||||||
|
3 ||
|
||||||
|
(radio->param.ant_cfg.rx_antenna & 0xFF) == 3)
|
||||||
|
wiphy->bands[IEEE80211_BAND_2GHZ]
|
||||||
|
->ht_cap.mcs.rx_mask[1] = 0xff;
|
||||||
|
|
||||||
|
wiphy->bands[IEEE80211_BAND_2GHZ]
|
||||||
|
->ht_cap.mcs.rx_mask[4] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wiphy->bands[IEEE80211_BAND_5GHZ]) {
|
||||||
|
if (((radio->param.ant_cfg.tx_antenna & 0xFF00) !=
|
||||||
|
0x300 &&
|
||||||
|
(radio->param.ant_cfg.tx_antenna & 0xFF00) != 0) ||
|
||||||
|
((radio->param.ant_cfg.rx_antenna & 0xFF00) !=
|
||||||
|
0x300 &&
|
||||||
|
(radio->param.ant_cfg.rx_antenna & 0xFF00) != 0)) {
|
||||||
|
wiphy->bands[IEEE80211_BAND_5GHZ]
|
||||||
|
->ht_cap.mcs.rx_mask[1] = 0;
|
||||||
|
wiphy->bands[IEEE80211_BAND_5GHZ]
|
||||||
|
->vht_cap.vht_mcs.rx_mcs_map = 0xfffe;
|
||||||
|
wiphy->bands[IEEE80211_BAND_5GHZ]
|
||||||
|
->vht_cap.vht_mcs.tx_mcs_map = 0xfffe;
|
||||||
|
} else if ((radio->param.ant_cfg.tx_antenna & 0xFF00) ==
|
||||||
|
0x300 ||
|
||||||
|
(radio->param.ant_cfg.rx_antenna & 0xFF00) ==
|
||||||
|
0x300) {
|
||||||
|
wiphy->bands[IEEE80211_BAND_5GHZ]
|
||||||
|
->ht_cap.mcs.rx_mask[1] = 0xff;
|
||||||
|
wiphy->bands[IEEE80211_BAND_5GHZ]
|
||||||
|
->vht_cap.vht_mcs.rx_mcs_map = 0xfffa;
|
||||||
|
wiphy->bands[IEEE80211_BAND_5GHZ]
|
||||||
|
->vht_cap.vht_mcs.tx_mcs_map = 0xfffa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
||||||
/**
|
/**
|
||||||
* @brief create cfg80211_chan_def structure based on chan_band info
|
* @brief create cfg80211_chan_def structure based on chan_band info
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the CFG80211 specific defines.
|
* @brief This file contains the CFG80211 specific defines.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2011-2020 NXP
|
* Copyright 2011-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -64,6 +64,16 @@
|
||||||
|
|
||||||
#define MRVL_PKT_TYPE_MGMT_FRAME 0xE5
|
#define MRVL_PKT_TYPE_MGMT_FRAME 0xE5
|
||||||
|
|
||||||
|
mlan_status woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep,
|
||||||
|
t_u32 cipher, const t_u8 *key, int key_len,
|
||||||
|
const t_u8 *seq, int seq_len, t_u8 key_index,
|
||||||
|
const t_u8 *addr, int disable,
|
||||||
|
t_u8 wait_option);
|
||||||
|
|
||||||
|
mlan_status woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key,
|
||||||
|
int key_len, t_u8 index,
|
||||||
|
t_u8 wait_option);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If multiple wiphys are registered e.g. a regular netdev with
|
* If multiple wiphys are registered e.g. a regular netdev with
|
||||||
* assigned ieee80211_ptr and you won't know whether it points
|
* assigned ieee80211_ptr and you won't know whether it points
|
||||||
|
@ -299,6 +309,10 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
||||||
int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev);
|
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
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
/* Group Owner Negotiation Req */
|
/* Group Owner Negotiation Req */
|
||||||
#define P2P_GO_NEG_REQ 0
|
#define P2P_GO_NEG_REQ 0
|
||||||
|
@ -338,9 +352,6 @@ int woal_cfg80211_init_p2p_client(moal_private *priv);
|
||||||
int woal_cfg80211_init_p2p_go(moal_private *priv);
|
int woal_cfg80211_init_p2p_go(moal_private *priv);
|
||||||
|
|
||||||
int woal_cfg80211_deinit_p2p(moal_private *priv);
|
int woal_cfg80211_deinit_p2p(moal_private *priv);
|
||||||
|
|
||||||
void woal_remove_virtual_interface(moal_handle *handle);
|
|
||||||
|
|
||||||
#endif /* KERNEL_VERSION */
|
#endif /* KERNEL_VERSION */
|
||||||
#endif /* WIFI_DIRECT_SUPPORT */
|
#endif /* WIFI_DIRECT_SUPPORT */
|
||||||
|
|
||||||
|
@ -430,7 +441,7 @@ void woal_csa_work_queue(struct work_struct *work);
|
||||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
#if KERNEL_VERSION(3, 5, 0) <= CFG80211_VERSION_CODE
|
#if KERNEL_VERSION(3, 5, 0) <= CFG80211_VERSION_CODE
|
||||||
void woal_cfg80211_notify_channel(moal_private *priv,
|
void woal_cfg80211_notify_channel(moal_private *priv,
|
||||||
pchan_band_info pchan_info);
|
chan_band_info *pchan_info);
|
||||||
void woal_channel_switch_event(moal_private *priv, chan_band_info *pchan_info);
|
void woal_channel_switch_event(moal_private *priv, chan_band_info *pchan_info);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -442,6 +453,12 @@ void woal_cfg80211_notify_sched_scan_stop(moal_private *priv);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
|
||||||
|
void woal_cfg80211_notify_antcfg(moal_private *priv, struct wiphy *wiphy,
|
||||||
|
mlan_ds_radio_cfg *radio);
|
||||||
|
#endif
|
||||||
|
|
||||||
void woal_deauth_event(moal_private *priv, int reason_code);
|
void woal_deauth_event(moal_private *priv, int reason_code);
|
||||||
|
|
||||||
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the functions for CFG80211 vendor.
|
* @brief This file contains the functions for CFG80211 vendor.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2015-2020 NXP
|
* Copyright 2015-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
/**nxp vendor command and event*/
|
/**nxp vendor command and event*/
|
||||||
#define MRVL_VENDOR_ID 0x005043
|
#define MRVL_VENDOR_ID 0x005043
|
||||||
/** vendor events */
|
/** vendor events */
|
||||||
const struct nl80211_vendor_cmd_info vendor_events[] = {
|
static const struct nl80211_vendor_cmd_info vendor_events[] = {
|
||||||
{
|
{
|
||||||
.vendor_id = MRVL_VENDOR_ID,
|
.vendor_id = MRVL_VENDOR_ID,
|
||||||
.subcmd = event_hang,
|
.subcmd = event_hang,
|
||||||
|
@ -143,11 +143,9 @@ static const struct nla_policy
|
||||||
woal_fw_roaming_policy[MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_MAX + 1] = {
|
woal_fw_roaming_policy[MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_MAX + 1] = {
|
||||||
[MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_CONTROL] = {.type = NLA_U32},
|
[MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_CONTROL] = {.type = NLA_U32},
|
||||||
[MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_CONFIG_BSSID] = {
|
[MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_CONFIG_BSSID] = {
|
||||||
.type = NLA_BINARY,
|
.type = NLA_BINARY},
|
||||||
.len = sizeof(int)},
|
|
||||||
[MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_CONFIG_SSID] = {
|
[MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_CONFIG_SSID] = {
|
||||||
.type = NLA_BINARY,
|
.type = NLA_BINARY},
|
||||||
.len = sizeof(int)},
|
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
@ -155,7 +153,7 @@ static const struct nla_policy
|
||||||
woal_keep_alive_policy[MKEEP_ALIVE_ATTRIBUTE_MAX + 1] = {
|
woal_keep_alive_policy[MKEEP_ALIVE_ATTRIBUTE_MAX + 1] = {
|
||||||
[MKEEP_ALIVE_ATTRIBUTE_ID] = {.type = NLA_U8},
|
[MKEEP_ALIVE_ATTRIBUTE_ID] = {.type = NLA_U8},
|
||||||
[MKEEP_ALIVE_ATTRIBUTE_ETHER_TYPE] = {.type = NLA_U16},
|
[MKEEP_ALIVE_ATTRIBUTE_ETHER_TYPE] = {.type = NLA_U16},
|
||||||
[MKEEP_ALIVE_ATTRIBUTE_IP_PKT] = {.type = NLA_BINARY, .len = 1},
|
[MKEEP_ALIVE_ATTRIBUTE_IP_PKT] = {.type = NLA_BINARY},
|
||||||
[MKEEP_ALIVE_ATTRIBUTE_IP_PKT_LEN] = {.type = NLA_U16},
|
[MKEEP_ALIVE_ATTRIBUTE_IP_PKT_LEN] = {.type = NLA_U16},
|
||||||
[MKEEP_ALIVE_ATTRIBUTE_SRC_MAC_ADDR] = {.type = NLA_STRING,
|
[MKEEP_ALIVE_ATTRIBUTE_SRC_MAC_ADDR] = {.type = NLA_STRING,
|
||||||
.len = ETH_ALEN},
|
.len = ETH_ALEN},
|
||||||
|
@ -174,12 +172,12 @@ static const struct nla_policy
|
||||||
*
|
*
|
||||||
* @return index of events array
|
* @return index of events array
|
||||||
*/
|
*/
|
||||||
int woal_get_event_id(int event)
|
static int woal_get_event_id(int event)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(vendor_events); i++) {
|
for (i = 0; i < (int)ARRAY_SIZE(vendor_events); i++) {
|
||||||
if (vendor_events[i].subcmd == event)
|
if ((int)vendor_events[i].subcmd == event)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,54 +242,6 @@ int woal_cfg80211_vendor_event(moal_private *priv, int event, t_u8 *data,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief send vendor event to kernel
|
|
||||||
*
|
|
||||||
* @param priv A pointer to moal_private
|
|
||||||
* @param event vendor event
|
|
||||||
* @param len data length
|
|
||||||
*
|
|
||||||
* @return 0: success 1: fail
|
|
||||||
*/
|
|
||||||
struct sk_buff *woal_cfg80211_alloc_vendor_event(moal_private *priv, int event,
|
|
||||||
int len)
|
|
||||||
{
|
|
||||||
struct wiphy *wiphy = NULL;
|
|
||||||
struct sk_buff *skb = NULL;
|
|
||||||
int event_id = 0;
|
|
||||||
|
|
||||||
ENTER();
|
|
||||||
|
|
||||||
if (!priv || !priv->wdev || !priv->wdev->wiphy) {
|
|
||||||
PRINTM(MERROR, "Not find this event %d\n", event_id);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
wiphy = priv->wdev->wiphy;
|
|
||||||
PRINTM(MEVENT, "vendor event :0x%x\n", event);
|
|
||||||
event_id = woal_get_event_id(event);
|
|
||||||
if (event_max == event_id) {
|
|
||||||
PRINTM(MERROR, "Not find this event %d\n", event_id);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**allocate skb*/
|
|
||||||
#if KERNEL_VERSION(4, 1, 0) <= CFG80211_VERSION_CODE
|
|
||||||
skb = cfg80211_vendor_event_alloc(wiphy, priv->wdev, len, event_id,
|
|
||||||
GFP_ATOMIC);
|
|
||||||
#else
|
|
||||||
skb = cfg80211_vendor_event_alloc(wiphy, len, event_id, GFP_ATOMIC);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!skb) {
|
|
||||||
PRINTM(MERROR, "allocate memory fail for vendor event\n");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
LEAVE();
|
|
||||||
return skb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief send dfs vendor event to kernel
|
* @brief send dfs vendor event to kernel
|
||||||
*
|
*
|
||||||
|
@ -854,7 +804,7 @@ static int woal_cfg80211_subcmd_set_country_code(struct wiphy *wiphy,
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ATTR_COUNTRY_CODE:
|
case ATTR_COUNTRY_CODE:
|
||||||
strncpy(country, nla_data(iter),
|
strncpy(country, nla_data(iter),
|
||||||
MIN(sizeof(country) - 1, nla_len(iter)));
|
MIN((int)sizeof(country) - 1, nla_len(iter)));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PRINTM(MERROR, "Unknown type: %d\n", type);
|
PRINTM(MERROR, "Unknown type: %d\n", type);
|
||||||
|
@ -3835,7 +3785,7 @@ static int woal_cfg80211_subcmd_set_dfs_offload(struct wiphy *wiphy,
|
||||||
}
|
}
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
const struct wiphy_vendor_command vendor_commands[] = {
|
static const struct wiphy_vendor_command vendor_commands[] = {
|
||||||
{
|
{
|
||||||
.info = {
|
.info = {
|
||||||
.vendor_id = MRVL_VENDOR_ID,
|
.vendor_id = MRVL_VENDOR_ID,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains functions for debug proc file.
|
* @brief This file contains functions for debug proc file.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -184,6 +184,8 @@ static struct debug_data items[] = {
|
||||||
item_addr(num_cons_assoc_failure), INFO_ADDR},
|
item_addr(num_cons_assoc_failure), INFO_ADDR},
|
||||||
{"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent), INFO_ADDR},
|
{"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", item_size(data_sent), item_addr(data_sent), INFO_ADDR},
|
||||||
|
{"data_sent_cnt", item_size(data_sent_cnt), item_addr(data_sent_cnt),
|
||||||
|
INFO_ADDR},
|
||||||
{"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap),
|
{"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap),
|
||||||
INFO_ADDR},
|
INFO_ADDR},
|
||||||
{"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port),
|
{"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port),
|
||||||
|
@ -363,6 +365,8 @@ static struct debug_data uap_items[] = {
|
||||||
#endif
|
#endif
|
||||||
{"cmd_sent", item_size(cmd_sent), item_addr(cmd_sent), INFO_ADDR},
|
{"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", item_size(data_sent), item_addr(data_sent), INFO_ADDR},
|
||||||
|
{"data_sent_cnt", item_size(data_sent_cnt), item_addr(data_sent_cnt),
|
||||||
|
INFO_ADDR},
|
||||||
{"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap),
|
{"mp_rd_bitmap", item_size(mp_rd_bitmap), item_addr(mp_rd_bitmap),
|
||||||
INFO_ADDR},
|
INFO_ADDR},
|
||||||
{"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port),
|
{"curr_rd_port", item_size(curr_rd_port), item_addr(curr_rd_port),
|
||||||
|
@ -968,8 +972,8 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
||||||
moal_private *priv = items_priv->priv;
|
moal_private *priv = items_priv->priv;
|
||||||
mlan_debug_info *info = NULL;
|
mlan_debug_info *info = NULL;
|
||||||
t_u32 intf_mask = INTF_MASK << 8;
|
t_u32 intf_mask = INTF_MASK << 8;
|
||||||
#ifdef SDIO
|
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
#ifdef SDIO
|
||||||
t_u8 mp_aggr_pkt_limit = 0;
|
t_u8 mp_aggr_pkt_limit = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1007,7 +1011,6 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
||||||
else if (d[i].size == 4)
|
else if (d[i].size == 4)
|
||||||
val = *((t_u32 *)d[i].addr);
|
val = *((t_u32 *)d[i].addr);
|
||||||
else {
|
else {
|
||||||
unsigned int j;
|
|
||||||
seq_printf(sfp, "%s=", d[i].name);
|
seq_printf(sfp, "%s=", d[i].name);
|
||||||
for (j = 0; j < d[i].size; j += 2) {
|
for (j = 0; j < d[i].size; j += 2) {
|
||||||
val = *(t_u16 *)(d[i].addr + j);
|
val = *(t_u16 *)(d[i].addr + j);
|
||||||
|
@ -1061,14 +1064,15 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
||||||
#endif
|
#endif
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
if (IS_PCIE(priv->phandle->card_type)) {
|
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",
|
seq_printf(sfp, "last_wr_index:%d\n",
|
||||||
info->txbd_wrptr & (MLAN_MAX_TXRX_BD - 1));
|
info->txbd_wrptr & (info->txrx_bd_size - 1));
|
||||||
seq_printf(sfp, "Tx pkt size:\n");
|
seq_printf(sfp, "TxRx BD size:%d\n", info->txrx_bd_size);
|
||||||
for (i = 0; i < MLAN_MAX_TXRX_BD; i++) {
|
|
||||||
seq_printf(sfp, "%04d ", info->last_tx_pkt_size[i]);
|
|
||||||
if ((i + 1) % 16 == 0)
|
|
||||||
seq_printf(sfp, "\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
seq_printf(sfp, "tcp_ack_drop_cnt=%d\n", priv->tcp_ack_drop_cnt);
|
seq_printf(sfp, "tcp_ack_drop_cnt=%d\n", priv->tcp_ack_drop_cnt);
|
||||||
|
@ -1094,8 +1098,6 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
||||||
if (info->rx_tbl_num) {
|
if (info->rx_tbl_num) {
|
||||||
seq_printf(sfp, "Rx reorder table:\n");
|
seq_printf(sfp, "Rx reorder table:\n");
|
||||||
for (i = 0; i < info->rx_tbl_num; i++) {
|
for (i = 0; i < info->rx_tbl_num; i++) {
|
||||||
unsigned int j;
|
|
||||||
|
|
||||||
seq_printf(
|
seq_printf(
|
||||||
sfp,
|
sfp,
|
||||||
"tid = %d, ta = %02x:%02x:%02x:%02x:%02x:%02x, start_win = %d, "
|
"tid = %d, ta = %02x:%02x:%02x:%02x:%02x:%02x, start_win = %d, "
|
||||||
|
@ -1128,6 +1130,33 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
||||||
info->ralist[i].tx_pause);
|
info->ralist[i].tx_pause);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < info->tdls_peer_num; i++) {
|
||||||
|
seq_printf(
|
||||||
|
sfp,
|
||||||
|
"tdls peer: %02x:%02x:%02x:%02x:%02x:%02x snr=%d nf=%d\n",
|
||||||
|
info->tdls_peer_list[i].mac_addr[0],
|
||||||
|
info->tdls_peer_list[i].mac_addr[1],
|
||||||
|
info->tdls_peer_list[i].mac_addr[2],
|
||||||
|
info->tdls_peer_list[i].mac_addr[3],
|
||||||
|
info->tdls_peer_list[i].mac_addr[4],
|
||||||
|
info->tdls_peer_list[i].mac_addr[5],
|
||||||
|
info->tdls_peer_list[i].snr,
|
||||||
|
-info->tdls_peer_list[i].nf);
|
||||||
|
seq_printf(sfp, "htcap: ");
|
||||||
|
for (j = 0; j < sizeof(IEEEtypes_HTCap_t); j++)
|
||||||
|
seq_printf(sfp, "%02x ",
|
||||||
|
info->tdls_peer_list[i].ht_cap[j]);
|
||||||
|
seq_printf(sfp, "\nExtcap: ");
|
||||||
|
for (j = 0; j < sizeof(IEEEtypes_ExtCap_t); j++)
|
||||||
|
seq_printf(sfp, "%02x ",
|
||||||
|
info->tdls_peer_list[i].ext_cap[j]);
|
||||||
|
seq_printf(sfp, "\n");
|
||||||
|
seq_printf(sfp, "vhtcap: ");
|
||||||
|
for (j = 0; j < sizeof(IEEEtypes_VHTCap_t); j++)
|
||||||
|
seq_printf(sfp, "%02x ",
|
||||||
|
info->tdls_peer_list[i].vht_cap[j]);
|
||||||
|
seq_printf(sfp, "\n");
|
||||||
|
}
|
||||||
exit:
|
exit:
|
||||||
MODULE_PUT;
|
MODULE_PUT;
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@
|
||||||
* @brief This file contains definition for private IOCTL call.
|
* @brief This file contains definition for private IOCTL call.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -242,6 +242,8 @@ typedef struct _chan_stats {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define PRIV_CMD_COEX_RX_WINSIZE "coex_rx_winsize"
|
#define PRIV_CMD_COEX_RX_WINSIZE "coex_rx_winsize"
|
||||||
|
#define PRIV_CMD_TX_AGGR_CTRL "txaggrctrl"
|
||||||
|
#define PRIV_CMD_AUTO_TDLS "autotdls"
|
||||||
|
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
#define PRIV_CMD_PCIE_REG_RW "pcieregrw"
|
#define PRIV_CMD_PCIE_REG_RW "pcieregrw"
|
||||||
|
@ -257,6 +259,8 @@ typedef struct _chan_stats {
|
||||||
#define PRIV_CMD_EXTEND_CHAN_SWITCH "channel_switch"
|
#define PRIV_CMD_EXTEND_CHAN_SWITCH "channel_switch"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define PRIV_CMD_TDLS_IDLE_TIME "tdls_idle_time"
|
||||||
|
|
||||||
#define PRIV_CMD_DYN_BW "dyn_bw"
|
#define PRIV_CMD_DYN_BW "dyn_bw"
|
||||||
|
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
|
@ -294,10 +298,14 @@ typedef struct _chan_stats {
|
||||||
/**Private command to configure cck desense config */
|
/**Private command to configure cck desense config */
|
||||||
#define PRIV_CMD_CCK_DESENSE_CFG "cck_desense_cfg"
|
#define PRIV_CMD_CCK_DESENSE_CFG "cck_desense_cfg"
|
||||||
#define PRIV_CMD_DOT11MC_UNASSOC_FTM_CFG "dot11mc_unassoc_ftm_cfg"
|
#define PRIV_CMD_DOT11MC_UNASSOC_FTM_CFG "dot11mc_unassoc_ftm_cfg"
|
||||||
|
#define PRIV_CMD_HAL_PHY_CFG "hal_phy_cfg"
|
||||||
|
|
||||||
/** Private command ID for Android default commands */
|
/** Private command ID for Android default commands */
|
||||||
#define WOAL_ANDROID_DEF_CMD (SIOCDEVPRIVATE + 1)
|
#define WOAL_ANDROID_DEF_CMD (SIOCDEVPRIVATE + 1)
|
||||||
|
|
||||||
|
/** Private command ID to send TLD configuration */
|
||||||
|
#define WOAL_TDLS_CONFIG (SIOCDEVPRIVATE + 5)
|
||||||
|
|
||||||
/** Private command ID to pass mgmt frame */
|
/** Private command ID to pass mgmt frame */
|
||||||
#define WOAL_MGMT_FRAME_TX WOAL_MGMT_FRAME_TX_IOCTL
|
#define WOAL_MGMT_FRAME_TX WOAL_MGMT_FRAME_TX_IOCTL
|
||||||
|
|
||||||
|
@ -592,8 +600,6 @@ typedef struct woal_priv_esuppmode_cfg {
|
||||||
} woal_esuppmode_cfg;
|
} woal_esuppmode_cfg;
|
||||||
|
|
||||||
mlan_status woal_set_ap_wps_p2p_ie(moal_private *priv, t_u8 *ie, size_t len);
|
mlan_status woal_set_ap_wps_p2p_ie(moal_private *priv, t_u8 *ie, size_t len);
|
||||||
mlan_status woal_ioctl_aggr_prio_tbl(moal_private *priv, t_u32 action,
|
|
||||||
mlan_ds_11n_aggr_prio_tbl *aggr_prio_tbl);
|
|
||||||
|
|
||||||
int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req);
|
int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* driver.
|
* driver.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2018-2020 NXP
|
* Copyright 2018-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -26,14 +26,14 @@
|
||||||
extern pmoal_handle m_handle[];
|
extern pmoal_handle m_handle[];
|
||||||
|
|
||||||
/** Firmware name */
|
/** Firmware name */
|
||||||
char *fw_name;
|
static char *fw_name;
|
||||||
int req_fw_nowait;
|
static int req_fw_nowait;
|
||||||
int fw_reload;
|
int fw_reload;
|
||||||
|
|
||||||
/** MAC address */
|
/** MAC address */
|
||||||
char *mac_addr;
|
static char *mac_addr;
|
||||||
/** Module param cfg file */
|
/** Module param cfg file */
|
||||||
char *mod_para;
|
static char *mod_para;
|
||||||
|
|
||||||
#ifdef MFG_CMD_SUPPORT
|
#ifdef MFG_CMD_SUPPORT
|
||||||
/** Mfg mode */
|
/** Mfg mode */
|
||||||
|
@ -42,138 +42,133 @@ int mfg_mode;
|
||||||
|
|
||||||
#if defined(SDIO)
|
#if defined(SDIO)
|
||||||
/** SDIO interrupt mode (0: INT_MODE_SDIO, 1: INT_MODE_GPIO) */
|
/** SDIO interrupt mode (0: INT_MODE_SDIO, 1: INT_MODE_GPIO) */
|
||||||
int intmode = INT_MODE_SDIO;
|
static int intmode = INT_MODE_SDIO;
|
||||||
/** GPIO interrupt pin number */
|
/** GPIO interrupt pin number */
|
||||||
int gpiopin;
|
static int gpiopin;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
int disable_regd_by_driver = 1;
|
static int disable_regd_by_driver = 1;
|
||||||
/** Region alpha2 string */
|
/** Region alpha2 string */
|
||||||
char *reg_alpha2;
|
static char *reg_alpha2;
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
int country_ie_ignore;
|
static int country_ie_ignore;
|
||||||
int beacon_hints;
|
static int beacon_hints;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
int host_mlme;
|
static int host_mlme;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Auto deep sleep */
|
/** Auto deep sleep */
|
||||||
int auto_ds;
|
static int auto_ds;
|
||||||
|
|
||||||
/** IEEE PS mode */
|
/** IEEE PS mode */
|
||||||
int ps_mode;
|
static int ps_mode;
|
||||||
/** passive to active scan */
|
/** passive to active scan */
|
||||||
int p2a_scan;
|
static int p2a_scan;
|
||||||
/** scan chan gap */
|
/** scan chan gap */
|
||||||
int scan_chan_gap;
|
static int scan_chan_gap;
|
||||||
/** Max Tx buffer size */
|
/** Max Tx buffer size */
|
||||||
int max_tx_buf;
|
int max_tx_buf;
|
||||||
|
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
/** Max STA interfaces */
|
/** Max STA interfaces */
|
||||||
int max_sta_bss = DEF_STA_BSS;
|
static int max_sta_bss = DEF_STA_BSS;
|
||||||
/** STA interface name */
|
/** STA interface name */
|
||||||
char *sta_name;
|
static char *sta_name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
/** Max uAP interfaces */
|
/** Max uAP interfaces */
|
||||||
int max_uap_bss = DEF_UAP_BSS;
|
static int max_uap_bss = DEF_UAP_BSS;
|
||||||
/** uAP interface name */
|
/** uAP interface name */
|
||||||
char *uap_name;
|
static char *uap_name;
|
||||||
/** Max uAP station number */
|
/** Max uAP station number */
|
||||||
int uap_max_sta;
|
static int uap_max_sta;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
/** Max WIFIDIRECT interfaces */
|
/** Max WIFIDIRECT interfaces */
|
||||||
int max_wfd_bss = DEF_WIFIDIRECT_BSS;
|
static int max_wfd_bss = DEF_WIFIDIRECT_BSS;
|
||||||
/** WIFIDIRECT interface name */
|
/** WIFIDIRECT interface name */
|
||||||
char *wfd_name;
|
static char *wfd_name;
|
||||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||||
/** max VIRTUAL bss */
|
/** max VIRTUAL bss */
|
||||||
int max_vir_bss = DEF_VIRTUAL_BSS;
|
static int max_vir_bss = DEF_VIRTUAL_BSS;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDIO_SUSPEND_RESUME
|
|
||||||
/** PM keep power */
|
/** PM keep power */
|
||||||
int pm_keep_power = 1;
|
static int pm_keep_power = 1;
|
||||||
|
#ifdef SDIO_SUSPEND_RESUME
|
||||||
/** HS when shutdown */
|
/** HS when shutdown */
|
||||||
int shutdown_hs;
|
static int shutdown_hs;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SDIO)
|
#if defined(SDIO)
|
||||||
/** SDIO slew rate */
|
/** SDIO slew rate */
|
||||||
int slew_rate = 3;
|
static int slew_rate = 3;
|
||||||
#endif
|
#endif
|
||||||
int tx_work = 0;
|
int tx_work = 0;
|
||||||
|
static int rps = 0;
|
||||||
|
|
||||||
#if defined(STA_SUPPORT)
|
#if defined(STA_SUPPORT)
|
||||||
/** 802.11d configuration */
|
/** 802.11d configuration */
|
||||||
int cfg_11d;
|
static int cfg_11d;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** fw serial download check */
|
/** fw serial download check */
|
||||||
int fw_serial = 1;
|
static int fw_serial = 1;
|
||||||
|
|
||||||
/** napi support*/
|
/** napi support*/
|
||||||
int napi;
|
static int napi;
|
||||||
|
|
||||||
/** DPD data config file */
|
/** DPD data config file */
|
||||||
char *dpd_data_cfg;
|
static char *dpd_data_cfg;
|
||||||
|
|
||||||
/** CAL data config file */
|
/** CAL data config file */
|
||||||
char *cal_data_cfg;
|
static char *cal_data_cfg;
|
||||||
/** Init config file (MAC address, register etc.) */
|
/** Init config file (MAC address, register etc.) */
|
||||||
char *init_cfg;
|
static char *init_cfg;
|
||||||
|
|
||||||
/** Set configuration data of Tx power limitation */
|
/** Set configuration data of Tx power limitation */
|
||||||
char *txpwrlimit_cfg;
|
static char *txpwrlimit_cfg;
|
||||||
/** Allow setting tx power table of country */
|
/** Allow setting tx power table of country */
|
||||||
int cntry_txpwr;
|
static int cntry_txpwr;
|
||||||
|
|
||||||
/** Init hostcmd file */
|
/** Init hostcmd file */
|
||||||
char *init_hostcmd_cfg;
|
static char *init_hostcmd_cfg;
|
||||||
char *band_steer_cfg;
|
static char *band_steer_cfg;
|
||||||
|
|
||||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||||
/** CFG80211 and WEXT mode */
|
/** CFG80211 and WEXT mode */
|
||||||
int cfg80211_wext = STA_WEXT_MASK | UAP_WEXT_MASK;
|
static int cfg80211_wext = STA_WEXT_MASK | UAP_WEXT_MASK;
|
||||||
#else
|
#else
|
||||||
/** CFG80211 mode */
|
/** CFG80211 mode */
|
||||||
int cfg80211_wext = STA_CFG80211_MASK | UAP_CFG80211_MASK;
|
static int cfg80211_wext = STA_CFG80211_MASK | UAP_CFG80211_MASK;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
|
||||||
int fw_region = 1;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Work queue priority */
|
/** Work queue priority */
|
||||||
int wq_sched_prio;
|
static int wq_sched_prio;
|
||||||
/** Work queue scheduling policy */
|
/** Work queue scheduling policy */
|
||||||
int wq_sched_policy = SCHED_NORMAL;
|
static int wq_sched_policy = SCHED_NORMAL;
|
||||||
/** rx_work flag */
|
/** rx_work flag */
|
||||||
int rx_work;
|
static int rx_work;
|
||||||
|
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
int skip_fwdnld;
|
int skip_fwdnld;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable/disable aggrctrl */
|
/* Enable/disable aggrctrl */
|
||||||
int aggrctrl;
|
static int aggrctrl;
|
||||||
|
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
/* Enable/disable USB aggregation feature */
|
/* Enable/disable USB aggregation feature */
|
||||||
int usb_aggr;
|
static int usb_aggr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
|
@ -181,68 +176,66 @@ int usb_aggr;
|
||||||
int pcie_int_mode = PCIE_INT_MODE_MSI;
|
int pcie_int_mode = PCIE_INT_MODE_MSI;
|
||||||
#endif /* PCIE */
|
#endif /* PCIE */
|
||||||
|
|
||||||
int low_power_mode_enable;
|
static int low_power_mode_enable;
|
||||||
|
|
||||||
int hw_test;
|
static int hw_test;
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
int dts_enable = 1;
|
int dts_enable = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
int dfs_offload;
|
static int dfs_offload;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
int wakelock_timeout = WAKE_LOCK_TIMEOUT;
|
int wakelock_timeout = WAKE_LOCK_TIMEOUT;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
int drv_mode = (DRV_MODE_STA | DRV_MODE_UAP | DRV_MODE_WIFIDIRECT);
|
static int drv_mode = (DRV_MODE_STA | DRV_MODE_UAP | DRV_MODE_WIFIDIRECT);
|
||||||
#else
|
#else
|
||||||
int drv_mode = (DRV_MODE_STA | DRV_MODE_UAP);
|
static int drv_mode = (DRV_MODE_STA | DRV_MODE_UAP);
|
||||||
#endif /* WIFI_DIRECT_SUPPORT */
|
#endif /* WIFI_DIRECT_SUPPORT */
|
||||||
#else
|
#else
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
int drv_mode = DRV_MODE_STA;
|
static int drv_mode = DRV_MODE_STA;
|
||||||
#else
|
#else
|
||||||
int drv_mode = DRV_MODE_UAP;
|
static int drv_mode = DRV_MODE_UAP;
|
||||||
#endif /* STA_SUPPORT */
|
#endif /* STA_SUPPORT */
|
||||||
#endif /* STA_SUPPORT & UAP_SUPPORT */
|
#endif /* STA_SUPPORT & UAP_SUPPORT */
|
||||||
|
|
||||||
int gtk_rekey_offload = GTK_REKEY_OFFLOAD_DISABLE;
|
static int gtk_rekey_offload = GTK_REKEY_OFFLOAD_DISABLE;
|
||||||
|
|
||||||
int pmic;
|
static int pmic;
|
||||||
|
|
||||||
int antcfg;
|
static int antcfg;
|
||||||
|
|
||||||
t_u32 uap_oper_ctrl;
|
static t_u32 uap_oper_ctrl;
|
||||||
|
|
||||||
int hs_wake_interval = 400;
|
static int hs_wake_interval = 400;
|
||||||
int indication_gpio = 0xff;
|
static int indication_gpio = 0xff;
|
||||||
int disconnect_on_suspend;
|
static int disconnect_on_suspend;
|
||||||
int hs_mimo_switch;
|
static int hs_mimo_switch;
|
||||||
|
|
||||||
int indrstcfg = 0xffffffff;
|
static int indrstcfg = 0xffffffff;
|
||||||
|
|
||||||
/** all the feature are enabled */
|
/** all the feature are enabled */
|
||||||
#define DEFAULT_DEV_CAP_MASK 0xffffffff
|
#define DEFAULT_DEV_CAP_MASK 0xffffffff
|
||||||
t_u32 dev_cap_mask = DEFAULT_DEV_CAP_MASK;
|
static t_u32 dev_cap_mask = DEFAULT_DEV_CAP_MASK;
|
||||||
#ifdef SDIO
|
#ifdef SDIO
|
||||||
int sdio_rx_aggr = MTRUE;
|
static int sdio_rx_aggr = MTRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** The global variable of scan beacon buffer **/
|
/** The global variable of scan beacon buffer **/
|
||||||
int fixed_beacon_buffer;
|
static int fixed_beacon_buffer;
|
||||||
|
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
int GoAgeoutTime;
|
static int GoAgeoutTime;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
t_u16 multi_dtim;
|
static t_u16 multi_dtim;
|
||||||
|
|
||||||
t_u16 inact_tmo;
|
static t_u16 inact_tmo;
|
||||||
|
|
||||||
#ifdef DEBUG_LEVEL1
|
#ifdef DEBUG_LEVEL1
|
||||||
#ifdef DEBUG_LEVEL2
|
#ifdef DEBUG_LEVEL2
|
||||||
|
@ -308,7 +301,7 @@ static card_type_entry card_type_map_tbl[] = {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
int dfs53cfg = DFS_W53_DEFAULT_FW;
|
static int dfs53cfg = DFS_W53_DEFAULT_FW;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function read a line in module parameter file
|
* @brief This function read a line in module parameter file
|
||||||
|
@ -325,7 +318,7 @@ static t_size parse_cfg_get_line(t_u8 *data, t_size size, t_u8 *line_pos)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
if (pos >= size) { /* reach the end */
|
if (pos >= (t_s32)size) { /* reach the end */
|
||||||
pos = 0; /* Reset position for rfkill */
|
pos = 0; /* Reset position for rfkill */
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -334,7 +327,7 @@ static t_size parse_cfg_get_line(t_u8 *data, t_size size, t_u8 *line_pos)
|
||||||
src = data + pos;
|
src = data + pos;
|
||||||
dest = line_pos;
|
dest = line_pos;
|
||||||
|
|
||||||
while (pos < size && *src != '\x0A' && *src != '\0') {
|
while (pos < (t_s32)size && *src != '\x0A' && *src != '\0') {
|
||||||
if (*src != ' ' && *src != '\t') /* parse space */
|
if (*src != ' ' && *src != '\t') /* parse space */
|
||||||
*dest++ = *src++;
|
*dest++ = *src++;
|
||||||
else
|
else
|
||||||
|
@ -499,12 +492,12 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
moal_mod_para *params = &handle->params;
|
moal_mod_para *params = &handle->params;
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
|
||||||
while (parse_cfg_get_line(data, size, line) != -1) {
|
while ((int)parse_cfg_get_line(data, size, line) != -1) {
|
||||||
if (strncmp(line, "}", strlen("}")) == 0) {
|
if (strncmp(line, "}", strlen("}")) == 0) {
|
||||||
end = 1;
|
end = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (end == 0 && strstr(line, "{") != 0)
|
if (end == 0 && strstr(line, "{") != NULL)
|
||||||
break;
|
break;
|
||||||
if (strncmp(line, "hw_test", strlen("hw_test")) == 0) {
|
if (strncmp(line, "hw_test", strlen("hw_test")) == 0) {
|
||||||
if (parse_line_read_int(line, &out_data) !=
|
if (parse_line_read_int(line, &out_data) !=
|
||||||
|
@ -701,7 +694,6 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
PRINTM(MMSG, "gpiopin = %d\n", params->gpiopin);
|
PRINTM(MMSG, "gpiopin = %d\n", params->gpiopin);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(SDIO) && defined(SDIO_SUSPEND_RESUME)
|
|
||||||
else if (strncmp(line, "pm_keep_power",
|
else if (strncmp(line, "pm_keep_power",
|
||||||
strlen("pm_keep_power")) == 0) {
|
strlen("pm_keep_power")) == 0) {
|
||||||
if (parse_line_read_int(line, &out_data) !=
|
if (parse_line_read_int(line, &out_data) !=
|
||||||
|
@ -715,8 +707,10 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
moal_extflg_isset(handle, EXT_PM_KEEP_POWER) ?
|
moal_extflg_isset(handle, EXT_PM_KEEP_POWER) ?
|
||||||
"on" :
|
"on" :
|
||||||
"off");
|
"off");
|
||||||
} else if (strncmp(line, "shutdown_hs",
|
}
|
||||||
strlen("shutdown_hs")) == 0) {
|
#if defined(SDIO) && defined(SDIO_SUSPEND_RESUME)
|
||||||
|
else if (strncmp(line, "shutdown_hs", strlen("shutdown_hs")) ==
|
||||||
|
0) {
|
||||||
if (parse_line_read_int(line, &out_data) !=
|
if (parse_line_read_int(line, &out_data) !=
|
||||||
MLAN_STATUS_SUCCESS)
|
MLAN_STATUS_SUCCESS)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -781,14 +775,8 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
if (parse_line_read_int(line, &out_data) !=
|
if (parse_line_read_int(line, &out_data) !=
|
||||||
MLAN_STATUS_SUCCESS)
|
MLAN_STATUS_SUCCESS)
|
||||||
goto err;
|
goto err;
|
||||||
if (out_data)
|
params->cntry_txpwr = out_data;
|
||||||
moal_extflg_set(handle, EXT_CNTRY_TXPWR);
|
PRINTM(MMSG, "cntry_txpwr = %d\n", params->cntry_txpwr);
|
||||||
else
|
|
||||||
moal_extflg_clear(handle, EXT_CNTRY_TXPWR);
|
|
||||||
PRINTM(MMSG, "cntry_txpwr %s\n",
|
|
||||||
moal_extflg_isset(handle, EXT_CNTRY_TXPWR) ?
|
|
||||||
"on" :
|
|
||||||
"off");
|
|
||||||
} else if (strncmp(line, "init_hostcmd_cfg",
|
} else if (strncmp(line, "init_hostcmd_cfg",
|
||||||
strlen("init_hostcmd_cfg")) == 0) {
|
strlen("init_hostcmd_cfg")) == 0) {
|
||||||
if (parse_line_read_string(line, &out_str) !=
|
if (parse_line_read_string(line, &out_str) !=
|
||||||
|
@ -901,9 +889,7 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
moal_extflg_isset(handle, EXT_LOW_PW_MODE) ?
|
moal_extflg_isset(handle, EXT_LOW_PW_MODE) ?
|
||||||
"on" :
|
"on" :
|
||||||
"off");
|
"off");
|
||||||
}
|
} else if (strncmp(line, "wakelock_timeout",
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
else if (strncmp(line, "wakelock_timeout",
|
|
||||||
strlen("wakelock_timeout")) == 0) {
|
strlen("wakelock_timeout")) == 0) {
|
||||||
if (parse_line_read_int(line, &out_data) !=
|
if (parse_line_read_int(line, &out_data) !=
|
||||||
MLAN_STATUS_SUCCESS)
|
MLAN_STATUS_SUCCESS)
|
||||||
|
@ -911,9 +897,7 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
params->wakelock_timeout = out_data;
|
params->wakelock_timeout = out_data;
|
||||||
PRINTM(MMSG, "wakelock_timeout=%d\n",
|
PRINTM(MMSG, "wakelock_timeout=%d\n",
|
||||||
params->wakelock_timeout);
|
params->wakelock_timeout);
|
||||||
}
|
} else if (strncmp(line, "dev_cap_mask",
|
||||||
#endif
|
|
||||||
else if (strncmp(line, "dev_cap_mask",
|
|
||||||
strlen("dev_cap_mask")) == 0) {
|
strlen("dev_cap_mask")) == 0) {
|
||||||
if (parse_line_read_int(line, &out_data) !=
|
if (parse_line_read_int(line, &out_data) !=
|
||||||
MLAN_STATUS_SUCCESS)
|
MLAN_STATUS_SUCCESS)
|
||||||
|
@ -940,8 +924,7 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
||||||
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
||||||
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
||||||
defined(USB9097) || defined(PCIE9097) || defined(SD8978) || \
|
defined(USB9097) || defined(PCIE9097) || defined(SD8978)
|
||||||
defined(USB8978)
|
|
||||||
else if (strncmp(line, "pmic", strlen("pmic")) == 0) {
|
else if (strncmp(line, "pmic", strlen("pmic")) == 0) {
|
||||||
if (parse_line_read_int(line, &out_data) !=
|
if (parse_line_read_int(line, &out_data) !=
|
||||||
MLAN_STATUS_SUCCESS)
|
MLAN_STATUS_SUCCESS)
|
||||||
|
@ -1089,6 +1072,17 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
PRINTM(MMSG, "tx_work %s\n",
|
PRINTM(MMSG, "tx_work %s\n",
|
||||||
moal_extflg_isset(handle, EXT_TX_WORK) ? "on" :
|
moal_extflg_isset(handle, EXT_TX_WORK) ? "on" :
|
||||||
"off");
|
"off");
|
||||||
|
} else if (strncmp(line, "rps", strlen("rps")) == 0) {
|
||||||
|
if (parse_line_read_int(line, &out_data) !=
|
||||||
|
MLAN_STATUS_SUCCESS)
|
||||||
|
goto err;
|
||||||
|
if (out_data)
|
||||||
|
moal_extflg_set(handle, EXT_RPS);
|
||||||
|
else
|
||||||
|
moal_extflg_clear(handle, EXT_RPS);
|
||||||
|
PRINTM(MMSG, "rps %s\n",
|
||||||
|
moal_extflg_isset(handle, EXT_RPS) ? "on" :
|
||||||
|
"off");
|
||||||
}
|
}
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
else if (strncmp(line, "dfs_offload", strlen("dfs_offload")) ==
|
else if (strncmp(line, "dfs_offload", strlen("dfs_offload")) ==
|
||||||
|
@ -1121,8 +1115,8 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
PRINTM(MMSG, "reg domain set by driver=%s\n",
|
PRINTM(MMSG, "reg domain set by driver=%s\n",
|
||||||
moal_extflg_isset(handle,
|
moal_extflg_isset(handle,
|
||||||
EXT_DISABLE_REGD_BY_DRIVER) ?
|
EXT_DISABLE_REGD_BY_DRIVER) ?
|
||||||
"disable" :
|
"enable" :
|
||||||
"enable");
|
"disable");
|
||||||
} else if (strncmp(line, "reg_alpha2", strlen("reg_alpha2")) ==
|
} else if (strncmp(line, "reg_alpha2", strlen("reg_alpha2")) ==
|
||||||
0) {
|
0) {
|
||||||
if (parse_line_read_string(line, &out_str) !=
|
if (parse_line_read_string(line, &out_str) !=
|
||||||
|
@ -1158,8 +1152,8 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
moal_extflg_clear(handle, EXT_BEACON_HINTS);
|
moal_extflg_clear(handle, EXT_BEACON_HINTS);
|
||||||
PRINTM(MMSG, "beacon_hints=%s\n",
|
PRINTM(MMSG, "beacon_hints=%s\n",
|
||||||
moal_extflg_isset(handle, EXT_BEACON_HINTS) ?
|
moal_extflg_isset(handle, EXT_BEACON_HINTS) ?
|
||||||
"disable" :
|
"enable" :
|
||||||
"enable");
|
"disable");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1185,8 +1179,8 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
||||||
moal_extflg_clear(handle, EXT_HOST_MLME);
|
moal_extflg_clear(handle, EXT_HOST_MLME);
|
||||||
PRINTM(MMSG, "host_mlme=%s\n",
|
PRINTM(MMSG, "host_mlme=%s\n",
|
||||||
moal_extflg_isset(handle, EXT_HOST_MLME) ?
|
moal_extflg_isset(handle, EXT_HOST_MLME) ?
|
||||||
"disable" :
|
"enable" :
|
||||||
"enable");
|
"disable");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1300,9 +1294,9 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
||||||
if (params)
|
if (params)
|
||||||
handle->params.gpiopin = params->gpiopin;
|
handle->params.gpiopin = params->gpiopin;
|
||||||
#endif
|
#endif
|
||||||
#if defined(SDIO) && defined(SDIO_SUSPEND_RESUME)
|
|
||||||
if (pm_keep_power)
|
if (pm_keep_power)
|
||||||
moal_extflg_set(handle, EXT_PM_KEEP_POWER);
|
moal_extflg_set(handle, EXT_PM_KEEP_POWER);
|
||||||
|
#if defined(SDIO) && defined(SDIO_SUSPEND_RESUME)
|
||||||
if (shutdown_hs)
|
if (shutdown_hs)
|
||||||
moal_extflg_set(handle, EXT_SHUTDOWN_HS);
|
moal_extflg_set(handle, EXT_SHUTDOWN_HS);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1313,6 +1307,8 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
||||||
#endif
|
#endif
|
||||||
#if defined(SDIO)
|
#if defined(SDIO)
|
||||||
handle->params.slew_rate = slew_rate;
|
handle->params.slew_rate = slew_rate;
|
||||||
|
if (params)
|
||||||
|
handle->params.slew_rate = params->slew_rate;
|
||||||
#endif
|
#endif
|
||||||
woal_dup_string(&handle->params.dpd_data_cfg, dpd_data_cfg);
|
woal_dup_string(&handle->params.dpd_data_cfg, dpd_data_cfg);
|
||||||
if (params)
|
if (params)
|
||||||
|
@ -1329,8 +1325,9 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
||||||
if (params)
|
if (params)
|
||||||
woal_dup_string(&handle->params.txpwrlimit_cfg,
|
woal_dup_string(&handle->params.txpwrlimit_cfg,
|
||||||
params->txpwrlimit_cfg);
|
params->txpwrlimit_cfg);
|
||||||
if (cntry_txpwr)
|
handle->params.cntry_txpwr = cntry_txpwr;
|
||||||
moal_extflg_set(handle, EXT_CNTRY_TXPWR);
|
if (params)
|
||||||
|
handle->params.cntry_txpwr = params->cntry_txpwr;
|
||||||
woal_dup_string(&handle->params.init_hostcmd_cfg, init_hostcmd_cfg);
|
woal_dup_string(&handle->params.init_hostcmd_cfg, init_hostcmd_cfg);
|
||||||
if (params)
|
if (params)
|
||||||
woal_dup_string(&handle->params.init_hostcmd_cfg,
|
woal_dup_string(&handle->params.init_hostcmd_cfg,
|
||||||
|
@ -1370,11 +1367,9 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
||||||
if (low_power_mode_enable)
|
if (low_power_mode_enable)
|
||||||
moal_extflg_set(handle, EXT_LOW_PW_MODE);
|
moal_extflg_set(handle, EXT_LOW_PW_MODE);
|
||||||
|
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
handle->params.wakelock_timeout = wakelock_timeout;
|
handle->params.wakelock_timeout = wakelock_timeout;
|
||||||
if (params)
|
if (params)
|
||||||
handle->params.wakelock_timeout = params->wakelock_timeout;
|
handle->params.wakelock_timeout = params->wakelock_timeout;
|
||||||
#endif
|
|
||||||
handle->params.dev_cap_mask = dev_cap_mask;
|
handle->params.dev_cap_mask = dev_cap_mask;
|
||||||
if (params)
|
if (params)
|
||||||
handle->params.dev_cap_mask = params->dev_cap_mask;
|
handle->params.dev_cap_mask = params->dev_cap_mask;
|
||||||
|
@ -1385,8 +1380,7 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
||||||
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
||||||
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
||||||
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
||||||
defined(USB9097) || defined(PCIE9097) || defined(SD8978) || \
|
defined(USB9097) || defined(PCIE9097) || defined(SD8978)
|
||||||
defined(USB8978)
|
|
||||||
if (pmic)
|
if (pmic)
|
||||||
moal_extflg_set(handle, EXT_PMIC);
|
moal_extflg_set(handle, EXT_PMIC);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1429,6 +1423,8 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
||||||
moal_extflg_set(handle, EXT_NAPI);
|
moal_extflg_set(handle, EXT_NAPI);
|
||||||
if (tx_work)
|
if (tx_work)
|
||||||
moal_extflg_set(handle, EXT_TX_WORK);
|
moal_extflg_set(handle, EXT_TX_WORK);
|
||||||
|
if (rps)
|
||||||
|
moal_extflg_set(handle, EXT_RPS);
|
||||||
|
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
if (dfs_offload)
|
if (dfs_offload)
|
||||||
|
@ -1642,6 +1638,11 @@ void woal_init_from_dev_tree(void)
|
||||||
PRINTM(MIOCTL, "tx_work=0x%x\n", data);
|
PRINTM(MIOCTL, "tx_work=0x%x\n", data);
|
||||||
tx_work = data;
|
tx_work = data;
|
||||||
}
|
}
|
||||||
|
} else if (!strncmp(prop->name, "rps", strlen("rps"))) {
|
||||||
|
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||||
|
PRINTM(MIOCTL, "rps=0x%x\n", data);
|
||||||
|
rps = data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef MFG_CMD_SUPPORT
|
#ifdef MFG_CMD_SUPPORT
|
||||||
else if (!strncmp(prop->name, "mfg_mode", strlen("mfg_mode"))) {
|
else if (!strncmp(prop->name, "mfg_mode", strlen("mfg_mode"))) {
|
||||||
|
@ -1906,7 +1907,7 @@ void woal_init_from_dev_tree(void)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_validate_cfg_id(moal_handle *handle)
|
static mlan_status woal_validate_cfg_id(moal_handle *handle)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -1930,16 +1931,16 @@ mlan_status woal_validate_cfg_id(moal_handle *handle)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status parse_skip_cfg_block(t_u8 *data, t_u32 size)
|
static mlan_status parse_skip_cfg_block(t_u8 *data, t_u32 size)
|
||||||
{
|
{
|
||||||
int end = 0;
|
int end = 0;
|
||||||
t_u8 line[MAX_LINE_LEN];
|
t_u8 line[MAX_LINE_LEN];
|
||||||
while (parse_cfg_get_line(data, size, line) != -1) {
|
while ((int)parse_cfg_get_line(data, size, line) != -1) {
|
||||||
if (strncmp(line, "}", strlen("}")) == 0) {
|
if (strncmp(line, "}", strlen("}")) == 0) {
|
||||||
end = 1;
|
end = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (end == 0 && strstr(line, "{") != 0)
|
if (end == 0 && strstr(line, "{") != NULL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return (end == 1) ? MLAN_STATUS_SUCCESS : MLAN_STATUS_FAILURE;
|
return (end == 1) ? MLAN_STATUS_SUCCESS : MLAN_STATUS_FAILURE;
|
||||||
|
@ -1953,7 +1954,7 @@ mlan_status parse_skip_cfg_block(t_u8 *data, t_u32 size)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_cfg_fallback_process(moal_handle *handle)
|
static mlan_status woal_cfg_fallback_process(moal_handle *handle)
|
||||||
{
|
{
|
||||||
int i, blk_id = 0x7fffffff, idx = -1;
|
int i, blk_id = 0x7fffffff, idx = -1;
|
||||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||||
|
@ -2019,7 +2020,7 @@ mlan_status woal_init_module_param(moal_handle *handle)
|
||||||
card_type_map_tbl[i].name);
|
card_type_map_tbl[i].name);
|
||||||
size = handle->param_data->size;
|
size = handle->param_data->size;
|
||||||
data = (t_u8 *)handle->param_data->data;
|
data = (t_u8 *)handle->param_data->data;
|
||||||
while (parse_cfg_get_line(data, size, line) != -1) {
|
while ((int)parse_cfg_get_line(data, size, line) != -1) {
|
||||||
if (line[0] == '#')
|
if (line[0] == '#')
|
||||||
continue;
|
continue;
|
||||||
if (strstr(line, "={")) {
|
if (strstr(line, "={")) {
|
||||||
|
@ -2161,9 +2162,9 @@ module_param(gpiopin, int, 0);
|
||||||
MODULE_PARM_DESC(gpiopin, "255:new GPIO int mode, other vlue: gpio pin number");
|
MODULE_PARM_DESC(gpiopin, "255:new GPIO int mode, other vlue: gpio pin number");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDIO_SUSPEND_RESUME
|
|
||||||
module_param(pm_keep_power, int, 0);
|
module_param(pm_keep_power, int, 0);
|
||||||
MODULE_PARM_DESC(pm_keep_power, "1: PM keep power; 0: PM no power");
|
MODULE_PARM_DESC(pm_keep_power, "1: PM keep power; 0: PM no power");
|
||||||
|
#ifdef SDIO_SUSPEND_RESUME
|
||||||
module_param(shutdown_hs, int, 0);
|
module_param(shutdown_hs, int, 0);
|
||||||
MODULE_PARM_DESC(shutdown_hs,
|
MODULE_PARM_DESC(shutdown_hs,
|
||||||
"1: Enable HS when shutdown; 0: No HS when shutdown");
|
"1: Enable HS when shutdown; 0: No HS when shutdown");
|
||||||
|
@ -2181,6 +2182,8 @@ MODULE_PARM_DESC(
|
||||||
#endif
|
#endif
|
||||||
module_param(tx_work, uint, 0660);
|
module_param(tx_work, uint, 0660);
|
||||||
MODULE_PARM_DESC(tx_work, "1: Enable tx_work; 0: Disable tx_work");
|
MODULE_PARM_DESC(tx_work, "1: Enable tx_work; 0: Disable tx_work");
|
||||||
|
module_param(rps, uint, 0660);
|
||||||
|
MODULE_PARM_DESC(rps, "1: Enable rps; 0: Disable rps");
|
||||||
module_param(dpd_data_cfg, charp, 0);
|
module_param(dpd_data_cfg, charp, 0);
|
||||||
MODULE_PARM_DESC(dpd_data_cfg, "DPD data file name");
|
MODULE_PARM_DESC(dpd_data_cfg, "DPD data file name");
|
||||||
module_param(init_cfg, charp, 0);
|
module_param(init_cfg, charp, 0);
|
||||||
|
@ -2193,26 +2196,19 @@ MODULE_PARM_DESC(txpwrlimit_cfg,
|
||||||
module_param(cntry_txpwr, int, 0);
|
module_param(cntry_txpwr, int, 0);
|
||||||
MODULE_PARM_DESC(
|
MODULE_PARM_DESC(
|
||||||
cntry_txpwr,
|
cntry_txpwr,
|
||||||
"Allow setting tx power table of country; 0: disable (default), 1: enable.");
|
"0: disable (default), 1: enable set country txpower table 2: enable set country rgpower table");
|
||||||
module_param(init_hostcmd_cfg, charp, 0);
|
module_param(init_hostcmd_cfg, charp, 0);
|
||||||
MODULE_PARM_DESC(init_hostcmd_cfg, "Init hostcmd file name");
|
MODULE_PARM_DESC(init_hostcmd_cfg, "Init hostcmd file name");
|
||||||
module_param(band_steer_cfg, charp, 0);
|
module_param(band_steer_cfg, charp, 0);
|
||||||
MODULE_PARM_DESC(band_steer_cfg, "band steer cfg file name");
|
MODULE_PARM_DESC(band_steer_cfg, "band steer cfg file name");
|
||||||
module_param(cfg80211_wext, int, 0660);
|
module_param(cfg80211_wext, int, 0660);
|
||||||
MODULE_PARM_DESC(cfg80211_wext,
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
#ifdef STA_WEXT
|
MODULE_PARM_DESC(
|
||||||
"Bit 0: STA WEXT; "
|
cfg80211_wext,
|
||||||
|
"Bit 0: STA WEXT Bit 1: UAP WEXT Bit 2: STA CFG80211 Bit 3: UAP CFG80211");
|
||||||
|
#else
|
||||||
|
MODULE_PARM_DESC(cfg80211_wext, "Bit 0: STA WEXT Bit 1: UAP WEXT Bit 2");
|
||||||
#endif
|
#endif
|
||||||
#ifdef UAP_WEXT
|
|
||||||
"Bit 1: UAP WEXT; "
|
|
||||||
#endif
|
|
||||||
#ifdef STA_CFG80211
|
|
||||||
"Bit 2: STA CFG80211; "
|
|
||||||
#endif
|
|
||||||
#ifdef UAP_CFG80211
|
|
||||||
"Bit 3: UAP CFG80211;"
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
module_param(skip_fwdnld, int, 0);
|
module_param(skip_fwdnld, int, 0);
|
||||||
MODULE_PARM_DESC(skip_fwdnld, "0: Enable FW download; 1: Disable FW download");
|
MODULE_PARM_DESC(skip_fwdnld, "0: Enable FW download; 1: Disable FW download");
|
||||||
|
@ -2242,10 +2238,8 @@ MODULE_PARM_DESC(pcie_int_mode, "0: Legacy mode; 1: MSI mode; 2: MSI-X mode");
|
||||||
module_param(low_power_mode_enable, int, 0);
|
module_param(low_power_mode_enable, int, 0);
|
||||||
MODULE_PARM_DESC(low_power_mode_enable, "0/1: Disable/Enable Low Power Mode");
|
MODULE_PARM_DESC(low_power_mode_enable, "0/1: Disable/Enable Low Power Mode");
|
||||||
|
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
module_param(wakelock_timeout, int, 0);
|
module_param(wakelock_timeout, int, 0);
|
||||||
MODULE_PARM_DESC(wakelock_timeout, "set wakelock_timeout value (ms)");
|
MODULE_PARM_DESC(wakelock_timeout, "set wakelock_timeout value (ms)");
|
||||||
#endif
|
|
||||||
|
|
||||||
module_param(dev_cap_mask, uint, 0);
|
module_param(dev_cap_mask, uint, 0);
|
||||||
MODULE_PARM_DESC(dev_cap_mask, "Device capability mask");
|
MODULE_PARM_DESC(dev_cap_mask, "Device capability mask");
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains ioctl function to MLAN
|
* @brief This file contains ioctl function to MLAN
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -126,11 +126,6 @@ extern const struct net_device_ops woal_netdev_ops;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MFG_CMD_SUPPORT
|
|
||||||
/** Mfg mode */
|
|
||||||
extern int mfg_mode;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Local Functions
|
Local Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
@ -141,7 +136,7 @@ extern int mfg_mode;
|
||||||
*
|
*
|
||||||
* @return Region code
|
* @return Region code
|
||||||
*/
|
*/
|
||||||
t_bool woal_is_country_code_supported(t_u8 *country_code)
|
static t_bool woal_is_country_code_supported(t_u8 *country_code)
|
||||||
{
|
{
|
||||||
t_u8 i;
|
t_u8 i;
|
||||||
ENTER();
|
ENTER();
|
||||||
|
@ -166,7 +161,7 @@ t_bool woal_is_country_code_supported(t_u8 *country_code)
|
||||||
*
|
*
|
||||||
* @return Region code
|
* @return Region code
|
||||||
*/
|
*/
|
||||||
t_u8 region_string_2_region_code(char *region_string)
|
static t_u8 region_string_2_region_code(char *region_string)
|
||||||
{
|
{
|
||||||
t_u8 i;
|
t_u8 i;
|
||||||
|
|
||||||
|
@ -310,7 +305,7 @@ t_u8 woal_get_second_channel_offset(int chan)
|
||||||
static inline void woal_copy_mc_addr(mlan_multicast_list *mlist,
|
static inline void woal_copy_mc_addr(mlan_multicast_list *mlist,
|
||||||
mlan_802_11_mac_addr mac)
|
mlan_802_11_mac_addr mac)
|
||||||
{
|
{
|
||||||
int i = 0;
|
t_u32 i = 0;
|
||||||
for (i = 0; i < mlist->num_multicast_addr; i++) {
|
for (i = 0; i < mlist->num_multicast_addr; i++) {
|
||||||
if (!memcmp(&mlist->mac_list[i], mac, ETH_ALEN))
|
if (!memcmp(&mlist->mac_list[i], mac, ETH_ALEN))
|
||||||
return;
|
return;
|
||||||
|
@ -644,7 +639,7 @@ mlan_status woal_request_ioctl(moal_private *priv, mlan_ioctl_req *req,
|
||||||
}
|
}
|
||||||
#ifdef MFG_CMD_SUPPORT
|
#ifdef MFG_CMD_SUPPORT
|
||||||
if (mfg_mode && sub_command != MLAN_OID_MISC_HOST_CMD) {
|
if (mfg_mode && sub_command != MLAN_OID_MISC_HOST_CMD) {
|
||||||
PRINTM(MCMND, "IOCTL is not allowed while suspended\n");
|
PRINTM(MCMND, "Only HOST_CMD allowed in MFG mode\n");
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -1654,7 +1649,7 @@ done:
|
||||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise
|
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING --success, otherwise
|
||||||
* fail
|
* fail
|
||||||
*/
|
*/
|
||||||
int woal_set_countrycode(moal_private *priv, char *country)
|
static int woal_set_countrycode(moal_private *priv, char *country)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
|
@ -1988,7 +1983,6 @@ out:
|
||||||
mlan_status woal_get_debug_info(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_debug_info(moal_private *priv, t_u8 wait_option,
|
||||||
mlan_debug_info *debug_info)
|
mlan_debug_info *debug_info)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_get_info *info = NULL;
|
mlan_ds_get_info *info = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -1998,7 +1992,7 @@ mlan_status woal_get_debug_info(moal_private *priv, t_u8 wait_option,
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) +
|
req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) +
|
||||||
sizeof(mlan_debug_info));
|
sizeof(mlan_debug_info));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2221,7 +2215,7 @@ int woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req)
|
||||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||||
mlan_ioctl_req *ioctl_req = NULL;
|
mlan_ioctl_req *ioctl_req = NULL;
|
||||||
mlan_ds_misc_cfg *misc = NULL;
|
mlan_ds_misc_cfg *misc = NULL;
|
||||||
mlan_ds_misc_custom_ie *custom_ie = NULL;
|
mlan_ds_misc_custom_ie *pcustom_ie = NULL;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
gfp_t flag;
|
gfp_t flag;
|
||||||
|
@ -2236,13 +2230,13 @@ int woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req)
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
|
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
|
||||||
custom_ie = kzalloc(sizeof(mlan_ds_misc_custom_ie), flag);
|
pcustom_ie = kzalloc(sizeof(mlan_ds_misc_custom_ie), flag);
|
||||||
if (!custom_ie) {
|
if (!pcustom_ie) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copy_from_user(custom_ie, req->ifr_data,
|
if (copy_from_user(pcustom_ie, req->ifr_data,
|
||||||
sizeof(mlan_ds_misc_custom_ie))) {
|
sizeof(mlan_ds_misc_custom_ie))) {
|
||||||
PRINTM(MERROR, "Copy from user failed\n");
|
PRINTM(MERROR, "Copy from user failed\n");
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
|
@ -2258,13 +2252,13 @@ int woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req)
|
||||||
misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf;
|
misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf;
|
||||||
misc->sub_command = MLAN_OID_MISC_CUSTOM_IE;
|
misc->sub_command = MLAN_OID_MISC_CUSTOM_IE;
|
||||||
ioctl_req->req_id = MLAN_IOCTL_MISC_CFG;
|
ioctl_req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||||
if ((custom_ie->len == 0) ||
|
if ((pcustom_ie->len == 0) ||
|
||||||
(custom_ie->len == sizeof(custom_ie->ie_data_list[0].ie_index)))
|
(pcustom_ie->len == sizeof(pcustom_ie->ie_data_list[0].ie_index)))
|
||||||
ioctl_req->action = MLAN_ACT_GET;
|
ioctl_req->action = MLAN_ACT_GET;
|
||||||
else
|
else
|
||||||
ioctl_req->action = MLAN_ACT_SET;
|
ioctl_req->action = MLAN_ACT_SET;
|
||||||
|
|
||||||
moal_memcpy_ext(priv->phandle, &misc->param.cust_ie, custom_ie,
|
moal_memcpy_ext(priv->phandle, &misc->param.cust_ie, pcustom_ie,
|
||||||
sizeof(mlan_ds_misc_custom_ie),
|
sizeof(mlan_ds_misc_custom_ie),
|
||||||
sizeof(mlan_ds_misc_custom_ie));
|
sizeof(mlan_ds_misc_custom_ie));
|
||||||
|
|
||||||
|
@ -2289,7 +2283,7 @@ int woal_custom_ie_ioctl(struct net_device *dev, struct ifreq *req)
|
||||||
done:
|
done:
|
||||||
if (status != MLAN_STATUS_PENDING)
|
if (status != MLAN_STATUS_PENDING)
|
||||||
kfree(ioctl_req);
|
kfree(ioctl_req);
|
||||||
kfree(custom_ie);
|
kfree(pcustom_ie);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -2433,6 +2427,88 @@ int woal_set_get_custom_ie(moal_private *priv, t_u16 mask, t_u8 *ie, int ie_len)
|
||||||
}
|
}
|
||||||
#endif /* defined(HOST_TXRX_MGMT_FRAME) && defined(UAP_WEXT) */
|
#endif /* defined(HOST_TXRX_MGMT_FRAME) && defined(UAP_WEXT) */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TDLS configuration ioctl handler
|
||||||
|
*
|
||||||
|
* @param dev A pointer to net_device structure
|
||||||
|
* @param req A pointer to ifreq structure
|
||||||
|
* @return 0 --success, otherwise fail
|
||||||
|
*/
|
||||||
|
int woal_tdls_config_ioctl(struct net_device *dev, struct ifreq *req)
|
||||||
|
{
|
||||||
|
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||||
|
mlan_ioctl_req *ioctl_req = NULL;
|
||||||
|
mlan_ds_misc_cfg *misc = NULL;
|
||||||
|
mlan_ds_misc_tdls_config *tdls_data = NULL;
|
||||||
|
int ret = 0;
|
||||||
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
gfp_t flag;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
|
||||||
|
/* Sanity check */
|
||||||
|
if (req->ifr_data == NULL) {
|
||||||
|
PRINTM(MERROR, "woal_tdls_config_ioctl() corrupt data\n");
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
|
||||||
|
tdls_data = kzalloc(sizeof(mlan_ds_misc_tdls_config), flag);
|
||||||
|
if (!tdls_data) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (copy_from_user(tdls_data, req->ifr_data,
|
||||||
|
sizeof(mlan_ds_misc_tdls_config))) {
|
||||||
|
PRINTM(MERROR, "Copy from user failed\n");
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||||
|
if (ioctl_req == NULL) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
misc = (mlan_ds_misc_cfg *)ioctl_req->pbuf;
|
||||||
|
misc->sub_command = MLAN_OID_MISC_TDLS_CONFIG;
|
||||||
|
ioctl_req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||||
|
if (tdls_data->tdls_action == WLAN_TDLS_DISCOVERY_REQ ||
|
||||||
|
tdls_data->tdls_action == WLAN_TDLS_LINK_STATUS)
|
||||||
|
ioctl_req->action = MLAN_ACT_GET;
|
||||||
|
else
|
||||||
|
ioctl_req->action = MLAN_ACT_SET;
|
||||||
|
|
||||||
|
moal_memcpy_ext(priv->phandle, &misc->param.tdls_config, tdls_data,
|
||||||
|
sizeof(mlan_ds_misc_tdls_config),
|
||||||
|
sizeof(mlan_ds_misc_tdls_config));
|
||||||
|
|
||||||
|
status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT);
|
||||||
|
if (status != MLAN_STATUS_SUCCESS) {
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tdls_data->tdls_action == WLAN_TDLS_DISCOVERY_REQ ||
|
||||||
|
tdls_data->tdls_action == WLAN_TDLS_LINK_STATUS) {
|
||||||
|
if (copy_to_user(req->ifr_data, &misc->param.tdls_config,
|
||||||
|
sizeof(mlan_ds_misc_tdls_config))) {
|
||||||
|
PRINTM(MERROR, "Copy to user failed!\n");
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
|
if (status != MLAN_STATUS_PENDING)
|
||||||
|
kfree(ioctl_req);
|
||||||
|
kfree(tdls_data);
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ioctl function get BSS type
|
* @brief ioctl function get BSS type
|
||||||
*
|
*
|
||||||
|
@ -2597,7 +2673,7 @@ int woal_set_get_bss_role(moal_private *priv, struct iwreq *wrq)
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (bss_role == GET_BSS_ROLE(priv)) {
|
if (bss_role == (int)GET_BSS_ROLE(priv)) {
|
||||||
PRINTM(MWARN, "Already BSS is in desired role\n");
|
PRINTM(MWARN, "Already BSS is in desired role\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -2849,7 +2925,11 @@ done:
|
||||||
*/
|
*/
|
||||||
mlan_status woal_cancel_hs(moal_private *priv, t_u8 wait_option)
|
mlan_status woal_cancel_hs(moal_private *priv, t_u8 wait_option)
|
||||||
{
|
{
|
||||||
|
#ifdef STA_CFG80211
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||||
moal_handle *handle = NULL;
|
moal_handle *handle = NULL;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_ds_hs_cfg hscfg;
|
mlan_ds_hs_cfg hscfg;
|
||||||
#ifdef STA_CFG80211
|
#ifdef STA_CFG80211
|
||||||
|
@ -2863,15 +2943,14 @@ mlan_status woal_cancel_hs(moal_private *priv, t_u8 wait_option)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
handle = priv->phandle;
|
|
||||||
/* Cancel Host Sleep */
|
/* Cancel Host Sleep */
|
||||||
|
|
||||||
hscfg.conditions = HOST_SLEEP_CFG_CANCEL;
|
hscfg.conditions = HOST_SLEEP_CFG_CANCEL;
|
||||||
hscfg.is_invoke_hostcmd = MTRUE;
|
hscfg.is_invoke_hostcmd = MTRUE;
|
||||||
ret = woal_set_get_hs_params(priv, MLAN_ACT_SET, wait_option, &hscfg);
|
ret = woal_set_get_hs_params(priv, MLAN_ACT_SET, wait_option, &hscfg);
|
||||||
|
|
||||||
#ifdef STA_CFG80211
|
#ifdef STA_CFG80211
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||||
|
handle = priv->phandle;
|
||||||
if (GTK_REKEY_OFFLOAD_SUSPEND == handle->params.gtk_rekey_offload) {
|
if (GTK_REKEY_OFFLOAD_SUSPEND == handle->params.gtk_rekey_offload) {
|
||||||
PRINTM(MIOCTL,
|
PRINTM(MIOCTL,
|
||||||
"Cancel Host Sleep... clear gtk rekey offload of FW\n");
|
"Cancel Host Sleep... clear gtk rekey offload of FW\n");
|
||||||
|
@ -3128,7 +3207,6 @@ mlan_status woal_request_soft_reset(moal_handle *handle)
|
||||||
mlan_status woal_set_wapi_enable(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_set_wapi_enable(moal_private *priv, t_u8 wait_option,
|
||||||
t_u32 enable)
|
t_u32 enable)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_sec_cfg *sec = NULL;
|
mlan_ds_sec_cfg *sec = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -3137,7 +3215,7 @@ mlan_status woal_set_wapi_enable(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3300,11 +3378,11 @@ done:
|
||||||
* @brief Set driver debug bit masks to mlan in order to enhance performance
|
* @brief Set driver debug bit masks to mlan in order to enhance performance
|
||||||
*
|
*
|
||||||
* @param priv A pointer to moal_private structure
|
* @param priv A pointer to moal_private structure
|
||||||
* @param drvdbg Driver debug level
|
* @param drv_dbg Driver debug level
|
||||||
*
|
*
|
||||||
* @return 0 --success, otherwise fail
|
* @return 0 --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
int woal_set_drvdbg(moal_private *priv, t_u32 drvdbg)
|
int woal_set_drvdbg(moal_private *priv, t_u32 drv_dbg)
|
||||||
{
|
{
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_misc_cfg *misc = NULL;
|
mlan_ds_misc_cfg *misc = NULL;
|
||||||
|
@ -3322,7 +3400,7 @@ int woal_set_drvdbg(moal_private *priv, t_u32 drvdbg)
|
||||||
misc->sub_command = MLAN_OID_MISC_DRVDBG;
|
misc->sub_command = MLAN_OID_MISC_DRVDBG;
|
||||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||||
req->action = MLAN_ACT_SET;
|
req->action = MLAN_ACT_SET;
|
||||||
misc->param.drvdbg = drvdbg;
|
misc->param.drvdbg = drv_dbg;
|
||||||
|
|
||||||
ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||||
|
|
||||||
|
@ -4006,7 +4084,6 @@ done:
|
||||||
mlan_status woal_get_sta_channel(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_sta_channel(moal_private *priv, t_u8 wait_option,
|
||||||
chan_band_info *channel)
|
chan_band_info *channel)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_bss *bss = NULL;
|
mlan_ds_bss *bss = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4016,7 +4093,7 @@ mlan_status woal_get_sta_channel(moal_private *priv, t_u8 wait_option,
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
PRINTM(MERROR, "woal_get_sta_channel req alloc fail\n");
|
PRINTM(MERROR, "woal_get_sta_channel req alloc fail\n");
|
||||||
ret = MLAN_STATUS_FAILURE;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4053,7 +4130,6 @@ done:
|
||||||
mlan_status woal_get_signal_info(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_signal_info(moal_private *priv, t_u8 wait_option,
|
||||||
mlan_ds_get_signal *signal)
|
mlan_ds_get_signal *signal)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ds_get_info *info = NULL;
|
mlan_ds_get_info *info = NULL;
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4063,7 +4139,7 @@ mlan_status woal_get_signal_info(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_get_info));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4113,7 +4189,6 @@ done:
|
||||||
mlan_status woal_get_scan_table(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_scan_table(moal_private *priv, t_u8 wait_option,
|
||||||
mlan_scan_resp *scan_resp)
|
mlan_scan_resp *scan_resp)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_scan *scan = NULL;
|
mlan_ds_scan *scan = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4127,7 +4202,7 @@ mlan_status woal_get_scan_table(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4343,7 +4418,6 @@ mlan_status woal_find_best_network(moal_private *priv, t_u8 wait_option,
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_bss *bss = NULL;
|
mlan_ds_bss *bss = NULL;
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u8 *mac = 0;
|
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -4374,9 +4448,9 @@ mlan_status woal_find_best_network(moal_private *priv, t_u8 wait_option,
|
||||||
moal_memcpy_ext(priv->phandle, ssid_bssid,
|
moal_memcpy_ext(priv->phandle, ssid_bssid,
|
||||||
&bss->param.ssid_bssid, sizeof(mlan_ssid_bssid),
|
&bss->param.ssid_bssid, sizeof(mlan_ssid_bssid),
|
||||||
sizeof(mlan_ssid_bssid));
|
sizeof(mlan_ssid_bssid));
|
||||||
mac = (t_u8 *)&ssid_bssid->bssid;
|
|
||||||
PRINTM(MINFO, "Find network: ssid=%s, " MACSTR ", idx=%d\n",
|
PRINTM(MINFO, "Find network: ssid=%s, " MACSTR ", idx=%d\n",
|
||||||
ssid_bssid->ssid.ssid, MAC2STR(mac),
|
ssid_bssid->ssid.ssid,
|
||||||
|
MAC2STR((t_u8 *)&ssid_bssid->bssid),
|
||||||
(int)ssid_bssid->idx);
|
(int)ssid_bssid->idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4445,7 +4519,6 @@ mlan_status woal_11d_check_ap_channel(moal_private *priv, t_u8 wait_option,
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_bss *bss = NULL;
|
mlan_ds_bss *bss = NULL;
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u8 *mac = 0;
|
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
@ -4470,9 +4543,8 @@ mlan_status woal_11d_check_ap_channel(moal_private *priv, t_u8 wait_option,
|
||||||
moal_memcpy_ext(priv->phandle, &bss->param.ssid_bssid, ssid_bssid,
|
moal_memcpy_ext(priv->phandle, &bss->param.ssid_bssid, ssid_bssid,
|
||||||
sizeof(mlan_ssid_bssid), sizeof(mlan_ssid_bssid));
|
sizeof(mlan_ssid_bssid), sizeof(mlan_ssid_bssid));
|
||||||
|
|
||||||
mac = (t_u8 *)&ssid_bssid->bssid;
|
|
||||||
PRINTM(MINFO, "ssid=%s, " MACSTR ", idx=%d\n", ssid_bssid->ssid.ssid,
|
PRINTM(MINFO, "ssid=%s, " MACSTR ", idx=%d\n", ssid_bssid->ssid.ssid,
|
||||||
MAC2STR(mac), (int)ssid_bssid->idx);
|
MAC2STR((t_u8 *)&ssid_bssid->bssid), (int)ssid_bssid->idx);
|
||||||
|
|
||||||
/* Send IOCTL request to MLAN */
|
/* Send IOCTL request to MLAN */
|
||||||
ret = woal_request_ioctl(priv, req, wait_option);
|
ret = woal_request_ioctl(priv, req, wait_option);
|
||||||
|
@ -4497,7 +4569,6 @@ done:
|
||||||
mlan_status woal_get_auth_mode(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_auth_mode(moal_private *priv, t_u8 wait_option,
|
||||||
t_u32 *auth_mode)
|
t_u32 *auth_mode)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_sec_cfg *sec = NULL;
|
mlan_ds_sec_cfg *sec = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4506,7 +4577,7 @@ mlan_status woal_get_auth_mode(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4540,7 +4611,6 @@ done:
|
||||||
mlan_status woal_get_encrypt_mode(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_encrypt_mode(moal_private *priv, t_u8 wait_option,
|
||||||
t_u32 *encrypt_mode)
|
t_u32 *encrypt_mode)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_sec_cfg *sec = NULL;
|
mlan_ds_sec_cfg *sec = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4550,7 +4620,7 @@ mlan_status woal_get_encrypt_mode(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4584,7 +4654,6 @@ done:
|
||||||
mlan_status woal_get_wpa_enable(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_wpa_enable(moal_private *priv, t_u8 wait_option,
|
||||||
t_u32 *enable)
|
t_u32 *enable)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_sec_cfg *sec = NULL;
|
mlan_ds_sec_cfg *sec = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4594,7 +4663,7 @@ mlan_status woal_get_wpa_enable(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4628,7 +4697,6 @@ done:
|
||||||
mlan_status woal_set_auth_mode(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_set_auth_mode(moal_private *priv, t_u8 wait_option,
|
||||||
t_u32 auth_mode)
|
t_u32 auth_mode)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_sec_cfg *sec = NULL;
|
mlan_ds_sec_cfg *sec = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4637,7 +4705,7 @@ mlan_status woal_set_auth_mode(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4670,7 +4738,6 @@ done:
|
||||||
mlan_status woal_set_encrypt_mode(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_set_encrypt_mode(moal_private *priv, t_u8 wait_option,
|
||||||
t_u32 encrypt_mode)
|
t_u32 encrypt_mode)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_sec_cfg *sec = NULL;
|
mlan_ds_sec_cfg *sec = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4679,7 +4746,7 @@ mlan_status woal_set_encrypt_mode(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4712,7 +4779,6 @@ done:
|
||||||
mlan_status woal_set_wpa_enable(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_set_wpa_enable(moal_private *priv, t_u8 wait_option,
|
||||||
t_u32 enable)
|
t_u32 enable)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_sec_cfg *sec = NULL;
|
mlan_ds_sec_cfg *sec = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4721,7 +4787,7 @@ mlan_status woal_set_wpa_enable(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4752,7 +4818,6 @@ done:
|
||||||
*/
|
*/
|
||||||
mlan_status woal_enable_wep_key(moal_private *priv, t_u8 wait_option)
|
mlan_status woal_enable_wep_key(moal_private *priv, t_u8 wait_option)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_sec_cfg *sec = NULL;
|
mlan_ds_sec_cfg *sec = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -4761,7 +4826,7 @@ mlan_status woal_enable_wep_key(moal_private *priv, t_u8 wait_option)
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_sec_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6289,7 +6354,8 @@ mlan_status woal_usb_aggr_init(moal_handle *handle)
|
||||||
else
|
else
|
||||||
moal_memcpy_ext(handle, &cardp->tx_aggr_ctrl,
|
moal_memcpy_ext(handle, &cardp->tx_aggr_ctrl,
|
||||||
&aggr_param->tx_aggr_ctrl,
|
&aggr_param->tx_aggr_ctrl,
|
||||||
sizeof(usb_aggr_ctrl), sizeof(usb_aggr_ctrl));
|
sizeof(usb_aggr_ctrl_cfg),
|
||||||
|
sizeof(usb_aggr_ctrl_cfg));
|
||||||
|
|
||||||
if (req->status_code) {
|
if (req->status_code) {
|
||||||
/* Disable the feature if FW return failure/unsupported */
|
/* Disable the feature if FW return failure/unsupported */
|
||||||
|
@ -6319,7 +6385,8 @@ mlan_status woal_usb_aggr_init(moal_handle *handle)
|
||||||
/* Default is disable, update only for enable case */
|
/* Default is disable, update only for enable case */
|
||||||
moal_memcpy_ext(handle, &cardp->rx_deaggr_ctrl,
|
moal_memcpy_ext(handle, &cardp->rx_deaggr_ctrl,
|
||||||
&aggr_param->rx_deaggr_ctrl,
|
&aggr_param->rx_deaggr_ctrl,
|
||||||
sizeof(usb_aggr_ctrl), sizeof(usb_aggr_ctrl));
|
sizeof(usb_aggr_ctrl_cfg),
|
||||||
|
sizeof(usb_aggr_ctrl_cfg));
|
||||||
|
|
||||||
/* Ensure the next data URBs will use the modified parameters */
|
/* Ensure the next data URBs will use the modified parameters */
|
||||||
if (!atomic_read(&cardp->rx_data_urb_pending)) {
|
if (!atomic_read(&cardp->rx_data_urb_pending)) {
|
||||||
|
@ -6486,9 +6553,65 @@ void woal_ioctl_get_misc_conf(moal_private *priv, mlan_ds_misc_cfg *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
|
#define RADIO_MODE_STR_LEN 20
|
||||||
#define TX_PWR_STR_LEN 20
|
#define TX_PWR_STR_LEN 20
|
||||||
#define TX_CONT_STR_LEN 50
|
#define TX_CONT_STR_LEN 50
|
||||||
#define TX_FRAME_STR_LEN 80
|
#define TX_FRAME_STR_LEN 200
|
||||||
|
#define HE_TB_TX_STR_LEN 30
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief Parse mfg cmd radio mode string
|
||||||
|
*
|
||||||
|
* @param s A pointer to user buffer
|
||||||
|
* @param len Length of user buffer
|
||||||
|
* @param d A pointer to mfg_cmd_generic_cfg struct
|
||||||
|
* @return 0 on success, -EINVAL otherwise
|
||||||
|
*/
|
||||||
|
static int parse_radio_mode_string(const char *s, size_t len,
|
||||||
|
struct mfg_cmd_generic_cfg *d)
|
||||||
|
{
|
||||||
|
int ret = MLAN_STATUS_SUCCESS;
|
||||||
|
char *string = NULL;
|
||||||
|
char *tmp = NULL;
|
||||||
|
char *pos = NULL;
|
||||||
|
gfp_t flag;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
if (!s || !d) {
|
||||||
|
LEAVE();
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
|
||||||
|
string = kzalloc(RADIO_MODE_STR_LEN, flag);
|
||||||
|
if (string == NULL) {
|
||||||
|
LEAVE();
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
moal_memcpy_ext(NULL, string, s + strlen("radio_mode="),
|
||||||
|
len - strlen("radio_mode="), RADIO_MODE_STR_LEN - 1);
|
||||||
|
|
||||||
|
tmp = string;
|
||||||
|
string = strstrip(string);
|
||||||
|
|
||||||
|
/* radio mode index 0 */
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->data1 = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
/* radio mode index 1 */
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->data2 = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
if ((d->data1 > 14 || d->data1 < 0) || (d->data2 > 14 || d->data2 < 0))
|
||||||
|
ret = -EINVAL;
|
||||||
|
|
||||||
|
kfree(tmp);
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @brief Parse mfg cmd tx pwr string
|
* @brief Parse mfg cmd tx pwr string
|
||||||
*
|
*
|
||||||
|
@ -6706,6 +6829,34 @@ static int parse_tx_frame_string(const char *s, size_t len,
|
||||||
if (pos)
|
if (pos)
|
||||||
d->stbc = (t_u32)woal_string_to_number(pos);
|
d->stbc = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->NumPkt = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->MaxPE = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->BeamChange = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->Dcm = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->Doppler = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->MidP = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->QNum = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
pos = strsep(&string, " \t");
|
pos = strsep(&string, " \t");
|
||||||
if (pos) {
|
if (pos) {
|
||||||
for (i = 0; i < ETH_ALEN; i++) {
|
for (i = 0; i < ETH_ALEN; i++) {
|
||||||
|
@ -6727,7 +6878,68 @@ done:
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
|
/*
|
||||||
|
* @brief Parse mfg cmd HE TB Tx string
|
||||||
|
*
|
||||||
|
* @param s A pointer to user buffer
|
||||||
|
* @param len Length of user buffer
|
||||||
|
* @param d A pointer to mfg_Cmd_HE_TBTx_t struct
|
||||||
|
* @return 0 on success, -EINVAL otherwise
|
||||||
|
*/
|
||||||
|
static int parse_he_tb_tx_string(const char *s, size_t len,
|
||||||
|
struct mfg_Cmd_HE_TBTx_t *d)
|
||||||
|
{
|
||||||
|
int ret = MLAN_STATUS_SUCCESS;
|
||||||
|
char *string = NULL;
|
||||||
|
char *tmp = NULL;
|
||||||
|
char *pos = NULL;
|
||||||
|
gfp_t flag;
|
||||||
|
|
||||||
|
ENTER();
|
||||||
|
if (!s || !d) {
|
||||||
|
LEAVE();
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
flag = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
|
||||||
|
string = kzalloc(HE_TB_TX_STR_LEN, flag);
|
||||||
|
if (string == NULL)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
moal_memcpy_ext(NULL, string, s + strlen("he_tb_tx="),
|
||||||
|
len - strlen("he_tb_tx="), HE_TB_TX_STR_LEN - 1);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->enable = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
if (d->enable == MFALSE)
|
||||||
|
goto done;
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->qnum = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->aid = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->axq_mu_timer = (t_u32)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
pos = strsep(&string, " \t");
|
||||||
|
if (pos)
|
||||||
|
d->tx_power = (t_u16)woal_string_to_number(pos);
|
||||||
|
|
||||||
|
if (d->enable > 1)
|
||||||
|
ret = -EINVAL;
|
||||||
|
|
||||||
|
done:
|
||||||
|
kfree(tmp);
|
||||||
|
LEAVE();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
/*
|
||||||
* @brief This function enables/disables RF test mode in firmware
|
* @brief This function enables/disables RF test mode in firmware
|
||||||
*
|
*
|
||||||
* @param handle A pointer to moal_handle structure
|
* @param handle A pointer to moal_handle structure
|
||||||
|
@ -6851,6 +7063,11 @@ mlan_status woal_process_rf_test_mode_cmd(moal_handle *handle, t_u32 cmd,
|
||||||
break;
|
break;
|
||||||
case MFG_CMD_CLR_RX_ERR:
|
case MFG_CMD_CLR_RX_ERR:
|
||||||
break;
|
break;
|
||||||
|
case MFG_CMD_RADIO_MODE_CFG:
|
||||||
|
if (parse_radio_mode_string(buffer, len,
|
||||||
|
&misc->param.mfg_generic_cfg))
|
||||||
|
err = MTRUE;
|
||||||
|
break;
|
||||||
case MFG_CMD_RFPWR:
|
case MFG_CMD_RFPWR:
|
||||||
if (parse_tx_pwr_string(buffer, len,
|
if (parse_tx_pwr_string(buffer, len,
|
||||||
&misc->param.mfg_generic_cfg))
|
&misc->param.mfg_generic_cfg))
|
||||||
|
@ -6867,6 +7084,12 @@ mlan_status woal_process_rf_test_mode_cmd(moal_handle *handle, t_u32 cmd,
|
||||||
&misc->param.mfg_tx_frame2))
|
&misc->param.mfg_tx_frame2))
|
||||||
err = MTRUE;
|
err = MTRUE;
|
||||||
break;
|
break;
|
||||||
|
case MFG_CMD_CONFIG_MAC_HE_TB_TX:
|
||||||
|
misc->sub_command = MLAN_OID_MISC_RF_TEST_HE_POWER;
|
||||||
|
if (parse_he_tb_tx_string(buffer, len,
|
||||||
|
&misc->param.mfg_he_power))
|
||||||
|
err = MTRUE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
err = MTRUE;
|
err = MTRUE;
|
||||||
}
|
}
|
||||||
|
@ -6891,6 +7114,12 @@ mlan_status woal_process_rf_test_mode_cmd(moal_handle *handle, t_u32 cmd,
|
||||||
case MFG_CMD_RX_ANT:
|
case MFG_CMD_RX_ANT:
|
||||||
handle->rf_data->rx_antenna = misc->param.mfg_generic_cfg.data1;
|
handle->rf_data->rx_antenna = misc->param.mfg_generic_cfg.data1;
|
||||||
break;
|
break;
|
||||||
|
case MFG_CMD_RADIO_MODE_CFG:
|
||||||
|
handle->rf_data->radio_mode[0] =
|
||||||
|
misc->param.mfg_generic_cfg.data1;
|
||||||
|
handle->rf_data->radio_mode[1] =
|
||||||
|
misc->param.mfg_generic_cfg.data2;
|
||||||
|
break;
|
||||||
case MFG_CMD_RF_BAND_AG:
|
case MFG_CMD_RF_BAND_AG:
|
||||||
handle->rf_data->band = misc->param.mfg_generic_cfg.data1;
|
handle->rf_data->band = misc->param.mfg_generic_cfg.data1;
|
||||||
/* set fw default bw and channel config on band change */
|
/* set fw default bw and channel config on band change */
|
||||||
|
@ -6963,11 +7192,34 @@ mlan_status woal_process_rf_test_mode_cmd(moal_handle *handle, t_u32 cmd,
|
||||||
misc->param.mfg_tx_frame2.gf_mode;
|
misc->param.mfg_tx_frame2.gf_mode;
|
||||||
handle->rf_data->tx_frame_data[12] =
|
handle->rf_data->tx_frame_data[12] =
|
||||||
misc->param.mfg_tx_frame2.stbc;
|
misc->param.mfg_tx_frame2.stbc;
|
||||||
|
handle->rf_data->tx_frame_data[13] =
|
||||||
|
misc->param.mfg_tx_frame2.NumPkt;
|
||||||
|
handle->rf_data->tx_frame_data[14] =
|
||||||
|
misc->param.mfg_tx_frame2.MaxPE;
|
||||||
|
handle->rf_data->tx_frame_data[15] =
|
||||||
|
misc->param.mfg_tx_frame2.BeamChange;
|
||||||
|
handle->rf_data->tx_frame_data[16] =
|
||||||
|
misc->param.mfg_tx_frame2.Dcm;
|
||||||
|
handle->rf_data->tx_frame_data[17] =
|
||||||
|
misc->param.mfg_tx_frame2.Doppler;
|
||||||
|
handle->rf_data->tx_frame_data[18] =
|
||||||
|
misc->param.mfg_tx_frame2.MidP;
|
||||||
|
handle->rf_data->tx_frame_data[19] =
|
||||||
|
misc->param.mfg_tx_frame2.QNum;
|
||||||
for (i = 0; i < ETH_ALEN; i++) {
|
for (i = 0; i < ETH_ALEN; i++) {
|
||||||
handle->rf_data->bssid[i] =
|
handle->rf_data->bssid[i] =
|
||||||
misc->param.mfg_tx_frame2.bssid[i];
|
misc->param.mfg_tx_frame2.bssid[i];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case MFG_CMD_CONFIG_MAC_HE_TB_TX:
|
||||||
|
handle->rf_data->he_tb_tx[0] = misc->param.mfg_he_power.enable;
|
||||||
|
handle->rf_data->he_tb_tx[1] = misc->param.mfg_he_power.qnum;
|
||||||
|
handle->rf_data->he_tb_tx[2] = misc->param.mfg_he_power.aid;
|
||||||
|
handle->rf_data->he_tb_tx[3] =
|
||||||
|
misc->param.mfg_he_power.axq_mu_timer;
|
||||||
|
handle->rf_data->he_tb_tx[4] =
|
||||||
|
misc->param.mfg_he_power.tx_power;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
if (err || ret != MLAN_STATUS_PENDING)
|
if (err || ret != MLAN_STATUS_PENDING)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* driver.
|
* driver.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -69,7 +69,7 @@ Change log:
|
||||||
Global Variables
|
Global Variables
|
||||||
********************************************************/
|
********************************************************/
|
||||||
/** the pointer of new fwdump fname for each dump**/
|
/** the pointer of new fwdump fname for each dump**/
|
||||||
char *fwdump_fname;
|
static char *fwdump_fname;
|
||||||
/** Semaphore for add/remove card */
|
/** Semaphore for add/remove card */
|
||||||
struct semaphore AddRemoveCardSem;
|
struct semaphore AddRemoveCardSem;
|
||||||
/**
|
/**
|
||||||
|
@ -77,16 +77,7 @@ struct semaphore AddRemoveCardSem;
|
||||||
* structure variable
|
* structure variable
|
||||||
**/
|
**/
|
||||||
moal_handle *m_handle[MAX_MLAN_ADAPTER];
|
moal_handle *m_handle[MAX_MLAN_ADAPTER];
|
||||||
/** Global veriable for usb independent reset */
|
|
||||||
extern int fw_reload;
|
|
||||||
|
|
||||||
extern int wifi_status;
|
|
||||||
|
|
||||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
|
||||||
extern int fw_region;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Local Variables
|
Local Variables
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
@ -631,6 +622,7 @@ static mlan_callbacks woal_callbacks = {
|
||||||
.moal_print_netintf = moal_print_netintf,
|
.moal_print_netintf = moal_print_netintf,
|
||||||
.moal_assert = moal_assert,
|
.moal_assert = moal_assert,
|
||||||
.moal_hist_data_add = moal_hist_data_add,
|
.moal_hist_data_add = moal_hist_data_add,
|
||||||
|
.moal_updata_peer_signal = moal_updata_peer_signal,
|
||||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||||
.moal_wait_hostcmd_complete = moal_wait_hostcmd_complete,
|
.moal_wait_hostcmd_complete = moal_wait_hostcmd_complete,
|
||||||
.moal_notify_hostcmd_complete = moal_notify_hostcmd_complete,
|
.moal_notify_hostcmd_complete = moal_notify_hostcmd_complete,
|
||||||
|
@ -722,16 +714,19 @@ void woal_process_hang(moal_handle *handle)
|
||||||
if (reset_handle == NULL) {
|
if (reset_handle == NULL) {
|
||||||
PRINTM(MMSG, "Start to process hanging\n");
|
PRINTM(MMSG, "Start to process hanging\n");
|
||||||
reset_handle = handle;
|
reset_handle = handle;
|
||||||
|
flush_workqueue(handle->workqueue);
|
||||||
|
flush_workqueue(handle->evt_workqueue);
|
||||||
|
if (handle->rx_workqueue) {
|
||||||
|
flush_workqueue(handle->rx_workqueue);
|
||||||
|
}
|
||||||
mlan_ioctl(handle->pmlan_adapter, NULL);
|
mlan_ioctl(handle->pmlan_adapter, NULL);
|
||||||
queue_work(hang_workqueue, &hang_work);
|
queue_work(hang_workqueue, &hang_work);
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
#define WAKE_LOCK_HANG 5000
|
#define WAKE_LOCK_HANG 5000
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||||
__pm_wakeup_event(&reset_handle->ws, WAKE_LOCK_HANG);
|
__pm_wakeup_event(&reset_handle->ws, WAKE_LOCK_HANG);
|
||||||
#else
|
#else
|
||||||
wake_lock_timeout(&reset_handle->wake_lock,
|
wake_lock_timeout(&reset_handle->wake_lock,
|
||||||
msecs_to_jiffies(WAKE_LOCK_HANG));
|
msecs_to_jiffies(WAKE_LOCK_HANG));
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -749,6 +744,8 @@ t_u8 woal_is_any_interface_active(moal_handle *handle)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < handle->priv_num; i++) {
|
for (i = 0; i < handle->priv_num; i++) {
|
||||||
|
if (!handle->priv[i])
|
||||||
|
continue;
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA) {
|
if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA) {
|
||||||
if (handle->priv[i]->media_connected == MTRUE)
|
if (handle->priv[i]->media_connected == MTRUE)
|
||||||
|
@ -989,7 +986,6 @@ const t_u8 *woal_parse_ext_ie_tlv(const t_u8 *ie, int len, t_u8 ext_id)
|
||||||
*/
|
*/
|
||||||
t_u32 woal_get_mode(moal_private *priv, t_u8 wait_option)
|
t_u32 woal_get_mode(moal_private *priv, t_u8 wait_option)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ds_bss *bss = NULL;
|
mlan_ds_bss *bss = NULL;
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -1003,7 +999,7 @@ t_u32 woal_get_mode(moal_private *priv, t_u8 wait_option)
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1154,7 +1150,7 @@ mlan_status woal_update_drv_tbl(moal_handle *handle, int drv_mode_local)
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
if (drv_mode_local & DRV_MODE_STA) {
|
if (drv_mode_local & DRV_MODE_STA) {
|
||||||
for (j = 0; j < max_sta_bss; j++) {
|
for (j = 0; j < max_sta_bss; j++) {
|
||||||
if (i >= intf_num)
|
if (i >= (int)intf_num)
|
||||||
break;
|
break;
|
||||||
bss_tbl[i].bss_type = MLAN_BSS_TYPE_STA;
|
bss_tbl[i].bss_type = MLAN_BSS_TYPE_STA;
|
||||||
bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
||||||
|
@ -1170,7 +1166,7 @@ mlan_status woal_update_drv_tbl(moal_handle *handle, int drv_mode_local)
|
||||||
#ifdef UAP_SUPPORT
|
#ifdef UAP_SUPPORT
|
||||||
if (drv_mode_local & DRV_MODE_UAP) {
|
if (drv_mode_local & DRV_MODE_UAP) {
|
||||||
for (j = 0; j < max_uap_bss; j++) {
|
for (j = 0; j < max_uap_bss; j++) {
|
||||||
if (i >= intf_num)
|
if (i >= (int)intf_num)
|
||||||
break;
|
break;
|
||||||
bss_tbl[i].bss_type = MLAN_BSS_TYPE_UAP;
|
bss_tbl[i].bss_type = MLAN_BSS_TYPE_UAP;
|
||||||
bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
||||||
|
@ -1186,7 +1182,7 @@ mlan_status woal_update_drv_tbl(moal_handle *handle, int drv_mode_local)
|
||||||
#ifdef WIFI_DIRECT_SUPPORT
|
#ifdef WIFI_DIRECT_SUPPORT
|
||||||
if (drv_mode_local & DRV_MODE_WIFIDIRECT) {
|
if (drv_mode_local & DRV_MODE_WIFIDIRECT) {
|
||||||
for (j = 0; j < max_wfd_bss; j++) {
|
for (j = 0; j < max_wfd_bss; j++) {
|
||||||
if (i >= intf_num)
|
if (i >= (int)intf_num)
|
||||||
break;
|
break;
|
||||||
bss_tbl[i].bss_type = MLAN_BSS_TYPE_WIFIDIRECT;
|
bss_tbl[i].bss_type = MLAN_BSS_TYPE_WIFIDIRECT;
|
||||||
bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
||||||
|
@ -1206,7 +1202,7 @@ mlan_status woal_update_drv_tbl(moal_handle *handle, int drv_mode_local)
|
||||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||||
/** append virtual interface at the end of table */
|
/** append virtual interface at the end of table */
|
||||||
for (j = 0; j < max_vir_bss; j++) {
|
for (j = 0; j < max_vir_bss; j++) {
|
||||||
if (i >= intf_num)
|
if (i >= (int)intf_num)
|
||||||
break;
|
break;
|
||||||
bss_tbl[i].bss_type = MLAN_BSS_TYPE_WIFIDIRECT;
|
bss_tbl[i].bss_type = MLAN_BSS_TYPE_WIFIDIRECT;
|
||||||
bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
bss_tbl[i].frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
||||||
|
@ -1504,11 +1500,6 @@ mlan_status woal_init_sw(moal_handle *handle)
|
||||||
}
|
}
|
||||||
moal_memcpy_ext(handle, &device.callbacks, &woal_callbacks,
|
moal_memcpy_ext(handle, &device.callbacks, &woal_callbacks,
|
||||||
sizeof(mlan_callbacks), sizeof(mlan_callbacks));
|
sizeof(mlan_callbacks), sizeof(mlan_callbacks));
|
||||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
|
||||||
device.fw_region = fw_region;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
device.drv_mode = handle->params.drv_mode;
|
device.drv_mode = handle->params.drv_mode;
|
||||||
if (MLAN_STATUS_SUCCESS == mlan_register(&device, &pmlan))
|
if (MLAN_STATUS_SUCCESS == mlan_register(&device, &pmlan))
|
||||||
handle->pmlan_adapter = pmlan;
|
handle->pmlan_adapter = pmlan;
|
||||||
|
@ -1617,7 +1608,7 @@ static t_size parse_cfg_get_line(t_u8 *data, t_size size, t_u8 *line_pos)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
if (pos >= size) { /* reach the end */
|
if (pos >= (t_s32)size) { /* reach the end */
|
||||||
pos = 0; /* Reset position for rfkill */
|
pos = 0; /* Reset position for rfkill */
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1626,7 +1617,7 @@ static t_size parse_cfg_get_line(t_u8 *data, t_size size, t_u8 *line_pos)
|
||||||
src = data + pos;
|
src = data + pos;
|
||||||
dest = line_pos;
|
dest = line_pos;
|
||||||
|
|
||||||
while ((dest - line_pos < MAX_LINE_LEN - 1) && pos < size &&
|
while ((dest - line_pos < MAX_LINE_LEN - 1) && pos < (t_s32)size &&
|
||||||
*src != '\x0A' && *src != '\0') {
|
*src != '\x0A' && *src != '\0') {
|
||||||
if (*src != ' ' && *src != '\t') /* parse space */
|
if (*src != ' ' && *src != '\t') /* parse space */
|
||||||
*dest++ = *src++;
|
*dest++ = *src++;
|
||||||
|
@ -1884,7 +1875,7 @@ static t_u32 woal_process_init_cfg(moal_handle *handle, t_u8 *data, t_size size)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
while ((line_len = parse_cfg_get_line(data, size, s)) != -1) {
|
while ((int)(line_len = parse_cfg_get_line(data, size, s)) != -1) {
|
||||||
pos = s;
|
pos = s;
|
||||||
while (*pos == ' ' || *pos == '\t')
|
while (*pos == ' ' || *pos == '\t')
|
||||||
pos++;
|
pos++;
|
||||||
|
@ -2149,7 +2140,8 @@ done:
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_request_init_user_conf_callback(const struct firmware *firmware,
|
static void
|
||||||
|
woal_request_init_user_conf_callback(const struct firmware *firmware,
|
||||||
void *context)
|
void *context)
|
||||||
{
|
{
|
||||||
moal_handle *handle;
|
moal_handle *handle;
|
||||||
|
@ -2642,6 +2634,83 @@ done:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ssize_t woal_set_rps_map(struct netdev_rx_queue *queue, const char *buf,
|
||||||
|
size_t len)
|
||||||
|
{
|
||||||
|
struct rps_map *old_map, *map;
|
||||||
|
cpumask_var_t mask;
|
||||||
|
int err, cpu, i;
|
||||||
|
static DEFINE_MUTEX(local_rps_map_mutex);
|
||||||
|
|
||||||
|
if (!queue || !queue->dev) {
|
||||||
|
PRINTM(MERROR, "%s: queue=%px or queue->dev is NULL\n",
|
||||||
|
__func__, queue);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!alloc_cpumask_var(&mask, GFP_KERNEL)) {
|
||||||
|
PRINTM(MERROR, "%s: alloc_cpumask_var fail.\n", __func__);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = bitmap_parse(buf, len, cpumask_bits(mask), nr_cpumask_bits);
|
||||||
|
if (err) {
|
||||||
|
PRINTM(MERROR, "%s: bitmap_parse fail err=%d.\n", __func__,
|
||||||
|
err);
|
||||||
|
free_cpumask_var(mask);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
map = kzalloc(max_t(unsigned int, RPS_MAP_SIZE(cpumask_weight(mask)),
|
||||||
|
L1_CACHE_BYTES),
|
||||||
|
GFP_KERNEL);
|
||||||
|
if (!map) {
|
||||||
|
PRINTM(MERROR, "%s: kzalloc map fail.\n", __func__);
|
||||||
|
free_cpumask_var(mask);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
for_each_cpu_and (cpu, mask, cpu_online_mask) {
|
||||||
|
PRINTM(MCMND, "map->cpus[%d]=%d\n", i, cpu);
|
||||||
|
map->cpus[i++] = cpu;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i) {
|
||||||
|
map->len = i;
|
||||||
|
PRINTM(MCMND, "map->len=%d\n", map->len);
|
||||||
|
} else {
|
||||||
|
kfree(map);
|
||||||
|
map = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
mutex_lock(&local_rps_map_mutex);
|
||||||
|
old_map = rcu_dereference_protected(
|
||||||
|
queue->rps_map, mutex_is_locked(&local_rps_map_mutex));
|
||||||
|
rcu_assign_pointer(queue->rps_map, map);
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0)
|
||||||
|
if (map)
|
||||||
|
static_branch_inc(&rps_needed);
|
||||||
|
if (old_map)
|
||||||
|
static_branch_dec(&rps_needed);
|
||||||
|
#else
|
||||||
|
if (map)
|
||||||
|
static_key_slow_inc(&rps_needed);
|
||||||
|
if (old_map)
|
||||||
|
static_key_slow_dec(&rps_needed);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
mutex_unlock(&local_rps_map_mutex);
|
||||||
|
|
||||||
|
if (old_map)
|
||||||
|
kfree_rcu(old_map, rcu);
|
||||||
|
|
||||||
|
PRINTM(MMSG, "%s on %s: buf=%s(%u) (%d i=%d)\n", __func__,
|
||||||
|
queue->dev->name, buf, (t_u32)len, nr_cpumask_bits, i);
|
||||||
|
free_cpumask_var(mask);
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add interfaces DPC
|
* @brief Add interfaces DPC
|
||||||
*
|
*
|
||||||
|
@ -2649,7 +2718,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_add_card_dpc(moal_handle *handle)
|
static mlan_status woal_add_card_dpc(moal_handle *handle)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
int i;
|
int i;
|
||||||
|
@ -2751,6 +2820,25 @@ mlan_status woal_add_card_dpc(moal_handle *handle)
|
||||||
woal_set_uap_operation_ctrl(handle);
|
woal_set_uap_operation_ctrl(handle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (moal_extflg_isset(handle, EXT_RPS)) {
|
||||||
|
moal_private *priv_rps =
|
||||||
|
woal_get_priv_bss_type(handle, MLAN_BSS_TYPE_STA);
|
||||||
|
if (priv_rps) {
|
||||||
|
char *rps_buf = "f";
|
||||||
|
PRINTM(MCMND,
|
||||||
|
"num_rx_queues=%u real_num_rx_queues=%u\n",
|
||||||
|
priv_rps->netdev->num_rx_queues,
|
||||||
|
priv_rps->netdev->real_num_rx_queues);
|
||||||
|
for (i = 0;
|
||||||
|
i < (int)MIN(priv_rps->netdev->num_rx_queues,
|
||||||
|
priv_rps->netdev->real_num_rx_queues);
|
||||||
|
i++) {
|
||||||
|
woal_set_rps_map(&(priv_rps->netdev->_rx[i]),
|
||||||
|
rps_buf, strlen(rps_buf));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MFG_CMD_SUPPORT
|
#ifdef MFG_CMD_SUPPORT
|
||||||
done:
|
done:
|
||||||
#endif
|
#endif
|
||||||
|
@ -3730,10 +3818,13 @@ moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_index,
|
||||||
|
|
||||||
INIT_LIST_HEAD(&priv->tcp_sess_queue);
|
INIT_LIST_HEAD(&priv->tcp_sess_queue);
|
||||||
spin_lock_init(&priv->tcp_sess_lock);
|
spin_lock_init(&priv->tcp_sess_lock);
|
||||||
|
#ifdef STA_SUPPORT
|
||||||
|
INIT_LIST_HEAD(&priv->tdls_list);
|
||||||
|
spin_lock_init(&priv->tdls_lock);
|
||||||
|
#endif
|
||||||
|
|
||||||
INIT_LIST_HEAD(&priv->tx_stat_queue);
|
INIT_LIST_HEAD(&priv->tx_stat_queue);
|
||||||
spin_lock_init(&priv->tx_stat_lock);
|
spin_lock_init(&priv->tx_stat_lock);
|
||||||
skb_queue_head_init(&priv->tx_q);
|
|
||||||
|
|
||||||
#ifdef STA_CFG80211
|
#ifdef STA_CFG80211
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
|
@ -3994,6 +4085,11 @@ void woal_remove_interface(moal_handle *handle, t_u8 bss_index)
|
||||||
|
|
||||||
woal_flush_tx_stat_queue(priv);
|
woal_flush_tx_stat_queue(priv);
|
||||||
|
|
||||||
|
#ifdef STA_CFG80211
|
||||||
|
if (priv->bss_type == MLAN_BSS_TYPE_STA)
|
||||||
|
woal_flush_tdls_list(priv);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef STA_CFG80211
|
#ifdef STA_CFG80211
|
||||||
if (priv->bss_type == MLAN_BSS_TYPE_STA &&
|
if (priv->bss_type == MLAN_BSS_TYPE_STA &&
|
||||||
IS_STA_CFG80211(handle->params.cfg80211_wext)) {
|
IS_STA_CFG80211(handle->params.cfg80211_wext)) {
|
||||||
|
@ -4152,10 +4248,14 @@ mlan_status woal_set_user_antcfg(moal_handle *handle, t_u8 wait_option)
|
||||||
|
|
||||||
if (handle->feature_control & FEATURE_CTRL_STREAM_2X2) {
|
if (handle->feature_control & FEATURE_CTRL_STREAM_2X2) {
|
||||||
if (IS_CARD9098(handle->card_type) ||
|
if (IS_CARD9098(handle->card_type) ||
|
||||||
IS_CARD9097(handle->card_type))
|
IS_CARD9097(handle->card_type)) {
|
||||||
radio->param.ant_cfg.tx_antenna =
|
radio->param.ant_cfg.tx_antenna =
|
||||||
radio->param.ant_cfg.rx_antenna = antcfg;
|
radio->param.ant_cfg.rx_antenna = antcfg;
|
||||||
else {
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
|
woal_cfg80211_notify_antcfg(priv, priv->phandle->wiphy,
|
||||||
|
radio);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
radio->param.ant_cfg.tx_antenna =
|
radio->param.ant_cfg.tx_antenna =
|
||||||
(antcfg & 0x0030) >> 4;
|
(antcfg & 0x0030) >> 4;
|
||||||
radio->param.ant_cfg.rx_antenna = antcfg & 0x0003;
|
radio->param.ant_cfg.rx_antenna = antcfg & 0x0003;
|
||||||
|
@ -4289,7 +4389,7 @@ int woal_hexval(char chr)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_flush_evt_queue(moal_handle *handle)
|
static void woal_flush_evt_queue(moal_handle *handle)
|
||||||
{
|
{
|
||||||
struct woal_event *evt = NULL, *tmp_node;
|
struct woal_event *evt = NULL, *tmp_node;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -4356,10 +4456,13 @@ int woal_open(struct net_device *dev)
|
||||||
{
|
{
|
||||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 0, 0)
|
||||||
|
struct usb_device *udev =
|
||||||
|
((struct usb_card_rec *)(priv->phandle->card))->udev;
|
||||||
|
#else
|
||||||
struct usb_interface *intf =
|
struct usb_interface *intf =
|
||||||
((struct usb_card_rec *)priv->phandle->card)->intf;
|
((struct usb_card_rec *)priv->phandle->card)->intf;
|
||||||
#endif /* < 2.6.34 */
|
#endif /* >= 5.0.0 */
|
||||||
#endif /* USB_SUSPEND_RESUME */
|
#endif /* USB_SUSPEND_RESUME */
|
||||||
t_u8 carrier_on = MFALSE;
|
t_u8 carrier_on = MFALSE;
|
||||||
|
|
||||||
|
@ -4373,21 +4476,19 @@ int woal_open(struct net_device *dev)
|
||||||
}
|
}
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
if (IS_USB(priv->phandle->card_type)) {
|
if (IS_USB(priv->phandle->card_type)) {
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
|
/* Error enabling PM on interface */
|
||||||
intf->pm_usage_cnt = 1;
|
if (usb_autopm_get_interface(intf)) {
|
||||||
|
LEAVE();
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
atomic_set(&intf->pm_usage_cnt, 1);
|
atomic_set(&intf->pm_usage_cnt, 1);
|
||||||
#endif /* < 2.6.32 */
|
|
||||||
usb_autopm_put_interface(intf);
|
|
||||||
#else
|
|
||||||
struct usb_device *udev =
|
|
||||||
((struct usb_card_rec *)(priv->phandle->card))->udev;
|
|
||||||
usb_lock_device(udev);
|
|
||||||
atomic_set(&udev->dev.power.usage_count, 1);
|
|
||||||
usb_enable_autosuspend(udev);
|
|
||||||
usb_unlock_device(udev);
|
|
||||||
#endif /* < 2.6.34 */
|
#endif /* < 2.6.34 */
|
||||||
|
#else
|
||||||
|
atomic_set(&udev->dev.power.usage_count, 1);
|
||||||
|
#endif /* 5.0. 0 */
|
||||||
}
|
}
|
||||||
#endif /* USB_SUSPEND_RESUME */
|
#endif /* USB_SUSPEND_RESUME */
|
||||||
|
|
||||||
|
@ -4458,10 +4559,13 @@ int woal_close(struct net_device *dev)
|
||||||
{
|
{
|
||||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 0, 0)
|
||||||
|
struct usb_device *udev =
|
||||||
|
((struct usb_card_rec *)(priv->phandle->card))->udev;
|
||||||
|
#else
|
||||||
struct usb_interface *intf =
|
struct usb_interface *intf =
|
||||||
((struct usb_card_rec *)priv->phandle->card)->intf;
|
((struct usb_card_rec *)priv->phandle->card)->intf;
|
||||||
#endif /* < 2.6.34 */
|
#endif /* < 5.0.0 */
|
||||||
#endif /* USB_SUSPEND_RESUME */
|
#endif /* USB_SUSPEND_RESUME */
|
||||||
#ifdef STA_CFG80211
|
#ifdef STA_CFG80211
|
||||||
int cfg80211_wext = priv->phandle->params.cfg80211_wext;
|
int cfg80211_wext = priv->phandle->params.cfg80211_wext;
|
||||||
|
@ -4509,21 +4613,15 @@ int woal_close(struct net_device *dev)
|
||||||
MODULE_PUT;
|
MODULE_PUT;
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
if (IS_USB(priv->phandle->card_type)) {
|
if (IS_USB(priv->phandle->card_type)) {
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
|
usb_autopm_put_interface(intf);
|
||||||
intf->pm_usage_cnt = 0;
|
|
||||||
#else
|
#else
|
||||||
atomic_set(&intf->pm_usage_cnt, 0);
|
atomic_set(&intf->pm_usage_cnt, 0);
|
||||||
#endif /* < 2.6.32 */
|
|
||||||
usb_autopm_get_interface(intf);
|
|
||||||
#else
|
|
||||||
struct usb_device *udev =
|
|
||||||
((struct usb_card_rec *)(priv->phandle->card))->udev;
|
|
||||||
usb_lock_device(udev);
|
|
||||||
atomic_set(&udev->dev.power.usage_count, 0);
|
|
||||||
usb_disable_autosuspend(udev);
|
|
||||||
usb_unlock_device(udev);
|
|
||||||
#endif /* < 2.6.34 */
|
#endif /* < 2.6.34 */
|
||||||
|
#else
|
||||||
|
atomic_set(&udev->dev.power.usage_count, 0);
|
||||||
|
#endif /* < 5.0.0 */
|
||||||
}
|
}
|
||||||
#endif /* USB_SUSPEND_RESUME */
|
#endif /* USB_SUSPEND_RESUME */
|
||||||
|
|
||||||
|
@ -4802,15 +4900,8 @@ void woal_mlan_debug_info(moal_private *priv)
|
||||||
PRINTM(MERROR, "eventbd_rdptr=0x%x event_wrptr=0x%x\n",
|
PRINTM(MERROR, "eventbd_rdptr=0x%x event_wrptr=0x%x\n",
|
||||||
info->eventbd_rdptr, info->eventbd_wrptr);
|
info->eventbd_rdptr, info->eventbd_wrptr);
|
||||||
PRINTM(MERROR, "last_wr_index:%d\n",
|
PRINTM(MERROR, "last_wr_index:%d\n",
|
||||||
info->txbd_wrptr & (MLAN_MAX_TXRX_BD - 1));
|
info->txbd_wrptr & (info->txrx_bd_size - 1));
|
||||||
PRINTM(MERROR, "Tx pkt size:\n");
|
PRINTM(MERROR, "TxRx BD size:%d\n", info->txrx_bd_size);
|
||||||
for (s = str, i = 0; i < MLAN_MAX_TXRX_BD; i++) {
|
|
||||||
s += sprintf(s, "%d ", info->last_tx_pkt_size[i]);
|
|
||||||
if (((i + 1) % 16) == 0) {
|
|
||||||
PRINTM(MERROR, "%s\n", str);
|
|
||||||
s = str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
PRINTM(MERROR, "num_event_deauth = %d\n", info->num_event_deauth);
|
PRINTM(MERROR, "num_event_deauth = %d\n", info->num_event_deauth);
|
||||||
|
@ -4832,6 +4923,7 @@ void woal_mlan_debug_info(moal_private *priv)
|
||||||
|
|
||||||
PRINTM(MERROR, "data_sent=%d cmd_sent=%d\n", info->data_sent,
|
PRINTM(MERROR, "data_sent=%d cmd_sent=%d\n", info->data_sent,
|
||||||
info->cmd_sent);
|
info->cmd_sent);
|
||||||
|
PRINTM(MERROR, "data_sent_cnt=%u\n", info->data_sent_cnt);
|
||||||
|
|
||||||
PRINTM(MERROR, "ps_mode=%d ps_state=%d\n", info->ps_mode,
|
PRINTM(MERROR, "ps_mode=%d ps_state=%d\n", info->ps_mode,
|
||||||
info->ps_state);
|
info->ps_state);
|
||||||
|
@ -4845,7 +4937,7 @@ void woal_mlan_debug_info(moal_private *priv)
|
||||||
PRINTM(MERROR, "tx_lock_flag = %d\n", info->tx_lock_flag);
|
PRINTM(MERROR, "tx_lock_flag = %d\n", info->tx_lock_flag);
|
||||||
PRINTM(MERROR, "port_open = %d\n", info->port_open);
|
PRINTM(MERROR, "port_open = %d\n", info->port_open);
|
||||||
PRINTM(MERROR, "scan_processing = %d\n", info->scan_processing);
|
PRINTM(MERROR, "scan_processing = %d\n", info->scan_processing);
|
||||||
for (i = 0; i < info->ralist_num; i++) {
|
for (i = 0; i < (int)info->ralist_num; i++) {
|
||||||
PRINTM(MERROR,
|
PRINTM(MERROR,
|
||||||
"ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n",
|
"ralist ra: %02x:%02x:%02x:%02x:%02x:%02x tid=%d pkts=%d pause=%d\n",
|
||||||
info->ralist[i].ra[0], info->ralist[i].ra[1],
|
info->ralist[i].ra[0], info->ralist[i].ra[1],
|
||||||
|
@ -4876,7 +4968,7 @@ void woal_mlan_debug_info(moal_private *priv)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_ioctl_timeout(moal_handle *handle)
|
static void woal_ioctl_timeout(moal_handle *handle)
|
||||||
{
|
{
|
||||||
moal_private *priv = NULL;
|
moal_private *priv = NULL;
|
||||||
|
|
||||||
|
@ -5117,6 +5209,76 @@ void woal_remove_tx_info(moal_private *priv, t_u8 tx_seq_num)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef STA_CFG80211
|
||||||
|
/**
|
||||||
|
* @brief This function flush tcp session queue
|
||||||
|
*
|
||||||
|
* @param priv A pointer to moal_private structure
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
void woal_flush_tdls_list(moal_private *priv)
|
||||||
|
{
|
||||||
|
struct tdls_peer *peer = NULL, *tmp_node;
|
||||||
|
unsigned long flags;
|
||||||
|
spin_lock_irqsave(&priv->tdls_lock, flags);
|
||||||
|
list_for_each_entry_safe (peer, tmp_node, &priv->tdls_list, link) {
|
||||||
|
list_del(&peer->link);
|
||||||
|
kfree(peer);
|
||||||
|
}
|
||||||
|
INIT_LIST_HEAD(&priv->tdls_list);
|
||||||
|
spin_unlock_irqrestore(&priv->tdls_lock, flags);
|
||||||
|
priv->tdls_check_tx = MFALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
|
/**
|
||||||
|
* @brief check the tx packet for tdls auto set up
|
||||||
|
*
|
||||||
|
* @param priv A pointer to moal_private structure
|
||||||
|
* @param skb A pointer to skb buffer.
|
||||||
|
*
|
||||||
|
* @return N/A
|
||||||
|
*/
|
||||||
|
static void woal_tdls_check_tx(moal_private *priv, struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
struct tdls_peer *peer = NULL;
|
||||||
|
unsigned long flags;
|
||||||
|
t_u8 ra[MLAN_MAC_ADDR_LENGTH];
|
||||||
|
ENTER();
|
||||||
|
moal_memcpy_ext(priv->phandle, ra, skb->data, MLAN_MAC_ADDR_LENGTH,
|
||||||
|
sizeof(ra));
|
||||||
|
spin_lock_irqsave(&priv->tdls_lock, flags);
|
||||||
|
list_for_each_entry (peer, &priv->tdls_list, link) {
|
||||||
|
if (!memcmp(peer->peer_addr, ra, ETH_ALEN)) {
|
||||||
|
if (peer->rssi &&
|
||||||
|
(peer->rssi <= TDLS_RSSI_HIGH_THRESHOLD)) {
|
||||||
|
if ((peer->link_status == TDLS_NOT_SETUP) &&
|
||||||
|
(peer->num_failure <
|
||||||
|
TDLS_MAX_FAILURE_COUNT)) {
|
||||||
|
peer->link_status =
|
||||||
|
TDLS_SETUP_INPROGRESS;
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"Wlan: Set up TDLS link,peer=" MACSTR
|
||||||
|
" rssi=%d\n",
|
||||||
|
MAC2STR(peer->peer_addr),
|
||||||
|
-peer->rssi);
|
||||||
|
cfg80211_tdls_oper_request(
|
||||||
|
priv->netdev, peer->peer_addr,
|
||||||
|
NL80211_TDLS_SETUP, 0,
|
||||||
|
GFP_ATOMIC);
|
||||||
|
priv->tdls_check_tx = MFALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spin_unlock_irqrestore(&priv->tdls_lock, flags);
|
||||||
|
LEAVE();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function flush tcp session queue
|
* @brief This function flush tcp session queue
|
||||||
*
|
*
|
||||||
|
@ -5185,7 +5347,7 @@ static inline struct tcp_sess *woal_get_tcp_sess(moal_private *priv,
|
||||||
* @param context A pointer to context
|
* @param context A pointer to context
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_tcp_ack_timer_func(void *context)
|
static void woal_tcp_ack_timer_func(void *context)
|
||||||
{
|
{
|
||||||
struct tcp_sess *tcp_session = (struct tcp_sess *)context;
|
struct tcp_sess *tcp_session = (struct tcp_sess *)context;
|
||||||
moal_private *priv = (moal_private *)tcp_session->priv;
|
moal_private *priv = (moal_private *)tcp_session->priv;
|
||||||
|
@ -5217,6 +5379,8 @@ void woal_tcp_ack_timer_func(void *context)
|
||||||
struct netdev_queue *txq = netdev_get_tx_queue(
|
struct netdev_queue *txq = netdev_get_tx_queue(
|
||||||
priv->netdev, index);
|
priv->netdev, index);
|
||||||
netif_tx_stop_queue(txq);
|
netif_tx_stop_queue(txq);
|
||||||
|
moal_tp_accounting_rx_param(
|
||||||
|
(t_void *)priv->phandle, 8, 0);
|
||||||
PRINTM(MINFO, "Stop Kernel Queue : %d\n",
|
PRINTM(MINFO, "Stop Kernel Queue : %d\n",
|
||||||
index);
|
index);
|
||||||
}
|
}
|
||||||
|
@ -5252,7 +5416,7 @@ void woal_tcp_ack_timer_func(void *context)
|
||||||
* @param tcp_session A pointer to tcp_session
|
* @param tcp_session A pointer to tcp_session
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_send_tcp_ack(moal_private *priv, struct tcp_sess *tcp_session)
|
static void woal_send_tcp_ack(moal_private *priv, struct tcp_sess *tcp_session)
|
||||||
{
|
{
|
||||||
mlan_status status;
|
mlan_status status;
|
||||||
struct sk_buff *skb = (struct sk_buff *)tcp_session->ack_skb;
|
struct sk_buff *skb = (struct sk_buff *)tcp_session->ack_skb;
|
||||||
|
@ -5279,6 +5443,8 @@ void woal_send_tcp_ack(moal_private *priv, struct tcp_sess *tcp_session)
|
||||||
struct netdev_queue *txq =
|
struct netdev_queue *txq =
|
||||||
netdev_get_tx_queue(priv->netdev, index);
|
netdev_get_tx_queue(priv->netdev, index);
|
||||||
netif_tx_stop_queue(txq);
|
netif_tx_stop_queue(txq);
|
||||||
|
moal_tp_accounting_rx_param((t_void *)priv->phandle, 8,
|
||||||
|
0);
|
||||||
PRINTM(MINFO, "Stop Kernel Queue : %d\n", index);
|
PRINTM(MINFO, "Stop Kernel Queue : %d\n", index);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -5309,7 +5475,7 @@ void woal_send_tcp_ack(moal_private *priv, struct tcp_sess *tcp_session)
|
||||||
*
|
*
|
||||||
* @return 1, if it's dropped; 0, if not dropped
|
* @return 1, if it's dropped; 0, if not dropped
|
||||||
*/
|
*/
|
||||||
int woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf)
|
static int woal_process_tcp_ack(moal_private *priv, mlan_buffer *pmbuf)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -5432,7 +5598,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return 0 --success
|
* @return 0 --success
|
||||||
*/
|
*/
|
||||||
int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
static int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
mlan_buffer *pmbuf = NULL;
|
mlan_buffer *pmbuf = NULL;
|
||||||
mlan_status status;
|
mlan_status status;
|
||||||
|
@ -5452,7 +5618,13 @@ int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
||||||
priv->stats.tx_dropped++;
|
priv->stats.tx_dropped++;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (skb->cloned || (skb_headroom(skb) <
|
if ((skb->cloned &&
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
|
||||||
|
(atomic_read(&skb->users.refs) > 1))
|
||||||
|
#else
|
||||||
|
(atomic_read(&skb->users) > 1))
|
||||||
|
#endif
|
||||||
|
|| (skb_headroom(skb) <
|
||||||
(MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) +
|
(MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) +
|
||||||
priv->extra_tx_head_len))) {
|
priv->extra_tx_head_len))) {
|
||||||
PRINTM(MWARN,
|
PRINTM(MWARN,
|
||||||
|
@ -5462,6 +5634,7 @@ int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
||||||
new_skb = skb_realloc_headroom(
|
new_skb = skb_realloc_headroom(
|
||||||
skb, MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) +
|
skb, MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) +
|
||||||
priv->extra_tx_head_len);
|
priv->extra_tx_head_len);
|
||||||
|
moal_tp_accounting_rx_param((t_void *)priv->phandle, 7, 0);
|
||||||
if (unlikely(!new_skb)) {
|
if (unlikely(!new_skb)) {
|
||||||
PRINTM(MERROR, "Tx: Cannot allocate skb\n");
|
PRINTM(MERROR, "Tx: Cannot allocate skb\n");
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
|
@ -5482,6 +5655,12 @@ int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
#ifdef STA_CFG80211
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
|
if (priv->enable_auto_tdls && priv->tdls_check_tx)
|
||||||
|
woal_tdls_check_tx(priv, skb);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
index = skb_get_queue_mapping(skb);
|
index = skb_get_queue_mapping(skb);
|
||||||
#endif
|
#endif
|
||||||
|
@ -5506,6 +5685,8 @@ int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
||||||
struct netdev_queue *txq =
|
struct netdev_queue *txq =
|
||||||
netdev_get_tx_queue(priv->netdev, index);
|
netdev_get_tx_queue(priv->netdev, index);
|
||||||
netif_tx_stop_queue(txq);
|
netif_tx_stop_queue(txq);
|
||||||
|
moal_tp_accounting_rx_param((t_void *)priv->phandle, 8,
|
||||||
|
0);
|
||||||
PRINTM(MINFO, "Stop Kernel Queue : %d\n", index);
|
PRINTM(MINFO, "Stop Kernel Queue : %d\n", index);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -5840,6 +6021,7 @@ void woal_init_priv(moal_private *priv, t_u8 wait_option)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
skb_queue_head_init(&priv->tx_q);
|
||||||
memset(&priv->tx_protocols, 0, sizeof(dot11_protocol));
|
memset(&priv->tx_protocols, 0, sizeof(dot11_protocol));
|
||||||
memset(&priv->rx_protocols, 0, sizeof(dot11_protocol));
|
memset(&priv->rx_protocols, 0, sizeof(dot11_protocol));
|
||||||
priv->media_connected = MFALSE;
|
priv->media_connected = MFALSE;
|
||||||
|
@ -5861,6 +6043,9 @@ void woal_init_priv(moal_private *priv, t_u8 wait_option)
|
||||||
|
|
||||||
priv->enable_tcp_ack_enh = MTRUE;
|
priv->enable_tcp_ack_enh = MTRUE;
|
||||||
|
|
||||||
|
priv->enable_auto_tdls = MFALSE;
|
||||||
|
priv->tdls_check_tx = MFALSE;
|
||||||
|
|
||||||
priv->gtk_data_ready = MFALSE;
|
priv->gtk_data_ready = MFALSE;
|
||||||
memset(&priv->gtk_rekey_data, 0, sizeof(mlan_ds_misc_gtk_rekey_data));
|
memset(&priv->gtk_rekey_data, 0, sizeof(mlan_ds_misc_gtk_rekey_data));
|
||||||
|
|
||||||
|
@ -6877,14 +7062,17 @@ t_void woal_send_disconnect_to_system(moal_private *priv,
|
||||||
mlan_ds_misc_gtk_rekey_data zero_gtk;
|
mlan_ds_misc_gtk_rekey_data zero_gtk;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef STA_CFG80211
|
||||||
t_u16 reason_code = 0;
|
t_u16 reason_code = 0;
|
||||||
|
#endif
|
||||||
ENTER();
|
ENTER();
|
||||||
priv->media_connected = MFALSE;
|
priv->media_connected = MFALSE;
|
||||||
|
#ifdef STA_CFG80211
|
||||||
if (!disconnect_reason)
|
if (!disconnect_reason)
|
||||||
reason_code = MLAN_REASON_DEAUTH_LEAVING;
|
reason_code = MLAN_REASON_DEAUTH_LEAVING;
|
||||||
else
|
else
|
||||||
reason_code = disconnect_reason;
|
reason_code = disconnect_reason;
|
||||||
|
#endif
|
||||||
woal_stop_queue(priv->netdev);
|
woal_stop_queue(priv->netdev);
|
||||||
if (netif_carrier_ok(priv->netdev))
|
if (netif_carrier_ok(priv->netdev))
|
||||||
netif_carrier_off(priv->netdev);
|
netif_carrier_off(priv->netdev);
|
||||||
|
@ -6905,6 +7093,10 @@ t_void woal_send_disconnect_to_system(moal_private *priv,
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef STA_CFG80211
|
||||||
|
if (priv->bss_type == MLAN_BSS_TYPE_STA)
|
||||||
|
woal_flush_tdls_list(priv);
|
||||||
|
#endif
|
||||||
#ifdef STA_CFG80211
|
#ifdef STA_CFG80211
|
||||||
if (priv->bss_type == MLAN_BSS_TYPE_STA &&
|
if (priv->bss_type == MLAN_BSS_TYPE_STA &&
|
||||||
IS_STA_CFG80211(cfg80211_wext)) {
|
IS_STA_CFG80211(cfg80211_wext)) {
|
||||||
|
@ -6971,7 +7163,7 @@ t_void woal_send_disconnect_to_system(moal_private *priv,
|
||||||
memset(event_buf, 0, sizeof(event_buf));
|
memset(event_buf, 0, sizeof(event_buf));
|
||||||
custom_len = strlen(CUS_EVT_AP_CONNECTED);
|
custom_len = strlen(CUS_EVT_AP_CONNECTED);
|
||||||
strncpy(event_buf, CUS_EVT_AP_CONNECTED,
|
strncpy(event_buf, CUS_EVT_AP_CONNECTED,
|
||||||
MIN((sizeof(event_buf) - 1), custom_len));
|
MIN((int)(sizeof(event_buf) - 1), custom_len));
|
||||||
woal_broadcast_event(priv, event_buf, custom_len + ETH_ALEN);
|
woal_broadcast_event(priv, event_buf, custom_len + ETH_ALEN);
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
|
@ -7021,10 +7213,7 @@ save_ssudump:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DBG_HEXDUMP(MEVT_D, "SSU addr", pmevent->event_buf, 8);
|
DBG_HEXDUMP(MEVT_D, "SSU addr", pmevent->event_buf, 8);
|
||||||
moal_memcpy_ext(phandle,
|
moal_memcpy_ext(phandle, &tmpbuf, pmevent->event_buf, sizeof(t_ptr),
|
||||||
&tmpbuf,
|
|
||||||
pmevent->event_buf,
|
|
||||||
sizeof(t_ptr),
|
|
||||||
sizeof(t_ptr));
|
sizeof(t_ptr));
|
||||||
PRINTM(MEVENT, "woal_store_ssu_dump: tmpbuf %p\n", tmpbuf);
|
PRINTM(MEVENT, "woal_store_ssu_dump: tmpbuf %p\n", tmpbuf);
|
||||||
for (i = 0; i < pmevent->event_len / 4; i++) {
|
for (i = 0; i < pmevent->event_len / 4; i++) {
|
||||||
|
@ -7035,7 +7224,8 @@ save_ssudump:
|
||||||
snprintf(dw_string, sizeof(dw_string), "%08x ",
|
snprintf(dw_string, sizeof(dw_string), "%08x ",
|
||||||
*tmpbuf);
|
*tmpbuf);
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
vfs_write(pfile_ssudump, dw_string, 9, &pos);
|
vfs_write(pfile_ssudump, (const char __user *)dw_string, 9,
|
||||||
|
&pos);
|
||||||
#else
|
#else
|
||||||
kernel_write(pfile_ssudump, dw_string, 9, &pos);
|
kernel_write(pfile_ssudump, dw_string, 9, &pos);
|
||||||
#endif
|
#endif
|
||||||
|
@ -7123,16 +7313,20 @@ t_void woal_store_firmware_dump(moal_handle *phandle, mlan_event *pmevent)
|
||||||
}
|
}
|
||||||
phandle->fw_dump_len += pmevent->event_len - OFFSET_SEQNUM;
|
phandle->fw_dump_len += pmevent->event_len - OFFSET_SEQNUM;
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
vfs_write(pfile_fwdump, pmevent->event_buf + OFFSET_SEQNUM,
|
vfs_write(pfile_fwdump,
|
||||||
|
(const char __user *)pmevent->event_buf + OFFSET_SEQNUM,
|
||||||
pmevent->event_len - OFFSET_SEQNUM, &pos);
|
pmevent->event_len - OFFSET_SEQNUM, &pos);
|
||||||
#else
|
#else
|
||||||
kernel_write(pfile_fwdump, pmevent->event_buf + OFFSET_SEQNUM,
|
kernel_write(pfile_fwdump, pmevent->event_buf + OFFSET_SEQNUM,
|
||||||
pmevent->event_len - OFFSET_SEQNUM, &pos);
|
pmevent->event_len - OFFSET_SEQNUM, &pos);
|
||||||
#endif
|
#endif
|
||||||
filp_close(pfile_fwdump, NULL);
|
filp_close(pfile_fwdump, NULL);
|
||||||
if (type == DUMP_TYPE_ENDE)
|
if (type == DUMP_TYPE_ENDE) {
|
||||||
PRINTM(MMSG, "==== FW DUMP END: %ld bytes ====\n",
|
PRINTM(MMSG, "==== FW DUMP END: %ld bytes ====\n",
|
||||||
(long int)phandle->fw_dump_len);
|
(long int)phandle->fw_dump_len);
|
||||||
|
phandle->fw_dump = MFALSE;
|
||||||
|
mlan_pm_wakeup_card(phandle->pmlan_adapter, MFALSE);
|
||||||
|
}
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7164,7 +7358,7 @@ static int woal_save_hex_dump(int rowsize, const void *buf, size_t len,
|
||||||
if (rowsize != ROW_SIZE_16 && rowsize != ROW_SIZE_32)
|
if (rowsize != ROW_SIZE_16 && rowsize != ROW_SIZE_32)
|
||||||
rowsize = ROW_SIZE_16;
|
rowsize = ROW_SIZE_16;
|
||||||
|
|
||||||
for (i = 0; i < len; i += rowsize) {
|
for (i = 0; i < (int)len; i += rowsize) {
|
||||||
linelen = min(remaining, rowsize);
|
linelen = min(remaining, rowsize);
|
||||||
remaining -= rowsize;
|
remaining -= rowsize;
|
||||||
|
|
||||||
|
@ -7225,7 +7419,8 @@ static int woal_dump_priv_drv_info(moal_handle *handle, t_u8 *buf)
|
||||||
"on" :
|
"on" :
|
||||||
"off"));
|
"off"));
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
for (i = 0; i < (priv->netdev->num_tx_queues); i++) {
|
for (i = 0; i < (int)(priv->netdev->num_tx_queues);
|
||||||
|
i++) {
|
||||||
ptr += sprintf(
|
ptr += sprintf(
|
||||||
ptr, "tx queue %d: %s\n", i,
|
ptr, "tx queue %d: %s\n", i,
|
||||||
((netif_tx_queue_stopped(
|
((netif_tx_queue_stopped(
|
||||||
|
@ -7447,13 +7642,8 @@ static int woal_dump_mlan_drv_info(moal_private *priv, t_u8 *buf)
|
||||||
ptr += sprintf(ptr, "eventbd_rdptr=0x%x event_wrptr=0x%x\n",
|
ptr += sprintf(ptr, "eventbd_rdptr=0x%x event_wrptr=0x%x\n",
|
||||||
info->eventbd_rdptr, info->eventbd_wrptr);
|
info->eventbd_rdptr, info->eventbd_wrptr);
|
||||||
ptr += sprintf(ptr, "last_wr_index:%d\n",
|
ptr += sprintf(ptr, "last_wr_index:%d\n",
|
||||||
info->txbd_wrptr & (MLAN_MAX_TXRX_BD - 1));
|
info->txbd_wrptr & (info->txrx_bd_size - 1));
|
||||||
ptr += sprintf(ptr, "Tx pkt size:\n");
|
ptr += sprintf(ptr, "TxRx BD size:%d\n", info->txrx_bd_size);
|
||||||
for (i = 0; i < MLAN_MAX_TXRX_BD; i++) {
|
|
||||||
ptr += sprintf(ptr, "%04d ", info->last_tx_pkt_size[i]);
|
|
||||||
if (((i + 1) % 16) == 0)
|
|
||||||
ptr += sprintf(ptr, "\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ptr += sprintf(ptr, "num_event_deauth = %d\n", info->num_event_deauth);
|
ptr += sprintf(ptr, "num_event_deauth = %d\n", info->num_event_deauth);
|
||||||
|
@ -7477,6 +7667,7 @@ static int woal_dump_mlan_drv_info(moal_private *priv, t_u8 *buf)
|
||||||
|
|
||||||
ptr += sprintf(ptr, "data_sent=%d cmd_sent=%d\n", info->data_sent,
|
ptr += sprintf(ptr, "data_sent=%d cmd_sent=%d\n", info->data_sent,
|
||||||
info->cmd_sent);
|
info->cmd_sent);
|
||||||
|
ptr += sprintf(ptr, "data_sent_cnt=%u\n", info->data_sent_cnt);
|
||||||
ptr += sprintf(ptr, "ps_mode=%d ps_state=%d\n", info->ps_mode,
|
ptr += sprintf(ptr, "ps_mode=%d ps_state=%d\n", info->ps_mode,
|
||||||
info->ps_state);
|
info->ps_state);
|
||||||
ptr += sprintf(
|
ptr += sprintf(
|
||||||
|
@ -7578,7 +7769,7 @@ t_void woal_save_host_cmdresp(moal_handle *phandle, mlan_cmdresp_event *pevent)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
fs = get_fs();
|
fs = get_fs();
|
||||||
set_fs(KERNEL_DS);
|
set_fs(KERNEL_DS);
|
||||||
vfs_write(pfile, buf, len, &pos);
|
vfs_write(pfile, (const char __user *)buf, len, &pos);
|
||||||
set_fs(fs);
|
set_fs(fs);
|
||||||
#else
|
#else
|
||||||
kernel_write(pfile, buf, len, &pos);
|
kernel_write(pfile, buf, len, &pos);
|
||||||
|
@ -7819,7 +8010,7 @@ mlan_status woal_save_dump_info_to_file(char *dir_name, char *file_name,
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
fs = get_fs();
|
fs = get_fs();
|
||||||
set_fs(KERNEL_DS);
|
set_fs(KERNEL_DS);
|
||||||
vfs_write(pfile, buf, buf_len, &pos);
|
vfs_write(pfile, (const char __user *)buf, buf_len, &pos);
|
||||||
set_fs(fs);
|
set_fs(fs);
|
||||||
#else
|
#else
|
||||||
kernel_write(pfile, buf, buf_len, &pos);
|
kernel_write(pfile, buf, buf_len, &pos);
|
||||||
|
@ -7903,7 +8094,8 @@ void woal_dump_drv_info(moal_handle *phandle, t_u8 *dir_name)
|
||||||
total_len += len;
|
total_len += len;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
vfs_write(pfile, drv_buf, total_len, &pfile->f_pos);
|
vfs_write(pfile, (const char __user *)drv_buf, total_len,
|
||||||
|
&pfile->f_pos);
|
||||||
#else
|
#else
|
||||||
kernel_write(pfile, drv_buf, total_len, &pfile->f_pos);
|
kernel_write(pfile, drv_buf, total_len, &pfile->f_pos);
|
||||||
#endif
|
#endif
|
||||||
|
@ -8010,7 +8202,7 @@ void woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag)
|
||||||
PRINTM(MERROR, "carrier %s\n",
|
PRINTM(MERROR, "carrier %s\n",
|
||||||
((netif_carrier_ok(priv->netdev)) ? "on" : "off"));
|
((netif_carrier_ok(priv->netdev)) ? "on" : "off"));
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
for (i = 0; i < (priv->netdev->num_tx_queues); i++) {
|
for (i = 0; i < (int)(priv->netdev->num_tx_queues); i++) {
|
||||||
PRINTM(MERROR, "tx queue %d: %s\n", i,
|
PRINTM(MERROR, "tx queue %d: %s\n", i,
|
||||||
((netif_tx_queue_stopped(
|
((netif_tx_queue_stopped(
|
||||||
netdev_get_tx_queue(priv->netdev, i))) ?
|
netdev_get_tx_queue(priv->netdev, i))) ?
|
||||||
|
@ -8038,9 +8230,11 @@ void woal_moal_debug_info(moal_private *priv, moal_handle *handle, u8 flag)
|
||||||
|
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
if (IS_PCIE(phandle->card_type)) {
|
if (IS_PCIE(phandle->card_type)) {
|
||||||
if (phandle->ops.reg_dbg && (drvdbg & (MREG_D | MFW_D)))
|
if (phandle->ops.reg_dbg && (drvdbg & (MREG_D | MFW_D))) {
|
||||||
|
if (!phandle->event_fw_dump)
|
||||||
phandle->ops.reg_dbg(phandle);
|
phandle->ops.reg_dbg(phandle);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDIO
|
#ifdef SDIO
|
||||||
if (IS_SD(phandle->card_type)) {
|
if (IS_SD(phandle->card_type)) {
|
||||||
|
@ -8098,14 +8292,14 @@ mlan_status woal_request_country_power_table(moal_private *priv, char *country)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_FAILURE;
|
return MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
handle = priv->phandle;
|
||||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
if (fw_region)
|
if (handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE)
|
||||||
strncpy(country_name, "rgpower_XX.bin",
|
strncpy(country_name, "rgpower_XX.bin",
|
||||||
strlen("rgpower_XX.bin"));
|
strlen("rgpower_XX.bin"));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
handle = priv->phandle;
|
|
||||||
|
|
||||||
/* Replace XX with ISO 3166-1 alpha-2 country code */
|
/* Replace XX with ISO 3166-1 alpha-2 country code */
|
||||||
strncpy(strstr(country_name, "XX"), country, strlen(country));
|
strncpy(strstr(country_name, "XX"), country, strlen(country));
|
||||||
|
@ -8143,7 +8337,8 @@ mlan_status woal_request_country_power_table(moal_private *priv, char *country)
|
||||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
/* Try download WW rgpowertable */
|
/* Try download WW rgpowertable */
|
||||||
if (fw_region && (ret == MLAN_STATUS_FILE_ERR)) {
|
if ((handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE) &&
|
||||||
|
(ret == MLAN_STATUS_FILE_ERR)) {
|
||||||
strncpy(country_name, "rgpower_WW.bin",
|
strncpy(country_name, "rgpower_WW.bin",
|
||||||
strlen("rgpower_WW.bin"));
|
strlen("rgpower_WW.bin"));
|
||||||
last_slash = strrchr(file_path, '/');
|
last_slash = strrchr(file_path, '/');
|
||||||
|
@ -8178,7 +8373,7 @@ mlan_status woal_request_country_power_table(moal_private *priv, char *country)
|
||||||
*
|
*
|
||||||
* @return packets received
|
* @return packets received
|
||||||
*/
|
*/
|
||||||
int woal_netdev_poll_rx(struct napi_struct *napi, int budget)
|
static int woal_netdev_poll_rx(struct napi_struct *napi, int budget)
|
||||||
{
|
{
|
||||||
moal_handle *handle = container_of(napi, moal_handle, napi_rx);
|
moal_handle *handle = container_of(napi, moal_handle, napi_rx);
|
||||||
t_u8 recv = budget;
|
t_u8 recv = budget;
|
||||||
|
@ -8233,6 +8428,17 @@ t_void woal_evt_work_queue(struct work_struct *work)
|
||||||
&evt->chan_info);
|
&evt->chan_info);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case WOAL_EVENT_RX_MGMT_PKT:
|
||||||
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
|
||||||
|
priv = evt->priv;
|
||||||
|
mutex_lock(&priv->wdev->mtx);
|
||||||
|
cfg80211_rx_mlme_mgmt(priv->netdev, evt->evt.event_buf,
|
||||||
|
evt->evt.event_len);
|
||||||
|
mutex_unlock(&priv->wdev->mtx);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case WOAL_EVENT_BGSCAN_STOP:
|
case WOAL_EVENT_BGSCAN_STOP:
|
||||||
|
@ -8411,6 +8617,8 @@ t_void woal_main_work_queue(struct work_struct *work)
|
||||||
woal_usb_submit_rx_data_urbs(handle);
|
woal_usb_submit_rx_data_urbs(handle);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (atomic_read(&handle->tx_pending) == 1)
|
||||||
|
usleep_range(30, 30);
|
||||||
handle->main_state = MOAL_START_MAIN_PROCESS;
|
handle->main_state = MOAL_START_MAIN_PROCESS;
|
||||||
/* Call MLAN main process */
|
/* Call MLAN main process */
|
||||||
mlan_main_process(handle->pmlan_adapter);
|
mlan_main_process(handle->pmlan_adapter);
|
||||||
|
@ -8681,12 +8889,10 @@ moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops,
|
||||||
goto err_registerdev;
|
goto err_registerdev;
|
||||||
}
|
}
|
||||||
woal_update_firmware_name(handle);
|
woal_update_firmware_name(handle);
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||||
wakeup_source_init(&handle->ws, "mwlan");
|
wakeup_source_init(&handle->ws, "mwlan");
|
||||||
#else
|
#else
|
||||||
wake_lock_init(&handle->wake_lock, WAKE_LOCK_SUSPEND, "mwlan");
|
wake_lock_init(&handle->wake_lock, WAKE_LOCK_SUSPEND, "mwlan");
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Init FW and HW */
|
/* Init FW and HW */
|
||||||
|
@ -8722,12 +8928,10 @@ err_init_fw:
|
||||||
wait_event_interruptible(handle->init_wait_q,
|
wait_event_interruptible(handle->init_wait_q,
|
||||||
handle->init_wait_q_woken);
|
handle->init_wait_q_woken);
|
||||||
}
|
}
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||||
wakeup_source_trash(&handle->ws);
|
wakeup_source_trash(&handle->ws);
|
||||||
#else
|
#else
|
||||||
wake_lock_destroy(&handle->wake_lock);
|
wake_lock_destroy(&handle->wake_lock);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
/* Unregister device */
|
/* Unregister device */
|
||||||
PRINTM(MINFO, "unregister device\n");
|
PRINTM(MINFO, "unregister device\n");
|
||||||
|
@ -8912,12 +9116,10 @@ mlan_status woal_remove_card(void *card)
|
||||||
/* Unregister device */
|
/* Unregister device */
|
||||||
PRINTM(MINFO, "unregister device\n");
|
PRINTM(MINFO, "unregister device\n");
|
||||||
handle->ops.unregister_dev(handle);
|
handle->ops.unregister_dev(handle);
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||||
wakeup_source_trash(&handle->ws);
|
wakeup_source_trash(&handle->ws);
|
||||||
#else
|
#else
|
||||||
wake_lock_destroy(&handle->wake_lock);
|
wake_lock_destroy(&handle->wake_lock);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
/* Free adapter structure */
|
/* Free adapter structure */
|
||||||
PRINTM(MINFO, "Free Adapter\n");
|
PRINTM(MINFO, "Free Adapter\n");
|
||||||
|
@ -9061,7 +9263,8 @@ static int woal_reset_and_reload_fw(moal_handle *handle)
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
if (!IS_SD9098(handle->card_type) && !IS_SD9097(handle->card_type)) {
|
if (!IS_SD9098(handle->card_type) && !IS_SD9097(handle->card_type) &&
|
||||||
|
!IS_SD9177(handle->card_type)) {
|
||||||
mlan_pm_wakeup_card(handle->pmlan_adapter, MTRUE);
|
mlan_pm_wakeup_card(handle->pmlan_adapter, MTRUE);
|
||||||
/** wait SOC fully wake up */
|
/** wait SOC fully wake up */
|
||||||
for (tries = 0; tries < FW_POLL_TRIES; ++tries) {
|
for (tries = 0; tries < FW_POLL_TRIES; ++tries) {
|
||||||
|
@ -9084,7 +9287,8 @@ static int woal_reset_and_reload_fw(moal_handle *handle)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
#if defined(SD9098) || defined(SD9097)
|
#if defined(SD9098) || defined(SD9097)
|
||||||
if (IS_SD9098(handle->card_type) || IS_SD9097(handle->card_type))
|
if (IS_SD9098(handle->card_type) || IS_SD9097(handle->card_type) ||
|
||||||
|
IS_SD9177(handle->card_type))
|
||||||
handle->ops.write_reg(handle, 0x00, 0x10);
|
handle->ops.write_reg(handle, 0x00, 0x10);
|
||||||
#endif
|
#endif
|
||||||
/* Poll register around 100 ms */
|
/* Poll register around 100 ms */
|
||||||
|
@ -9102,7 +9306,8 @@ static int woal_reset_and_reload_fw(moal_handle *handle)
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (!IS_SD9098(handle->card_type) && !IS_SD9097(handle->card_type))
|
if (!IS_SD9098(handle->card_type) && !IS_SD9097(handle->card_type) &&
|
||||||
|
!IS_SD9177(handle->card_type))
|
||||||
mlan_pm_wakeup_card(handle->pmlan_adapter, MFALSE);
|
mlan_pm_wakeup_card(handle->pmlan_adapter, MFALSE);
|
||||||
/* Download FW */
|
/* Download FW */
|
||||||
ret = woal_request_fw(handle);
|
ret = woal_request_fw(handle);
|
||||||
|
@ -9140,7 +9345,7 @@ done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void woal_pre_reset(moal_handle *handle)
|
static void woal_pre_reset(moal_handle *handle)
|
||||||
{
|
{
|
||||||
int intf_num;
|
int intf_num;
|
||||||
ENTER();
|
ENTER();
|
||||||
|
@ -9158,7 +9363,7 @@ void woal_pre_reset(moal_handle *handle)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void woal_post_reset(moal_handle *handle)
|
static void woal_post_reset(moal_handle *handle)
|
||||||
{
|
{
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_misc_cfg *misc = NULL;
|
mlan_ds_misc_cfg *misc = NULL;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains wlan driver specific defines etc.
|
* @brief This file contains wlan driver specific defines etc.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -104,14 +104,12 @@ Change log:
|
||||||
|
|
||||||
#include <linux/firmware.h>
|
#include <linux/firmware.h>
|
||||||
|
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||||
#include <linux/pm_wakeup.h>
|
#include <linux/pm_wakeup.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#else
|
#else
|
||||||
#include <linux/wakelock.h>
|
#include <linux/wakelock.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "mlan.h"
|
#include "mlan.h"
|
||||||
#include "moal_shim.h"
|
#include "moal_shim.h"
|
||||||
|
@ -212,13 +210,19 @@ Change log:
|
||||||
#define default_11p_name "ocb%d"
|
#define default_11p_name "ocb%d"
|
||||||
#define mwiphy_name "mwiphy%d"
|
#define mwiphy_name "mwiphy%d"
|
||||||
|
|
||||||
|
/** country txpower mode */
|
||||||
|
#define CNTRY_TXPOWER_MODE 1
|
||||||
|
/** country rgpower mode */
|
||||||
|
#define CNTRY_RGPOWER_MODE 2
|
||||||
|
|
||||||
/** Define BOOLEAN */
|
/** Define BOOLEAN */
|
||||||
typedef t_u8 BOOLEAN;
|
typedef t_u8 BOOLEAN;
|
||||||
|
|
||||||
#define INTF_CARDTYPE "---------%s-MXM"
|
#define INTF_CARDTYPE "----------%s-MM"
|
||||||
|
|
||||||
#define KERN_VERSION "5X"
|
#define KERN_VERSION "5X"
|
||||||
|
|
||||||
|
#define V14 "14"
|
||||||
#define V15 "15"
|
#define V15 "15"
|
||||||
#define V16 "16"
|
#define V16 "16"
|
||||||
#define V17 "17"
|
#define V17 "17"
|
||||||
|
@ -243,6 +247,47 @@ typedef t_u8 BOOLEAN;
|
||||||
/** Driver version */
|
/** Driver version */
|
||||||
extern char driver_version[];
|
extern char driver_version[];
|
||||||
|
|
||||||
|
extern struct semaphore AddRemoveCardSem;
|
||||||
|
extern int wifi_status;
|
||||||
|
extern int max_tx_buf;
|
||||||
|
extern int pcie_int_mode;
|
||||||
|
|
||||||
|
#ifdef STA_SUPPORT
|
||||||
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
|
extern const struct net_device_ops woal_netdev_ops;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef UAP_SUPPORT
|
||||||
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
|
extern const struct net_device_ops woal_uap_netdev_ops;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Global veriable for usb independent reset */
|
||||||
|
extern int fw_reload;
|
||||||
|
|
||||||
|
#ifdef MFG_CMD_SUPPORT
|
||||||
|
/** Mfg mode */
|
||||||
|
extern int mfg_mode;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
|
extern int fw_region;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(USB)
|
||||||
|
extern int skip_fwdnld;
|
||||||
|
#endif
|
||||||
|
#if defined(SDIO) || defined(PCIE)
|
||||||
|
typedef enum {
|
||||||
|
RDWR_STATUS_SUCCESS = 0,
|
||||||
|
RDWR_STATUS_FAILURE = 1,
|
||||||
|
RDWR_STATUS_DONE = 2
|
||||||
|
} rdwr_status;
|
||||||
|
#endif
|
||||||
/** Private structure for MOAL */
|
/** Private structure for MOAL */
|
||||||
typedef struct _moal_private moal_private, *pmoal_private;
|
typedef struct _moal_private moal_private, *pmoal_private;
|
||||||
/** Handle data structure for MOAL */
|
/** Handle data structure for MOAL */
|
||||||
|
@ -636,12 +681,10 @@ out:
|
||||||
/* IOCTL Timeout */
|
/* IOCTL Timeout */
|
||||||
#define MOAL_IOCTL_TIMEOUT (20 * HZ)
|
#define MOAL_IOCTL_TIMEOUT (20 * HZ)
|
||||||
|
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
/** Wake lock timeout in msec */
|
/** Wake lock timeout in msec */
|
||||||
#define WAKE_LOCK_TIMEOUT 3000
|
#define WAKE_LOCK_TIMEOUT 3000
|
||||||
/** Roaming Wake lock timeout in msec */
|
/** Roaming Wake lock timeout in msec */
|
||||||
#define ROAMING_WAKE_LOCK_TIMEOUT 10000
|
#define ROAMING_WAKE_LOCK_TIMEOUT 10000
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Threshold value of number of times the Tx timeout happened */
|
/** Threshold value of number of times the Tx timeout happened */
|
||||||
/* WAR For EDMAC Test */
|
/* WAR For EDMAC Test */
|
||||||
|
@ -649,6 +692,15 @@ out:
|
||||||
/** Custom event : DRIVER HANG */
|
/** Custom event : DRIVER HANG */
|
||||||
#define CUS_EVT_DRIVER_HANG "EVENT=DRIVER_HANG"
|
#define CUS_EVT_DRIVER_HANG "EVENT=DRIVER_HANG"
|
||||||
|
|
||||||
|
/** TDLS connected event */
|
||||||
|
#define CUS_EVT_TDLS_CONNECTED "EVENT=TDLS_CONNECTED"
|
||||||
|
/** TDLS tear down event */
|
||||||
|
#define CUS_EVT_TDLS_TEARDOWN "EVENT=TDLS_TEARDOWN"
|
||||||
|
/** wmm info */
|
||||||
|
#define WMM_TYPE_INFO 0
|
||||||
|
/** wmm parameter */
|
||||||
|
#define WMM_TYPE_PARAMETER 1
|
||||||
|
|
||||||
/** AP connected event */
|
/** AP connected event */
|
||||||
#define CUS_EVT_AP_CONNECTED "EVENT=AP_CONNECTED"
|
#define CUS_EVT_AP_CONNECTED "EVENT=AP_CONNECTED"
|
||||||
|
|
||||||
|
@ -693,6 +745,8 @@ out:
|
||||||
/** Custom event : Deep Sleep awake */
|
/** Custom event : Deep Sleep awake */
|
||||||
#define CUS_EVT_DEEP_SLEEP_AWAKE "EVENT=DS_AWAKE"
|
#define CUS_EVT_DEEP_SLEEP_AWAKE "EVENT=DS_AWAKE"
|
||||||
|
|
||||||
|
#define CUS_EVT_TOD_TOA "EVENT=TOD-TOA"
|
||||||
|
|
||||||
/** Custom event : Host Sleep activated */
|
/** Custom event : Host Sleep activated */
|
||||||
#define CUS_EVT_HS_ACTIVATED "HS_ACTIVATED"
|
#define CUS_EVT_HS_ACTIVATED "HS_ACTIVATED"
|
||||||
/** Custom event : Host Sleep deactivated */
|
/** Custom event : Host Sleep deactivated */
|
||||||
|
@ -776,7 +830,7 @@ typedef enum {
|
||||||
#define LOW_RX_PENDING 80
|
#define LOW_RX_PENDING 80
|
||||||
|
|
||||||
/** MAX Tx Pending count */
|
/** MAX Tx Pending count */
|
||||||
#define MAX_TX_PENDING 400
|
#define MAX_TX_PENDING 800
|
||||||
|
|
||||||
/** LOW Tx Pending count */
|
/** LOW Tx Pending count */
|
||||||
#define LOW_TX_PENDING 380
|
#define LOW_TX_PENDING 380
|
||||||
|
@ -908,6 +962,8 @@ typedef struct _moal_drv_mode {
|
||||||
char *fw_name;
|
char *fw_name;
|
||||||
} moal_drv_mode;
|
} moal_drv_mode;
|
||||||
|
|
||||||
|
extern moal_handle *m_handle[MAX_MLAN_ADAPTER];
|
||||||
|
|
||||||
/** Indicate if handle->info's address */
|
/** Indicate if handle->info's address */
|
||||||
#define INFO_ADDR BIT(0)
|
#define INFO_ADDR BIT(0)
|
||||||
#define IS_INFO_ADDR(attr) (attr & INFO_ADDR)
|
#define IS_INFO_ADDR(attr) (attr & INFO_ADDR)
|
||||||
|
@ -990,6 +1046,7 @@ struct tx_status_info {
|
||||||
/** woal event type */
|
/** woal event type */
|
||||||
enum woal_event_type {
|
enum woal_event_type {
|
||||||
WOAL_EVENT_CHAN_SWITCH,
|
WOAL_EVENT_CHAN_SWITCH,
|
||||||
|
WOAL_EVENT_RX_MGMT_PKT,
|
||||||
WOAL_EVENT_BGSCAN_STOP,
|
WOAL_EVENT_BGSCAN_STOP,
|
||||||
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
#if defined(UAP_CFG80211) || defined(STA_CFG80211)
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||||
|
@ -999,6 +1056,13 @@ enum woal_event_type {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct _woal_evt_buf {
|
||||||
|
/** Event len */
|
||||||
|
t_u16 event_len;
|
||||||
|
/** Event buffer */
|
||||||
|
t_u8 event_buf[1024];
|
||||||
|
} woal_evt_buf;
|
||||||
|
|
||||||
/** woal event */
|
/** woal event */
|
||||||
struct woal_event {
|
struct woal_event {
|
||||||
/*list head */
|
/*list head */
|
||||||
|
@ -1009,6 +1073,7 @@ struct woal_event {
|
||||||
void *priv;
|
void *priv;
|
||||||
union {
|
union {
|
||||||
chan_band_info chan_info;
|
chan_band_info chan_info;
|
||||||
|
woal_evt_buf evt;
|
||||||
mlan_ds_misc_assoc_rsp assoc_resp;
|
mlan_ds_misc_assoc_rsp assoc_resp;
|
||||||
int reason_code;
|
int reason_code;
|
||||||
};
|
};
|
||||||
|
@ -1059,11 +1124,51 @@ struct pmksa_entry {
|
||||||
u8 pmkid[PMKID_LEN];
|
u8 pmkid[PMKID_LEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** default rssi low threshold */
|
||||||
|
#define TDLS_RSSI_LOW_THRESHOLD 55
|
||||||
|
/** default rssi high threshold */
|
||||||
|
#define TDLS_RSSI_HIGH_THRESHOLD 50
|
||||||
|
/** TDLS idle time */
|
||||||
|
#define TDLS_IDLE_TIME (10 * HZ)
|
||||||
|
/** TDLS max failure count */
|
||||||
|
#define TDLS_MAX_FAILURE_COUNT 4
|
||||||
|
/** TDLS tear down reason */
|
||||||
|
#define TDLS_TEARN_DOWN_REASON_UNSPECIFIC 26
|
||||||
|
|
||||||
|
/** TDLS status */
|
||||||
|
typedef enum _tdlsStatus_e {
|
||||||
|
TDLS_NOT_SETUP = 0,
|
||||||
|
TDLS_SETUP_INPROGRESS,
|
||||||
|
TDLS_SETUP_COMPLETE,
|
||||||
|
TDLS_SETUP_FAILURE,
|
||||||
|
TDLS_TEAR_DOWN,
|
||||||
|
TDLS_SWITCHING_CHANNEL,
|
||||||
|
TDLS_IN_BASE_CHANNEL,
|
||||||
|
TDLS_IN_OFF_CHANNEL,
|
||||||
|
} tdlsStatus_e;
|
||||||
|
|
||||||
|
/** tdls peer_info */
|
||||||
|
struct tdls_peer {
|
||||||
|
struct list_head link;
|
||||||
|
/** MAC address information */
|
||||||
|
t_u8 peer_addr[ETH_ALEN];
|
||||||
|
/** rssi */
|
||||||
|
int rssi;
|
||||||
|
/** jiffies with rssi */
|
||||||
|
long rssi_jiffies;
|
||||||
|
/** link status */
|
||||||
|
tdlsStatus_e link_status;
|
||||||
|
/** num of set up failure */
|
||||||
|
t_u8 num_failure;
|
||||||
|
};
|
||||||
|
|
||||||
struct rf_test_mode_data {
|
struct rf_test_mode_data {
|
||||||
/* tx antenna num */
|
/* tx antenna num */
|
||||||
t_u32 tx_antenna;
|
t_u32 tx_antenna;
|
||||||
/* rx antenna num */
|
/* rx antenna num */
|
||||||
t_u32 rx_antenna;
|
t_u32 rx_antenna;
|
||||||
|
/* radio mode */
|
||||||
|
t_u32 radio_mode[2];
|
||||||
/* RF band */
|
/* RF band */
|
||||||
t_u32 band;
|
t_u32 band;
|
||||||
/* RF bandwidth */
|
/* RF bandwidth */
|
||||||
|
@ -1081,7 +1186,9 @@ struct rf_test_mode_data {
|
||||||
/* Tx continuous config values */
|
/* Tx continuous config values */
|
||||||
t_u32 tx_cont_data[6];
|
t_u32 tx_cont_data[6];
|
||||||
/* Tx frame config values */
|
/* Tx frame config values */
|
||||||
t_u32 tx_frame_data[13];
|
t_u32 tx_frame_data[20];
|
||||||
|
/* HE TB Tx values */
|
||||||
|
t_u32 he_tb_tx[5];
|
||||||
/* BSSID */
|
/* BSSID */
|
||||||
t_u8 bssid[ETH_ALEN];
|
t_u8 bssid[ETH_ALEN];
|
||||||
};
|
};
|
||||||
|
@ -1215,6 +1322,8 @@ struct _moal_private {
|
||||||
t_u8 conn_wep_key[MAX_WEP_KEY_SIZE];
|
t_u8 conn_wep_key[MAX_WEP_KEY_SIZE];
|
||||||
/** connection param */
|
/** connection param */
|
||||||
struct cfg80211_connect_params sme_current;
|
struct cfg80211_connect_params sme_current;
|
||||||
|
/* associcate bss */
|
||||||
|
struct cfg80211_bss *assoc_bss;
|
||||||
#endif
|
#endif
|
||||||
t_u8 wait_target_ap_pmkid;
|
t_u8 wait_target_ap_pmkid;
|
||||||
wait_queue_head_t okc_wait_q __ATTRIB_ALIGN__;
|
wait_queue_head_t okc_wait_q __ATTRIB_ALIGN__;
|
||||||
|
@ -1389,6 +1498,14 @@ struct _moal_private {
|
||||||
t_u8 enable_tcp_ack_enh;
|
t_u8 enable_tcp_ack_enh;
|
||||||
/** TCP session spin lock */
|
/** TCP session spin lock */
|
||||||
spinlock_t tcp_sess_lock;
|
spinlock_t tcp_sess_lock;
|
||||||
|
/** tcp list */
|
||||||
|
struct list_head tdls_list;
|
||||||
|
/** tdls spin lock */
|
||||||
|
spinlock_t tdls_lock;
|
||||||
|
/** auto tdls flag */
|
||||||
|
t_u8 enable_auto_tdls;
|
||||||
|
/** check tx packet for tdls peer */
|
||||||
|
t_u8 tdls_check_tx;
|
||||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
atomic_t wmm_tx_pending[4];
|
atomic_t wmm_tx_pending[4];
|
||||||
#endif
|
#endif
|
||||||
|
@ -1519,14 +1636,13 @@ enum ext_mod_params {
|
||||||
#endif
|
#endif
|
||||||
EXT_REQ_FW_NOWAIT,
|
EXT_REQ_FW_NOWAIT,
|
||||||
EXT_FW_SERIAL,
|
EXT_FW_SERIAL,
|
||||||
|
EXT_PM_KEEP_POWER,
|
||||||
#ifdef SDIO
|
#ifdef SDIO
|
||||||
EXT_INTMODE,
|
EXT_INTMODE,
|
||||||
#ifdef SDIO_SUSPEND_RESUME
|
#ifdef SDIO_SUSPEND_RESUME
|
||||||
EXT_PM_KEEP_POWER,
|
|
||||||
EXT_SHUTDOWN_HS,
|
EXT_SHUTDOWN_HS,
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
EXT_CNTRY_TXPWR,
|
|
||||||
#if defined(USB)
|
#if defined(USB)
|
||||||
EXT_SKIP_FWDNLD,
|
EXT_SKIP_FWDNLD,
|
||||||
#endif
|
#endif
|
||||||
|
@ -1554,6 +1670,7 @@ enum ext_mod_params {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
EXT_TX_WORK,
|
EXT_TX_WORK,
|
||||||
|
EXT_RPS,
|
||||||
EXT_MAX_PARAM,
|
EXT_MAX_PARAM,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1604,6 +1721,7 @@ typedef struct _moal_mod_para {
|
||||||
char *init_cfg;
|
char *init_cfg;
|
||||||
char *cal_data_cfg;
|
char *cal_data_cfg;
|
||||||
char *txpwrlimit_cfg;
|
char *txpwrlimit_cfg;
|
||||||
|
int cntry_txpwr;
|
||||||
char *init_hostcmd_cfg;
|
char *init_hostcmd_cfg;
|
||||||
char *band_steer_cfg;
|
char *band_steer_cfg;
|
||||||
int cfg80211_wext;
|
int cfg80211_wext;
|
||||||
|
@ -1616,15 +1734,12 @@ typedef struct _moal_mod_para {
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
int pcie_int_mode;
|
int pcie_int_mode;
|
||||||
#endif /* PCIE */
|
#endif /* PCIE */
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
int wakelock_timeout;
|
int wakelock_timeout;
|
||||||
#endif
|
|
||||||
unsigned int dev_cap_mask;
|
unsigned int dev_cap_mask;
|
||||||
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
||||||
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
||||||
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
||||||
defined(USB9097) || defined(PCIE9097) || defined(SD8978) || \
|
defined(USB9097) || defined(PCIE9097) || defined(SD8978)
|
||||||
defined(USB8978)
|
|
||||||
int pmic;
|
int pmic;
|
||||||
#endif
|
#endif
|
||||||
int antcfg;
|
int antcfg;
|
||||||
|
@ -1650,6 +1765,10 @@ void woal_set_tp_state(moal_private *priv);
|
||||||
#define RX_DROP_P3 (MAX_TP_ACCOUNT_DROP_POINT_NUM + 2)
|
#define RX_DROP_P3 (MAX_TP_ACCOUNT_DROP_POINT_NUM + 2)
|
||||||
#define RX_DROP_P4 (MAX_TP_ACCOUNT_DROP_POINT_NUM + 3)
|
#define RX_DROP_P4 (MAX_TP_ACCOUNT_DROP_POINT_NUM + 3)
|
||||||
#define RX_DROP_P5 (MAX_TP_ACCOUNT_DROP_POINT_NUM + 4)
|
#define RX_DROP_P5 (MAX_TP_ACCOUNT_DROP_POINT_NUM + 4)
|
||||||
|
#define TXRX_MAX_SAMPLE 100
|
||||||
|
#define RX_TIME_PKT (MAX_TP_ACCOUNT_DROP_POINT_NUM + 5)
|
||||||
|
#define TX_TIME_PKT (MAX_TP_ACCOUNT_DROP_POINT_NUM + 6)
|
||||||
|
|
||||||
typedef struct _moal_tp_acnt_t {
|
typedef struct _moal_tp_acnt_t {
|
||||||
/* TX accounting */
|
/* TX accounting */
|
||||||
unsigned long tx_packets[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long tx_packets[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
|
@ -1658,10 +1777,20 @@ typedef struct _moal_tp_acnt_t {
|
||||||
unsigned long tx_bytes[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long tx_bytes[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
unsigned long tx_bytes_last[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long tx_bytes_last[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
unsigned long tx_bytes_rate[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long tx_bytes_rate[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
|
unsigned long tx_amsdu_cnt;
|
||||||
|
unsigned long tx_amsdu_cnt_last;
|
||||||
|
unsigned long tx_amsdu_cnt_rate;
|
||||||
|
unsigned long tx_amsdu_pkt_cnt;
|
||||||
|
unsigned long tx_amsdu_pkt_cnt_last;
|
||||||
|
unsigned long tx_amsdu_pkt_cnt_rate;
|
||||||
unsigned long tx_intr_cnt;
|
unsigned long tx_intr_cnt;
|
||||||
unsigned long tx_intr_last;
|
unsigned long tx_intr_last;
|
||||||
unsigned long tx_intr_rate;
|
unsigned long tx_intr_rate;
|
||||||
unsigned long tx_pending;
|
unsigned long tx_pending;
|
||||||
|
unsigned long tx_xmit_skb_realloc_cnt;
|
||||||
|
unsigned long tx_stop_queue_cnt;
|
||||||
|
unsigned long tx_delay_driver[TXRX_MAX_SAMPLE];
|
||||||
|
|
||||||
/** RX accounting */
|
/** RX accounting */
|
||||||
unsigned long rx_packets[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long rx_packets[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
unsigned long rx_packets_last[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long rx_packets_last[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
|
@ -1669,11 +1798,23 @@ typedef struct _moal_tp_acnt_t {
|
||||||
unsigned long rx_bytes[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long rx_bytes[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
unsigned long rx_bytes_last[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long rx_bytes_last[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
unsigned long rx_bytes_rate[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
unsigned long rx_bytes_rate[MAX_TP_ACCOUNT_DROP_POINT_NUM];
|
||||||
|
unsigned long rx_amsdu_cnt;
|
||||||
|
unsigned long rx_amsdu_cnt_last;
|
||||||
|
unsigned long rx_amsdu_cnt_rate;
|
||||||
|
unsigned long rx_amsdu_pkt_cnt;
|
||||||
|
unsigned long rx_amsdu_pkt_cnt_last;
|
||||||
|
unsigned long rx_amsdu_pkt_cnt_rate;
|
||||||
unsigned long rx_intr_cnt;
|
unsigned long rx_intr_cnt;
|
||||||
unsigned long rx_intr_last;
|
unsigned long rx_intr_last;
|
||||||
unsigned long rx_intr_rate;
|
unsigned long rx_intr_rate;
|
||||||
unsigned long rx_pending;
|
unsigned long rx_pending;
|
||||||
unsigned long rx_paused_cnt;
|
unsigned long rx_paused_cnt;
|
||||||
|
unsigned long rx_rdptr_full_cnt;
|
||||||
|
unsigned long rx_delay1_driver[TXRX_MAX_SAMPLE];
|
||||||
|
unsigned long rx_delay2_driver[TXRX_MAX_SAMPLE];
|
||||||
|
unsigned long rx_delay_kernel[TXRX_MAX_SAMPLE];
|
||||||
|
t_u8 rx_index;
|
||||||
|
t_u8 tx_index;
|
||||||
/* TP account mode 0-disable 1-enable */
|
/* TP account mode 0-disable 1-enable */
|
||||||
unsigned int on;
|
unsigned int on;
|
||||||
/* drop point */
|
/* drop point */
|
||||||
|
@ -1987,12 +2128,10 @@ struct _moal_handle {
|
||||||
/** Card specific driver version */
|
/** Card specific driver version */
|
||||||
t_s8 driver_version[MLAN_MAX_VER_STR_LEN];
|
t_s8 driver_version[MLAN_MAX_VER_STR_LEN];
|
||||||
char *fwdump_fname;
|
char *fwdump_fname;
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||||
struct wakeup_source ws;
|
struct wakeup_source ws;
|
||||||
#else
|
#else
|
||||||
struct wake_lock wake_lock;
|
struct wake_lock wake_lock;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
t_u16 dfs_repeater_mode;
|
t_u16 dfs_repeater_mode;
|
||||||
/* feature_control */
|
/* feature_control */
|
||||||
|
@ -2038,6 +2177,8 @@ struct _moal_handle {
|
||||||
/** TP accounting parameters */
|
/** TP accounting parameters */
|
||||||
moal_tp_acnt_t tp_acnt;
|
moal_tp_acnt_t tp_acnt;
|
||||||
BOOLEAN is_tp_acnt_timer_set;
|
BOOLEAN is_tp_acnt_timer_set;
|
||||||
|
|
||||||
|
t_u8 request_pm;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2642,7 +2783,6 @@ void woal_free_moal_handle(moal_handle *handle);
|
||||||
/** shutdown fw */
|
/** shutdown fw */
|
||||||
mlan_status woal_shutdown_fw(moal_private *priv, t_u8 wait_option);
|
mlan_status woal_shutdown_fw(moal_private *priv, t_u8 wait_option);
|
||||||
/* Functions in interface module */
|
/* Functions in interface module */
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||||
static inline void wakeup_source_init(struct wakeup_source *ws,
|
static inline void wakeup_source_init(struct wakeup_source *ws,
|
||||||
const char *name)
|
const char *name)
|
||||||
|
@ -2672,7 +2812,6 @@ static inline void wakeup_source_trash(struct wakeup_source *ws)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
/** Add card */
|
/** Add card */
|
||||||
moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops,
|
moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops,
|
||||||
t_u16 card_type);
|
t_u16 card_type);
|
||||||
|
@ -2700,7 +2839,7 @@ int woal_reg_rx_mgmt_ind(moal_private *priv, t_u16 action,
|
||||||
t_u32 *pmgmt_subtype_mask, t_u8 wait_option);
|
t_u32 *pmgmt_subtype_mask, t_u8 wait_option);
|
||||||
#ifdef DEBUG_LEVEL1
|
#ifdef DEBUG_LEVEL1
|
||||||
/** Set driver debug bit masks */
|
/** Set driver debug bit masks */
|
||||||
int woal_set_drvdbg(moal_private *priv, t_u32 drvdbg);
|
int woal_set_drvdbg(moal_private *priv, t_u32 drv_dbg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mlan_status woal_set_get_tx_bf_cap(moal_private *priv, t_u16 action,
|
mlan_status woal_set_get_tx_bf_cap(moal_private *priv, t_u16 action,
|
||||||
|
@ -2933,6 +3072,8 @@ int woal_priv_get_nonglobal_operclass_by_bw_channel(moal_private *priv,
|
||||||
int woal_send_host_packet(struct net_device *dev, struct ifreq *req);
|
int woal_send_host_packet(struct net_device *dev, struct ifreq *req);
|
||||||
/** Private command ID to pass mgmt frame */
|
/** Private command ID to pass mgmt frame */
|
||||||
#define WOAL_MGMT_FRAME_TX_IOCTL (SIOCDEVPRIVATE + 12)
|
#define WOAL_MGMT_FRAME_TX_IOCTL (SIOCDEVPRIVATE + 12)
|
||||||
|
/** common ioctl for TDLS */
|
||||||
|
int woal_tdls_config_ioctl(struct net_device *dev, struct ifreq *req);
|
||||||
|
|
||||||
int woal_get_bss_type(struct net_device *dev, struct ifreq *req);
|
int woal_get_bss_type(struct net_device *dev, struct ifreq *req);
|
||||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||||
|
@ -3018,6 +3159,8 @@ mlan_status woal_init_sta_dev(struct net_device *dev, moal_private *priv);
|
||||||
mlan_status woal_init_uap_dev(struct net_device *dev, moal_private *priv);
|
mlan_status woal_init_uap_dev(struct net_device *dev, moal_private *priv);
|
||||||
#endif
|
#endif
|
||||||
mlan_status woal_update_drv_tbl(moal_handle *handle, int drv_mode_local);
|
mlan_status woal_update_drv_tbl(moal_handle *handle, int drv_mode_local);
|
||||||
|
void woal_fill_mlan_buffer(moal_private *priv, mlan_buffer *pmbuf,
|
||||||
|
struct sk_buff *skb);
|
||||||
moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_num,
|
moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_num,
|
||||||
t_u8 bss_type);
|
t_u8 bss_type);
|
||||||
void woal_remove_interface(moal_handle *handle, t_u8 bss_index);
|
void woal_remove_interface(moal_handle *handle, t_u8 bss_index);
|
||||||
|
@ -3079,6 +3222,9 @@ void woal_clear_conn_params(moal_private *priv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void woal_flush_tcp_sess_queue(moal_private *priv);
|
void woal_flush_tcp_sess_queue(moal_private *priv);
|
||||||
|
#ifdef STA_CFG80211
|
||||||
|
void woal_flush_tdls_list(moal_private *priv);
|
||||||
|
#endif
|
||||||
void wlan_scan_create_brief_table_entry(t_u8 **ppbuffer,
|
void wlan_scan_create_brief_table_entry(t_u8 **ppbuffer,
|
||||||
BSSDescriptor_t *pbss_desc);
|
BSSDescriptor_t *pbss_desc);
|
||||||
int wlan_get_scan_table_ret_entry(BSSDescriptor_t *pbss_desc, t_u8 **ppbuffer,
|
int wlan_get_scan_table_ret_entry(BSSDescriptor_t *pbss_desc, t_u8 **ppbuffer,
|
||||||
|
@ -3111,9 +3257,6 @@ mlan_status woal_set_get_wowlan_config(moal_private *priv, t_u16 action,
|
||||||
t_u8 wait_option,
|
t_u8 wait_option,
|
||||||
mlan_ds_misc_mef_flt_cfg *mefcfg);
|
mlan_ds_misc_mef_flt_cfg *mefcfg);
|
||||||
mlan_status woal_set_auto_arp_ext(moal_handle *handle, t_u8 enable);
|
mlan_status woal_set_auto_arp_ext(moal_handle *handle, t_u8 enable);
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
|
|
||||||
mlan_status woal_do_flr(moal_handle *handle, bool prepare);
|
|
||||||
#endif
|
|
||||||
mlan_status woal_delba_all(moal_private *priv, t_u8 wait_option);
|
mlan_status woal_delba_all(moal_private *priv, t_u8 wait_option);
|
||||||
#ifdef STA_CFG80211
|
#ifdef STA_CFG80211
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* related functions.
|
* related functions.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -35,18 +35,22 @@ Change log:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
|
||||||
|
#ifdef IMX_SUPPORT
|
||||||
#include <linux/busfreq-imx.h>
|
#include <linux/busfreq-imx.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Local Variables
|
Local Variables
|
||||||
********************************************************/
|
********************************************************/
|
||||||
#define DRV_NAME "NXP mdriver PCIe"
|
#define DRV_NAME "NXP mdriver PCIe"
|
||||||
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 11, 0)
|
||||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
|
||||||
|
#ifdef IMX_SUPPORT
|
||||||
static struct pm_qos_request woal_pcie_pm_qos_req;
|
static struct pm_qos_request woal_pcie_pm_qos_req;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* PCIE resume handler */
|
/* PCIE resume handler */
|
||||||
static int woal_pcie_resume(struct pci_dev *pdev);
|
static int woal_pcie_resume(struct pci_dev *pdev);
|
||||||
|
@ -54,9 +58,6 @@ static void woal_pcie_reg_dbg(moal_handle *phandle);
|
||||||
static void woal_pcie_unregister_dev(moal_handle *handle);
|
static void woal_pcie_unregister_dev(moal_handle *handle);
|
||||||
static void woal_pcie_cleanup(pcie_service_card *card);
|
static void woal_pcie_cleanup(pcie_service_card *card);
|
||||||
static mlan_status woal_pcie_init(pcie_service_card *card);
|
static mlan_status woal_pcie_init(pcie_service_card *card);
|
||||||
extern int pcie_int_mode;
|
|
||||||
extern struct semaphore AddRemoveCardSem;
|
|
||||||
extern moal_handle **m_handle;
|
|
||||||
|
|
||||||
/** WLAN IDs */
|
/** WLAN IDs */
|
||||||
static const struct pci_device_id wlan_ids[] = {
|
static const struct pci_device_id wlan_ids[] = {
|
||||||
|
@ -128,6 +129,51 @@ static moal_if_ops pcie_ops;
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Local Functions
|
Local Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
|
void woal_request_pmqos_busfreq_high(void)
|
||||||
|
{
|
||||||
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
|
||||||
|
#ifdef IMX_SUPPORT
|
||||||
|
pm_qos_add_request(&woal_pcie_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, 0);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
|
||||||
|
#ifdef IMX_SUPPORT
|
||||||
|
cpu_latency_qos_add_request(&woal_pcie_pm_qos_req, 0);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
|
||||||
|
#ifdef IMX_SUPPORT
|
||||||
|
request_bus_freq(BUS_FREQ_HIGH);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void woal_release_pmqos_busfreq_high(void)
|
||||||
|
{
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
|
||||||
|
#ifdef IMX_SUPPORT
|
||||||
|
release_bus_freq(BUS_FREQ_HIGH);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
|
||||||
|
#ifdef IMX_SUPPORT
|
||||||
|
pm_qos_remove_request(&woal_pcie_pm_qos_req);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
|
||||||
|
#ifdef IMX_SUPPORT
|
||||||
|
cpu_latency_qos_remove_request(&woal_pcie_pm_qos_req);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static mlan_status woal_pcie_preinit(struct pci_dev *pdev);
|
static mlan_status woal_pcie_preinit(struct pci_dev *pdev);
|
||||||
|
|
||||||
/** @brief This function updates the card types
|
/** @brief This function updates the card types
|
||||||
|
@ -206,6 +252,7 @@ static t_u16 woal_update_card_type(t_void *card)
|
||||||
* @param handle A pointer to moal_handle structure
|
* @param handle A pointer to moal_handle structure
|
||||||
* @param prepare True :- its a pre FLR call from the kernel
|
* @param prepare True :- its a pre FLR call from the kernel
|
||||||
* False :- its a post FLR call from the kernel
|
* False :- its a post FLR call from the kernel
|
||||||
|
* @param flr True: call from FLR
|
||||||
*
|
*
|
||||||
* Note: This function is mix of woal_switch_drv_mode() and
|
* Note: This function is mix of woal_switch_drv_mode() and
|
||||||
* remove_card(). Idea is to cleanup the software only without
|
* remove_card(). Idea is to cleanup the software only without
|
||||||
|
@ -214,7 +261,7 @@ static t_u16 woal_update_card_type(t_void *card)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_do_flr(moal_handle *handle, bool prepare)
|
mlan_status woal_do_flr(moal_handle *handle, bool prepare, bool flr_flag)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
@ -321,9 +368,11 @@ perform_init:
|
||||||
|
|
||||||
/* Init FW and HW */
|
/* Init FW and HW */
|
||||||
/* Load wlan only binary */
|
/* Load wlan only binary */
|
||||||
|
if (flr_flag) {
|
||||||
fw_serial_bkp = moal_extflg_isset(handle, EXT_FW_SERIAL);
|
fw_serial_bkp = moal_extflg_isset(handle, EXT_FW_SERIAL);
|
||||||
moal_extflg_clear(handle, EXT_FW_SERIAL);
|
moal_extflg_clear(handle, EXT_FW_SERIAL);
|
||||||
woal_update_firmware_name(handle);
|
woal_update_firmware_name(handle);
|
||||||
|
}
|
||||||
if (woal_init_fw(handle)) {
|
if (woal_init_fw(handle)) {
|
||||||
PRINTM(MFATAL, "Firmware Init Failed\n");
|
PRINTM(MFATAL, "Firmware Init Failed\n");
|
||||||
woal_pcie_reg_dbg(handle);
|
woal_pcie_reg_dbg(handle);
|
||||||
|
@ -331,8 +380,10 @@ perform_init:
|
||||||
moal_extflg_set(handle, EXT_FW_SERIAL);
|
moal_extflg_set(handle, EXT_FW_SERIAL);
|
||||||
goto err_init_fw;
|
goto err_init_fw;
|
||||||
}
|
}
|
||||||
if (fw_serial_bkp)
|
if (flr_flag && fw_serial_bkp)
|
||||||
moal_extflg_set(handle, EXT_FW_SERIAL);
|
moal_extflg_set(handle, EXT_FW_SERIAL);
|
||||||
|
if (IS_PCIE9098(handle->card_type))
|
||||||
|
handle->event_fw_dump = MTRUE;
|
||||||
exit:
|
exit:
|
||||||
MOAL_REL_SEMAPHORE(&AddRemoveCardSem);
|
MOAL_REL_SEMAPHORE(&AddRemoveCardSem);
|
||||||
|
|
||||||
|
@ -350,13 +401,11 @@ err_init_fw:
|
||||||
wait_event_interruptible(handle->init_wait_q,
|
wait_event_interruptible(handle->init_wait_q,
|
||||||
handle->init_wait_q_woken);
|
handle->init_wait_q_woken);
|
||||||
}
|
}
|
||||||
#ifdef ANDROID_KERNEL
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||||
wakeup_source_trash(&handle->ws);
|
wakeup_source_trash(&handle->ws);
|
||||||
#else
|
#else
|
||||||
wake_lock_destroy(&handle->wake_lock);
|
wake_lock_destroy(&handle->wake_lock);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
woal_proc_exit(handle);
|
woal_proc_exit(handle);
|
||||||
#endif
|
#endif
|
||||||
|
@ -395,7 +444,7 @@ err_init_fw:
|
||||||
*
|
*
|
||||||
* @return error code
|
* @return error code
|
||||||
*/
|
*/
|
||||||
int woal_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
static int woal_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
{
|
{
|
||||||
pcie_service_card *card = NULL;
|
pcie_service_card *card = NULL;
|
||||||
t_u16 card_type = 0;
|
t_u16 card_type = 0;
|
||||||
|
@ -500,6 +549,7 @@ static int woal_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||||
int ret = MLAN_STATUS_SUCCESS;
|
int ret = MLAN_STATUS_SUCCESS;
|
||||||
int hs_actived;
|
int hs_actived;
|
||||||
mlan_ds_ps_info pm_info;
|
mlan_ds_ps_info pm_info;
|
||||||
|
int keep_power = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
PRINTM(MCMND, "<--- Enter woal_pcie_suspend --->\n");
|
PRINTM(MCMND, "<--- Enter woal_pcie_suspend --->\n");
|
||||||
|
@ -554,9 +604,15 @@ static int woal_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||||
|
|
||||||
for (i = 0; i < handle->priv_num; i++)
|
for (i = 0; i < handle->priv_num; i++)
|
||||||
netif_device_detach(handle->priv[i]->netdev);
|
netif_device_detach(handle->priv[i]->netdev);
|
||||||
|
if (moal_extflg_isset(handle, EXT_PM_KEEP_POWER))
|
||||||
|
keep_power = MTRUE;
|
||||||
|
else
|
||||||
|
keep_power = MFALSE;
|
||||||
|
|
||||||
|
if (keep_power) {
|
||||||
/* Enable Host Sleep */
|
/* Enable Host Sleep */
|
||||||
hs_actived = woal_enable_hs(woal_get_priv(handle, MLAN_BSS_ROLE_ANY));
|
hs_actived = woal_enable_hs(
|
||||||
|
woal_get_priv(handle, MLAN_BSS_ROLE_ANY));
|
||||||
if (hs_actived == MTRUE) {
|
if (hs_actived == MTRUE) {
|
||||||
/* Indicate device suspended */
|
/* Indicate device suspended */
|
||||||
handle->is_suspended = MTRUE;
|
handle->is_suspended = MTRUE;
|
||||||
|
@ -568,12 +624,18 @@ static int woal_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
flush_workqueue(handle->workqueue);
|
flush_workqueue(handle->workqueue);
|
||||||
flush_workqueue(handle->evt_workqueue);
|
flush_workqueue(handle->evt_workqueue);
|
||||||
if (handle->rx_workqueue)
|
if (handle->rx_workqueue)
|
||||||
flush_workqueue(handle->rx_workqueue);
|
flush_workqueue(handle->rx_workqueue);
|
||||||
if (handle->tx_workqueue)
|
if (handle->tx_workqueue)
|
||||||
flush_workqueue(handle->tx_workqueue);
|
flush_workqueue(handle->tx_workqueue);
|
||||||
|
if (!keep_power) {
|
||||||
|
woal_do_flr(handle, true, false);
|
||||||
|
handle->surprise_removed = MTRUE;
|
||||||
|
handle->is_suspended = MTRUE;
|
||||||
|
}
|
||||||
pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
|
pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
|
||||||
pci_save_state(pdev);
|
pci_save_state(pdev);
|
||||||
pci_set_power_state(pdev, pci_choose_state(pdev, state));
|
pci_set_power_state(pdev, pci_choose_state(pdev, state));
|
||||||
|
@ -593,15 +655,16 @@ done:
|
||||||
static int woal_pcie_resume(struct pci_dev *pdev)
|
static int woal_pcie_resume(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
moal_handle *handle;
|
moal_handle *handle;
|
||||||
pcie_service_card *card;
|
pcie_service_card *cardp;
|
||||||
|
int keep_power = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
PRINTM(MCMND, "<--- Enter woal_pcie_resume --->\n");
|
PRINTM(MCMND, "<--- Enter woal_pcie_resume --->\n");
|
||||||
if (pdev) {
|
if (pdev) {
|
||||||
card = (pcie_service_card *)pci_get_drvdata(pdev);
|
cardp = (pcie_service_card *)pci_get_drvdata(pdev);
|
||||||
if (!card || !card->handle) {
|
if (!cardp || !cardp->handle) {
|
||||||
PRINTM(MERROR, "Card or handle is not valid\n");
|
PRINTM(MERROR, "Card or handle is not valid\n");
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
|
@ -611,19 +674,24 @@ static int woal_pcie_resume(struct pci_dev *pdev)
|
||||||
LEAVE();
|
LEAVE();
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
pci_set_power_state(pdev, PCI_D0);
|
handle = cardp->handle;
|
||||||
pci_restore_state(pdev);
|
|
||||||
pci_enable_wake(pdev, PCI_D0, 0);
|
|
||||||
|
|
||||||
handle = card->handle;
|
|
||||||
|
|
||||||
if (handle->is_suspended == MFALSE) {
|
if (handle->is_suspended == MFALSE) {
|
||||||
PRINTM(MWARN, "Device already resumed\n");
|
PRINTM(MWARN, "Device already resumed\n");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle->is_suspended = MFALSE;
|
handle->is_suspended = MFALSE;
|
||||||
|
|
||||||
|
if (moal_extflg_isset(handle, EXT_PM_KEEP_POWER))
|
||||||
|
keep_power = MTRUE;
|
||||||
|
else
|
||||||
|
keep_power = MFALSE;
|
||||||
|
pci_set_power_state(pdev, PCI_D0);
|
||||||
|
pci_restore_state(pdev);
|
||||||
|
pci_enable_wake(pdev, PCI_D0, 0);
|
||||||
|
if (!keep_power) {
|
||||||
|
handle->surprise_removed = MFALSE;
|
||||||
|
woal_do_flr(handle, false, false);
|
||||||
|
} else {
|
||||||
if (woal_check_driver_status(handle)) {
|
if (woal_check_driver_status(handle)) {
|
||||||
PRINTM(MERROR, "Resuem, device is in hang state\n");
|
PRINTM(MERROR, "Resuem, device is in hang state\n");
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -632,8 +700,9 @@ static int woal_pcie_resume(struct pci_dev *pdev)
|
||||||
for (i = 0; i < handle->priv_num; i++)
|
for (i = 0; i < handle->priv_num; i++)
|
||||||
netif_device_attach(handle->priv[i]->netdev);
|
netif_device_attach(handle->priv[i]->netdev);
|
||||||
|
|
||||||
woal_cancel_hs(woal_get_priv(handle, MLAN_BSS_ROLE_ANY), MOAL_NO_WAIT);
|
woal_cancel_hs(woal_get_priv(handle, MLAN_BSS_ROLE_ANY),
|
||||||
|
MOAL_NO_WAIT);
|
||||||
|
}
|
||||||
done:
|
done:
|
||||||
PRINTM(MCMND, "<--- Leave woal_pcie_resume --->\n");
|
PRINTM(MCMND, "<--- Leave woal_pcie_resume --->\n");
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -689,10 +758,10 @@ static void woal_pcie_reset_prepare(struct pci_dev *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handle->surprise_removed = MTRUE;
|
handle->surprise_removed = MTRUE;
|
||||||
woal_do_flr(handle, true);
|
woal_do_flr(handle, true, true);
|
||||||
if (ref_handle) {
|
if (ref_handle) {
|
||||||
ref_handle->surprise_removed = MTRUE;
|
ref_handle->surprise_removed = MTRUE;
|
||||||
woal_do_flr(ref_handle, true);
|
woal_do_flr(ref_handle, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -741,16 +810,16 @@ static void woal_pcie_reset_done(struct pci_dev *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handle->surprise_removed = MFALSE;
|
handle->surprise_removed = MFALSE;
|
||||||
woal_do_flr(handle, false);
|
woal_do_flr(handle, false, true);
|
||||||
if (ref_handle) {
|
if (ref_handle) {
|
||||||
ref_handle->surprise_removed = MFALSE;
|
ref_handle->surprise_removed = MFALSE;
|
||||||
woal_do_flr(ref_handle, false);
|
woal_do_flr(ref_handle, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void woal_pcie_reset_notify(struct pci_dev *pdev, bool prepare)
|
static void woal_pcie_reset_notify(struct pci_dev *pdev, bool prepare)
|
||||||
{
|
{
|
||||||
pcie_service_card *card;
|
pcie_service_card *card;
|
||||||
moal_handle *handle;
|
moal_handle *handle;
|
||||||
|
@ -793,10 +862,10 @@ void woal_pcie_reset_notify(struct pci_dev *pdev, bool prepare)
|
||||||
* Note. FW might not be healthy.
|
* Note. FW might not be healthy.
|
||||||
*/
|
*/
|
||||||
handle->surprise_removed = MTRUE;
|
handle->surprise_removed = MTRUE;
|
||||||
woal_do_flr(handle, prepare);
|
woal_do_flr(handle, prepare, true);
|
||||||
if (ref_handle) {
|
if (ref_handle) {
|
||||||
ref_handle->surprise_removed = MTRUE;
|
ref_handle->surprise_removed = MTRUE;
|
||||||
woal_do_flr(ref_handle, prepare);
|
woal_do_flr(ref_handle, prepare, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Kernel stores and restores PCIe function context before and
|
/* Kernel stores and restores PCIe function context before and
|
||||||
|
@ -805,10 +874,10 @@ void woal_pcie_reset_notify(struct pci_dev *pdev, bool prepare)
|
||||||
* Reconfigure the sw and fw including fw redownload
|
* Reconfigure the sw and fw including fw redownload
|
||||||
*/
|
*/
|
||||||
handle->surprise_removed = MFALSE;
|
handle->surprise_removed = MFALSE;
|
||||||
woal_do_flr(handle, prepare);
|
woal_do_flr(handle, prepare, true);
|
||||||
if (ref_handle) {
|
if (ref_handle) {
|
||||||
ref_handle->surprise_removed = MFALSE;
|
ref_handle->surprise_removed = MFALSE;
|
||||||
woal_do_flr(ref_handle, prepare);
|
woal_do_flr(ref_handle, prepare, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -899,8 +968,9 @@ static mlan_status woal_pcie_read_reg(moal_handle *handle, t_u32 reg,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_pcie_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
static mlan_status woal_pcie_write_data_sync(moal_handle *handle,
|
||||||
t_u32 port, t_u32 timeout)
|
mlan_buffer *pmbuf, t_u32 port,
|
||||||
|
t_u32 timeout)
|
||||||
{
|
{
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -915,8 +985,9 @@ mlan_status woal_pcie_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_pcie_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
|
static mlan_status woal_pcie_read_data_sync(moal_handle *handle,
|
||||||
t_u32 port, t_u32 timeout)
|
mlan_buffer *pmbuf, t_u32 port,
|
||||||
|
t_u32 timeout)
|
||||||
{
|
{
|
||||||
return MLAN_STATUS_SUCCESS;
|
return MLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1029,7 +1100,8 @@ exit:
|
||||||
static mlan_status woal_pcie_preinit(struct pci_dev *pdev)
|
static mlan_status woal_pcie_preinit(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
if (pdev->multifunction)
|
||||||
|
device_disable_async_suspend(&pdev->dev);
|
||||||
ret = pci_enable_device(pdev);
|
ret = pci_enable_device(pdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_enable_dev;
|
goto err_enable_dev;
|
||||||
|
@ -1064,7 +1136,7 @@ err_enable_dev:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_pcie_init(pcie_service_card *card)
|
static mlan_status woal_pcie_init(pcie_service_card *card)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = NULL;
|
struct pci_dev *pdev = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -1267,7 +1339,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_pcie_cleanup(pcie_service_card *card)
|
static void woal_pcie_cleanup(pcie_service_card *card)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = NULL;
|
struct pci_dev *pdev = NULL;
|
||||||
pdev = card->dev;
|
pdev = card->dev;
|
||||||
|
@ -1350,23 +1422,9 @@ mlan_status woal_pcie_bus_register(void)
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
|
|
||||||
pm_qos_add_request(&woal_pcie_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, 0);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
|
|
||||||
request_bus_freq(BUS_FREQ_HIGH);
|
|
||||||
#endif
|
|
||||||
/* API registers the NXP PCIE driver */
|
/* API registers the NXP PCIE driver */
|
||||||
if (pci_register_driver(&wlan_pcie)) {
|
if (pci_register_driver(&wlan_pcie)) {
|
||||||
PRINTM(MFATAL, "PCIE Driver Registration Failed \n");
|
PRINTM(MFATAL, "PCIE Driver Registration Failed \n");
|
||||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
|
|
||||||
pm_qos_remove_request(&woal_pcie_pm_qos_req);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
ret = MLAN_STATUS_FAILURE;
|
ret = MLAN_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1383,16 +1441,8 @@ void woal_pcie_bus_unregister(void)
|
||||||
{
|
{
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
|
|
||||||
release_bus_freq(BUS_FREQ_HIGH);
|
|
||||||
#endif
|
|
||||||
/* PCIE Driver Unregistration */
|
/* PCIE Driver Unregistration */
|
||||||
pci_unregister_driver(&wlan_pcie);
|
pci_unregister_driver(&wlan_pcie);
|
||||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
|
|
||||||
pm_qos_remove_request(&woal_pcie_pm_qos_req);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
|
@ -1431,7 +1481,7 @@ void woal_pcie_bus_unregister(void)
|
||||||
*
|
*
|
||||||
* @return The length of this log
|
* @return The length of this log
|
||||||
*/
|
*/
|
||||||
int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
static int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
||||||
{
|
{
|
||||||
char *drv_ptr = (char *)buffer;
|
char *drv_ptr = (char *)buffer;
|
||||||
t_u32 reg = 0, value = 0;
|
t_u32 reg = 0, value = 0;
|
||||||
|
@ -1715,7 +1765,6 @@ typedef enum {
|
||||||
|
|
||||||
#define MAX_NAME_LEN 8
|
#define MAX_NAME_LEN 8
|
||||||
#define MAX_FULL_NAME_LEN 32
|
#define MAX_FULL_NAME_LEN 32
|
||||||
t_u8 *name_prefix = "/data/file_";
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
t_u8 mem_name[MAX_NAME_LEN];
|
t_u8 mem_name[MAX_NAME_LEN];
|
||||||
|
@ -1725,16 +1774,10 @@ typedef struct {
|
||||||
t_u8 type;
|
t_u8 type;
|
||||||
} memory_type_mapping;
|
} memory_type_mapping;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
RDWR_STATUS_SUCCESS = 0,
|
|
||||||
RDWR_STATUS_FAILURE = 1,
|
|
||||||
RDWR_STATUS_DONE = 2
|
|
||||||
} rdwr_status;
|
|
||||||
|
|
||||||
#ifdef PCIE8897
|
#ifdef PCIE8897
|
||||||
#define DEBUG_HOST_READY_8897 0xEE
|
#define DEBUG_HOST_READY_8897 0xEE
|
||||||
#define DEBUG_MEMDUMP_FINISH_8897 0xFE
|
#define DEBUG_MEMDUMP_FINISH_8897 0xFE
|
||||||
memory_type_mapping mem_type_mapping_tbl_8897[] = {
|
static memory_type_mapping mem_type_mapping_tbl_8897[] = {
|
||||||
{"ITCM", NULL, NULL, 0xF0, FW_DUMP_TYPE_MEM_ITCM},
|
{"ITCM", NULL, NULL, 0xF0, FW_DUMP_TYPE_MEM_ITCM},
|
||||||
{"DTCM", NULL, NULL, 0xF1, FW_DUMP_TYPE_MEM_DTCM},
|
{"DTCM", NULL, NULL, 0xF1, FW_DUMP_TYPE_MEM_DTCM},
|
||||||
{"SQRAM", NULL, NULL, 0xF2, FW_DUMP_TYPE_MEM_SQRAM},
|
{"SQRAM", NULL, NULL, 0xF2, FW_DUMP_TYPE_MEM_SQRAM},
|
||||||
|
@ -1750,8 +1793,8 @@ memory_type_mapping mem_type_mapping_tbl_8897[] = {
|
||||||
#define DEBUG_HOST_READY_8997 0xCC
|
#define DEBUG_HOST_READY_8997 0xCC
|
||||||
#define DEBUG_HOST_EVENT_READY 0xAA
|
#define DEBUG_HOST_EVENT_READY 0xAA
|
||||||
#define DEBUG_MEMDUMP_FINISH_8997 0xDD
|
#define DEBUG_MEMDUMP_FINISH_8997 0xDD
|
||||||
memory_type_mapping mem_type_mapping_tbl_8997 = {"DUMP", NULL, NULL, 0xDD,
|
static memory_type_mapping mem_type_mapping_tbl_8997 = {"DUMP", NULL, NULL,
|
||||||
0x00};
|
0xDD, 0x00};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1766,7 +1809,8 @@ memory_type_mapping mem_type_mapping_tbl_8997 = {"DUMP", NULL, NULL, 0xDD,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_read_reg_eight_bit(moal_handle *handle, t_u32 reg, t_u8 *data)
|
static mlan_status woal_read_reg_eight_bit(moal_handle *handle, t_u32 reg,
|
||||||
|
t_u8 *data)
|
||||||
{
|
{
|
||||||
pcie_service_card *card = (pcie_service_card *)handle->card;
|
pcie_service_card *card = (pcie_service_card *)handle->card;
|
||||||
*data = ioread8(card->pci_mmap1 + reg);
|
*data = ioread8(card->pci_mmap1 + reg);
|
||||||
|
@ -1781,7 +1825,7 @@ mlan_status woal_read_reg_eight_bit(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
static rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int tries = 0;
|
int tries = 0;
|
||||||
|
@ -1819,6 +1863,13 @@ rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||||
PRINTM(MERROR, "PCIE Write ERR\n");
|
PRINTM(MERROR, "PCIE Write ERR\n");
|
||||||
return RDWR_STATUS_FAILURE;
|
return RDWR_STATUS_FAILURE;
|
||||||
}
|
}
|
||||||
|
#if defined(PCIE9098) || defined(PCIE9097)
|
||||||
|
if (IS_PCIE9098(phandle->card_type) ||
|
||||||
|
IS_PCIE9097(phandle->card_type)) {
|
||||||
|
if (phandle->event_fw_dump)
|
||||||
|
return RDWR_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
ret = woal_pcie_read_reg(phandle, dump_ctrl_reg, ®_data);
|
ret = woal_pcie_read_reg(phandle, dump_ctrl_reg, ®_data);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
PRINTM(MERROR, "PCIE Read DEBUG_DUMP_CTRL_REG fail\n");
|
PRINTM(MERROR, "PCIE Read DEBUG_DUMP_CTRL_REG fail\n");
|
||||||
|
@ -1866,7 +1917,7 @@ rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned int reg, reg_start, reg_end;
|
unsigned int reg, reg_start, reg_end;
|
||||||
|
@ -2034,7 +2085,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned int reg, reg_start, reg_end;
|
unsigned int reg, reg_start, reg_end;
|
||||||
|
@ -2061,13 +2112,13 @@ void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
||||||
IS_PCIE9097(phandle->card_type)) {
|
IS_PCIE9097(phandle->card_type)) {
|
||||||
if (phandle->event_fw_dump) {
|
if (phandle->event_fw_dump) {
|
||||||
if (RDWR_STATUS_FAILURE !=
|
if (RDWR_STATUS_FAILURE !=
|
||||||
woal_pcie_rdwr_firmware(phandle, doneflag))
|
woal_pcie_rdwr_firmware(phandle, doneflag)) {
|
||||||
PRINTM(MMSG,
|
PRINTM(MMSG,
|
||||||
"====PCIE FW DUMP EVENT MODE START ====\n");
|
"====PCIE FW DUMP EVENT MODE START ====\n");
|
||||||
phandle->event_fw_dump = MFALSE;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||||
/** Create dump directory*/
|
/** Create dump directory*/
|
||||||
|
@ -2165,15 +2216,19 @@ void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (RDWR_STATUS_DONE == stat) {
|
if (RDWR_STATUS_DONE == stat) {
|
||||||
|
#ifdef MLAN_64BIT
|
||||||
PRINTM(MMSG,
|
PRINTM(MMSG,
|
||||||
"%s done:"
|
"%s done:"
|
||||||
#ifdef MLAN_64BIT
|
|
||||||
"size = 0x%lx\n",
|
"size = 0x%lx\n",
|
||||||
#else
|
|
||||||
"size = 0x%x\n",
|
|
||||||
#endif
|
|
||||||
mem_type_mapping_tbl->mem_name,
|
mem_type_mapping_tbl->mem_name,
|
||||||
dbg_ptr - mem_type_mapping_tbl->mem_Ptr);
|
dbg_ptr - mem_type_mapping_tbl->mem_Ptr);
|
||||||
|
#else
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"%s done:"
|
||||||
|
"size = 0x%x\n",
|
||||||
|
mem_type_mapping_tbl->mem_name,
|
||||||
|
dbg_ptr - mem_type_mapping_tbl->mem_Ptr);
|
||||||
|
#endif
|
||||||
memset(file_name, 0, sizeof(file_name));
|
memset(file_name, 0, sizeof(file_name));
|
||||||
sprintf(file_name, "%s%s", "file_pcie_",
|
sprintf(file_name, "%s%s", "file_pcie_",
|
||||||
mem_type_mapping_tbl->mem_name);
|
mem_type_mapping_tbl->mem_name);
|
||||||
|
@ -2225,7 +2280,7 @@ static t_u8 woal_pcie_is_second_mac(moal_handle *handle)
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void woal_pcie_dump_fw_info(moal_handle *phandle)
|
static void woal_pcie_dump_fw_info(moal_handle *phandle)
|
||||||
{
|
{
|
||||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MTRUE);
|
mlan_pm_wakeup_card(phandle->pmlan_adapter, MTRUE);
|
||||||
phandle->fw_dump = MTRUE;
|
phandle->fw_dump = MTRUE;
|
||||||
|
@ -2235,8 +2290,15 @@ void woal_pcie_dump_fw_info(moal_handle *phandle)
|
||||||
#endif
|
#endif
|
||||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||||
if (IS_PCIE8997(phandle->card_type) ||
|
if (IS_PCIE8997(phandle->card_type) ||
|
||||||
IS_PCIE9098(phandle->card_type) || IS_PCIE9097(phandle->card_type))
|
IS_PCIE9098(phandle->card_type) ||
|
||||||
|
IS_PCIE9097(phandle->card_type)) {
|
||||||
woal_pcie_dump_fw_info_v2(phandle);
|
woal_pcie_dump_fw_info_v2(phandle);
|
||||||
|
if (phandle->event_fw_dump) {
|
||||||
|
phandle->event_fw_dump = MFALSE;
|
||||||
|
queue_work(phandle->workqueue, &phandle->main_work);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
phandle->fw_dump = MFALSE;
|
phandle->fw_dump = MFALSE;
|
||||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MFALSE);
|
mlan_pm_wakeup_card(phandle->pmlan_adapter, MFALSE);
|
||||||
|
|
|
@ -139,4 +139,10 @@ typedef struct _pcie_service_card {
|
||||||
mlan_status woal_pcie_bus_register(void);
|
mlan_status woal_pcie_bus_register(void);
|
||||||
/** Unregister from bus driver function */
|
/** Unregister from bus driver function */
|
||||||
void woal_pcie_bus_unregister(void);
|
void woal_pcie_bus_unregister(void);
|
||||||
|
|
||||||
|
/* pmqos busfreq request handler*/
|
||||||
|
void woal_request_pmqos_busfreq_high(void);
|
||||||
|
/* pmqos busfreq release handler*/
|
||||||
|
void woal_release_pmqos_busfreq_high(void);
|
||||||
|
|
||||||
#endif /* _MOAL_PCIE_H_ */
|
#endif /* _MOAL_PCIE_H_ */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains standard ioctl functions
|
* @brief This file contains standard ioctl functions
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -586,7 +586,7 @@ static int woal_11n_htcap_cfg(moal_private *priv, struct iwreq *wrq)
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (cfg_11n->param.htcap_cfg.htcap != data[0]) {
|
if ((int)cfg_11n->param.htcap_cfg.htcap != data[0]) {
|
||||||
data_length = 2;
|
data_length = 2;
|
||||||
data[1] = cfg_11n->param.htcap_cfg.htcap;
|
data[1] = cfg_11n->param.htcap_cfg.htcap;
|
||||||
PRINTM(MINFO, "GET: htcapinfo for 2.4GHz:0x%x\n",
|
PRINTM(MINFO, "GET: htcapinfo for 2.4GHz:0x%x\n",
|
||||||
|
@ -1157,8 +1157,8 @@ static int woal_hs_cfg(moal_private *priv, struct iwreq *wrq,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* HS config is blocked if HS is already activated */
|
/* HS config is blocked if HS is already activated */
|
||||||
if (data_length &&
|
if (data_length && (data[0] != (int)HOST_SLEEP_CFG_CANCEL ||
|
||||||
(data[0] != HOST_SLEEP_CFG_CANCEL || invoke_hostcmd == MFALSE)) {
|
invoke_hostcmd == MFALSE)) {
|
||||||
memset(&bss_info, 0, sizeof(bss_info));
|
memset(&bss_info, 0, sizeof(bss_info));
|
||||||
woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info);
|
woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info);
|
||||||
if (bss_info.is_hs_configured) {
|
if (bss_info.is_hs_configured) {
|
||||||
|
@ -2171,7 +2171,7 @@ static int woal_tx_power_cfg(moal_private *priv, struct iwreq *wrq)
|
||||||
i = 0;
|
i = 0;
|
||||||
power_ext_len = 0;
|
power_ext_len = 0;
|
||||||
ptr = power_data;
|
ptr = power_data;
|
||||||
while ((i < pcfg->param.power_ext.num_pwr_grp) &&
|
while ((i < (int)pcfg->param.power_ext.num_pwr_grp) &&
|
||||||
((power_ext_len + 5) < MAX_POWER_TABLE_SIZE)) {
|
((power_ext_len + 5) < MAX_POWER_TABLE_SIZE)) {
|
||||||
pwr_grp = &pcfg->param.power_ext.power_group[i];
|
pwr_grp = &pcfg->param.power_ext.power_group[i];
|
||||||
if (pwr_grp->rate_format == MLAN_RATE_FORMAT_HT) {
|
if (pwr_grp->rate_format == MLAN_RATE_FORMAT_HT) {
|
||||||
|
@ -3565,7 +3565,7 @@ static int woal_passphrase(moal_private *priv, struct iwreq *wrq)
|
||||||
ret = -EOPNOTSUPP;
|
ret = -EOPNOTSUPP;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (!data_length || data_length >= sizeof(buf) - 1) {
|
if (!data_length || data_length >= (int)sizeof(buf) - 1) {
|
||||||
PRINTM(MERROR,
|
PRINTM(MERROR,
|
||||||
"Argument missing or too long for setpassphrase\n");
|
"Argument missing or too long for setpassphrase\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
@ -4103,7 +4103,7 @@ static int woal_tx_bf_cfg_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||||
char_count = data_length - 1;
|
char_count = data_length - 1;
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
if (char_count) {
|
if (char_count) {
|
||||||
if (data_length > sizeof(buf)) {
|
if (data_length > (int)sizeof(buf)) {
|
||||||
PRINTM(MERROR, "Too many arguments\n");
|
PRINTM(MERROR, "Too many arguments\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -4331,7 +4331,7 @@ static int woal_tx_bf_cfg_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||||
bf_periodicity->interval);
|
bf_periodicity->interval);
|
||||||
break;
|
break;
|
||||||
case TX_BF_FOR_PEER_ENBL:
|
case TX_BF_FOR_PEER_ENBL:
|
||||||
for (i = 0; i < bf_cfg.no_of_peers; i++) {
|
for (i = 0; i < (int)bf_cfg.no_of_peers; i++) {
|
||||||
data_length +=
|
data_length +=
|
||||||
sprintf(buf + data_length,
|
sprintf(buf + data_length,
|
||||||
"%02x:%02x:%02x:%02x:%02x:%02x",
|
"%02x:%02x:%02x:%02x:%02x:%02x",
|
||||||
|
@ -4354,7 +4354,7 @@ static int woal_tx_bf_cfg_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SET_SNR_THR_PEER:
|
case SET_SNR_THR_PEER:
|
||||||
for (i = 0; i < bf_cfg.no_of_peers; i++) {
|
for (i = 0; i < (int)bf_cfg.no_of_peers; i++) {
|
||||||
data_length +=
|
data_length +=
|
||||||
sprintf(buf + data_length,
|
sprintf(buf + data_length,
|
||||||
"%02x:%02x:%02x:%02x:%02x:%02x",
|
"%02x:%02x:%02x:%02x:%02x:%02x",
|
||||||
|
@ -4415,10 +4415,12 @@ static int moal_ret_get_scan_table_ioctl(struct iwreq *wrq,
|
||||||
num_scans_done = 0;
|
num_scans_done = 0;
|
||||||
ret_code = MLAN_STATUS_SUCCESS;
|
ret_code = MLAN_STATUS_SUCCESS;
|
||||||
|
|
||||||
prsp_info = (wlan_ioctl_get_scan_table_info *)wrq->u.data.pointer;
|
prsp_info =
|
||||||
|
(wlan_ioctl_get_scan_table_info __force *)wrq->u.data.pointer;
|
||||||
pcurrent = (t_u8 *)prsp_info->scan_table_entry_buf;
|
pcurrent = (t_u8 *)prsp_info->scan_table_entry_buf;
|
||||||
|
|
||||||
pbuffer_end = wrq->u.data.pointer + wrq->u.data.length - 1;
|
pbuffer_end =
|
||||||
|
(t_u8 __force *)wrq->u.data.pointer + wrq->u.data.length - 1;
|
||||||
space_left = pbuffer_end - pcurrent;
|
space_left = pbuffer_end - pcurrent;
|
||||||
scan_table = (BSSDescriptor_t *)(scan_resp->pscan_table);
|
scan_table = (BSSDescriptor_t *)(scan_resp->pscan_table);
|
||||||
|
|
||||||
|
@ -4459,7 +4461,7 @@ static int moal_ret_get_scan_table_ioctl(struct iwreq *wrq,
|
||||||
}
|
}
|
||||||
|
|
||||||
prsp_info->scan_number = num_scans_done;
|
prsp_info->scan_number = num_scans_done;
|
||||||
ret_len = pcurrent - (t_u8 *)wrq->u.data.pointer;
|
ret_len = pcurrent - (t_u8 __force *)wrq->u.data.pointer;
|
||||||
|
|
||||||
wrq->u.data.length = ret_len;
|
wrq->u.data.length = ret_len;
|
||||||
|
|
||||||
|
@ -4482,7 +4484,6 @@ static int moal_ret_get_scan_table_ioctl(struct iwreq *wrq,
|
||||||
static mlan_status woal_get_scan_table_ioctl(moal_private *priv,
|
static mlan_status woal_get_scan_table_ioctl(moal_private *priv,
|
||||||
struct iwreq *wrq)
|
struct iwreq *wrq)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_scan *scan = NULL;
|
mlan_ds_scan *scan = NULL;
|
||||||
int scan_start = 0;
|
int scan_start = 0;
|
||||||
|
@ -4493,7 +4494,7 @@ static mlan_status woal_get_scan_table_ioctl(moal_private *priv,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_scan));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4506,7 +4507,6 @@ static mlan_status woal_get_scan_table_ioctl(moal_private *priv,
|
||||||
if (copy_from_user(&scan_start, wrq->u.data.pointer,
|
if (copy_from_user(&scan_start, wrq->u.data.pointer,
|
||||||
sizeof(scan_start))) {
|
sizeof(scan_start))) {
|
||||||
PRINTM(MERROR, "copy from user failed\n");
|
PRINTM(MERROR, "copy from user failed\n");
|
||||||
ret = -EFAULT;
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (scan_start > 0)
|
if (scan_start > 0)
|
||||||
|
@ -4760,7 +4760,7 @@ done:
|
||||||
static int woal_cmd53rdwr_ioctl(moal_private *priv, struct iwreq *wrq)
|
static int woal_cmd53rdwr_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||||
{
|
{
|
||||||
t_u8 *buf = NULL;
|
t_u8 *buf = NULL;
|
||||||
t_u8 rw, func, mode;
|
t_u8 rw, mode;
|
||||||
t_u16 blklen = 0, blknum = 0;
|
t_u16 blklen = 0, blknum = 0;
|
||||||
int reg = 0, pattern_len = 0, pos = 0, ret = MLAN_STATUS_SUCCESS;
|
int reg = 0, pattern_len = 0, pos = 0, ret = MLAN_STATUS_SUCCESS;
|
||||||
t_u32 total_len = 0;
|
t_u32 total_len = 0;
|
||||||
|
@ -4792,7 +4792,6 @@ static int woal_cmd53rdwr_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||||
}
|
}
|
||||||
|
|
||||||
rw = buf[0]; /* read/write (0/1) */
|
rw = buf[0]; /* read/write (0/1) */
|
||||||
func = buf[1]; /* func (0/1/2) */
|
|
||||||
reg = buf[5]; /* address */
|
reg = buf[5]; /* address */
|
||||||
reg = (reg << 8) + buf[4];
|
reg = (reg << 8) + buf[4];
|
||||||
reg = (reg << 8) + buf[3];
|
reg = (reg << 8) + buf[3];
|
||||||
|
@ -4812,8 +4811,8 @@ static int woal_cmd53rdwr_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
PRINTM(MINFO,
|
PRINTM(MINFO,
|
||||||
"CMD53 read/write, func = %d, addr = %#x, mode = %d, block size = %d, block(byte) number = %d\n",
|
"CMD53 read/write, addr = %#x, mode = %d, block size = %d, block(byte) number = %d\n",
|
||||||
func, reg, mode, blklen, blknum);
|
reg, mode, blklen, blknum);
|
||||||
|
|
||||||
if (!rw) {
|
if (!rw) {
|
||||||
sdio_claim_host(
|
sdio_claim_host(
|
||||||
|
@ -4835,12 +4834,12 @@ static int woal_cmd53rdwr_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||||
wrq->u.data.length = total_len;
|
wrq->u.data.length = total_len;
|
||||||
} else {
|
} else {
|
||||||
pattern_len = wrq->u.data.length - 11;
|
pattern_len = wrq->u.data.length - 11;
|
||||||
if (pattern_len > total_len)
|
if (pattern_len > (int)total_len)
|
||||||
pattern_len = total_len;
|
pattern_len = total_len;
|
||||||
memset(data, 0, WOAL_2K_BYTES);
|
memset(data, 0, WOAL_2K_BYTES);
|
||||||
|
|
||||||
/* Copy/duplicate the pattern to data buffer */
|
/* Copy/duplicate the pattern to data buffer */
|
||||||
for (pos = 0; pos < total_len; pos++)
|
for (pos = 0; pos < (int)total_len; pos++)
|
||||||
data[pos] = buf[11 + (pos % pattern_len)];
|
data[pos] = buf[11 + (pos % pattern_len)];
|
||||||
|
|
||||||
sdio_claim_host(
|
sdio_claim_host(
|
||||||
|
@ -5924,8 +5923,8 @@ static int woal_dfs_testing(moal_private *priv, struct iwreq *wrq)
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if ((unsigned)data[0] > 0xFFFF) {
|
if ((unsigned)data[0] > 1800) {
|
||||||
PRINTM(MERROR, "The maximum user CAC is 65535 msec.\n");
|
PRINTM(MERROR, "The maximum user CAC is 1800 sec.\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -5947,7 +5946,7 @@ static int woal_dfs_testing(moal_private *priv, struct iwreq *wrq)
|
||||||
ds_11hcfg->param.dfs_testing.usr_no_chan_change =
|
ds_11hcfg->param.dfs_testing.usr_no_chan_change =
|
||||||
data[2] ? 1 : 0;
|
data[2] ? 1 : 0;
|
||||||
ds_11hcfg->param.dfs_testing.usr_fixed_new_chan = (t_u8)data[3];
|
ds_11hcfg->param.dfs_testing.usr_fixed_new_chan = (t_u8)data[3];
|
||||||
priv->phandle->cac_period_jiffies = (t_u16)data[0] * HZ / 1000;
|
priv->phandle->cac_period_jiffies = (t_u16)data[0] * HZ;
|
||||||
req->action = MLAN_ACT_SET;
|
req->action = MLAN_ACT_SET;
|
||||||
} else {
|
} else {
|
||||||
PRINTM(MERROR, "Invalid number of args!\n");
|
PRINTM(MERROR, "Invalid number of args!\n");
|
||||||
|
@ -6716,7 +6715,6 @@ int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||||
mlan_status woal_get_data_rates(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_data_rates(moal_private *priv, t_u8 wait_option,
|
||||||
moal_802_11_rates *m_rates)
|
moal_802_11_rates *m_rates)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ds_rate *rate = NULL;
|
mlan_ds_rate *rate = NULL;
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -6725,7 +6723,7 @@ mlan_status woal_get_data_rates(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_rate));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6763,7 +6761,6 @@ done:
|
||||||
mlan_status woal_get_channel_list(moal_private *priv, t_u8 wait_option,
|
mlan_status woal_get_channel_list(moal_private *priv, t_u8 wait_option,
|
||||||
mlan_chan_list *chan_list)
|
mlan_chan_list *chan_list)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
mlan_ds_bss *bss = NULL;
|
mlan_ds_bss *bss = NULL;
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -6772,7 +6769,7 @@ mlan_status woal_get_channel_list(moal_private *priv, t_u8 wait_option,
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
ret = -ENOMEM;
|
status = MLAN_STATUS_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains functions for proc file.
|
* @brief This file contains functions for proc file.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -41,7 +41,7 @@ Change log:
|
||||||
#define MWLAN_PROC "mwlan"
|
#define MWLAN_PROC "mwlan"
|
||||||
#define WLAN_PROC "adapter%d"
|
#define WLAN_PROC "adapter%d"
|
||||||
/** Proc mwlan directory entry */
|
/** Proc mwlan directory entry */
|
||||||
struct proc_dir_entry *proc_mwlan;
|
static struct proc_dir_entry *proc_mwlan;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
|
||||||
#define PROC_DIR NULL
|
#define PROC_DIR NULL
|
||||||
|
@ -220,7 +220,7 @@ static int woal_info_proc_read(struct seq_file *sfp, void *data)
|
||||||
seq_printf(sfp, "carrier %s\n",
|
seq_printf(sfp, "carrier %s\n",
|
||||||
((netif_carrier_ok(priv->netdev)) ? "on" : "off"));
|
((netif_carrier_ok(priv->netdev)) ? "on" : "off"));
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||||
for (i = 0; i < netdev->num_tx_queues; i++) {
|
for (i = 0; i < (int)netdev->num_tx_queues; i++) {
|
||||||
seq_printf(sfp, "tx queue %d: %s\n", i,
|
seq_printf(sfp, "tx queue %d: %s\n", i,
|
||||||
((netif_tx_queue_stopped(
|
((netif_tx_queue_stopped(
|
||||||
netdev_get_tx_queue(netdev, 0))) ?
|
netdev_get_tx_queue(netdev, 0))) ?
|
||||||
|
@ -287,6 +287,18 @@ static int woal_info_proc_read(struct seq_file *sfp, void *data)
|
||||||
seq_printf(sfp, "[%d] Tx bytes rate : %luMbps\n", i,
|
seq_printf(sfp, "[%d] Tx bytes rate : %luMbps\n", i,
|
||||||
handle->tp_acnt.tx_bytes_rate[i] * 8 / 1024 / 1024);
|
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",
|
seq_printf(sfp, "Tx intr cnt : %lu\n",
|
||||||
handle->tp_acnt.tx_intr_cnt);
|
handle->tp_acnt.tx_intr_cnt);
|
||||||
seq_printf(sfp, "Tx intr last : %lu\n",
|
seq_printf(sfp, "Tx intr last : %lu\n",
|
||||||
|
@ -295,6 +307,10 @@ static int woal_info_proc_read(struct seq_file *sfp, void *data)
|
||||||
handle->tp_acnt.tx_intr_rate);
|
handle->tp_acnt.tx_intr_rate);
|
||||||
seq_printf(sfp, "Tx pending : %lu\n",
|
seq_printf(sfp, "Tx pending : %lu\n",
|
||||||
handle->tp_acnt.tx_pending);
|
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");
|
seq_printf(sfp, "====Rx accounting====\n");
|
||||||
for (i = 0; i < MAX_TP_ACCOUNT_DROP_POINT_NUM; i++) {
|
for (i = 0; i < MAX_TP_ACCOUNT_DROP_POINT_NUM; i++) {
|
||||||
seq_printf(sfp, "[%d] Rx packets : %lu\n", i,
|
seq_printf(sfp, "[%d] Rx packets : %lu\n", i,
|
||||||
|
@ -310,6 +326,18 @@ static int woal_info_proc_read(struct seq_file *sfp, void *data)
|
||||||
seq_printf(sfp, "[%d] Rx bytes rate : %luMbps\n", i,
|
seq_printf(sfp, "[%d] Rx bytes rate : %luMbps\n", i,
|
||||||
handle->tp_acnt.rx_bytes_rate[i] * 8 / 1024 / 1024);
|
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",
|
seq_printf(sfp, "Rx intr cnt : %lu\n",
|
||||||
handle->tp_acnt.rx_intr_cnt);
|
handle->tp_acnt.rx_intr_cnt);
|
||||||
seq_printf(sfp, "Rx intr last : %lu\n",
|
seq_printf(sfp, "Rx intr last : %lu\n",
|
||||||
|
@ -320,6 +348,8 @@ static int woal_info_proc_read(struct seq_file *sfp, void *data)
|
||||||
handle->tp_acnt.rx_pending);
|
handle->tp_acnt.rx_pending);
|
||||||
seq_printf(sfp, "Rx pause : %lu\n",
|
seq_printf(sfp, "Rx pause : %lu\n",
|
||||||
handle->tp_acnt.rx_paused_cnt);
|
handle->tp_acnt.rx_paused_cnt);
|
||||||
|
seq_printf(sfp, "Rx rdptr full cnt : %lu\n",
|
||||||
|
handle->tp_acnt.rx_rdptr_full_cnt);
|
||||||
exit:
|
exit:
|
||||||
LEAVE();
|
LEAVE();
|
||||||
MODULE_PUT;
|
MODULE_PUT;
|
||||||
|
@ -578,6 +608,11 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
||||||
config_data = (t_u32)woal_string_to_number(line);
|
config_data = (t_u32)woal_string_to_number(line);
|
||||||
cmd = MFG_CMD_RX_ANT;
|
cmd = MFG_CMD_RX_ANT;
|
||||||
}
|
}
|
||||||
|
if (!strncmp(databuf, "radio_mode", strlen("radio_mode"))) {
|
||||||
|
line += strlen("radio_mode") + 1;
|
||||||
|
config_data = (t_u32)woal_string_to_number(line);
|
||||||
|
cmd = MFG_CMD_RADIO_MODE_CFG;
|
||||||
|
}
|
||||||
if (!strncmp(databuf, "channel", strlen("channel"))) {
|
if (!strncmp(databuf, "channel", strlen("channel"))) {
|
||||||
line += strlen("channel") + 1;
|
line += strlen("channel") + 1;
|
||||||
config_data = (t_u32)woal_string_to_number(line);
|
config_data = (t_u32)woal_string_to_number(line);
|
||||||
|
@ -604,6 +639,9 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
||||||
if (!strncmp(databuf, "tx_continuous=", strlen("tx_continuous=")) &&
|
if (!strncmp(databuf, "tx_continuous=", strlen("tx_continuous=")) &&
|
||||||
count > strlen("tx_continuous="))
|
count > strlen("tx_continuous="))
|
||||||
cmd = MFG_CMD_TX_CONT;
|
cmd = MFG_CMD_TX_CONT;
|
||||||
|
if (!strncmp(databuf, "he_tb_tx=", strlen("he_tb_tx=")) &&
|
||||||
|
count > strlen("he_tb_tx="))
|
||||||
|
cmd = MFG_CMD_CONFIG_MAC_HE_TB_TX;
|
||||||
|
|
||||||
if (cmd && handle->rf_test_mode &&
|
if (cmd && handle->rf_test_mode &&
|
||||||
(woal_process_rf_test_mode_cmd(
|
(woal_process_rf_test_mode_cmd(
|
||||||
|
@ -659,6 +697,16 @@ static int woal_config_read(struct seq_file *sfp, void *data)
|
||||||
handle->rf_data->channel);
|
handle->rf_data->channel);
|
||||||
else
|
else
|
||||||
seq_printf(sfp, "channel=\n");
|
seq_printf(sfp, "channel=\n");
|
||||||
|
if (handle->rf_data->radio_mode[0])
|
||||||
|
seq_printf(sfp, "radio_mode[0]=%u\n",
|
||||||
|
handle->rf_data->radio_mode[0]);
|
||||||
|
else
|
||||||
|
seq_printf(sfp, "radio_mode[0]=\n");
|
||||||
|
if (handle->rf_data->radio_mode[1])
|
||||||
|
seq_printf(sfp, "radio_mode[1]=%u\n",
|
||||||
|
handle->rf_data->radio_mode[1]);
|
||||||
|
else
|
||||||
|
seq_printf(sfp, "radio_mode[1]=\n");
|
||||||
seq_printf(sfp, "total rx pkt count=%u\n",
|
seq_printf(sfp, "total rx pkt count=%u\n",
|
||||||
handle->rf_data->rx_tot_pkt_count);
|
handle->rf_data->rx_tot_pkt_count);
|
||||||
seq_printf(sfp, "rx multicast/broadcast pkt count=%u\n",
|
seq_printf(sfp, "rx multicast/broadcast pkt count=%u\n",
|
||||||
|
@ -696,6 +744,9 @@ static int woal_config_read(struct seq_file *sfp, void *data)
|
||||||
for (i = 3; i < 13; i++)
|
for (i = 3; i < 13; i++)
|
||||||
seq_printf(sfp, " %u",
|
seq_printf(sfp, " %u",
|
||||||
handle->rf_data->tx_frame_data[i]);
|
handle->rf_data->tx_frame_data[i]);
|
||||||
|
for (i = 13; i < 20; i++)
|
||||||
|
seq_printf(sfp, " %u",
|
||||||
|
handle->rf_data->tx_frame_data[i]);
|
||||||
seq_printf(sfp, " %02x:%02x:%02x:%02x:%02x:%02x",
|
seq_printf(sfp, " %02x:%02x:%02x:%02x:%02x:%02x",
|
||||||
handle->rf_data->bssid[0],
|
handle->rf_data->bssid[0],
|
||||||
handle->rf_data->bssid[1],
|
handle->rf_data->bssid[1],
|
||||||
|
@ -705,6 +756,14 @@ static int woal_config_read(struct seq_file *sfp, void *data)
|
||||||
handle->rf_data->bssid[5]);
|
handle->rf_data->bssid[5]);
|
||||||
}
|
}
|
||||||
seq_printf(sfp, "\n");
|
seq_printf(sfp, "\n");
|
||||||
|
seq_printf(sfp, "he_tb_tx=%u", handle->rf_data->he_tb_tx[0]);
|
||||||
|
if (handle->rf_data->he_tb_tx[0] == MTRUE) {
|
||||||
|
seq_printf(sfp, " %u", handle->rf_data->he_tb_tx[1]);
|
||||||
|
seq_printf(sfp, " %u", handle->rf_data->he_tb_tx[2]);
|
||||||
|
seq_printf(sfp, " %u", handle->rf_data->he_tb_tx[3]);
|
||||||
|
seq_printf(sfp, " %u", handle->rf_data->he_tb_tx[4]);
|
||||||
|
}
|
||||||
|
seq_printf(sfp, "\n");
|
||||||
}
|
}
|
||||||
MODULE_PUT;
|
MODULE_PUT;
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* driver.
|
* driver.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* related functions.
|
* related functions.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -31,7 +31,8 @@ Change log:
|
||||||
#include "moal_sdio.h"
|
#include "moal_sdio.h"
|
||||||
|
|
||||||
/** define nxp vendor id */
|
/** define nxp vendor id */
|
||||||
#define NXP_VENDOR_ID 0x02df
|
#define NXP_VENDOR_ID 0x0471
|
||||||
|
#define MRVL_VENDOR_ID 0x02df
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Local Variables
|
Local Variables
|
||||||
|
@ -84,29 +85,29 @@ static moal_if_ops sdiommc_ops;
|
||||||
/** WLAN IDs */
|
/** WLAN IDs */
|
||||||
static const struct sdio_device_id wlan_ids[] = {
|
static const struct sdio_device_id wlan_ids[] = {
|
||||||
#ifdef SD8887
|
#ifdef SD8887
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_8887)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8887)},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SD8897
|
#ifdef SD8897
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_8897)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8897)},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SD8977
|
#ifdef SD8977
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_8977)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8977)},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SD8978
|
#ifdef SD8978
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_8978)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8978)},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SD8997
|
#ifdef SD8997
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_8997)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8997)},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SD8987
|
#ifdef SD8987
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_8987)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_8987)},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SD9098
|
#ifdef SD9098
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_9098_FN1)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_9098_FN1)},
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_9098_FN2)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_9098_FN2)},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SD9097
|
#ifdef SD9097
|
||||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_9097)},
|
{SDIO_DEVICE(MRVL_VENDOR_ID, SD_DEVICE_ID_9097)},
|
||||||
#endif
|
#endif
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
@ -165,13 +166,13 @@ static struct sdio_driver REFDATA wlan_sdio = {
|
||||||
Local Functions
|
Local Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
static void woal_sdiommc_dump_fw_info(moal_handle *phandle);
|
static void woal_sdiommc_dump_fw_info(moal_handle *phandle);
|
||||||
|
#if 0
|
||||||
/** @brief This function dump the sdio register
|
/** @brief This function dump the sdio register
|
||||||
*
|
*
|
||||||
* @param handle A Pointer to the moal_handle structure
|
* @param handle A Pointer to the moal_handle structure
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_dump_sdio_reg(moal_handle *handle)
|
static void woal_dump_sdio_reg(moal_handle *handle)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
t_u8 data, i;
|
t_u8 data, i;
|
||||||
|
@ -210,6 +211,7 @@ void woal_dump_sdio_reg(moal_handle *handle)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Global Functions
|
Global Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
@ -286,6 +288,7 @@ static t_u16 woal_update_card_type(t_void *card)
|
||||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SD8897
|
#ifdef SD8897
|
||||||
if (cardp_sd->func->device == SD_DEVICE_ID_8897) {
|
if (cardp_sd->func->device == SD_DEVICE_ID_8897) {
|
||||||
card_type = CARD_TYPE_SD8897;
|
card_type = CARD_TYPE_SD8897;
|
||||||
|
@ -525,7 +528,6 @@ void woal_sdio_shutdown(struct device *dev)
|
||||||
moal_handle *handle = NULL;
|
moal_handle *handle = NULL;
|
||||||
struct sdio_mmc_card *cardp;
|
struct sdio_mmc_card *cardp;
|
||||||
mlan_ds_ps_info pm_info;
|
mlan_ds_ps_info pm_info;
|
||||||
int timeout = 0;
|
|
||||||
int i, retry_num = 8;
|
int i, retry_num = 8;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
@ -562,7 +564,7 @@ void woal_sdio_shutdown(struct device *dev)
|
||||||
}
|
}
|
||||||
woal_enable_hs(woal_get_priv(handle, MLAN_BSS_ROLE_ANY));
|
woal_enable_hs(woal_get_priv(handle, MLAN_BSS_ROLE_ANY));
|
||||||
|
|
||||||
timeout = wait_event_interruptible_timeout(
|
wait_event_interruptible_timeout(
|
||||||
handle->hs_activate_wait_q,
|
handle->hs_activate_wait_q,
|
||||||
handle->hs_activate_wait_q_woken, HS_ACTIVE_TIMEOUT);
|
handle->hs_activate_wait_q_woken, HS_ACTIVE_TIMEOUT);
|
||||||
if (handle->hs_activated == MTRUE)
|
if (handle->hs_activated == MTRUE)
|
||||||
|
@ -812,7 +814,7 @@ static mlan_status woal_sdiommc_read_reg(moal_handle *handle, t_u32 reg,
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_sdio_writeb(moal_handle *handle, t_u32 reg, t_u8 data)
|
static mlan_status woal_sdio_writeb(moal_handle *handle, t_u32 reg, t_u8 data)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||||
sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func);
|
sdio_claim_host(((struct sdio_mmc_card *)handle->card)->func);
|
||||||
|
@ -831,7 +833,7 @@ mlan_status woal_sdio_writeb(moal_handle *handle, t_u32 reg, t_u8 data)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_sdio_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
static mlan_status woal_sdio_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||||
t_u8 val;
|
t_u8 val;
|
||||||
|
@ -853,7 +855,8 @@ mlan_status woal_sdio_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_sdio_f0_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
static mlan_status woal_sdio_f0_readb(moal_handle *handle, t_u32 reg,
|
||||||
|
t_u8 *data)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||||
t_u8 val;
|
t_u8 val;
|
||||||
|
@ -876,7 +879,7 @@ mlan_status woal_sdio_f0_readb(moal_handle *handle, t_u32 reg, t_u8 *data)
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_sdio_rw_mb(moal_handle *handle, pmlan_buffer pmbuf_list,
|
static mlan_status woal_sdio_rw_mb(moal_handle *handle, pmlan_buffer pmbuf_list,
|
||||||
t_u32 port, t_u8 write)
|
t_u32 port, t_u8 write)
|
||||||
{
|
{
|
||||||
struct scatterlist sg_list[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX];
|
struct scatterlist sg_list[SDIO_MP_AGGR_DEF_PKT_LIMIT_MAX];
|
||||||
|
@ -1477,7 +1480,7 @@ typedef struct {
|
||||||
t_u8 type;
|
t_u8 type;
|
||||||
} memory_type_mapping;
|
} memory_type_mapping;
|
||||||
|
|
||||||
memory_type_mapping mem_type_mapping_tbl[] = {
|
static memory_type_mapping mem_type_mapping_tbl[] = {
|
||||||
{"ITCM", NULL, NULL, 0xF0, FW_DUMP_TYPE_MEM_ITCM},
|
{"ITCM", NULL, NULL, 0xF0, FW_DUMP_TYPE_MEM_ITCM},
|
||||||
{"DTCM", NULL, NULL, 0xF1, FW_DUMP_TYPE_MEM_DTCM},
|
{"DTCM", NULL, NULL, 0xF1, FW_DUMP_TYPE_MEM_DTCM},
|
||||||
{"SQRAM", NULL, NULL, 0xF2, FW_DUMP_TYPE_MEM_SQRAM},
|
{"SQRAM", NULL, NULL, 0xF2, FW_DUMP_TYPE_MEM_SQRAM},
|
||||||
|
@ -1494,15 +1497,8 @@ memory_type_mapping mem_type_mapping_tbl[] = {
|
||||||
{"EXT13", NULL, NULL, 0xFD, 0},
|
{"EXT13", NULL, NULL, 0xFD, 0},
|
||||||
{"EXTLAST", NULL, NULL, 0xFE, 0},
|
{"EXTLAST", NULL, NULL, 0xFE, 0},
|
||||||
};
|
};
|
||||||
memory_type_mapping mem_type_mapping_tbl_8977_8997 = {"DUMP", NULL, NULL, 0xDD,
|
static memory_type_mapping mem_type_mapping_tbl_8977_8997 = {"DUMP", NULL, NULL,
|
||||||
0};
|
0xDD, 0};
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
RDWR_STATUS_SUCCESS = 0,
|
|
||||||
RDWR_STATUS_FAILURE = 1,
|
|
||||||
RDWR_STATUS_DONE = 2
|
|
||||||
} rdwr_status;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function read/write firmware via cmd52
|
* @brief This function read/write firmware via cmd52
|
||||||
*
|
*
|
||||||
|
@ -1511,7 +1507,7 @@ typedef enum {
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS
|
* @return MLAN_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int tries = 0;
|
int tries = 0;
|
||||||
|
@ -1677,16 +1673,21 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
||||||
"pre-allocced buf is not enough\n");
|
"pre-allocced buf is not enough\n");
|
||||||
}
|
}
|
||||||
if (RDWR_STATUS_DONE == stat) {
|
if (RDWR_STATUS_DONE == stat) {
|
||||||
|
#ifdef MLAN_64BIT
|
||||||
PRINTM(MMSG,
|
PRINTM(MMSG,
|
||||||
"%s done:"
|
"%s done:"
|
||||||
#ifdef MLAN_64BIT
|
|
||||||
"size = 0x%lx\n",
|
"size = 0x%lx\n",
|
||||||
#else
|
|
||||||
"size = 0x%x\n",
|
|
||||||
#endif
|
|
||||||
mem_type_mapping_tbl[idx].mem_name,
|
mem_type_mapping_tbl[idx].mem_name,
|
||||||
dbg_ptr - mem_type_mapping_tbl[idx]
|
dbg_ptr - mem_type_mapping_tbl[idx]
|
||||||
.mem_Ptr);
|
.mem_Ptr);
|
||||||
|
#else
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"%s done:"
|
||||||
|
"size = 0x%x\n",
|
||||||
|
mem_type_mapping_tbl[idx].mem_name,
|
||||||
|
dbg_ptr - mem_type_mapping_tbl[idx]
|
||||||
|
.mem_Ptr);
|
||||||
|
#endif
|
||||||
memset(file_name, 0, sizeof(file_name));
|
memset(file_name, 0, sizeof(file_name));
|
||||||
sprintf(file_name, "%s%s", "file_sdio_",
|
sprintf(file_name, "%s%s", "file_sdio_",
|
||||||
mem_type_mapping_tbl[idx].mem_name);
|
mem_type_mapping_tbl[idx].mem_name);
|
||||||
|
@ -1853,15 +1854,20 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (RDWR_STATUS_DONE == stat) {
|
if (RDWR_STATUS_DONE == stat) {
|
||||||
|
#ifdef MLAN_64BIT
|
||||||
PRINTM(MMSG,
|
PRINTM(MMSG,
|
||||||
"%s done:"
|
"%s done:"
|
||||||
#ifdef MLAN_64BIT
|
|
||||||
"size = 0x%lx\n",
|
"size = 0x%lx\n",
|
||||||
#else
|
|
||||||
"size = 0x%x\n",
|
|
||||||
#endif
|
|
||||||
pmem_type_mapping_tbl->mem_name,
|
pmem_type_mapping_tbl->mem_name,
|
||||||
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr);
|
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr);
|
||||||
|
#else
|
||||||
|
PRINTM(MMSG,
|
||||||
|
"%s done:"
|
||||||
|
"size = 0x%x\n",
|
||||||
|
pmem_type_mapping_tbl->mem_name,
|
||||||
|
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr);
|
||||||
|
|
||||||
|
#endif
|
||||||
memset(file_name, 0, sizeof(file_name));
|
memset(file_name, 0, sizeof(file_name));
|
||||||
sprintf(file_name, "%s%s", "file_sdio_",
|
sprintf(file_name, "%s%s", "file_sdio_",
|
||||||
pmem_type_mapping_tbl->mem_name);
|
pmem_type_mapping_tbl->mem_name);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -28,95 +28,94 @@
|
||||||
#ifndef _MOAL_H
|
#ifndef _MOAL_H
|
||||||
#define _MOAL_H
|
#define _MOAL_H
|
||||||
|
|
||||||
mlan_status moal_get_fw_data(t_void *pmoal_handle, t_u32 offset, t_u32 len,
|
mlan_status moal_get_fw_data(t_void *pmoal, t_u32 offset, t_u32 len,
|
||||||
t_u8 *pbuf);
|
t_u8 *pbuf);
|
||||||
mlan_status moal_get_vdll_data(t_void *pmoal_handle, t_u32 len, t_u8 *pbuf);
|
mlan_status moal_get_vdll_data(t_void *pmoal, t_u32 len, t_u8 *pbuf);
|
||||||
mlan_status moal_get_hw_spec_complete(t_void *pmoal_handle, mlan_status status,
|
mlan_status moal_get_hw_spec_complete(t_void *pmoal, mlan_status status,
|
||||||
mlan_hw_info *phw, pmlan_bss_tbl ptbl);
|
mlan_hw_info *phw, pmlan_bss_tbl ptbl);
|
||||||
mlan_status moal_init_fw_complete(t_void *pmoal_handle, mlan_status status);
|
mlan_status moal_init_fw_complete(t_void *pmoal, mlan_status status);
|
||||||
mlan_status moal_shutdown_fw_complete(t_void *pmoal_handle, mlan_status status);
|
mlan_status moal_shutdown_fw_complete(t_void *pmoal, mlan_status status);
|
||||||
mlan_status moal_ioctl_complete(t_void *pmoal_handle,
|
mlan_status moal_ioctl_complete(t_void *pmoal, pmlan_ioctl_req pioctl_req,
|
||||||
pmlan_ioctl_req pioctl_req, mlan_status status);
|
mlan_status status);
|
||||||
mlan_status moal_alloc_mlan_buffer(t_void *pmoal_handle, t_u32 size,
|
mlan_status moal_alloc_mlan_buffer(t_void *pmoal, t_u32 size,
|
||||||
pmlan_buffer *pmbuf);
|
pmlan_buffer *pmbuf);
|
||||||
mlan_status moal_free_mlan_buffer(t_void *pmoal_handle, pmlan_buffer pmbuf);
|
mlan_status moal_free_mlan_buffer(t_void *pmoal, pmlan_buffer pmbuf);
|
||||||
mlan_status moal_send_packet_complete(t_void *pmoal_handle, pmlan_buffer pmbuf,
|
mlan_status moal_send_packet_complete(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
mlan_status status);
|
mlan_status status);
|
||||||
#ifdef USB
|
#ifdef USB
|
||||||
mlan_status moal_recv_complete(t_void *pmoal_handle, pmlan_buffer pmbuf,
|
mlan_status moal_recv_complete(t_void *pmoal, pmlan_buffer pmbuf, t_u32 port,
|
||||||
t_u32 port, mlan_status status);
|
mlan_status status);
|
||||||
mlan_status moal_write_data_async(t_void *pmoal_handle, pmlan_buffer pmbuf,
|
mlan_status moal_write_data_async(t_void *pmoal, pmlan_buffer pmbuf,
|
||||||
t_u32 port);
|
t_u32 port);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SDIO) || defined(PCIE)
|
#if defined(SDIO) || defined(PCIE)
|
||||||
/** moal_write_reg */
|
/** moal_write_reg */
|
||||||
mlan_status moal_write_reg(t_void *pmoal_handle, t_u32 reg, t_u32 data);
|
mlan_status moal_write_reg(t_void *pmoal, t_u32 reg, t_u32 data);
|
||||||
/** moal_read_reg */
|
/** moal_read_reg */
|
||||||
mlan_status moal_read_reg(t_void *pmoal_handle, t_u32 reg, t_u32 *data);
|
mlan_status moal_read_reg(t_void *pmoal, t_u32 reg, t_u32 *data);
|
||||||
#endif /* SDIO || PCIE */
|
#endif /* SDIO || PCIE */
|
||||||
mlan_status moal_write_data_sync(t_void *pmoal_handle, pmlan_buffer pmbuf,
|
mlan_status moal_write_data_sync(t_void *pmoal, pmlan_buffer pmbuf, t_u32 port,
|
||||||
t_u32 port, t_u32 timeout);
|
t_u32 timeout);
|
||||||
mlan_status moal_read_data_sync(t_void *pmoal_handle, pmlan_buffer pmbuf,
|
mlan_status moal_read_data_sync(t_void *pmoal, pmlan_buffer pmbuf, t_u32 port,
|
||||||
t_u32 port, t_u32 timeout);
|
t_u32 timeout);
|
||||||
mlan_status moal_recv_packet(t_void *pmoal_handle, pmlan_buffer pmbuf);
|
mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf);
|
||||||
mlan_status moal_recv_event(t_void *pmoal_handle, pmlan_event pmevent);
|
mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent);
|
||||||
mlan_status moal_malloc(t_void *pmoal_handle, t_u32 size, t_u32 flag,
|
mlan_status moal_malloc(t_void *pmoal, t_u32 size, t_u32 flag, t_u8 **ppbuf);
|
||||||
t_u8 **ppbuf);
|
mlan_status moal_mfree(t_void *pmoal, t_u8 *pbuf);
|
||||||
mlan_status moal_mfree(t_void *pmoal_handle, t_u8 *pbuf);
|
mlan_status moal_vmalloc(t_void *pmoal, t_u32 size, t_u8 **ppbuf);
|
||||||
mlan_status moal_vmalloc(t_void *pmoal_handle, t_u32 size, t_u8 **ppbuf);
|
mlan_status moal_vfree(t_void *pmoal, t_u8 *pbuf);
|
||||||
mlan_status moal_vfree(t_void *pmoal_handle, t_u8 *pbuf);
|
|
||||||
#ifdef PCIE
|
#ifdef PCIE
|
||||||
mlan_status moal_malloc_consistent(t_void *pmoal_handle, t_u32 size,
|
mlan_status moal_malloc_consistent(t_void *pmoal, t_u32 size, t_u8 **ppbuf,
|
||||||
t_u8 **ppbuf, t_pu64 pbuf_pa);
|
t_pu64 pbuf_pa);
|
||||||
mlan_status moal_mfree_consistent(t_void *pmoal_handle, t_u32 size, t_u8 *pbuf,
|
mlan_status moal_mfree_consistent(t_void *pmoal, t_u32 size, t_u8 *pbuf,
|
||||||
t_u64 buf_pa);
|
t_u64 buf_pa);
|
||||||
mlan_status moal_map_memory(t_void *pmoal_handle, t_u8 *pbuf, t_u64 *pbuf_pa,
|
mlan_status moal_map_memory(t_void *pmoal, t_u8 *pbuf, t_u64 *pbuf_pa,
|
||||||
t_u32 size, t_u32 flag);
|
t_u32 size, t_u32 flag);
|
||||||
mlan_status moal_unmap_memory(t_void *pmoal_handle, t_u8 *pbuf, t_u64 buf_pa,
|
mlan_status moal_unmap_memory(t_void *pmoal, t_u8 *pbuf, t_u64 buf_pa,
|
||||||
t_u32 size, t_u32 flag);
|
t_u32 size, t_u32 flag);
|
||||||
#endif /* PCIE */
|
#endif /* PCIE */
|
||||||
t_void *moal_memset(t_void *pmoal_handle, t_void *pmem, t_u8 byte, t_u32 num);
|
t_void *moal_memset(t_void *pmoal, t_void *pmem, t_u8 byte, t_u32 num);
|
||||||
t_void *moal_memcpy(t_void *pmoal_handle, t_void *pdest, const t_void *psrc,
|
t_void *moal_memcpy(t_void *pmoal, t_void *pdest, const t_void *psrc,
|
||||||
t_u32 num);
|
t_u32 num);
|
||||||
t_void *moal_memcpy_ext(t_void *pmoal_handle, t_void *pdest, const t_void *psrc,
|
t_void *moal_memcpy_ext(t_void *pmoal, t_void *pdest, const t_void *psrc,
|
||||||
t_u32 num, t_u32 dest_size);
|
t_u32 num, t_u32 dest_size);
|
||||||
|
|
||||||
t_void *moal_memmove(t_void *pmoal_handle, t_void *pdest, const t_void *psrc,
|
t_void *moal_memmove(t_void *pmoal, t_void *pdest, const t_void *psrc,
|
||||||
|
t_u32 num);
|
||||||
|
t_s32 moal_memcmp(t_void *pmoal, const t_void *pmem1, const t_void *pmem2,
|
||||||
t_u32 num);
|
t_u32 num);
|
||||||
t_s32 moal_memcmp(t_void *pmoal_handle, const t_void *pmem1,
|
|
||||||
const t_void *pmem2, t_u32 num);
|
|
||||||
/** moal_udelay */
|
/** moal_udelay */
|
||||||
t_void moal_udelay(t_void *pmoal_handle, t_u32 udelay);
|
t_void moal_udelay(t_void *pmoal, t_u32 udelay);
|
||||||
t_void moal_usleep_range(t_void *pmoal_handle, t_u32 min_delay,
|
t_void moal_usleep_range(t_void *pmoal, t_u32 min_delay, t_u32 max_delay);
|
||||||
t_u32 max_delay);
|
mlan_status moal_get_boot_ktime(t_void *pmoal, t_u64 *pnsec);
|
||||||
mlan_status moal_get_boot_ktime(t_void *pmoal_handle, t_u64 *pnsec);
|
mlan_status moal_get_system_time(t_void *pmoal, t_u32 *psec, t_u32 *pusec);
|
||||||
mlan_status moal_get_system_time(t_void *pmoal_handle, t_u32 *psec,
|
mlan_status moal_init_lock(t_void *pmoal, t_void **pplock);
|
||||||
t_u32 *pusec);
|
mlan_status moal_free_lock(t_void *pmoal, t_void *plock);
|
||||||
mlan_status moal_init_lock(t_void *pmoal_handle, t_void **pplock);
|
mlan_status moal_spin_lock(t_void *pmoal, t_void *plock);
|
||||||
mlan_status moal_free_lock(t_void *pmoal_handle, t_void *plock);
|
mlan_status moal_spin_unlock(t_void *pmoal, t_void *plock);
|
||||||
mlan_status moal_spin_lock(t_void *pmoal_handle, t_void *plock);
|
|
||||||
mlan_status moal_spin_unlock(t_void *pmoal_handle, t_void *plock);
|
|
||||||
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
#if defined(DRV_EMBEDDED_AUTHENTICATOR) || defined(DRV_EMBEDDED_SUPPLICANT)
|
||||||
mlan_status moal_wait_hostcmd_complete(t_void *pmoal_handle, t_u32 bss_index);
|
mlan_status moal_wait_hostcmd_complete(t_void *pmoal, t_u32 bss_index);
|
||||||
mlan_status moal_notify_hostcmd_complete(t_void *pmoal_handle, t_u32 bss_index);
|
mlan_status moal_notify_hostcmd_complete(t_void *pmoal, t_u32 bss_index);
|
||||||
#endif
|
#endif
|
||||||
t_void moal_print(t_void *pmoal_handle, t_u32 level, char *pformat, IN...);
|
t_void moal_print(t_void *pmoal, t_u32 level, char *pformat, IN...);
|
||||||
t_void moal_print_netintf(t_void *pmoal_handle, t_u32 bss_index, t_u32 level);
|
t_void moal_print_netintf(t_void *pmoal, t_u32 bss_index, t_u32 level);
|
||||||
t_void moal_assert(t_void *pmoal_handle, t_u32 cond);
|
t_void moal_assert(t_void *pmoal, t_u32 cond);
|
||||||
t_void moal_hist_data_add(t_void *pmoal_handle, t_u32 bss_index, t_u16 rx_rate,
|
t_void moal_hist_data_add(t_void *pmoal, t_u32 bss_index, t_u16 rx_rate,
|
||||||
t_s8 snr, t_s8 nflr, t_u8 antenna);
|
t_s8 snr, t_s8 nflr, t_u8 antenna);
|
||||||
|
|
||||||
|
t_void moal_updata_peer_signal(t_void *pmoal, t_u32 bss_index, t_u8 *peer_addr,
|
||||||
|
t_s8 snr, t_s8 nflr);
|
||||||
t_u64 moal_do_div(t_u64 num, t_u32 base);
|
t_u64 moal_do_div(t_u64 num, t_u32 base);
|
||||||
|
|
||||||
mlan_status moal_init_timer(t_void *pmoal_handle, t_void **pptimer,
|
mlan_status moal_init_timer(t_void *pmoal, t_void **pptimer,
|
||||||
IN t_void (*callback)(t_void *pcontext),
|
IN t_void (*callback)(t_void *pcontext),
|
||||||
t_void *pcontext);
|
t_void *pcontext);
|
||||||
mlan_status moal_free_timer(t_void *pmoal_handle, t_void *ptimer);
|
mlan_status moal_free_timer(t_void *pmoal, t_void *ptimer);
|
||||||
mlan_status moal_start_timer(t_void *pmoal_handle, t_void *ptimer,
|
mlan_status moal_start_timer(t_void *pmoal, t_void *ptimer, t_u8 periodic,
|
||||||
t_u8 periodic, t_u32 msec);
|
t_u32 msec);
|
||||||
mlan_status moal_stop_timer(t_void *pmoal_handle, t_void *ptimer);
|
mlan_status moal_stop_timer(t_void *pmoal, t_void *ptimer);
|
||||||
void moal_tp_accounting(t_void *pmoal_handle, void *buf, t_u32 drop_point);
|
void moal_tp_accounting(t_void *pmoal, void *buf, t_u32 drop_point);
|
||||||
void moal_tp_accounting_rx_param(t_void *pmoal_handle, unsigned int type,
|
void moal_tp_accounting_rx_param(t_void *pmoal, unsigned int type,
|
||||||
unsigned int rsvd1);
|
unsigned int rsvd1);
|
||||||
#endif /*_MOAL_H */
|
#endif /*_MOAL_H */
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the STA CFG80211 specific defines.
|
* @brief This file contains the STA CFG80211 specific defines.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2011-2020 NXP
|
* Copyright 2011-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -28,14 +28,4 @@
|
||||||
|
|
||||||
mlan_status woal_register_sta_cfg80211(struct net_device *dev, t_u8 bss_type);
|
mlan_status woal_register_sta_cfg80211(struct net_device *dev, t_u8 bss_type);
|
||||||
|
|
||||||
mlan_status woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep,
|
|
||||||
t_u32 cipher, const t_u8 *key, int key_len,
|
|
||||||
const t_u8 *seq, int seq_len, t_u8 key_index,
|
|
||||||
const t_u8 *addr, int disable,
|
|
||||||
t_u8 wait_option);
|
|
||||||
|
|
||||||
mlan_status woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key,
|
|
||||||
int key_len, t_u8 index,
|
|
||||||
t_u8 wait_option);
|
|
||||||
|
|
||||||
#endif /* _MOAL_STA_CFG80211_H_ */
|
#endif /* _MOAL_STA_CFG80211_H_ */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* driver.
|
* driver.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -58,7 +58,7 @@ static int woal_uap_addba_param(struct net_device *dev, struct ifreq *req)
|
||||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||||
mlan_ioctl_req *ioctl_req = NULL;
|
mlan_ioctl_req *ioctl_req = NULL;
|
||||||
mlan_ds_11n_cfg *cfg_11n = NULL;
|
mlan_ds_11n_cfg *cfg_11n = NULL;
|
||||||
addba_param param;
|
uap_addba_param param;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ static int woal_uap_aggr_priotbl(struct net_device *dev, struct ifreq *req)
|
||||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||||
mlan_ioctl_req *ioctl_req = NULL;
|
mlan_ioctl_req *ioctl_req = NULL;
|
||||||
mlan_ds_11n_cfg *cfg_11n = NULL;
|
mlan_ds_11n_cfg *cfg_11n = NULL;
|
||||||
aggr_prio_tbl param;
|
uap_aggr_prio_tbl param;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -281,7 +281,7 @@ done:
|
||||||
static int woal_uap_get_fw_info(struct net_device *dev, struct ifreq *req)
|
static int woal_uap_get_fw_info(struct net_device *dev, struct ifreq *req)
|
||||||
{
|
{
|
||||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||||
fw_info fw;
|
uap_fw_info fw;
|
||||||
mlan_fw_info fw_info;
|
mlan_fw_info fw_info;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -887,7 +887,7 @@ static int woal_uap_domain_info(struct net_device *dev, struct ifreq *req)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
tlv_data_len = ((t_u16 *)(tlv))[1];
|
tlv_data_len = ((t_u16 *)(tlv))[1];
|
||||||
if ((TLV_HEADER_LEN + tlv_data_len) > sizeof(tlv)) {
|
if ((TLV_HEADER_LEN + tlv_data_len) > (int)sizeof(tlv)) {
|
||||||
PRINTM(MERROR, "TLV buffer is overflowed");
|
PRINTM(MERROR, "TLV buffer is overflowed");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -1002,7 +1002,7 @@ static int woal_uap_dfs_testing(struct net_device *dev, struct ifreq *req)
|
||||||
/* Set mib value to MLAN */
|
/* Set mib value to MLAN */
|
||||||
ioctl_req->action = MLAN_ACT_SET;
|
ioctl_req->action = MLAN_ACT_SET;
|
||||||
cfg11h->param.dfs_testing.usr_cac_period_msec =
|
cfg11h->param.dfs_testing.usr_cac_period_msec =
|
||||||
param.usr_cac_period;
|
param.usr_cac_period * 1000;
|
||||||
cfg11h->param.dfs_testing.usr_nop_period_sec =
|
cfg11h->param.dfs_testing.usr_nop_period_sec =
|
||||||
param.usr_nop_period;
|
param.usr_nop_period;
|
||||||
cfg11h->param.dfs_testing.usr_no_chan_change =
|
cfg11h->param.dfs_testing.usr_no_chan_change =
|
||||||
|
@ -1011,8 +1011,7 @@ static int woal_uap_dfs_testing(struct net_device *dev, struct ifreq *req)
|
||||||
param.fixed_new_chan;
|
param.fixed_new_chan;
|
||||||
cfg11h->param.dfs_testing.usr_cac_restart = param.cac_restart;
|
cfg11h->param.dfs_testing.usr_cac_restart = param.cac_restart;
|
||||||
priv->phandle->cac_restart = param.cac_restart;
|
priv->phandle->cac_restart = param.cac_restart;
|
||||||
priv->phandle->cac_period_jiffies =
|
priv->phandle->cac_period_jiffies = param.usr_cac_period * HZ;
|
||||||
param.usr_cac_period * HZ / 1000;
|
|
||||||
priv->user_cac_period_msec =
|
priv->user_cac_period_msec =
|
||||||
cfg11h->param.dfs_testing.usr_cac_period_msec;
|
cfg11h->param.dfs_testing.usr_cac_period_msec;
|
||||||
}
|
}
|
||||||
|
@ -1024,7 +1023,7 @@ static int woal_uap_dfs_testing(struct net_device *dev, struct ifreq *req)
|
||||||
|
|
||||||
if (!param.action) { /* GET */
|
if (!param.action) { /* GET */
|
||||||
param.usr_cac_period =
|
param.usr_cac_period =
|
||||||
cfg11h->param.dfs_testing.usr_cac_period_msec;
|
cfg11h->param.dfs_testing.usr_cac_period_msec / 1000;
|
||||||
param.usr_nop_period =
|
param.usr_nop_period =
|
||||||
cfg11h->param.dfs_testing.usr_nop_period_sec;
|
cfg11h->param.dfs_testing.usr_nop_period_sec;
|
||||||
param.no_chan_change =
|
param.no_chan_change =
|
||||||
|
@ -1883,6 +1882,15 @@ static int woal_uap_antenna_cfg(struct net_device *dev, struct ifreq *req)
|
||||||
mreq->action = MLAN_ACT_SET;
|
mreq->action = MLAN_ACT_SET;
|
||||||
radio->param.ant_cfg.tx_antenna = antenna_config.tx_mode;
|
radio->param.ant_cfg.tx_antenna = antenna_config.tx_mode;
|
||||||
radio->param.ant_cfg.rx_antenna = antenna_config.rx_mode;
|
radio->param.ant_cfg.rx_antenna = antenna_config.rx_mode;
|
||||||
|
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||||
|
if (IS_CARD9098(priv->phandle->card_type) ||
|
||||||
|
IS_CARD9097(priv->phandle->card_type)) {
|
||||||
|
if (IS_STA_CFG80211(
|
||||||
|
priv->phandle->params.cfg80211_wext))
|
||||||
|
woal_cfg80211_notify_antcfg(
|
||||||
|
priv, priv->phandle->wiphy, radio);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
status = woal_request_ioctl(priv, mreq, MOAL_IOCTL_WAIT);
|
status = woal_request_ioctl(priv, mreq, MOAL_IOCTL_WAIT);
|
||||||
|
@ -3204,7 +3212,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_uap_get_bss_param(moal_private *priv,
|
static mlan_status woal_uap_get_bss_param(moal_private *priv,
|
||||||
mlan_uap_bss_param *sys_cfg,
|
mlan_uap_bss_param *sys_cfg,
|
||||||
t_u8 wait_option)
|
t_u8 wait_option)
|
||||||
{
|
{
|
||||||
|
@ -3556,8 +3564,8 @@ done:
|
||||||
*
|
*
|
||||||
* @return 0 --success, otherwise fail
|
* @return 0 --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
int woal_uap_ap_cfg_parse_data(moal_private *priv, mlan_uap_bss_param *ap_cfg,
|
static int woal_uap_ap_cfg_parse_data(moal_private *priv,
|
||||||
char *buf)
|
mlan_uap_bss_param *ap_cfg, char *buf)
|
||||||
{
|
{
|
||||||
int ret = 0, atoi_ret;
|
int ret = 0, atoi_ret;
|
||||||
int set_sec = 0, set_key = 0, set_chan = 0;
|
int set_sec = 0, set_key = 0, set_chan = 0;
|
||||||
|
@ -3875,7 +3883,8 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_set_get_ap_scan_channels(moal_private *priv, t_u16 action,
|
static mlan_status
|
||||||
|
woal_set_get_ap_scan_channels(moal_private *priv, t_u16 action,
|
||||||
mlan_uap_scan_channels *scan_channels)
|
mlan_uap_scan_channels *scan_channels)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
|
@ -3971,7 +3980,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_start_acs_scan(moal_private *priv)
|
static mlan_status woal_start_acs_scan(moal_private *priv)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_ds_bss *bss = NULL;
|
mlan_ds_bss *bss = NULL;
|
||||||
|
@ -4014,7 +4023,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_do_acs_check(moal_private *priv)
|
static mlan_status woal_do_acs_check(moal_private *priv)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_uap_bss_param *sys_config = NULL;
|
mlan_uap_bss_param *sys_config = NULL;
|
||||||
|
|
|
@ -298,7 +298,7 @@ typedef struct _ds_hs_cfg {
|
||||||
#define UAP_GET_BSS_TYPE (SIOCDEVPRIVATE + 15)
|
#define UAP_GET_BSS_TYPE (SIOCDEVPRIVATE + 15)
|
||||||
|
|
||||||
/** addba_param */
|
/** addba_param */
|
||||||
typedef struct _addba_param {
|
typedef struct _uap_addba_param {
|
||||||
/** subcmd */
|
/** subcmd */
|
||||||
t_u32 subcmd;
|
t_u32 subcmd;
|
||||||
/** Set/Get */
|
/** Set/Get */
|
||||||
|
@ -313,10 +313,10 @@ typedef struct _addba_param {
|
||||||
t_u8 txamsdu;
|
t_u8 txamsdu;
|
||||||
/** amsdu for ADDBA response */
|
/** amsdu for ADDBA response */
|
||||||
t_u8 rxamsdu;
|
t_u8 rxamsdu;
|
||||||
} addba_param;
|
} uap_addba_param;
|
||||||
|
|
||||||
/** aggr_prio_tbl */
|
/** aggr_prio_tbl */
|
||||||
typedef struct _aggr_prio_tbl {
|
typedef struct _uap_aggr_prio_tbl {
|
||||||
/** subcmd */
|
/** subcmd */
|
||||||
t_u32 subcmd;
|
t_u32 subcmd;
|
||||||
/** Set/Get */
|
/** Set/Get */
|
||||||
|
@ -325,7 +325,7 @@ typedef struct _aggr_prio_tbl {
|
||||||
t_u8 ampdu[MAX_NUM_TID];
|
t_u8 ampdu[MAX_NUM_TID];
|
||||||
/** amsdu priority table */
|
/** amsdu priority table */
|
||||||
t_u8 amsdu[MAX_NUM_TID];
|
t_u8 amsdu[MAX_NUM_TID];
|
||||||
} aggr_prio_tbl;
|
} uap_aggr_prio_tbl;
|
||||||
|
|
||||||
/** addba_reject parameters */
|
/** addba_reject parameters */
|
||||||
typedef struct _addba_reject_para {
|
typedef struct _addba_reject_para {
|
||||||
|
@ -338,7 +338,7 @@ typedef struct _addba_reject_para {
|
||||||
} addba_reject_para;
|
} addba_reject_para;
|
||||||
|
|
||||||
/** fw_info */
|
/** fw_info */
|
||||||
typedef struct _fw_info {
|
typedef struct _uap_fw_info {
|
||||||
/** subcmd */
|
/** subcmd */
|
||||||
t_u32 subcmd;
|
t_u32 subcmd;
|
||||||
/** Get */
|
/** Get */
|
||||||
|
@ -353,7 +353,7 @@ typedef struct _fw_info {
|
||||||
t_u16 region_code;
|
t_u16 region_code;
|
||||||
/** 802.11n device capabilities */
|
/** 802.11n device capabilities */
|
||||||
t_u32 hw_dot_11n_dev_cap;
|
t_u32 hw_dot_11n_dev_cap;
|
||||||
} fw_info;
|
} uap_fw_info;
|
||||||
|
|
||||||
typedef struct _ht_tx_cfg_para_hdr {
|
typedef struct _ht_tx_cfg_para_hdr {
|
||||||
/** Sub command */
|
/** Sub command */
|
||||||
|
@ -541,7 +541,7 @@ int woal_uap_get_channel_nop_info(moal_private *priv, t_u8 wait_option,
|
||||||
#endif
|
#endif
|
||||||
mlan_status woal_set_get_ap_channel(moal_private *priv, t_u16 action,
|
mlan_status woal_set_get_ap_channel(moal_private *priv, t_u16 action,
|
||||||
t_u8 wait_option,
|
t_u8 wait_option,
|
||||||
pchan_band_info uap_channel);
|
chan_band_info *uap_channel);
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
void woal_uap_get_version(moal_private *priv, char *version, int max_len);
|
void woal_uap_get_version(moal_private *priv, char *version, int max_len);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains the functions for uAP CFG80211.
|
* @brief This file contains the functions for uAP CFG80211.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2011-2020 NXP
|
* Copyright 2011-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -154,7 +154,7 @@ static t_u8 woal_check_rsn_ie(IEEEtypes_Rsn_t *rsn_ie,
|
||||||
int i = 0;
|
int i = 0;
|
||||||
wpa_suite_auth_key_mgmt_t *key_mgmt = NULL;
|
wpa_suite_auth_key_mgmt_t *key_mgmt = NULL;
|
||||||
left = rsn_ie->len + 2;
|
left = rsn_ie->len + 2;
|
||||||
if (left < sizeof(IEEEtypes_Rsn_t))
|
if (left < (int)sizeof(IEEEtypes_Rsn_t))
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
sys_config->wpa_cfg.group_cipher = 0;
|
sys_config->wpa_cfg.group_cipher = 0;
|
||||||
sys_config->wpa_cfg.pairwise_cipher_wpa2 = 0;
|
sys_config->wpa_cfg.pairwise_cipher_wpa2 = 0;
|
||||||
|
@ -185,14 +185,14 @@ static t_u8 woal_check_rsn_ie(IEEEtypes_Rsn_t *rsn_ie,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
left -= sizeof(IEEEtypes_Rsn_t) + (count - 1) * sizeof(wpa_suite);
|
left -= sizeof(IEEEtypes_Rsn_t) + (count - 1) * sizeof(wpa_suite);
|
||||||
if (left < sizeof(wpa_suite_auth_key_mgmt_t))
|
if (left < (int)sizeof(wpa_suite_auth_key_mgmt_t))
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
key_mgmt =
|
key_mgmt =
|
||||||
(wpa_suite_auth_key_mgmt_t *)((u8 *)rsn_ie +
|
(wpa_suite_auth_key_mgmt_t *)((u8 *)rsn_ie +
|
||||||
sizeof(IEEEtypes_Rsn_t) +
|
sizeof(IEEEtypes_Rsn_t) +
|
||||||
(count - 1) * sizeof(wpa_suite));
|
(count - 1) * sizeof(wpa_suite));
|
||||||
count = le16_to_cpu(key_mgmt->count);
|
count = le16_to_cpu(key_mgmt->count);
|
||||||
if (left < (sizeof(wpa_suite_auth_key_mgmt_t) +
|
if (left < (int)(sizeof(wpa_suite_auth_key_mgmt_t) +
|
||||||
(count - 1) * sizeof(wpa_suite)))
|
(count - 1) * sizeof(wpa_suite)))
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
|
@ -233,7 +233,7 @@ static t_u8 woal_check_wpa_ie(IEEEtypes_Wpa_t *wpa_ie,
|
||||||
int i = 0;
|
int i = 0;
|
||||||
wpa_suite_auth_key_mgmt_t *key_mgmt = NULL;
|
wpa_suite_auth_key_mgmt_t *key_mgmt = NULL;
|
||||||
left = wpa_ie->len + 2;
|
left = wpa_ie->len + 2;
|
||||||
if (left < sizeof(IEEEtypes_Wpa_t))
|
if (left < (int)sizeof(IEEEtypes_Wpa_t))
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
sys_config->wpa_cfg.group_cipher = 0;
|
sys_config->wpa_cfg.group_cipher = 0;
|
||||||
sys_config->wpa_cfg.pairwise_cipher_wpa = 0;
|
sys_config->wpa_cfg.pairwise_cipher_wpa = 0;
|
||||||
|
@ -262,14 +262,14 @@ static t_u8 woal_check_wpa_ie(IEEEtypes_Wpa_t *wpa_ie,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
left -= sizeof(IEEEtypes_Wpa_t) + (count - 1) * sizeof(wpa_suite);
|
left -= sizeof(IEEEtypes_Wpa_t) + (count - 1) * sizeof(wpa_suite);
|
||||||
if (left < sizeof(wpa_suite_auth_key_mgmt_t))
|
if (left < (int)sizeof(wpa_suite_auth_key_mgmt_t))
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
key_mgmt =
|
key_mgmt =
|
||||||
(wpa_suite_auth_key_mgmt_t *)((u8 *)wpa_ie +
|
(wpa_suite_auth_key_mgmt_t *)((u8 *)wpa_ie +
|
||||||
sizeof(IEEEtypes_Wpa_t) +
|
sizeof(IEEEtypes_Wpa_t) +
|
||||||
(count - 1) * sizeof(wpa_suite));
|
(count - 1) * sizeof(wpa_suite));
|
||||||
count = le16_to_cpu(key_mgmt->count);
|
count = le16_to_cpu(key_mgmt->count);
|
||||||
if (left < (sizeof(wpa_suite_auth_key_mgmt_t) +
|
if (left < (int)(sizeof(wpa_suite_auth_key_mgmt_t) +
|
||||||
(count - 1) * sizeof(wpa_suite)))
|
(count - 1) * sizeof(wpa_suite)))
|
||||||
return MFALSE;
|
return MFALSE;
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
|
@ -426,7 +426,7 @@ static t_void woal_set_wmm_ies(moal_private *priv, const t_u8 *ie, int len,
|
||||||
* @param params A pointer to cfg80211_ap_settings structure
|
* @param params A pointer to cfg80211_ap_settings structure
|
||||||
* @return 0 -- success, otherwise fail
|
* @return 0 -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
t_u8 woal_check_11ac_capability(moal_private *priv, t_u8 band,
|
static t_u8 woal_check_11ac_capability(moal_private *priv, t_u8 band,
|
||||||
struct cfg80211_ap_settings *params)
|
struct cfg80211_ap_settings *params)
|
||||||
#else
|
#else
|
||||||
/**
|
/**
|
||||||
|
@ -435,7 +435,7 @@ t_u8 woal_check_11ac_capability(moal_private *priv, t_u8 band,
|
||||||
* @param priv A pointer to moal private structure
|
* @param priv A pointer to moal private structure
|
||||||
* @return 0 -- success, otherwise fail
|
* @return 0 -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
t_u8 woal_check_11ac_capability(moal_private *priv, t_u8 band)
|
static t_u8 woal_check_11ac_capability(moal_private *priv, t_u8 band)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
mlan_fw_info fw_info;
|
mlan_fw_info fw_info;
|
||||||
|
@ -478,7 +478,7 @@ t_u8 woal_check_11ac_capability(moal_private *priv, t_u8 band)
|
||||||
* @param params A pointer to cfg80211_ap_settings structure
|
* @param params A pointer to cfg80211_ap_settings structure
|
||||||
* @return 0 -- success, otherwise fail
|
* @return 0 -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
t_u8 woal_check_11ax_capability(moal_private *priv, t_u8 band,
|
static t_u8 woal_check_11ax_capability(moal_private *priv, t_u8 band,
|
||||||
struct cfg80211_ap_settings *params)
|
struct cfg80211_ap_settings *params)
|
||||||
{
|
{
|
||||||
mlan_fw_info fw_info;
|
mlan_fw_info fw_info;
|
||||||
|
@ -1338,7 +1338,8 @@ static void woal_virt_if_setup(struct net_device *dev)
|
||||||
*
|
*
|
||||||
* @return A pointer to the new priv structure
|
* @return A pointer to the new priv structure
|
||||||
*/
|
*/
|
||||||
moal_private *woal_alloc_virt_interface(moal_handle *handle, t_u8 bss_index,
|
static moal_private *woal_alloc_virt_interface(moal_handle *handle,
|
||||||
|
t_u8 bss_index,
|
||||||
unsigned char name_assign_type,
|
unsigned char name_assign_type,
|
||||||
t_u8 bss_type, const char *name)
|
t_u8 bss_type, const char *name)
|
||||||
#else
|
#else
|
||||||
|
@ -1441,7 +1442,7 @@ error:
|
||||||
*
|
*
|
||||||
* @return 0 -- success, otherwise fail
|
* @return 0 -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
int woal_cfg80211_add_virt_if(struct wiphy *wiphy, const char *name,
|
static int woal_cfg80211_add_virt_if(struct wiphy *wiphy, const char *name,
|
||||||
unsigned char name_assign_type,
|
unsigned char name_assign_type,
|
||||||
enum nl80211_iftype type, u32 *flags,
|
enum nl80211_iftype type, u32 *flags,
|
||||||
struct vif_params *params,
|
struct vif_params *params,
|
||||||
|
@ -1587,7 +1588,7 @@ done:
|
||||||
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success,
|
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success,
|
||||||
* otherwise fail
|
* otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status woal_bss_remove(moal_private *priv)
|
static mlan_status woal_bss_remove(moal_private *priv)
|
||||||
{
|
{
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
mlan_ds_bss *bss = NULL;
|
mlan_ds_bss *bss = NULL;
|
||||||
|
@ -2339,12 +2340,12 @@ int woal_cfg80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
|
||||||
#endif
|
#endif
|
||||||
/* if the bss is still running, then stop it */
|
/* if the bss is still running, then stop it */
|
||||||
if (priv->bss_started == MTRUE) {
|
if (priv->bss_started == MTRUE) {
|
||||||
if (MLAN_STATUS_FAILURE ==
|
if ((int)MLAN_STATUS_FAILURE ==
|
||||||
woal_uap_bss_ctrl(priv, MOAL_NO_WAIT, UAP_BSS_STOP)) {
|
woal_uap_bss_ctrl(priv, MOAL_NO_WAIT, UAP_BSS_STOP)) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (MLAN_STATUS_FAILURE ==
|
if ((int)MLAN_STATUS_FAILURE ==
|
||||||
woal_uap_bss_ctrl(priv, MOAL_NO_WAIT, UAP_BSS_RESET)) {
|
woal_uap_bss_ctrl(priv, MOAL_NO_WAIT, UAP_BSS_RESET)) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -2911,7 +2912,7 @@ void woal_cac_timer_func(void *context)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_switch_uap_channel(moal_private *priv, t_u8 wait_option)
|
static void woal_switch_uap_channel(moal_private *priv, t_u8 wait_option)
|
||||||
{
|
{
|
||||||
chan_band_info uap_channel;
|
chan_band_info uap_channel;
|
||||||
t_u8 chan2Offset = SEC_CHAN_NONE;
|
t_u8 chan2Offset = SEC_CHAN_NONE;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains standard ioctl functions
|
* @brief This file contains standard ioctl functions
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2010-2020 NXP
|
* Copyright 2010-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -102,7 +102,8 @@ int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||||
case WOAL_WL_FW_RELOAD:
|
case WOAL_WL_FW_RELOAD:
|
||||||
break;
|
break;
|
||||||
case WOAL_AP_SET_CFG:
|
case WOAL_AP_SET_CFG:
|
||||||
ret = woal_uap_set_ap_cfg(priv, wrq->u.data.pointer,
|
ret = woal_uap_set_ap_cfg(
|
||||||
|
priv, (t_u8 __force *)wrq->u.data.pointer,
|
||||||
wrq->u.data.length);
|
wrq->u.data.length);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -141,7 +142,8 @@ int woal_uap_do_priv_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||||
case WOAL_UAP_FROYO_WL_FW_RELOAD:
|
case WOAL_UAP_FROYO_WL_FW_RELOAD:
|
||||||
break;
|
break;
|
||||||
case WOAL_UAP_FROYO_AP_SET_CFG:
|
case WOAL_UAP_FROYO_AP_SET_CFG:
|
||||||
ret = woal_uap_set_ap_cfg(priv, wrq->u.data.pointer,
|
ret = woal_uap_set_ap_cfg(priv,
|
||||||
|
(t_u8 __force *)wrq->u.data.pointer,
|
||||||
wrq->u.data.length);
|
wrq->u.data.length);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains wireless extension standard ioctl functions
|
* @brief This file contains wireless extension standard ioctl functions
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2010-2020 NXP
|
* Copyright 2010-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -42,7 +42,7 @@ typedef struct _chan_to_freq_t {
|
||||||
t_u8 band;
|
t_u8 band;
|
||||||
} chan_to_freq_t;
|
} chan_to_freq_t;
|
||||||
|
|
||||||
const chan_to_freq_t chan_to_freq[] = {
|
static const chan_to_freq_t chan_to_freq[] = {
|
||||||
{1, 2412, 0}, {2, 2417, 0}, {3, 2422, 0}, {4, 2427, 0},
|
{1, 2412, 0}, {2, 2417, 0}, {3, 2422, 0}, {4, 2427, 0},
|
||||||
{5, 2432, 0}, {6, 2437, 0}, {7, 2442, 0}, {8, 2447, 0},
|
{5, 2432, 0}, {6, 2437, 0}, {7, 2442, 0}, {8, 2447, 0},
|
||||||
{9, 2452, 0}, {10, 2457, 0}, {11, 2462, 0}, {12, 2467, 0},
|
{9, 2452, 0}, {10, 2457, 0}, {11, 2462, 0}, {12, 2467, 0},
|
||||||
|
@ -107,7 +107,7 @@ static int channel_to_frequency(t_u16 channel, t_u8 band)
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
for (i = 0; i < ARRAY_SIZE(chan_to_freq); i++) {
|
for (i = 0; i < (int)ARRAY_SIZE(chan_to_freq); i++) {
|
||||||
if (channel == chan_to_freq[i].channel &&
|
if (channel == chan_to_freq[i].channel &&
|
||||||
band == chan_to_freq[i].band) {
|
band == chan_to_freq[i].band) {
|
||||||
LEAVE();
|
LEAVE();
|
||||||
|
@ -297,10 +297,10 @@ static int woal_set_freq(struct net_device *dev, struct iw_request_info *info,
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
for (i = 0; i < ap_cfg->num_of_chan; i++)
|
for (i = 0; i < (int)ap_cfg->num_of_chan; i++)
|
||||||
if (ap_cfg->chan_list[i].chan_number == chan)
|
if (ap_cfg->chan_list[i].chan_number == chan)
|
||||||
break;
|
break;
|
||||||
if (i == ap_cfg->num_of_chan) {
|
if (i == (int)ap_cfg->num_of_chan) {
|
||||||
PRINTM(MERROR, "Channel %d is not supported\n", chan);
|
PRINTM(MERROR, "Channel %d is not supported\n", chan);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -1170,7 +1170,6 @@ done:
|
||||||
static int woal_set_auth(struct net_device *dev, struct iw_request_info *info,
|
static int woal_set_auth(struct net_device *dev, struct iw_request_info *info,
|
||||||
union iwreq_data *wrqu, char *extra)
|
union iwreq_data *wrqu, char *extra)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||||
struct iw_param *vwrq = &wrqu->param;
|
struct iw_param *vwrq = &wrqu->param;
|
||||||
mlan_uap_bss_param *sys_cfg = NULL;
|
mlan_uap_bss_param *sys_cfg = NULL;
|
||||||
|
@ -1325,7 +1324,6 @@ static int woal_set_auth(struct net_device *dev, struct iw_request_info *info,
|
||||||
MOAL_IOCTL_WAIT,
|
MOAL_IOCTL_WAIT,
|
||||||
sys_cfg)) {
|
sys_cfg)) {
|
||||||
PRINTM(MERROR, "Error setting AP confiruration\n");
|
PRINTM(MERROR, "Error setting AP confiruration\n");
|
||||||
ret = -EFAULT;
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1816,14 +1814,14 @@ static const iw_handler woal_private_handler[] = {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
/** wlan_handler_def */
|
/** wlan_handler_def */
|
||||||
struct iw_handler_def woal_uap_handler_def = {
|
struct iw_handler_def woal_uap_handler_def = {
|
||||||
num_standard: ARRAY_SIZE(woal_handler),
|
.num_standard = ARRAY_SIZE(woal_handler),
|
||||||
num_private : ARRAY_SIZE(woal_private_handler),
|
.num_private = ARRAY_SIZE(woal_private_handler),
|
||||||
num_private_args : ARRAY_SIZE(woal_uap_priv_args),
|
.num_private_args = ARRAY_SIZE(woal_uap_priv_args),
|
||||||
standard : (iw_handler *)woal_handler,
|
.standard = (iw_handler *)woal_handler,
|
||||||
private : (iw_handler *)woal_private_handler,
|
.private = (iw_handler *)woal_private_handler,
|
||||||
private_args : (struct iw_priv_args *)woal_uap_priv_args,
|
.private_args = (struct iw_priv_args *)woal_uap_priv_args,
|
||||||
#if WIRELESS_EXT > 20
|
#if WIRELESS_EXT > 20
|
||||||
get_wireless_stats : woal_get_uap_wireless_stats,
|
.get_wireless_stats = woal_get_uap_wireless_stats,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* driver.
|
* driver.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -55,10 +55,10 @@ typedef struct {
|
||||||
USB_DEVICE(vid, pid), .driver_info = (t_ptr)name
|
USB_DEVICE(vid, pid), .driver_info = (t_ptr)name
|
||||||
|
|
||||||
/** Name of the USB driver */
|
/** Name of the USB driver */
|
||||||
const char usbdriver_name[] = "usbxxx";
|
static const char usbdriver_name[] = "usbxxx";
|
||||||
|
|
||||||
/** This structure contains the device signature */
|
/** This structure contains the device signature */
|
||||||
struct usb_device_id woal_usb_table[] = {
|
static struct usb_device_id woal_usb_table[] = {
|
||||||
/* Enter the device signature inside */
|
/* Enter the device signature inside */
|
||||||
#ifdef USB8897
|
#ifdef USB8897
|
||||||
{NXP_USB_DEVICE(USB8897_VID_1, USB8897_PID_1, "NXP WLAN USB Adapter")},
|
{NXP_USB_DEVICE(USB8897_VID_1, USB8897_PID_1, "NXP WLAN USB Adapter")},
|
||||||
|
@ -95,7 +95,7 @@ struct usb_device_id woal_usb_table[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This structure contains the device signature */
|
/** This structure contains the device signature */
|
||||||
struct usb_device_id woal_usb_table_skip_fwdnld[] = {
|
static struct usb_device_id woal_usb_table_skip_fwdnld[] = {
|
||||||
/* Enter the device signature inside */
|
/* Enter the device signature inside */
|
||||||
#ifdef USB8897
|
#ifdef USB8897
|
||||||
{NXP_USB_DEVICE(USB8897_VID_1, USB8897_PID_2, "NXP WLAN USB Adapter")},
|
{NXP_USB_DEVICE(USB8897_VID_1, USB8897_PID_2, "NXP WLAN USB Adapter")},
|
||||||
|
@ -173,9 +173,6 @@ static moal_if_ops usb_ops;
|
||||||
Global Variables
|
Global Variables
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
extern int skip_fwdnld;
|
|
||||||
extern int max_tx_buf;
|
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
Local Functions
|
Local Functions
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
@ -489,13 +486,14 @@ rx_ret:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||||
*/
|
*/
|
||||||
mlan_status woal_check_chip_revision(moal_handle *handle, t_u32 *usb_chip_rev,
|
static mlan_status woal_check_chip_revision(moal_handle *handle,
|
||||||
|
t_u32 *usb_chip_rev,
|
||||||
t_u32 *usb_strap)
|
t_u32 *usb_strap)
|
||||||
{
|
{
|
||||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||||
mlan_buffer mbuf;
|
mlan_buffer mbuf;
|
||||||
t_u8 *tx_buff = 0;
|
t_u8 *tx_buff = NULL;
|
||||||
t_u8 *recv_buff = 0;
|
t_u8 *recv_buff = NULL;
|
||||||
usb_ack_pkt ack_pkt;
|
usb_ack_pkt ack_pkt;
|
||||||
t_u32 extend_ver;
|
t_u32 extend_ver;
|
||||||
t_u8 tx_size = CHIP_REV_TX_BUF_SIZE;
|
t_u8 tx_size = CHIP_REV_TX_BUF_SIZE;
|
||||||
|
@ -1217,21 +1215,18 @@ static int woal_usb_resume(struct usb_interface *intf)
|
||||||
struct usb_card_rec *cardp = usb_get_intfdata(intf);
|
struct usb_card_rec *cardp = usb_get_intfdata(intf);
|
||||||
moal_handle *handle = NULL;
|
moal_handle *handle = NULL;
|
||||||
int i;
|
int i;
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
PRINTM(MCMND, "<--- Enter woal_usb_resume --->\n");
|
PRINTM(MCMND, "<--- Enter woal_usb_resume --->\n");
|
||||||
if (!cardp || !cardp->phandle) {
|
if (!cardp || !cardp->phandle) {
|
||||||
PRINTM(MERROR, "Card or adapter structure is not valid\n");
|
PRINTM(MERROR, "Card or adapter structure is not valid\n");
|
||||||
ret = 0;
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
handle = cardp->phandle;
|
handle = cardp->phandle;
|
||||||
|
|
||||||
if (handle->is_suspended == MFALSE) {
|
if (handle->is_suspended == MFALSE) {
|
||||||
PRINTM(MWARN, "Device already resumed\n");
|
PRINTM(MWARN, "Device already resumed\n");
|
||||||
ret = 0;
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1862,7 +1857,7 @@ void woal_submit_rx_urb(moal_handle *handle, t_u8 ep)
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
void woal_usb_dump_fw_info(moal_handle *phandle)
|
static void woal_usb_dump_fw_info(moal_handle *phandle)
|
||||||
{
|
{
|
||||||
moal_private *priv = NULL;
|
moal_private *priv = NULL;
|
||||||
mlan_ioctl_req *req = NULL;
|
mlan_ioctl_req *req = NULL;
|
||||||
|
@ -1873,13 +1868,13 @@ void woal_usb_dump_fw_info(moal_handle *phandle)
|
||||||
|
|
||||||
priv = woal_get_priv(phandle, MLAN_BSS_ROLE_ANY);
|
priv = woal_get_priv(phandle, MLAN_BSS_ROLE_ANY);
|
||||||
if (!priv) {
|
if (!priv) {
|
||||||
PRINTM(MERROR, "woal_dump_firmware_info get priv is NULL!\n");
|
PRINTM(MERROR, "woal_usb_dump_fw_info: priv is NULL!\n");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* Allocate an IOCTL request buffer */
|
/* Allocate an IOCTL request buffer */
|
||||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
PRINTM(MERROR, "woal_dump_firmware_info alloc req fail!\n");
|
PRINTM(MERROR, "woal_usb_dump_fw_info: alloc req fail!\n");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1917,6 +1912,7 @@ static mlan_status woal_usb_get_fw_name(moal_handle *handle)
|
||||||
goto done;
|
goto done;
|
||||||
if (cardp->boot_state == USB_FW_READY)
|
if (cardp->boot_state == USB_FW_READY)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || defined(USB8978)
|
#if defined(USB8997) || defined(USB9098) || defined(USB9097) || defined(USB8978)
|
||||||
ret = woal_check_chip_revision(handle, &revision_id, &strap);
|
ret = woal_check_chip_revision(handle, &revision_id, &strap);
|
||||||
if (ret != MLAN_STATUS_SUCCESS) {
|
if (ret != MLAN_STATUS_SUCCESS) {
|
||||||
|
|
|
@ -210,8 +210,8 @@ struct usb_card_rec {
|
||||||
int tx_data_ix;
|
int tx_data_ix;
|
||||||
/** Pre-allocated urb for data */
|
/** Pre-allocated urb for data */
|
||||||
urb_context tx_data_list[MVUSB_TX_HIGH_WMARK];
|
urb_context tx_data_list[MVUSB_TX_HIGH_WMARK];
|
||||||
usb_aggr_ctrl tx_aggr_ctrl;
|
usb_aggr_ctrl_cfg tx_aggr_ctrl;
|
||||||
usb_aggr_ctrl rx_deaggr_ctrl;
|
usb_aggr_ctrl_cfg rx_deaggr_ctrl;
|
||||||
t_u8 resubmit_urbs;
|
t_u8 resubmit_urbs;
|
||||||
/** USB card type */
|
/** USB card type */
|
||||||
t_u16 card_type;
|
t_u16 card_type;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @brief This file contains wireless extension standard ioctl functions
|
* @brief This file contains wireless extension standard ioctl functions
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright 2008-2020 NXP
|
* Copyright 2008-2021 NXP
|
||||||
*
|
*
|
||||||
* This software file (the File) is distributed by NXP
|
* This software file (the File) is distributed by NXP
|
||||||
* under the terms of the GNU General Public License Version 2, June 1991
|
* under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
@ -2248,7 +2248,7 @@ static int woal_set_priv(struct net_device *dev, struct iw_request_info *info,
|
||||||
}
|
}
|
||||||
PRINTM(MIOCTL, "PRIV Command return: %s, length=%d\n", buf, len);
|
PRINTM(MIOCTL, "PRIV Command return: %s, length=%d\n", buf, len);
|
||||||
dwrq->length = (t_u16)len;
|
dwrq->length = (t_u16)len;
|
||||||
if (copy_to_user(dwrq->pointer, buf, dwrq->length))
|
if (copy_to_user((void __user *)dwrq->pointer, buf, dwrq->length))
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
done:
|
done:
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
|
@ -2265,7 +2265,7 @@ done:
|
||||||
*
|
*
|
||||||
* @return MLAN_STATUS_SUCCESS -- success, otherwise fail
|
* @return MLAN_STATUS_SUCCESS -- success, otherwise fail
|
||||||
*/
|
*/
|
||||||
mlan_status woal_wext_request_scan(moal_private *priv, t_u8 wait_option,
|
static mlan_status woal_wext_request_scan(moal_private *priv, t_u8 wait_option,
|
||||||
mlan_802_11_ssid *req_ssid)
|
mlan_802_11_ssid *req_ssid)
|
||||||
{
|
{
|
||||||
wlan_user_scan_cfg scan_req;
|
wlan_user_scan_cfg scan_req;
|
||||||
|
@ -3056,7 +3056,7 @@ void woal_send_iwevcustom_event(moal_private *priv, char *str)
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf) - 1, "%s", str);
|
snprintf(buf, sizeof(buf) - 1, "%s", str);
|
||||||
|
|
||||||
iwrq.data.pointer = buf;
|
iwrq.data.pointer = (t_u8 __user *)buf;
|
||||||
iwrq.data.length = strlen(buf) + 1;
|
iwrq.data.length = strlen(buf) + 1;
|
||||||
|
|
||||||
/* Send Event to upper layer */
|
/* Send Event to upper layer */
|
||||||
|
@ -3090,7 +3090,7 @@ void woal_send_mic_error_event(moal_private *priv, t_u32 event)
|
||||||
mic.flags = IW_MICFAILURE_PAIRWISE;
|
mic.flags = IW_MICFAILURE_PAIRWISE;
|
||||||
else
|
else
|
||||||
mic.flags = IW_MICFAILURE_GROUP;
|
mic.flags = IW_MICFAILURE_GROUP;
|
||||||
iwrq.data.pointer = &mic;
|
iwrq.data.pointer = (t_u8 __user *)&mic;
|
||||||
iwrq.data.length = sizeof(mic);
|
iwrq.data.length = sizeof(mic);
|
||||||
|
|
||||||
wireless_send_event(priv->netdev, IWEVMICHAELMICFAILURE, &iwrq,
|
wireless_send_event(priv->netdev, IWEVMICHAELMICFAILURE, &iwrq,
|
||||||
|
@ -3105,14 +3105,14 @@ void woal_send_mic_error_event(moal_private *priv, t_u32 event)
|
||||||
#ifdef STA_SUPPORT
|
#ifdef STA_SUPPORT
|
||||||
/** wlan_handler_def */
|
/** wlan_handler_def */
|
||||||
struct iw_handler_def woal_handler_def = {
|
struct iw_handler_def woal_handler_def = {
|
||||||
num_standard: ARRAY_SIZE(woal_handler),
|
.num_standard = ARRAY_SIZE(woal_handler),
|
||||||
num_private : ARRAY_SIZE(woal_private_handler),
|
.num_private = ARRAY_SIZE(woal_private_handler),
|
||||||
num_private_args : ARRAY_SIZE(woal_private_args),
|
.num_private_args = ARRAY_SIZE(woal_private_args),
|
||||||
standard : (iw_handler *)woal_handler,
|
.standard = (iw_handler *)woal_handler,
|
||||||
private : (iw_handler *)woal_private_handler,
|
.private = (iw_handler *)woal_private_handler,
|
||||||
private_args : (struct iw_priv_args *)woal_private_args,
|
.private_args = (struct iw_priv_args *)woal_private_args,
|
||||||
#if WIRELESS_EXT > 20
|
#if WIRELESS_EXT > 20
|
||||||
get_wireless_stats : woal_get_wireless_stats,
|
.get_wireless_stats = woal_get_wireless_stats,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
Loading…
Reference in a new issue