mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2024-06-02 08:59:23 +00:00
Compare commits
21 commits
lf-5.10.52
...
lf-5.15.32
Author | SHA1 | Date | |
---|---|---|---|
31800f43a6 | |||
f6055d3fc2 | |||
caa89d99ad | |||
2a2b474597 | |||
6620b8524b | |||
ce5f564cb7 | |||
35da828282 | |||
28c2f97672 | |||
29b5d07aee | |||
200fc8808c | |||
8248dbc2cb | |||
255269e2d3 | |||
3c2a3c2cd2 | |||
2d93593f86 | |||
f849943092 | |||
8ffae47921 | |||
b400ebe7fe | |||
61d685b925 | |||
56066208e5 | |||
26f73d7b94 | |||
3ba7550231 |
|
@ -1,19 +1,27 @@
|
|||
# File: Makefile
|
||||
#
|
||||
# Copyright 2008-2021 NXP
|
||||
# Copyright 2014-2022 NXP
|
||||
#
|
||||
# This software file (the File) is distributed by NXP
|
||||
# under the terms of the GNU General Public License Version 2, June 1991
|
||||
# (the License). You may use, redistribute and/or modify the File in
|
||||
# accordance with the terms and conditions of the License, a copy of which
|
||||
# is available by writing to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
# worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
# NXP CONFIDENTIAL
|
||||
# The source code contained or described herein and all documents related to
|
||||
# the source code (Materials) are owned by NXP, its
|
||||
# suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
# its suppliers and/or its licensors. The Materials contain
|
||||
# trade secrets and proprietary and confidential information of NXP, its
|
||||
# suppliers and/or its licensors. The Materials are protected by worldwide copyright
|
||||
# and trade secret laws and treaty provisions. No part of the Materials may be
|
||||
# used, copied, reproduced, modified, published, uploaded, posted,
|
||||
# transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
# express written permission.
|
||||
#
|
||||
# THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
# this warranty disclaimer.
|
||||
# No license under any patent, copyright, trade secret or other intellectual
|
||||
# property right is granted to or conferred upon you by disclosure or delivery
|
||||
# of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
# otherwise. Any license under such intellectual property rights must be
|
||||
# express and approved by NXP in writing.
|
||||
#
|
||||
# Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
|
||||
CONFIG_COMPATDIR=n
|
||||
|
@ -21,7 +29,7 @@ ifeq ($(CONFIG_COMPATDIR), y)
|
|||
COMPATDIR=/lib/modules/$(KERNELVERSION_X86)/build/compat-wireless-3.2-rc1-1/include
|
||||
CC ?= $(CROSS_COMPILE)gcc -I$(COMPATDIR)
|
||||
else
|
||||
CC ?= $(CROSS_COMPILE)gcc
|
||||
CC ?= $(CROSS_COMPILE)gcc -I$(COMPATDIR)
|
||||
endif
|
||||
|
||||
LD ?= $(CROSS_COMPILE)ld
|
||||
|
@ -45,13 +53,16 @@ CONFIG_PCIE8997=y
|
|||
CONFIG_SD8987=y
|
||||
CONFIG_SD9097=n
|
||||
CONFIG_SD9177=n
|
||||
CONFIG_SD8801=n
|
||||
CONFIG_SD8801=y
|
||||
CONFIG_USB8801=n
|
||||
CONFIG_USB9097=n
|
||||
CONFIG_PCIE9097=n
|
||||
CONFIG_SD9098=n
|
||||
CONFIG_SD9098=y
|
||||
CONFIG_USB9098=n
|
||||
CONFIG_PCIE9098=y
|
||||
CONFIG_SDNW62X=n
|
||||
CONFIG_PCIENW62X=n
|
||||
CONFIG_USBNW62X=n
|
||||
|
||||
|
||||
# Debug Option
|
||||
|
@ -81,9 +92,6 @@ CONFIG_MFG_CMD_SUPPORT=y
|
|||
# OpenWrt support
|
||||
CONFIG_OPENWRT_SUPPORT=n
|
||||
|
||||
# Big-endian platform
|
||||
CONFIG_BIG_ENDIAN=n
|
||||
|
||||
|
||||
|
||||
ifeq ($(CONFIG_DRV_EMBEDDED_SUPPLICANT), y)
|
||||
|
@ -125,6 +133,7 @@ ccflags-y += -DLINUX
|
|||
|
||||
|
||||
|
||||
|
||||
ARCH ?= arm64
|
||||
CONFIG_IMX_SUPPORT=y
|
||||
ifeq ($(CONFIG_IMX_SUPPORT),y)
|
||||
|
@ -187,10 +196,6 @@ ifeq ($(CONFIG_MFG_CMD_SUPPORT),y)
|
|||
ccflags-y += -DMFG_CMD_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BIG_ENDIAN),y)
|
||||
ccflags-y += -DBIG_ENDIAN_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT),y)
|
||||
ccflags-y += -DUSERSPACE_32BIT_OVER_KERNEL_64BIT
|
||||
endif
|
||||
|
@ -249,6 +254,10 @@ ifeq ($(CONFIG_SD9097),y)
|
|||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD9097
|
||||
endif
|
||||
ifeq ($(CONFIG_SDNW62X),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSDNW62X
|
||||
endif
|
||||
ifeq ($(CONFIG_SD9177),y)
|
||||
CONFIG_SDIO=y
|
||||
ccflags-y += -DSD9177
|
||||
|
@ -281,6 +290,10 @@ ifeq ($(CONFIG_USB9097),y)
|
|||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB9097
|
||||
endif
|
||||
ifeq ($(CONFIG_USBNW62X),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSBNW62X
|
||||
endif
|
||||
ifeq ($(CONFIG_USB9098),y)
|
||||
CONFIG_MUSB=y
|
||||
ccflags-y += -DUSB9098
|
||||
|
@ -301,6 +314,10 @@ ifeq ($(CONFIG_PCIE9098),y)
|
|||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIE9098
|
||||
endif
|
||||
ifeq ($(CONFIG_PCIENW62X),y)
|
||||
CONFIG_PCIE=y
|
||||
ccflags-y += -DPCIENW62X
|
||||
endif
|
||||
ifeq ($(CONFIG_SDIO),y)
|
||||
ccflags-y += -DSDIO
|
||||
ccflags-y += -DSDIO_MMC
|
||||
|
@ -344,6 +361,7 @@ endif
|
|||
#ccflags-y += -Wstringop-truncation
|
||||
#ccflags-y += -Wmisleading-indentation
|
||||
#ccflags-y += -Wunused-const-variable
|
||||
ccflags-y += -Wno-array-bounds
|
||||
#############################################################################
|
||||
# Make Targets
|
||||
#############################################################################
|
||||
|
@ -571,16 +589,27 @@ endif
|
|||
|
||||
export CC LD ccflags-y KERNELDIR
|
||||
|
||||
.PHONY: mapp/mlanconfig mapp/mlanutl clean distclean
|
||||
.PHONY: mapp/mlanutl clean distclean
|
||||
@echo "Finished Making NXP Wlan Linux Driver"
|
||||
|
||||
mapp/mlanconfig:
|
||||
$(MAKE) -C $@
|
||||
mapp/mlanutl:
|
||||
$(MAKE) -C $@
|
||||
|
||||
echo:
|
||||
|
||||
appsbuild:
|
||||
|
||||
@if [ ! -d $(BINDIR) ]; then \
|
||||
mkdir $(BINDIR); \
|
||||
fi
|
||||
|
||||
cp -f README_MLAN $(BINDIR)
|
||||
cp -rf mapp/mlanconfig/config $(BINDIR)
|
||||
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/mlanutl $@ INSTALLDIR=$(BINDIR)
|
||||
endif
|
||||
|
||||
build: echo default
|
||||
|
||||
@if [ ! -d $(BINDIR) ]; then \
|
||||
|
@ -594,8 +623,9 @@ build: echo default
|
|||
cp -rpf script/unload $(BINDIR)/
|
||||
|
||||
cp -f README_MLAN $(BINDIR)
|
||||
cp -rf mapp/mlanconfig/config $(BINDIR)
|
||||
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/mlanconfig $@ INSTALLDIR=$(BINDIR)
|
||||
$(MAKE) -C mapp/mlanutl $@ INSTALLDIR=$(BINDIR)
|
||||
endif
|
||||
|
||||
|
@ -611,7 +641,6 @@ clean:
|
|||
-find . -name "*dwo" -exec rm {} \;
|
||||
-rm -rf .tmp_versions
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/mlanconfig $@
|
||||
$(MAKE) -C mapp/mlanutl $@
|
||||
endif
|
||||
#ifdef SDIO
|
||||
|
@ -641,7 +670,6 @@ distclean:
|
|||
-find . -name "*dwo" -exec rm {} \;
|
||||
-rm -rf .tmp_versions
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/mlanconfig $@
|
||||
$(MAKE) -C mapp/mlanutl $@
|
||||
endif
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
===============================================================================
|
||||
U S E R M A N U A L
|
||||
|
||||
Copyright 2008-2021 NXP
|
||||
Copyright 2008-2022 NXP
|
||||
|
||||
|
||||
1) FOR DRIVER BUILD
|
||||
|
@ -9,7 +9,7 @@
|
|||
Goto source code directory wlan_src/.
|
||||
make [clean] build
|
||||
The driver and utility binaries can be found in ../bin_xxxx directory.
|
||||
The driver code supports Linux kernel from 2.6.32 to 5.8.0.
|
||||
The driver code supports Linux kernel from 2.6.32 to 5.15.
|
||||
|
||||
2) FOR DRIVER INSTALL
|
||||
|
||||
|
@ -49,7 +49,12 @@
|
|||
dev_cap_mask=<Bit mask of the device capability>
|
||||
mac_addr=xx:xx:xx:xx:xx:xx <override the MAC address (in hex)>
|
||||
auto_ds=0|1|2 <use MLAN default | enable auto deepsleep | disable auto deepsleep>
|
||||
ext_scan=0|1|2 <use MLAN default | Enable Extended Scan| Enable Enhanced Extended Scan>
|
||||
net_rx=0|1 <use netif_rx_ni in rx | use netif_receive_skb in rx>
|
||||
amsdu_deaggr=0|1 <default | Try avoid buf copy in amsud deaggregation>
|
||||
|
||||
ps_mode=0|1|2 <use MLAN default | enable IEEE PS mode | disable IEEE PS mode>
|
||||
sched_scan=0|1 <disable sched_scan | enable sched_scan default>
|
||||
max_tx_buf=2048|4096|8192 <maximum AMSDU Tx buffer size>
|
||||
pm_keep_power=1|0 <PM keep power in suspend (default) | PM no power in suspend>
|
||||
shutdown_hs=1|0 <Enable HS when shutdown | No HS when shutdown (default)>
|
||||
|
@ -57,12 +62,11 @@
|
|||
dts_enable=0|1 <Disable DTS | Enable DTS (default)>
|
||||
fw_name = <FW file name>
|
||||
e.g. copy pcieuart9098_combo_v1.bin to firmware directory, fw_name=nxp/pcieuart9098_combo_v1.bin
|
||||
hw_name = <hardware name>
|
||||
reg_work=0|1 <Disable register work queue| Enable register work queue>
|
||||
hw_test=0|1 <Disable hardware test (default) | Enable hardware test>
|
||||
fw_serial=0|1 <support parallel download FW | support serial download FW (default)>
|
||||
req_fw_nowait=0|1 <use request_firmware API (default) | use request_firmware_nowait API>
|
||||
dfs53cfg=0|1|2 <use Fw Default | New W53 | Old W53>
|
||||
SD8887: antcfg=0|1|2|0xffff <default | Tx/Rx antenna 1 | Tx/Rx antenna 2 | enable antenna diversity>
|
||||
SD8897/SD8997: antcfg=0x11|0x13|0x33 <Bit0:Rx Path A, Bit1:Rx Path B, Bit 4:Tx Path A, Bit 5:Tx Path B>
|
||||
slew_rate: Slew Rate Control value = 0|1|2|3 (0 is the slowest slew rate and 03 has the highest slew rate (default))
|
||||
init_cfg=<init config (MAC addresses, registers etc.) file name>
|
||||
e.g. copy init_cfg.conf to firmware directory, init_cfg=nxp/init_cfg.conf
|
||||
|
@ -99,7 +103,6 @@
|
|||
pcie_int_mode=0|1|2 <Legacy mode, MSI mode (default), MSI-X mode>
|
||||
pcie_int_mode=0|1 <Legacy mode, MSI mode (default)>
|
||||
ring_size=32|64|128|256|512 <adma ring size for 9097/9098>
|
||||
aggrctrl=1|0 <enable Tx aggr | disable Tx aggr>
|
||||
usb_aggr=0|1|2 <use MLAN default (disabled) | enable USB aggr | disable USB aggr>
|
||||
low_power_mode_enable=0|1 <disable low power mode (default)| enable low power mode>
|
||||
When low power mode is enabled, the output power will be clipped at ~+10dBm and the
|
||||
|
@ -118,12 +121,15 @@
|
|||
GoAgeoutTime=0|x <use default ageout time (default) | set Go age out time xTU(TU 100ms)>
|
||||
multi_dtim=0|x <use default DTIM interval(default) | set x*beacon_period as DTIM interval>
|
||||
inact_tmo=0|x <use default IEEE ps inactivity timout value (default) | use IEEE ps inactivity timeout value x ms>
|
||||
roamoffload_in_hs=0|1 <always enable fw roaming (default) | enable fw roaming only when host suspend>
|
||||
uap_max_sta: Maximum number of STA for UAP/GO (default 0, max 64)
|
||||
host_mlme=0|1 <Operate in non-host_mlme mode (default)| Operate in host_mlme mode>
|
||||
for supplicant/authenticator running on host side, WPA3 support is available only in host_mlme mode
|
||||
country_ie_ignore=0|1 <Follow countryIE from AP and beacon hint enable (default) | Ignore countryIE from AP and beacon hint disable>
|
||||
beacon_hints=0|1 <enable beacon hints(default) | disable beacon hints>
|
||||
|
||||
chan_track=0|1 <restore channel tracking parameters(default) | set channel tracking new parameters> for 9098 only
|
||||
|
||||
Note: On some platforms (e.g. PXA910/920) double quotation marks ("") need to used
|
||||
for module parameters.
|
||||
insmod sdxxx.ko "<para1> <para2> ..."
|
||||
|
@ -155,10 +161,10 @@
|
|||
num_rx_pkts_err = <number of Rx packets failed to receive from device>
|
||||
carrier "on" | "off"
|
||||
tx queue "stopped" | "started"
|
||||
tkip_mic_failures = 0 // Only for uAP
|
||||
tkip_mic_failures = 0 // Only for uAP (use of WEP/TKIP is not recommended anymore)
|
||||
ccmp_decrypt_errors = 0 // Only for uAP
|
||||
wep_undecryptable_count = 0 // Only for uAP
|
||||
wep_icv_error_count = 0 // Only for uAP
|
||||
wep_undecryptable_count = 0 // Only for uAP (use of WEP/TKIP is not recommended anymore)
|
||||
wep_icv_error_count = 0 // Only for uAP (use of WEP/TKIP is not recommended anymore)
|
||||
decrypt_failure_count = 0 // Only for uAP
|
||||
mcast_tx_count = 0 // Only for uAP
|
||||
failed_count = 0 // Only for uAP
|
||||
|
@ -172,7 +178,7 @@
|
|||
mcast_rx_frame_count = 0 // Only for uAP
|
||||
fcs_error_count = 0 // Only for uAP
|
||||
tx_frame_count = 0 // Only for uAP
|
||||
rsna_tkip_cm_invoked = 0 // Only for uAP
|
||||
rsna_tkip_cm_invoked = 0 // Only for uAP (use of WEP/TKIP is not recommended anymore)
|
||||
rsna_4way_hshk_failures = 0 // Only for uAP
|
||||
|
||||
The following debug info are provided in /proc/net/mwlan/adapterX/mlanY|uapY|wfdY/debug,
|
||||
|
@ -257,27 +263,16 @@
|
|||
hs_skip_count = <number of skipped suspends>
|
||||
hs_force_count = <number of forced suspends>
|
||||
|
||||
Issue SDIO cmd52 read/write through proc.
|
||||
Usage:
|
||||
echo "sdcmd52rw=<func> <reg> [data]" > /proc/mwlan/adapterX/config
|
||||
where the parameters:
|
||||
func: The function number to use (0-7)
|
||||
reg: The address of the register
|
||||
data: The value to write, read if the value is absent
|
||||
For SDIO MMC driver, only function 0 and WLAN function access is allowed.
|
||||
And there is a limitation for function 0 write, only vendor specific CCCR
|
||||
registers (0xf0 -0xff) are permiited.
|
||||
Examples:
|
||||
echo "sdcmd52rw= 0 4" > /proc/mwlan/adapterX/config # read func 0 address 4
|
||||
cat /proc/mwlan/adapterX/config # display the register value
|
||||
echo "sdcmd52rw= 1 3 0xf" > /proc/mwlan/adapterX/config # write 0xf to func 1 address 3
|
||||
|
||||
Issue debug_dump command through proc.
|
||||
Usage:
|
||||
echo "debug_dump" > /proc/mwlan/adapterX/config
|
||||
|
||||
Examples:
|
||||
echo "debug_dump" > /proc/mwlan/adapterX/config # dump driver internal debug status.
|
||||
To obtain fw dump or driver dump, use command:
|
||||
cat /proc/mwlan/adapter0/drv_dump > file_drv_dump #save the drv dump to file_drv_dump
|
||||
cat /proc/mwlan/adapter0/fw_dump > file_fw_dump #save the fw dump to file_fw_dump
|
||||
cat /proc/mwlan/adapter1/drv_dump > file_drv_dump_2 #save the adapter1 drv dump to file_drv_dump_2
|
||||
|
||||
Use dmesg or cat /var/log/debug to check driver debug messages.
|
||||
|
||||
|
@ -442,6 +437,7 @@ SYNOPSIS
|
|||
mlanutl mlanX hssetpara condition [GPIO# [gap]] [ind_GPIO# [level]]
|
||||
mlanutl mlanX mefcfg <mef.conf>
|
||||
mlanutl mlanX cloud_keep_alive <keep_alive.conf> <start/stop/reset>
|
||||
mlanutl mlanX min_ba_threshold <n>
|
||||
|
||||
DESCRIPTION
|
||||
Those commands are used to send additional commands to the NXP MLAN
|
||||
|
@ -557,7 +553,7 @@ getlog
|
|||
|
||||
dot11TransmittedFrameCount Increments for each successfully transmitted MSDU
|
||||
|
||||
dot11WeplcvErrCnt Increment when WEP decryption error for key index 0.3
|
||||
dot11WeplcvErrCnt Increment when WEP (use of WEP/TKIP is not recommended anymore)decryption error for key index 0.3
|
||||
|
||||
beaconReceivedCnt Increments when received beacon
|
||||
|
||||
|
@ -600,9 +596,9 @@ getlog
|
|||
|
||||
dot11RSNAStatsRobustMgmtCCMPReplays Increments when a robust management frame discarded by CCMP replay error
|
||||
|
||||
dot11RSNAStatsTKIPICVErrors Increments when a MPDU discarded by TKIP ICV error
|
||||
dot11RSNAStatsTKIPICVErrors Increments when a MPDU discarded by TKIP ICV error //(use of WEP/TKIP is not recommended anymore)
|
||||
|
||||
dot11RSNAStatsTKIPReplays Increments when a MPDU discarded by TKIP replay error
|
||||
dot11RSNAStatsTKIPReplays Increments when a MPDU discarded by TKIP replay error //(use of WEP/TKIP is not recommended anymore)
|
||||
|
||||
dot11RSNAStatsCCMPDecryptErrors Increments when a MPDU discarded by CCMP decryption error
|
||||
|
||||
|
@ -1323,11 +1319,23 @@ hssetpara
|
|||
This command is used to set host sleep parameters.
|
||||
|
||||
Usage:
|
||||
mlanutl mlanX hssetpara condition [GPIO# [gap]] (optional)[type ind_GPIO# [level]] (optional)[type event_force_ignore event_use_ext_gap ext_gap [gpio_wave]] (optional)[type hs_wakeup_interval]
|
||||
mlanutl mlanX hssetpara condition [GPIO# [gap]] (optional)[type ind_GPIO# [level]] (optional)[type event_force_ignore event_use_ext_gap ext_gap [gpio_wave]] (optional)[type hs_wakeup_interval] (optional)[type min_wake_holdoff]
|
||||
|
||||
This command takes one (condition), two (condition and GPIO#) or three
|
||||
(condition, GPIO# and gap).If more than three parameters, it can set different or multiple features indicating by type and
|
||||
the detailed usage is the same as hscfg above.
|
||||
(condition, GPIO# and gap).If more than three parameters, it can set different or multiple features indicating by type.
|
||||
|
||||
If type=1, it will set indication gpio and its level. And the parameter format will be (condition, GPIO#,gap and type,ind_GPIO#) or
|
||||
(condition, GPIO#, gap, type, ind_GPIO# and level).
|
||||
|
||||
If type=2, it will set extend host sleep wakup method. And the parameter format will be (condition, GPIO#, gap, type, force_ignore,
|
||||
use_ext_gap, ext_gap [gpio_wave]). gpio_wave parameter is optional and default value is 0(falling edge). Each bit of
|
||||
event_force_ignore and event_use_ext_gap will be defined to one same event, and set one same event(same bit) in those two
|
||||
parameters is not allowed. Set bit(s) in event_force_ignore means the event(s) will be forced ignore in firmware silently.
|
||||
Set bit(s) in event_use_ext_gap mean the event(s) will use extend gap to inform host. Not set means not handle.
|
||||
|
||||
If type=3, it will set hs_wakeup_interval.
|
||||
|
||||
If no parameter provided, get is performed.
|
||||
|
||||
where Condition is:
|
||||
bit 0 = 1 -- broadcast data
|
||||
|
@ -1372,12 +1380,15 @@ hssetpara
|
|||
where ext_gap is the extend gap based on third parameter Gap. Only valid when use_ext_gap is used.
|
||||
The total gap is (Gap + (x+1)*ext_gap). x means the bit number(start from 0) of this reason in use_ext_gap.
|
||||
|
||||
where gpio_wave is used to set GPIO wave level for hscfg extend. 0 means falling edge, 1 means rising edge.
|
||||
where gpio_wave is used to set GPIO wave level for host sleep extend. 0 means falling edge, 1 means rising edge.
|
||||
This parameter is optional and default value is 0.
|
||||
|
||||
where hs_wakeup_interval is used to set host sleep wakeup interval and the type must set to 3 to indicate
|
||||
this feature. And the value will round to the nearest multiple dtim*beacon_interval in fw. The unit is milliseconds.
|
||||
|
||||
where min_wake_holdoff is minimum delay between HsActive and HostWake and the type must set to 4 to indicate
|
||||
this feature. The unit is milliseconds.
|
||||
|
||||
Examples:
|
||||
mlanutl mlan0 hssetpara -1 : Cancel host sleep mode
|
||||
mlanutl mlan0 hssetpara 3 : Broadcast and unicast data
|
||||
|
@ -1410,7 +1421,7 @@ hssetpara
|
|||
mlanutl mlan0 hssetpara 2 1 0xa0 2 0 0x1 10 1: Unicast data
|
||||
Use GPIO 1
|
||||
Gap 160 ms
|
||||
type=2 to set extend hscfg feature
|
||||
type=2 to set extend host sleep feature
|
||||
Force_ignore not used
|
||||
Disconnect will use extend gap to indicate host
|
||||
Use gap 170.
|
||||
|
@ -1418,7 +1429,7 @@ hssetpara
|
|||
mlanutl mlan0 hssetpara 2 1 0xa0 2 0x1 0 0 0: Unicast data
|
||||
Use GPIO 1
|
||||
Gap 160 ms
|
||||
type=2 to set extend hscfg feature
|
||||
type=2 to set extend host sleep feature
|
||||
Falling edge
|
||||
Force ignore Disconnect
|
||||
Extend gap not used
|
||||
|
@ -1430,6 +1441,12 @@ hssetpara
|
|||
type=3 to set hs_wakeup_interval feature
|
||||
hs_wakeup_interval set to 400ms
|
||||
|
||||
mlanutl mlan0 hssetpara 2 1 0xa0 4 800: Unicase data
|
||||
Use GPIO 1
|
||||
Gap 160ms
|
||||
type=4 to set min_wake_holdoff feature
|
||||
min_wake_holdoff set to 800ms
|
||||
|
||||
Note: The parameters will be saved in the driver and be used when host suspends.
|
||||
The ind_GPIO# and level parameters only work with specific board and firmware.
|
||||
mefcfg
|
||||
|
@ -1456,3 +1473,15 @@ cloud_keep_alive
|
|||
mlanutl mlan0 cloud_keep_alive keep_alive.conf start
|
||||
mlanutl mlan0 cloud_keep_alive keep_alive.conf stop
|
||||
mlanutl mlan0 cloud_keep_alive keep_alive.conf reset
|
||||
min_ba_threshold
|
||||
This command is to set minimum Tx BA setup threshold
|
||||
|
||||
Usage:
|
||||
mlanutl mlanX min_ba_threshold <n>
|
||||
|
||||
where the parameters are:
|
||||
<n>: minimum BA Threshold :0-16 (default is 16)
|
||||
Example:
|
||||
mlanutl mlan0 min_ba_threshold : get min_ba_threshold value
|
||||
mlanutl mlan0 min_ba_threshold 10 : set minimum BA threshold to 10
|
||||
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
#
|
||||
# File : mlanconfig/Makefile
|
||||
#
|
||||
# Copyright 2008-2020 NXP
|
||||
|
||||
# Path to the top directory of the mlandriver distribution
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
# Determine how we should copy things to the install directory
|
||||
ABSPATH := $(filter /%, $(INSTALLDIR))
|
||||
RELPATH := $(filter-out /%, $(INSTALLDIR))
|
||||
INSTALLPATH := $(ABSPATH)
|
||||
ifeq ($(strip $(INSTALLPATH)),)
|
||||
INSTALLPATH := $(PATH_TO_TOP)/$(RELPATH)
|
||||
endif
|
||||
|
||||
# Override CFLAGS for application sources, remove __ kernel namespace defines
|
||||
CFLAGS := $(filter-out -D__%, $(ccflags-y))
|
||||
# remove KERNEL include dir
|
||||
CFLAGS := $(filter-out -I$(KERNELDIR)%, $(CFLAGS))
|
||||
|
||||
#
|
||||
# List of application executables to create
|
||||
#
|
||||
TARGETS := $(exectarget)
|
||||
|
||||
#
|
||||
# Make target rules
|
||||
#
|
||||
|
||||
# All rule compiles list of TARGETS using builtin program target from src rule
|
||||
all :
|
||||
$(exectarget): $(libobjs)
|
||||
$(CC) $(CFLAGS) $(libobjs) -o $(exectarget)
|
||||
|
||||
# Update any needed TARGETS and then copy to the install path
|
||||
build install: $(TARGETS)
|
||||
@cp -rf config $(INSTALLPATH)
|
||||
|
||||
clean:
|
||||
@rm -f $(exectarget)
|
||||
@rm -f *.o
|
||||
|
||||
distclean: clean
|
||||
@rm -f *~ core
|
||||
@rm -f tags
|
126
mxm_wifiex/wlan_src/mapp/mlanconfig/config/coex_int_api.conf
Normal file
126
mxm_wifiex/wlan_src/mapp/mlanconfig/config/coex_int_api.conf
Normal file
|
@ -0,0 +1,126 @@
|
|||
# File : coex_int_api.conf
|
||||
|
||||
######################### Coex API command ###############
|
||||
get_bca_arb_config={
|
||||
CmdCode=0x0277 # do NOT change this line
|
||||
|
||||
# BCA Arbitration TLV
|
||||
BCAArbitrationTLVType:2=0x024B # do NOT change this line
|
||||
RobustCoexTlvLength:2={
|
||||
Version:2=0x1 # Firecrest
|
||||
Action:2=0 # GET
|
||||
Arbitration_Enable:1=0x00 # Read-back BCA Arb Settings
|
||||
Grant_Policy:1=0 # Read-back Grant Policy acc to Ant and Isolation config
|
||||
Priority_Remap_WLAN:16=0 # Read-back remapped WLAN priority
|
||||
Priority_Remap_BT:4=0 # Read-back remapped BT priority
|
||||
Priority_Remap_15_4:4=0 # Read-back remapped 15.4 priority
|
||||
Priority_Ramap_ExtRadio:4=0 # Read-back remapped External Radio
|
||||
}
|
||||
}
|
||||
|
||||
set_en_bca_arb_config={
|
||||
CmdCode=0x0277 # do NOT change this line
|
||||
|
||||
# BCA Arbitration TLV
|
||||
BCAArbitrationTLVType:2=0x024B # do NOT change this line
|
||||
RobustCoexTlvLength:2={
|
||||
Version:2=0x1 # Firecrest
|
||||
Action:2=1 # SET
|
||||
Arbitration_Enable:1=0x01 # Set BCA Arb Settings
|
||||
Grant_Policy:1=0 # Set Grant Policy acc to Ant and Isolation config
|
||||
Priority_Remap_WLAN:16='0x00,0x08,0x10,0x18,0x20,0x28,0x30,0x38,0x40,0x48,0x50,0x58,0x60,0x68,0x70,0x78' # Set remapped WLAN priority
|
||||
Priority_Remap_BT:4='0x80,0x88,0x90,0x98' # Set remapped BT priority
|
||||
Priority_Remap_15_4:4='0xA0,0xA8,0xB0,0xB8' # Set remapped 15.4 priority
|
||||
}
|
||||
}
|
||||
|
||||
set_dis_bca_arb_config={
|
||||
CmdCode=0x0277 # do NOT change this line
|
||||
|
||||
# BCA Arbitration TLV
|
||||
BCAArbitrationTLVType:2=0x024B # do NOT change this line
|
||||
RobustCoexTlvLength:2={
|
||||
Version:2=0x1 # Firecrest
|
||||
Action:2=1 # SET
|
||||
Arbitration_Enable:1=0x00 # Clear BCA Arb Settings
|
||||
Grant_Policy:1=0 # Set Grant Policy acc to Ant and Isolation config
|
||||
Priority_Remap_WLAN:16='0x00,0x08,0x10,0x18,0x20,0x28,0x30,0x38,0x40,0x48,0x50,0x58,0x60,0x68,0x70,0x78' # Set remapped WLAN priority
|
||||
Priority_Remap_BT:4='0x80,0x88,0x90,0x98' # Set remapped BT priority
|
||||
Priority_Remap_15_4:4='0xA0,0xA8,0xB0,0xB8' # Set remapped 15.4 priority
|
||||
}
|
||||
}
|
||||
|
||||
set_wlan_traffic_priority={
|
||||
CmdCode=0x0277 # do NOT change this line
|
||||
|
||||
# COEX WLAN Traffic Priority TLV
|
||||
BCAArbitrationTLVType:2=0x024C # do NOT change this line
|
||||
RobustCoexTlvLength:2={
|
||||
Version:2=0x1 # Firecrest
|
||||
Action:2=1 # SET
|
||||
Mode:1=1 # 1 - Qbased based;0-Packet type based
|
||||
Mask_1:4=0xffffffff # This value will be read in little endian format in firmware,Tx_Priority_setting[t] t = 0 – 31, set bits to indicate which entry need to update priorities
|
||||
Mask_2:4=0xffffffff # Tx_Priority_setting[t] t= 32 – 63, set bits to indicate which entry need to update priorities
|
||||
Mask_3:4=0xffffffff # Rx_Priority_setting[t] t= 0 – 31, set bits to indicate which entry need to update priorities
|
||||
Mask_4:4=0xffffffff # Rx_Priority_setting[t] t= 32 – 63, set bits to indicate which entry need to update priorities
|
||||
Tx_Priority_setting:64='0xf,0xf,0xf,0xf,0xf,0xf,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x08,0x08,0x8,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40' # WLAN Tx Traffic priorities
|
||||
Rx_Priority_setting:64='0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,0x80' # WLAN Rx Traffic priorities
|
||||
}
|
||||
}
|
||||
|
||||
get_wlan_traffic_priority={
|
||||
CmdCode=0x0277 # do NOT change this line
|
||||
|
||||
# COEX WLAN Traffic Priority TLV
|
||||
BCAArbitrationTLVType:2=0x024C # do NOT change this line
|
||||
RobustCoexTlvLength:2={
|
||||
Version:2=0x1 # Firecrest
|
||||
Action:2=0 # GET WLAN Traffic priorities
|
||||
Mode:1=0 # (Qbased based - 1) or (Packet type based - 0)
|
||||
Mask_1:4=0 # GET mask 1
|
||||
Mask_2:4=0 # GET mask 2
|
||||
Mask_3:4=0 # GET mask 3
|
||||
Mask_4:4=0 # GET mask 4
|
||||
Tx_Priority_setting:64=0 # GET WLAN Tx Traffic priorities
|
||||
Rx_Priority_setting:64=0 # GET WLAN Rx Traffic priorities
|
||||
}
|
||||
}
|
||||
|
||||
get_wlan_stats={
|
||||
CmdCode=0x0277 # do NOT change this line
|
||||
|
||||
# BCA Arbitration TLV
|
||||
BCAArbitrationTLVType:2=0x024F # do NOT change this line
|
||||
RobustCoexTlvLength:2={
|
||||
Version:2=0x1 # Firecrest
|
||||
Action:2=0 # GET WLAN Statistics
|
||||
length:4=40 # Length of collected statistics
|
||||
stats:40=0 # Accumulated Statistics
|
||||
}
|
||||
}
|
||||
|
||||
get_15_4_stats={
|
||||
CmdCode=0x0277 # do NOT change this line
|
||||
|
||||
# BCA Arbitration TLV
|
||||
BCAArbitrationTLVType:2=0x024F # do NOT change this line
|
||||
RobustCoexTlvLength:2={
|
||||
Version:2=0x1 # Firecrest
|
||||
Action:2=1 # GET 15.4 Statistics
|
||||
length:4=52 # Length of collected statistics
|
||||
stats:52=0 # Accumulated Statistics
|
||||
}
|
||||
}
|
||||
|
||||
get_bt_stats={
|
||||
CmdCode=0x0277 # do NOT change this line
|
||||
|
||||
# BCA Arbitration TLV
|
||||
BCAArbitrationTLVType:2=0x024F # do NOT change this line
|
||||
RobustCoexTlvLength:2={
|
||||
Version:2=0x1 # Firecrest
|
||||
Action:2=2 # GET BT Statistics
|
||||
length:4=28 # Length of collected statistics
|
||||
stats:28=0 # Accumulated Statistics
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
# File : ed_mac_ctrl_V1_8801.conf
|
||||
#
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V1_8801.conf ed_mac_ctrl
|
||||
#
|
||||
#
|
||||
## Set Energy Detect Threshold for EU Adaptivity test
|
||||
|
||||
ed_mac_ctrl={
|
||||
CmdCode=0x0124 #Command code, DO NOT change this line
|
||||
Enable:2=0x1 # 0 - disable EU adaptivity
|
||||
# 1 - enable EU adaptivity
|
||||
|
||||
Offset:2=0x1b # 0 - Default Energy Detect threshold
|
||||
#offset value range: 0x80 to 0x7F
|
||||
}
|
|
@ -1,11 +1,10 @@
|
|||
# File : ed_mac_ctrl_V3_8987.conf
|
||||
# File : ed_mac_ctrl_V2_8987.conf
|
||||
#
|
||||
# ed_mac_ctrl_v3 is used for 88W8997, 88W8987, 88W8977
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_8987.conf ed_mac_ctrl_v3
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V2_8987.conf ed_mac_ctrl_v2
|
||||
#
|
||||
## Set Energy Detect Threshold for EU Adaptivity test
|
||||
|
||||
ed_mac_ctrl_v3={
|
||||
ed_mac_ctrl_v2={
|
||||
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
|
|
@ -1,11 +1,10 @@
|
|||
# File : ed_mac_ctrl_V3_8997.conf
|
||||
# File : ed_mac_ctrl_V2_8997.conf
|
||||
#
|
||||
# ed_mac_ctrl_v3 is used for 88W8997, 88W8987, 88W8977
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_8997.conf ed_mac_ctrl_v3
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V2_8997.conf ed_mac_ctrl_v2
|
||||
#
|
||||
## Set Energy Detect Threshold for EU Adaptivity test
|
||||
|
||||
ed_mac_ctrl_v3={
|
||||
ed_mac_ctrl_v2={
|
||||
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
|
|
@ -0,0 +1,22 @@
|
|||
# File : ed_mac_ctrl_V2_iw416.conf
|
||||
#
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V2_iw416.conf ed_mac_ctrl_v2
|
||||
#
|
||||
## Set Energy Detect Threshold for EU Adaptivity test
|
||||
|
||||
ed_mac_ctrl_v2={
|
||||
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=0x9 # 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=0xC # 0 - Default Energy Detect threshold
|
||||
#offset value range: 0x80 to 0x7F
|
||||
|
||||
ed_ctrl_txq_lock:4=0xFF #DO NOT Change this line
|
||||
}
|
|
@ -1,22 +1,21 @@
|
|||
# File : ed_mac_ctrl_V3_909x.conf
|
||||
# File : ed_mac_ctrl_V2_nw61x.conf
|
||||
#
|
||||
# ed_mac_ctrl_v3 is used for 88W9098, 88W9097
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_909x.conf ed_mac_ctrl_v3
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V2_nw61x.conf ed_mac_ctrl_v2
|
||||
#
|
||||
## Set Energy Detect Threshold for EU Adaptivity test
|
||||
|
||||
ed_mac_ctrl_v3={
|
||||
ed_mac_ctrl_v2={
|
||||
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
|
||||
ed_ctrl_2g.offset:2=0xA # 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
|
||||
ed_ctrl_5g.offset:2=0xA # 0 - Default Energy Detect threshold
|
||||
#offset value range: 0x80 to 0x7F
|
||||
|
||||
ed_ctrl_txq_lock:4=0x1e00FF #DO NOT Change this line
|
24
mxm_wifiex/wlan_src/mapp/mlanconfig/config/keep_alive.conf
Normal file
24
mxm_wifiex/wlan_src/mapp/mlanconfig/config/keep_alive.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
######################### Keep-Alive command ##################
|
||||
stop={
|
||||
mkeep_alive_id=1
|
||||
enable=0 #1-enable; 0-disable
|
||||
}
|
||||
|
||||
reset={
|
||||
mkeep_alive_id=1
|
||||
enable=0 #1-enable; 0-disable
|
||||
reset=1 #enable reset
|
||||
}
|
||||
|
||||
start={
|
||||
mkeep_alive_id=1
|
||||
enable=1 #1-enable; 0-disable
|
||||
sendInterval=55000 # 55 seconds(The unit of sendInterval is milliseconds)
|
||||
retryInterval=20000 # 20 seconds(The unit of retryInterval is milliseconds)
|
||||
retryCount=3 # tcp alive retry count
|
||||
destMacAddr=00:50:43:21:3b:7b # destination MAC address. need change accordingly
|
||||
srcMacAddr=00:00:00:00:00:00 # source MAC address. need change accordingly
|
||||
pktLen=67 #IP packet len
|
||||
ipPkt=45 00 00 43 8c 9e 00 00 ff 06 ac bf c0 a8 00 7c c0 a8 00 8a c0 03 22 b7 b0 b6 60 9f 42 dd 9e 1e 50 18 80 00 d0 88 00 00 74 68 69 73 20 69 73 20 61 20 6b 65 65 70 20 61 6c 69 76 65 20 70 61 63 6b 65 74 #packet content. "c0 a8 00 7c" is the source ip address. "c0 a8 00 8a" is the destination ip address. They may need change accordingly.
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# File : robust_btc_MM.conf
|
||||
|
||||
######################### Robust Coex command ###############
|
||||
mode_get={
|
||||
CmdCode=0x00e0 # do NOT change this line
|
||||
Action:2=0 # GET
|
||||
RSVD:2=0
|
||||
|
||||
# Robust Coex Mode TLV
|
||||
RobustCoexTlvType:2=0x0160
|
||||
RobustCoexTlvLength:2={
|
||||
Enable:1=0x00 # Read-back Coex mode(s)
|
||||
Reserved:3=0
|
||||
}
|
||||
}
|
||||
|
||||
mode_none={
|
||||
CmdCode=0x00e0 # do NOT change this line
|
||||
Action:2=1 # SET
|
||||
RSVD:2=0
|
||||
|
||||
# Robust Coex Mode TLV
|
||||
RobustCoexTlvType:2=0x0160
|
||||
RobustCoexTlvLength:2={
|
||||
Enable:1=0 # Concurrent Coex mode. Used for chips which has
|
||||
# separate antenna for BT
|
||||
Reserved:3=0
|
||||
}
|
||||
}
|
||||
|
||||
mode_bca={
|
||||
CmdCode=0x00e0 # do NOT change this line
|
||||
Action:2=1 # SET
|
||||
RSVD:2=0
|
||||
|
||||
# Robust Coex Mode TLV
|
||||
RobustCoexTlvType:2=0x0160
|
||||
RobustCoexTlvLength:2={
|
||||
Enable:1=0x08 # BCA Coex mode.
|
||||
# Pure HW BCA based WLAN and BT traffic arbitration.
|
||||
Reserved:3=0
|
||||
}
|
||||
}
|
|
@ -1,617 +0,0 @@
|
|||
# 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'
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,497 @@
|
|||
# File : txpwrlimit_cfg_iw416.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 (0,1,2)
|
||||
## 5: HT20 (3,4)
|
||||
## 6: HT20 (5,6,7)
|
||||
## 7: HT40 (0,1,2)
|
||||
## 8: HT40 (3,4)
|
||||
## 9: HT40 (5,6,7)
|
||||
## Power Limit in dBm
|
||||
##
|
||||
## For 40MHz modulation groups, specify same Tx power value for a set of
|
||||
## two consecutive channel frequencies
|
||||
## Valid channel sets:
|
||||
## (36, 40), (44, 48), (52, 56), (60, 64)
|
||||
## (100, 104), (108, 112), (116, 120), (124, 128), (132, 136), (140, 144)
|
||||
## (149, 153), (157, 161)
|
||||
##
|
||||
|
||||
## 2G Tx power limit CFG
|
||||
txpwrlimit_2g_cfg_set={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=1 # 1 - SET
|
||||
RSVD:2=0 # do NOT change this line
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=1
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=2
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=3
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=4
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=5
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=6
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=7
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=8
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=9
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=10
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=11
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=12
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=13
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2414
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=14
|
||||
TLVPwr:20='0,16,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
}
|
||||
|
||||
## 5G Tx power limit CFG
|
||||
txpwrlimit_5g_cfg_set={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=1 # 1 - SET
|
||||
RSVD:2=0 # do NOT change this line
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=36
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=40
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=44
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=48
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=52
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=56
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=60
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=64
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=100
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=104
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=108
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=112
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=116
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=120
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=124
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=128
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=132
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=136
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,16,8,15,9,12'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=140
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,15,8,15,9,10'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=144
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=149
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,15,8,15,9,10'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=153
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,15,8,15,9,10'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=157
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,15,8,15,9,10'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=161
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,15,8,15,9,10'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=165
|
||||
TLVPwr:20='0,0,1,16,2,16,3,13,4,16,5,16,6,12,7,15,8,15,9,10'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=183
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=184
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=185
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=187
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=188
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=189
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=192
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=196
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=7
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=8
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=11
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=12
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=16
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=34
|
||||
TLVPwr:20='0,0,1,16,2,16,3,15,4,16,5,16,6,14,7,16,8,16,9,14'
|
||||
}
|
||||
}
|
|
@ -67,6 +67,15 @@ SD8997 = {
|
|||
# drv_mode=7
|
||||
#}
|
||||
|
||||
#SD8978 = {
|
||||
# cfg80211_wext=0xf
|
||||
# wfd_name=p2p
|
||||
# hw_name=SDIW416
|
||||
# max_vir_bss=1
|
||||
# cal_data_cfg=nxp/WlanCalData_ext_8978_QFN_TB.conf
|
||||
# drv_mode=7
|
||||
#}
|
||||
|
||||
#SD8987 = {
|
||||
# cfg80211_wext=0xf
|
||||
# wfd_name=p2p
|
||||
|
@ -75,6 +84,14 @@ SD8997 = {
|
|||
# drv_mode=7
|
||||
#}
|
||||
|
||||
#SD9177 = {
|
||||
# cfg80211_wext=0xf
|
||||
# wfd_name=p2p
|
||||
# hw_name=SDNW611
|
||||
# max_vir_bss=1
|
||||
# drv_mode=7
|
||||
#}
|
||||
|
||||
USB8997 = {
|
||||
cfg80211_wext=0xf
|
||||
wfd_name=p2p
|
||||
|
@ -83,6 +100,15 @@ USB8997 = {
|
|||
drv_mode=7
|
||||
}
|
||||
|
||||
#USBIW620 = {
|
||||
# cfg80211_wext=0xf
|
||||
# wfd_name=p2p
|
||||
# hw_name=USBIW620
|
||||
# max_vir_bss=1
|
||||
# drv_mode=7
|
||||
#}
|
||||
|
||||
|
||||
PCIE8997 = {
|
||||
cfg80211_wext=0xf
|
||||
wfd_name=p2p
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
# Copyright 2021 NXP
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
## http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
LOCAL_PATH := $(my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# Enable DEBUG Level
|
||||
DEBUG_LEVEL=1
|
||||
ifeq ($(DEBUG_LEVEL),1)
|
||||
LOCAL_CFLAGS += -DDEBUG_LEVEL1
|
||||
endif
|
||||
ifeq ($(DEBUG_LEVEL),2)
|
||||
LOCAL_CFLAGS += -DDEBUG_LEVEL1
|
||||
LOCAL_CFLAGS += -DDEBUG_LEVEL2
|
||||
endif
|
||||
# Enable STA mode support
|
||||
CONFIG_STA_SUPPORT=y
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
LOCAL_CFLAGS += -DSTA_SUPPORT
|
||||
endif
|
||||
# Enable uAP mode support
|
||||
CONFIG_UAP_SUPPORT=y
|
||||
ifeq ($(CONFIG_UAP_SUPPORT),y)
|
||||
LOCAL_CFLAGS += -DUAP_SUPPORT
|
||||
endif
|
||||
CONFIG_WIFI_DIRECT_SUPPORT=y
|
||||
ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT), y)
|
||||
LOCAL_CFLAGS += -DWIFI_DIRECT_SUPPORT
|
||||
endif
|
||||
|
||||
# if 64bit Android is used (e.g. PXA1928)
|
||||
# Please turn on following compiler flag
|
||||
CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=y
|
||||
ifeq ($(CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT), y)
|
||||
LOCAL_CFLAGS += -DUSERSPACE_32BIT_OVER_KERNEL_64BIT
|
||||
endif
|
||||
|
||||
LOCAL_MODULE := mlanutl
|
||||
LOCAL_VENDOR_MODULE := true
|
||||
OBJS = mlanutl.c
|
||||
LOCAL_SRC_FILES := $(OBJS)
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
|
@ -1,6 +1,6 @@
|
|||
# File : mlanutl/Makefile
|
||||
#
|
||||
# Copyright 2011-2020 NXP
|
||||
# Copyright 2011-2022 NXP
|
||||
|
||||
# Path to the top directory of the wlan distribution
|
||||
PATH_TO_TOP = ../..
|
||||
|
@ -21,6 +21,7 @@ CFLAGS := $(filter-out -I$(KERNELDIR)%, $(CFLAGS))
|
|||
|
||||
#CFLAGS += -DAP22 -fshort-enums
|
||||
CFLAGS += -Wall
|
||||
CFLAGS += -Wno-stringop-truncation
|
||||
#ECHO = @
|
||||
ifeq (,$(findstring ANDROID_KERNEL, $(CFLAGS)))
|
||||
LIBS=-lrt
|
||||
|
@ -33,10 +34,12 @@ HEADERS = mlanutl.h
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
exectarget=mlanutl
|
||||
TARGET := $(exectarget)
|
||||
|
||||
build default: $(TARGET)
|
||||
build appsbuild default: $(TARGET)
|
||||
@cp -f $(TARGET) $(INSTALLPATH)
|
||||
|
||||
all : tags default
|
||||
|
|
|
@ -2,21 +2,28 @@
|
|||
*
|
||||
* @brief Program to control parameters in the mlandriver
|
||||
*
|
||||
* Usage: mlanutl mlanX cmd [...]
|
||||
*
|
||||
* Copyright 2011-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* Copyright 2011-2022 NXP
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
*/
|
||||
/************************************************************************
|
||||
|
@ -52,16 +59,48 @@ Change log:
|
|||
/** Termination flag */
|
||||
int terminate_flag = 0;
|
||||
|
||||
/** Termination flag */
|
||||
boolean mcast_debug_flag = 0;
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
********************************************************/
|
||||
|
||||
#define BAND_B (1U << 0)
|
||||
#define BAND_G (1U << 1)
|
||||
#define BAND_A (1U << 2)
|
||||
#define BAND_GN (1U << 3)
|
||||
#define BAND_AN (1U << 4)
|
||||
#define BAND_GAC (1U << 5)
|
||||
#define BAND_AAC (1U << 6)
|
||||
#define BAND_GAX (1U << 8)
|
||||
#define BAND_AAX (1U << 9)
|
||||
|
||||
/** Stringification of rateId enumeration */
|
||||
const char *rateIdStr[] = {"1", "2", "5.5", "11", "--", "6", "9", "12",
|
||||
"18", "24", "36", "48", "54", "--", "M0", "M1",
|
||||
"M2", "M3", "M4", "M5", "M6", "M7", "H0", "H1",
|
||||
"H2", "H3", "H4", "H5", "H6", "H7"};
|
||||
|
||||
char mod_conv_bg_1x1[10][35] = {
|
||||
"CCK (1,2,5.5,11 Mbps)", "OFDM_PSK (6,9,12,18 Mbps)",
|
||||
"OFDM_QAM16 (24,36 Mbps)", "OFDM_QAM64 (48,54 Mbps)",
|
||||
"HT_20_PSK (MCS 0,1,2)", "HT_20_QAM16 (MCS 3,4)",
|
||||
"HT_20_QAM64 (MCS 5,6,7)", "HT_40_PSK (MCS 0,1,2)",
|
||||
"HT_40_QAM16 (MCS 3,4)", "HT_40_QAM64 (MCS 5,6,7)"};
|
||||
char mod_conv_a_1x1[6][35] = {
|
||||
"VHT_20_QAM256 (MCS 8)", "VHT_40_QAM256 (MCS 8,9)",
|
||||
"VHT_80_PSK (MCS 0,1,2)", "VHT_80_QAM16 (MCS 3,4)",
|
||||
"VHT_80_QAM64 (MCS 5,6,7)", "VHT_80_QAM256 (MCS 8,9)"};
|
||||
char mod_conv_bg_2x2[6][35] = {
|
||||
"HT2_20_PSK (MCS 8,9,10)", "HT2_20_QAM16 (MCS 11,12)",
|
||||
"HT2_20_QAM64 (MCS 13,14,15)", "HT2_40_PSK (MCS 8,9,10)",
|
||||
"HT2_40_QAM16 (MCS 11,12)", "HT2_40_QAM64 (MCS 13,14,15)"};
|
||||
char mod_conv_a_2x2[6][35] = {
|
||||
"VHT2_20_QAM256 (MCS 8)", "VHT2_40_QAM256 (MCS 8,9)",
|
||||
"VHT2_80_PSK (MCS 0,1,2)", "VHT2_80_QAM16 (MCS 3,4)",
|
||||
"VHT2_80_QAM64 (MCS 5,6,7)", "VHT2_80_QAM256 (MCS 8,9)"};
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
#define MMSG MBIT(0)
|
||||
#define MFATAL MBIT(1)
|
||||
|
@ -115,6 +154,7 @@ static int process_addbareject(int argc, char *argv[]);
|
|||
static int process_hssetpara(int argc, char *argv[]);
|
||||
static int process_mefcfg(int argc, char *argv[]);
|
||||
static int process_cloud_keep_alive(int argc, char *argv[]);
|
||||
static int process_min_ba_threshold_cfg(int argc, char *argv[]);
|
||||
|
||||
struct command_node command_list[] = {
|
||||
{"version", process_version},
|
||||
|
@ -145,6 +185,7 @@ struct command_node command_list[] = {
|
|||
{"hssetpara", process_hssetpara},
|
||||
{"mefcfg", process_mefcfg},
|
||||
{"cloud_keep_alive", process_cloud_keep_alive},
|
||||
{"min_ba_threshold", process_min_ba_threshold_cfg},
|
||||
};
|
||||
|
||||
static char *usage[] = {
|
||||
|
@ -182,6 +223,7 @@ static char *usage[] = {
|
|||
" hssetpara",
|
||||
" mefcfg",
|
||||
" cloud_keep_alive",
|
||||
" min_ba_threshold",
|
||||
};
|
||||
|
||||
/** Socket */
|
||||
|
@ -190,8 +232,7 @@ t_s32 sockfd;
|
|||
char dev_name[IFNAMSIZ + 1];
|
||||
#define HOSTCMD "hostcmd"
|
||||
|
||||
static char *config_get_line(char *s, int size, FILE *stream, int *line,
|
||||
char **_pos);
|
||||
char *config_get_line(char *s, int size, FILE *stream, int *line, char **_pos);
|
||||
#define BSSID_FILTER 1
|
||||
#define SSID_FILTER 2
|
||||
/********************************************************
|
||||
|
@ -255,7 +296,7 @@ t_void hexdump(char *prompt, t_void *p, t_s32 len, char delim)
|
|||
* @param chr Char
|
||||
* @return Hex integer
|
||||
*/
|
||||
static t_u8 hexc2bin(char chr)
|
||||
t_u8 hexc2bin(char chr)
|
||||
{
|
||||
if (chr >= '0' && chr <= '9')
|
||||
chr -= '0';
|
||||
|
@ -273,7 +314,7 @@ static t_u8 hexc2bin(char chr)
|
|||
* @param s A pointer string buffer
|
||||
* @return Hex integer
|
||||
*/
|
||||
static t_u32 a2hex(char *s)
|
||||
t_u32 a2hex(char *s)
|
||||
{
|
||||
t_u32 val = 0;
|
||||
|
||||
|
@ -294,7 +335,7 @@ static t_u32 a2hex(char *s)
|
|||
* @param value A pointer to string
|
||||
* @return Integer
|
||||
*/
|
||||
static t_u32 a2hex_or_atoi(char *value)
|
||||
t_u32 a2hex_or_atoi(char *value)
|
||||
{
|
||||
if (value[0] == '0' && (value[1] == 'X' || value[1] == 'x')) {
|
||||
return a2hex(value + 2);
|
||||
|
@ -654,7 +695,7 @@ int process_host_cmd_resp(char *cmd_name, t_u8 *buf);
|
|||
* @param lineno A pointer to return current line number
|
||||
* @return returns string or NULL
|
||||
*/
|
||||
static char *mlan_config_get_line(FILE *fp, char *str, t_s32 size, int *lineno)
|
||||
char *mlan_config_get_line(FILE *fp, char *str, t_s32 size, int *lineno)
|
||||
{
|
||||
char *start, *end;
|
||||
int out, next_line;
|
||||
|
@ -750,8 +791,7 @@ static char *mlan_config_get_line(FILE *fp, char *str, t_s32 size, int *lineno)
|
|||
* @param _pos Output string or NULL
|
||||
* @return String or NULL
|
||||
*/
|
||||
static char *config_get_line(char *s, int size, FILE *stream, int *line,
|
||||
char **_pos)
|
||||
char *config_get_line(char *s, int size, FILE *stream, int *line, char **_pos)
|
||||
{
|
||||
*_pos = mlan_config_get_line(stream, s, size, line);
|
||||
return *_pos;
|
||||
|
@ -928,18 +968,40 @@ static int prepare_host_cmd_buffer(FILE *fp, char *cmd_name, t_u8 *buf)
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#define SUBID_OFFSET 2
|
||||
static t_u16 supported_subcmd[] = {0x104, 0x111, 0x11b, 0x11e, 0x27};
|
||||
#define CMDCODE_OFFSET 0
|
||||
#define SUBID_OFFSET (S_DS_GEN + 2)
|
||||
|
||||
static int check_if_hostcmd_subcmd_allowed(t_u8 *buf)
|
||||
static const t_u16 debug_cmd = 0x008b;
|
||||
static t_u16 supported_cmd[] = {0x0130, 0x0016, 0x00e0};
|
||||
/* If the hostcmd CmdCode is 0x008b (debug cmd), then below SUBIDs will be
|
||||
* allowed */
|
||||
static t_u16 supported_8b_subcmd[] = {0x104, 0x111, 0x11b, 0x11e, 0x27, 0x101};
|
||||
|
||||
static int check_if_hostcmd_allowed(t_u8 *buf)
|
||||
{
|
||||
t_u32 maxcnt = sizeof(supported_subcmd) / sizeof(supported_subcmd[0]);
|
||||
t_u32 maxcnt_cmd = sizeof(supported_cmd) / sizeof(supported_cmd[0]);
|
||||
t_u32 maxcnt_subcmd =
|
||||
sizeof(supported_8b_subcmd) / sizeof(supported_8b_subcmd[0]);
|
||||
|
||||
for (int i = 0; i < maxcnt; i++) {
|
||||
if (!memcmp(buf + SUBID_OFFSET, (supported_subcmd + i),
|
||||
/* Check if CmdCode is 0x008b (debug cmd from debug.conf) */
|
||||
if (!memcmp(buf + CMDCODE_OFFSET, &debug_cmd, sizeof(t_u16))) {
|
||||
for (int i = 0; i < maxcnt_subcmd; i++) {
|
||||
/* Check if SUBID matches with allowed subcmd */
|
||||
if (!memcmp(buf + SUBID_OFFSET,
|
||||
(supported_8b_subcmd + i), sizeof(t_u16)))
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
return MLAN_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
for (int i = 0; i < maxcnt_cmd; i++) {
|
||||
/* If CmdCode is other than 0x008b, then only check the CmdCode
|
||||
*/
|
||||
if (!memcmp(buf + CMDCODE_OFFSET, (supported_cmd + i),
|
||||
sizeof(t_u16)))
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return MLAN_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
|
@ -1151,11 +1213,10 @@ static int process_hostcmd(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (call_ioctl) {
|
||||
/* raw_buf points to start of command id */
|
||||
raw_buf = buffer + strlen(CMD_NXP) + strlen(argv[2]) +
|
||||
sizeof(t_u32) + S_DS_GEN; /* raw_buf points to start
|
||||
of actual <raw data> */
|
||||
if (check_if_hostcmd_subcmd_allowed(raw_buf) !=
|
||||
MLAN_STATUS_SUCCESS) {
|
||||
sizeof(t_u32);
|
||||
if (check_if_hostcmd_allowed(raw_buf) != MLAN_STATUS_SUCCESS) {
|
||||
printf("ERR:Entered hostcmd not allowed!\n");
|
||||
goto done;
|
||||
}
|
||||
|
@ -1588,7 +1649,11 @@ static int process_getlog(int argc, char *argv[])
|
|||
"gOwnrshpCtlErrCnt %u\n"
|
||||
"gOwnrshpBcnErrCnt %u\n"
|
||||
"gOwnrshpMgtErrCnt %u\n"
|
||||
"gOwnrshpDatErrCnt %u\n",
|
||||
"gOwnrshpDatErrCnt %u\n"
|
||||
"bigtk_mmeGoodCnt %u\n"
|
||||
"bigtk_replayErrCnt %u\n"
|
||||
"bigtk_micErrCnt %u\n"
|
||||
"bigtk_mmeNotFoundCnt %u\n",
|
||||
stats->rx_stuck_issue_cnt[0],
|
||||
stats->rx_stuck_issue_cnt[1],
|
||||
stats->rx_stuck_recovery_cnt, stats->rx_stuck_tsf[0],
|
||||
|
@ -1601,7 +1666,9 @@ static int process_getlog(int argc, char *argv[])
|
|||
stats->rx_Isr2_NotDone_Cnt, stats->gdma_abort_cnt,
|
||||
stats->g_reset_rx_mac_cnt, stats->dwCtlErrCnt,
|
||||
stats->dwBcnErrCnt, stats->dwMgtErrCnt,
|
||||
stats->dwDatErrCnt);
|
||||
stats->dwDatErrCnt, stats->bigtk_mmeGoodCnt,
|
||||
stats->bigtk_replayErrCnt, stats->bigtk_micErrCnt,
|
||||
stats->bigtk_mmeNotFoundCnt);
|
||||
}
|
||||
|
||||
if (cmd->used_len == sizeof(struct eth_priv_get_log)) {
|
||||
|
@ -2827,8 +2894,11 @@ static int process_11axcfg(int argc, char *argv[])
|
|||
(t_u8 *)config_id);
|
||||
|
||||
snprintf(config_id, sizeof(config_id), "HECap");
|
||||
fparse_for_cmd_and_hex(fp, buffer + cmd_header_len + id_len,
|
||||
(t_u8 *)config_id);
|
||||
id_len +=
|
||||
fparse_for_cmd_and_hex(fp,
|
||||
buffer + cmd_header_len + id_len,
|
||||
(t_u8 *)config_id);
|
||||
|
||||
hexdump("Set 11axcfg", buffer + cmd_header_len,
|
||||
sizeof(mlan_ds_11ax_he_cfg), ' ');
|
||||
cmd->used_len = cmd_header_len + sizeof(mlan_ds_11ax_he_cfg);
|
||||
|
@ -3619,6 +3689,43 @@ int process_host_cmd_resp(char *cmd_name, t_u8 *buf)
|
|||
wmm_param->ac_params[AC_VO].tx_op_limit));
|
||||
break;
|
||||
}
|
||||
case HostCmd_ROBUST_COEX: {
|
||||
host_RobustCoexLteStats_t *RobustCoexLteStat =
|
||||
(host_RobustCoexLteStats_t *)(buf + S_DS_GEN);
|
||||
if (RobustCoexLteStat->ResponseType ==
|
||||
EXT_LTE_RESP_GETSTAT) {
|
||||
printf("==============LTE COEX STATS================\n");
|
||||
printf("Responsetype: %d \n",
|
||||
RobustCoexLteStat->ResponseType);
|
||||
printf("Count_LTE_TX_NOTIFY: %d \n",
|
||||
(unsigned int)le32_to_cpu(
|
||||
RobustCoexLteStat
|
||||
->Count_LTE_TX_NOTIFY));
|
||||
printf("Count_LTE_RX_PROTECT: %d \n",
|
||||
(unsigned int)le32_to_cpu(
|
||||
RobustCoexLteStat
|
||||
->Count_LTE_RX_PROTECT));
|
||||
printf("Count_LTE_TX_SUSPEND: %d \n",
|
||||
(unsigned int)le32_to_cpu(
|
||||
RobustCoexLteStat
|
||||
->Count_LTE_TX_SUSPEND));
|
||||
printf("Count_LTE_RX_NOTIFY: %d \n",
|
||||
(unsigned int)le32_to_cpu(
|
||||
RobustCoexLteStat
|
||||
->Count_LTE_RX_NOTIFY));
|
||||
} else if (RobustCoexLteStat->ResponseType ==
|
||||
EXT_LTE_RESP_RSTSTAT) {
|
||||
printf("LTE STAT Counters cleared \n");
|
||||
} else // else print default cmdresp
|
||||
{
|
||||
printf("HOSTCMD_RESP: CmdCode=%#04x, Size=%#04x,"
|
||||
" SeqNum=%#04x, Result=%#04x\n",
|
||||
hostcmd->command, hostcmd->size,
|
||||
hostcmd->seq_num, hostcmd->result);
|
||||
hexdump("payload", (t_void *)(buf + S_DS_GEN),
|
||||
hostcmd->size - S_DS_GEN, ' ');
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
printf("HOSTCMD_RESP: CmdCode=%#04x, Size=%#04x,"
|
||||
" SeqNum=%#04x, Result=%#04x\n",
|
||||
|
@ -4545,7 +4652,7 @@ static int ishexstring(char *s)
|
|||
* MAC_BROADCAST - if broadcast mac
|
||||
* MAC_MULTICAST - if multicast mac
|
||||
*/
|
||||
static int mac2raw(char *mac, t_u8 *raw)
|
||||
int mac2raw(char *mac, t_u8 *raw)
|
||||
{
|
||||
unsigned int temp_raw[ETH_ALEN];
|
||||
int num_tokens = 0;
|
||||
|
@ -4595,7 +4702,7 @@ static int atoval(char *buf)
|
|||
* 'args'
|
||||
* @return Number of arguments in the line or EOF
|
||||
*/
|
||||
static int parse_line(char *line, char *args[], t_u16 args_count)
|
||||
int parse_line(char *line, char *args[], t_u16 args_count)
|
||||
{
|
||||
int arg_num = 0;
|
||||
int is_start = 0;
|
||||
|
@ -4996,6 +5103,83 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Implement Minimum BA Threshold command
|
||||
* @param argc Number of arguments
|
||||
* @param argv A pointer to arguments array
|
||||
* @return MLAN_STATUS_SUCCESS--success, otherwise--fail
|
||||
*/
|
||||
static int process_min_ba_threshold_cfg(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
t_u8 min_ba_thres = 0;
|
||||
t_u8 *buffer = NULL;
|
||||
struct eth_priv_cmd *cmd = NULL;
|
||||
struct ifreq ifr;
|
||||
|
||||
/* Initialize buffer */
|
||||
buffer = (t_u8 *)malloc(BUFFER_LENGTH);
|
||||
if (!buffer) {
|
||||
printf("ERR:Cannot allocate buffer for command!\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
memset(buffer, 0, BUFFER_LENGTH);
|
||||
|
||||
/* Sanity tests */
|
||||
if (argc < 3 || argc > 4) {
|
||||
printf("Error: invalid no of arguments\n");
|
||||
printf("mlanutl mlanX min_ba_threshold [#]\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
prepare_buffer(buffer, argv[2], (argc - 3), &argv[3]);
|
||||
|
||||
cmd = (struct eth_priv_cmd *)malloc(sizeof(struct eth_priv_cmd));
|
||||
if (!cmd) {
|
||||
printf("ERR:Cannot allocate buffer for command!\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Fill up buffer */
|
||||
#ifdef USERSPACE_32BIT_OVER_KERNEL_64BIT
|
||||
memset(cmd, 0, sizeof(struct eth_priv_cmd));
|
||||
memcpy(&cmd->buf, &buffer, sizeof(buffer));
|
||||
#else
|
||||
cmd->buf = buffer;
|
||||
#endif
|
||||
cmd->used_len = 0;
|
||||
cmd->total_len = BUFFER_LENGTH;
|
||||
|
||||
/* Perform IOCTL */
|
||||
memset(&ifr, 0, sizeof(struct ifreq));
|
||||
strncpy(ifr.ifr_ifrn.ifrn_name, dev_name, strlen(dev_name));
|
||||
ifr.ifr_ifru.ifru_data = (void *)cmd;
|
||||
|
||||
if (ioctl(sockfd, MLAN_ETH_PRIV, &ifr)) {
|
||||
perror("mlanutl");
|
||||
fprintf(stderr, "mlanutl: min_ba_threshold fail\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Process result */
|
||||
if (argc == 3) {
|
||||
memcpy(&min_ba_thres, buffer, sizeof(min_ba_thres));
|
||||
printf("Min Tx BA Threshold: %d\n", min_ba_thres);
|
||||
}
|
||||
|
||||
done:
|
||||
if (buffer)
|
||||
free(buffer);
|
||||
if (cmd)
|
||||
free(cmd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
|
|
@ -3,20 +3,25 @@
|
|||
* @brief This file contains definitions for application
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2021 NXP
|
||||
* Copyright 2011-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
*/
|
||||
/************************************************************************
|
||||
|
@ -59,16 +64,6 @@ typedef enum { FALSE, TRUE } boolean;
|
|||
(((t_u32)(x)&0xff000000UL) >> 24)))
|
||||
|
||||
/** Convert to correct endian format */
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** CPU to little-endian convert for 16-bit */
|
||||
#define cpu_to_le16(x) swap_byte_16(x)
|
||||
/** CPU to little-endian convert for 32-bit */
|
||||
#define cpu_to_le32(x) swap_byte_32(x)
|
||||
/** Little-endian to CPU convert for 16-bit */
|
||||
#define le16_to_cpu(x) swap_byte_16(x)
|
||||
/** Little-endian to CPU convert for 32-bit */
|
||||
#define le32_to_cpu(x) swap_byte_32(x)
|
||||
#else
|
||||
/** Do nothing */
|
||||
#define cpu_to_le16(x) (x)
|
||||
/** Do nothing */
|
||||
|
@ -77,7 +72,6 @@ typedef enum { FALSE, TRUE } boolean;
|
|||
#define le16_to_cpu(x) (x)
|
||||
/** Do nothing */
|
||||
#define le32_to_cpu(x) (x)
|
||||
#endif
|
||||
|
||||
/** TLV header */
|
||||
#define TLVHEADER /** Tag */ \
|
||||
|
@ -158,6 +152,10 @@ enum _mlan_act_ioctl {
|
|||
#define ACTION_GET 0
|
||||
/** Action field value : set */
|
||||
#define ACTION_SET 1
|
||||
/** Action field value: add */
|
||||
#define ACTION_ADD 2
|
||||
/** Action field value: remove */
|
||||
#define ACTION_REMOVE 3
|
||||
|
||||
/** Maximum number of TID */
|
||||
#define MAX_NUM_TID 8
|
||||
|
@ -374,6 +372,14 @@ struct eth_priv_get_log {
|
|||
t_u32 dwMgtErrCnt;
|
||||
/*Control Ownership error count*/
|
||||
t_u32 dwDatErrCnt;
|
||||
/*BIGTK MME good count*/
|
||||
t_u32 bigtk_mmeGoodCnt;
|
||||
/*BIGTK Replay error count*/
|
||||
t_u32 bigtk_replayErrCnt;
|
||||
/*BIGTK MIC error count*/
|
||||
t_u32 bigtk_micErrCnt;
|
||||
/*BIGTK MME not included count*/
|
||||
t_u32 bigtk_mmeNotFoundCnt;
|
||||
};
|
||||
|
||||
/** MLAN MAC Address Length */
|
||||
|
@ -444,28 +450,11 @@ typedef enum _IEEEtypes_ElementId_e {
|
|||
|
||||
typedef enum _IEEEtypes_Ext_ElementId_e {
|
||||
HE_CAPABILITY = 35,
|
||||
HE_OPERATION = 36
|
||||
HE_OPERATION = 36,
|
||||
HE_6G_CAPABILITY = 59
|
||||
} IEEEtypes_Ext_ElementId_e;
|
||||
|
||||
/** Capability Bit Map*/
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef struct _IEEEtypes_CapInfo_t {
|
||||
t_u8 rsrvd1 : 2;
|
||||
t_u8 dsss_ofdm : 1;
|
||||
t_u8 rsvrd2 : 2;
|
||||
t_u8 short_slot_time : 1;
|
||||
t_u8 rsrvd3 : 1;
|
||||
t_u8 spectrum_mgmt : 1;
|
||||
t_u8 chan_agility : 1;
|
||||
t_u8 pbcc : 1;
|
||||
t_u8 short_preamble : 1;
|
||||
t_u8 privacy : 1;
|
||||
t_u8 cf_poll_rqst : 1;
|
||||
t_u8 cf_pollable : 1;
|
||||
t_u8 ibss : 1;
|
||||
t_u8 ess : 1;
|
||||
} __ATTRIB_PACK__ IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
|
||||
#else
|
||||
typedef struct _IEEEtypes_CapInfo_t {
|
||||
/** Capability Bit Map : ESS */
|
||||
t_u8 ess : 1;
|
||||
|
@ -498,7 +487,6 @@ typedef struct _IEEEtypes_CapInfo_t {
|
|||
/** Capability Bit Map : Reserved */
|
||||
t_u8 rsrvd1 : 2;
|
||||
} __ATTRIB_PACK__ IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
|
||||
/** IEEE IE header */
|
||||
typedef struct _IEEEtypes_Header_t {
|
||||
|
@ -583,6 +571,7 @@ typedef struct MrvlIEtypes_Data_t {
|
|||
enum { BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_4GHZ = 2,
|
||||
BAND_6GHZ = 3,
|
||||
};
|
||||
|
||||
/** channel offset */
|
||||
|
@ -600,16 +589,6 @@ enum { CHAN_BW_20MHZ = 0,
|
|||
|
||||
/** Band_Config_t */
|
||||
typedef struct _Band_Config_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
|
||||
t_u8 scanMode : 2;
|
||||
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
|
||||
t_u8 chan2Offset : 2;
|
||||
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
|
||||
t_u8 chanWidth : 2;
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz */
|
||||
t_u8 chanBand : 2;
|
||||
#else
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz */
|
||||
t_u8 chanBand : 2;
|
||||
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
|
||||
|
@ -618,7 +597,6 @@ typedef struct _Band_Config_t {
|
|||
t_u8 chan2Offset : 2;
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=Adoption mode*/
|
||||
t_u8 scanMode : 2;
|
||||
#endif
|
||||
} __ATTRIB_PACK__ Band_Config_t;
|
||||
|
||||
/** Maximum length of lines in configuration file */
|
||||
|
@ -867,16 +845,6 @@ typedef struct _mlan_ds_11ax_cmd_cfg {
|
|||
|
||||
/** 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 */
|
||||
|
@ -885,22 +853,14 @@ typedef struct _IEEEtypes_WmmAciAifsn_t {
|
|||
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 */
|
||||
|
@ -1232,4 +1192,16 @@ typedef struct _cloud_keep_alive {
|
|||
t_u8 pkt[255];
|
||||
} __ATTRIB_PACK__ cloud_keep_alive;
|
||||
|
||||
#define EXT_LTE_RESP_GETSTAT 0xA5
|
||||
#define EXT_LTE_RESP_RSTSTAT 0x5A
|
||||
/** Host Command ID: ROBUST_COEX */
|
||||
#define HostCmd_ROBUST_COEX 0x00e0
|
||||
typedef struct _host_RobustCoexLteStats_t {
|
||||
unsigned int Count_LTE_TX_NOTIFY;
|
||||
unsigned int Count_LTE_RX_PROTECT;
|
||||
unsigned int Count_LTE_TX_SUSPEND;
|
||||
unsigned int Count_LTE_RX_NOTIFY;
|
||||
unsigned char ResponseType;
|
||||
} __ATTRIB_PACK__ host_RobustCoexLteStats_t;
|
||||
|
||||
#endif /* _MLANUTL_H_ */
|
||||
|
|
1754
mxm_wifiex/wlan_src/mapp/mlanutl/mlanwls.c
Normal file
1754
mxm_wifiex/wlan_src/mapp/mlanutl/mlanwls.c
Normal file
File diff suppressed because it is too large
Load diff
380
mxm_wifiex/wlan_src/mapp/mlanutl/mlanwls.h
Normal file
380
mxm_wifiex/wlan_src/mapp/mlanutl/mlanwls.h
Normal file
|
@ -0,0 +1,380 @@
|
|||
/** @file mlanwls.h
|
||||
*
|
||||
* @brief 11mc/11az Wifi location services application
|
||||
*
|
||||
*
|
||||
* Copyright 2022 NXP
|
||||
*
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
*/
|
||||
/************************************************************************
|
||||
Change log:
|
||||
01/24/2022: initial version
|
||||
************************************************************************/
|
||||
#ifndef _WLS_H_
|
||||
#define _WLS_H_
|
||||
|
||||
/** Size of command buffer */
|
||||
#define MRVDRV_SIZE_OF_CMD_BUFFER (3 * 1024)
|
||||
|
||||
/** MAC BROADCAST */
|
||||
#define MAC_BROADCAST 0x1FF
|
||||
/** MAC MULTICAST */
|
||||
#define MAC_MULTICAST 0x1FE
|
||||
/** Default scan interval in second*/
|
||||
#define DEFAULT_SCAN_INTERVAL 300
|
||||
|
||||
/** Netlink protocol number */
|
||||
#define NETLINK_NXP (MAX_LINKS - 1)
|
||||
/** Netlink maximum payload size */
|
||||
#define NL_MAX_PAYLOAD 1024
|
||||
/** Default wait time in seconds for events */
|
||||
#define UAP_RECV_WAIT_DEFAULT 10
|
||||
#ifndef NLMSG_HDRLEN
|
||||
/** NL message header length */
|
||||
#define NLMSG_HDRLEN ((int)NLMSG_ALIGN(sizeof(struct nlmsghdr)))
|
||||
#endif
|
||||
|
||||
/** Host Command ID : FTM session config and control */
|
||||
#define HostCmd_CMD_FTM_SESSION_CFG 0x024d
|
||||
#define HostCmd_CMD_FTM_SESSION_CTRL 0x024E
|
||||
#define HostCmd_CMD_FTM_FEATURE_CTRL 0x024f
|
||||
#define HostCmd_CMD_WLS_REQ_FTM_RANGE 0x0250
|
||||
|
||||
/** Events*/
|
||||
#define EVENT_WLS_FTM_COMPLETE 0x00000086
|
||||
#define WLS_SUB_EVENT_FTM_COMPLETE 0
|
||||
#define WLS_SUB_EVENT_RADIO_RECEIVED 1
|
||||
#define WLS_SUB_EVENT_RADIO_RPT_RECEIVED 2
|
||||
#define WLS_SUB_EVENT_ANQP_RESP_RECEIVED 3
|
||||
#define WLS_SUB_EVENT_RTT_RESULTS 4
|
||||
|
||||
/** Custom events definitions */
|
||||
/** AP connected event */
|
||||
#define CUS_EVT_AP_CONNECTED "EVENT=AP_CONNECTED"
|
||||
/** Custom events definitions end */
|
||||
|
||||
/*TLVs*/
|
||||
/** TLV type ID definition */
|
||||
#define PROPRIETARY_TLV_BASE_ID 0x0100
|
||||
#define FTM_SESSION_CFG_INITATOR_TLV_ID (PROPRIETARY_TLV_BASE_ID + 273)
|
||||
#define FTM_NTB_RANGING_CFG_TLV_ID (PROPRIETARY_TLV_BASE_ID + 343)
|
||||
#define FTM_RANGE_REPORT_TLV_ID \
|
||||
(PROPRIETARY_TLV_BASE_ID + 0x10C) /* 0x0100 + 0x10C = 0x20C */
|
||||
#define FTM_SESSION_CFG_LCI_TLV_ID (PROPRIETARY_TLV_BASE_ID + 270)
|
||||
#define FTM_SESSION_CFG_LOCATION_CIVIC_TLV_ID (PROPRIETARY_TLV_BASE_ID + 271)
|
||||
|
||||
/** Structure of command table*/
|
||||
typedef struct {
|
||||
/** User Command ID*/
|
||||
int cmd_id;
|
||||
/** Command name */
|
||||
char *cmd;
|
||||
/** Command function pointer */
|
||||
int (*func)(int argc, char *argv[], void *param);
|
||||
/** Command usuage */
|
||||
char **help;
|
||||
} wls_app_command_table;
|
||||
|
||||
/** Structure of FTM_SESSION_CFG_NTB_RANGING TLV data*/
|
||||
typedef struct _ntb_ranging_cfg {
|
||||
/** Indicates the channel BW for session*/
|
||||
/*0: HE20, 1: HE40, 2: HE80, 3: HE80+80, 4: HE160, 5:HE160_SRF*/
|
||||
t_u8 format_bw;
|
||||
/** indicates for bandwidths less than or equal to 80 MHz the maximum
|
||||
* number of space-time streams to be used in DL/UL NDP frames in the
|
||||
* session*/
|
||||
t_u8 max_i2r_sts_upto80;
|
||||
/**indicates for bandwidths less than or equal to 80 MHz the maximum
|
||||
* number of space-time streams to be used in DL/UL NDP frames in the
|
||||
* session*/
|
||||
t_u8 max_r2i_sts_upto80;
|
||||
/**Specify measurement freq in Hz to calculate measurement interval*/
|
||||
t_u8 az_measurement_freq;
|
||||
/**Indicates the number of measurements to be done for session*/
|
||||
t_u8 az_number_of_measurements;
|
||||
/**Include location civic request (Expect location civic from
|
||||
* responder)*/
|
||||
t_u8 civic_req;
|
||||
/**Include LCI request (Expect LCI info from responder)*/
|
||||
t_u8 lci_req;
|
||||
} __ATTRIB_PACK__ ntb_ranging_cfg_t;
|
||||
|
||||
/** Structure of FTM_SESSION_CFG TLV data*/
|
||||
typedef struct _ftm_session_cfg {
|
||||
/** Indicates how many burst instances are requested for the FTM
|
||||
* session*/
|
||||
t_u8 burst_exponent;
|
||||
/** Indicates the duration of a burst instance*/
|
||||
t_u8 burst_duration;
|
||||
/**Minimum time between consecutive FTM frames*/
|
||||
t_u8 min_delta_FTM;
|
||||
/**ASAP/non-ASAP casel*/
|
||||
t_u8 is_ASAP;
|
||||
/**Number of FTMs per burst*/
|
||||
t_u8 per_burst_FTM;
|
||||
/**FTM channel spacing: HT20/HT40/VHT80/…*/
|
||||
t_u8 channel_spacing;
|
||||
/**Indicates the interval between two consecutive burst instances*/
|
||||
t_u16 burst_period;
|
||||
} __ATTRIB_PACK__ ftm_session_cfg_t;
|
||||
|
||||
/** Structure for FTM_SESSION_CFG_LOCATION_CIVIC TLV data*/
|
||||
typedef struct _civic_loc_cfg {
|
||||
/**Civic location type*/
|
||||
t_u8 civic_location_type;
|
||||
/**Country code*/
|
||||
t_u16 country_code;
|
||||
/**Civic address type*/
|
||||
t_u8 civic_address_type;
|
||||
/**Civic address length*/
|
||||
t_u8 civic_address_length;
|
||||
/**Civic Address*/
|
||||
t_u8 civic_address[];
|
||||
} __ATTRIB_PACK__ civic_loc_cfg_t;
|
||||
|
||||
/** Structure for FTM_SESSION_CFG_LCI TLV data*/
|
||||
typedef struct _lci_cfg {
|
||||
/** known longitude*/
|
||||
double longitude;
|
||||
/** known Latitude*/
|
||||
double latitude;
|
||||
/** known altitude*/
|
||||
double altitude;
|
||||
/** known Latitude uncertainty*/
|
||||
t_u8 lat_unc;
|
||||
/** known Longitude uncertainty*/
|
||||
t_u8 long_unc;
|
||||
/** Known Altitude uncertainty*/
|
||||
t_u8 alt_unc;
|
||||
/** 1 word for additional Z information */
|
||||
t_u32 z_info;
|
||||
} __ATTRIB_PACK__ lci_cfg_t;
|
||||
|
||||
/** Structure for FTM_SESSION_CFG_NTB_RANGING TLV*/
|
||||
typedef struct _ntb_ranging_cfg_tlv {
|
||||
/** Type*/
|
||||
t_u16 type;
|
||||
/** Length*/
|
||||
t_u16 len;
|
||||
/** Value*/
|
||||
ntb_ranging_cfg_t val;
|
||||
} __ATTRIB_PACK__ ntb_ranging_cfg_tlv_t;
|
||||
|
||||
/** Structure for FTM_SESSION_CFG TLV*/
|
||||
typedef struct _ftm_session_cfg_tlv {
|
||||
/** Type*/
|
||||
t_u16 type;
|
||||
/** Length*/
|
||||
t_u16 len;
|
||||
/** Value*/
|
||||
ftm_session_cfg_t val;
|
||||
t_u8 civic_req;
|
||||
t_u8 lci_req;
|
||||
} __ATTRIB_PACK__ ftm_session_cfg_tlv_t;
|
||||
|
||||
/** Structure for FTM_SESSION_CFG_LOCATION_CIVIC TLV*/
|
||||
typedef struct _civic_loc_tlv {
|
||||
/** Type*/
|
||||
t_u16 type;
|
||||
/** Length*/
|
||||
t_u16 len;
|
||||
/** Value*/
|
||||
civic_loc_cfg_t val;
|
||||
} __ATTRIB_PACK__ civic_loc_tlv_t;
|
||||
|
||||
/** Structure for FTM_SESSION_CFG_LCI TLV*/
|
||||
typedef struct _lci_tlv {
|
||||
/** Type*/
|
||||
t_u16 type;
|
||||
/** Length*/
|
||||
t_u16 len;
|
||||
/** Value*/
|
||||
lci_cfg_t val;
|
||||
} __ATTRIB_PACK__ lci_tlv_t;
|
||||
|
||||
/** Structure for DOT11MC FTM_SESSION_CFG */
|
||||
typedef struct _dot11mc_ftm_cfg {
|
||||
/** FTM session cfg*/
|
||||
ftm_session_cfg_tlv_t sess_tlv;
|
||||
/** Location Request cfg*/
|
||||
lci_tlv_t lci_tlv;
|
||||
/** Civic location cfg*/
|
||||
civic_loc_tlv_t civic_tlv;
|
||||
|
||||
} __ATTRIB_PACK__ dot11mc_ftm_cfg_t;
|
||||
|
||||
/** Structure for DOT11AZ FTM_SESSION_CFG */
|
||||
typedef struct _dot11az_ftmcfg_ntb_t {
|
||||
/** NTB session cfg */
|
||||
ntb_ranging_cfg_tlv_t ntb_tlv;
|
||||
} __ATTRIB_PACK__ dot11az_ftm_cfg_t;
|
||||
|
||||
/** Type definition for hostcmd_ftm_session_cfg */
|
||||
typedef struct _hostcmd_ftm_session_cfg {
|
||||
/** 0:Get, 1:Set */
|
||||
t_u16 action;
|
||||
/** FTM_SESSION_CFG_TLVs*/
|
||||
union {
|
||||
/**11az cfg*/
|
||||
dot11az_ftm_cfg_t cfg_11az;
|
||||
/** 11mc cfg*/
|
||||
dot11mc_ftm_cfg_t cfg_11mc;
|
||||
} tlv;
|
||||
} __ATTRIB_PACK__ hostcmd_ftm_session_cfg;
|
||||
|
||||
/** Type definition for hostcmd_ftm_session_ctrl */
|
||||
typedef struct _hostcmd_ftm_session_ctrl {
|
||||
/** 0: Not used, 1: Start, 2: Stop*/
|
||||
t_u16 action;
|
||||
/*FTM for ranging*/
|
||||
t_u8 for_ranging;
|
||||
/** Mac address of the peer with whom FTM session is required*/
|
||||
t_u8 peer_mac[ETH_ALEN];
|
||||
/** Channel on which FTM must be started */
|
||||
t_u8 chan;
|
||||
} __ATTRIB_PACK__ hostcmd_ftm_session_ctrl;
|
||||
|
||||
/** Type definition for generic Hostcmd for 11AZ FTM Session */
|
||||
typedef struct _hostcmd_ds_ftm_session_cmd {
|
||||
/** HostCmd_DS_GEN */
|
||||
HostCmd_DS_GEN cmd_hdr;
|
||||
/** Command Body */
|
||||
union {
|
||||
/** hostcmd for session_ctrl user command */
|
||||
hostcmd_ftm_session_ctrl ftm_session_ctrl;
|
||||
/** hostcmd for session_cfg user command */
|
||||
hostcmd_ftm_session_cfg ftm_session_cfg;
|
||||
} cmd;
|
||||
} __ATTRIB_PACK__ hostcmd_ds_ftm_session_cmd;
|
||||
|
||||
/** Type definition for FTM Session Events */
|
||||
|
||||
/** Event ID length */
|
||||
#define EVENT_ID_LEN 4
|
||||
|
||||
/**Structure for RTT results subevent*/
|
||||
typedef struct _wls_subevent_rtt_results_t {
|
||||
/** complete */
|
||||
t_u8 complete;
|
||||
/** tlv buffer */
|
||||
/** MrvlIEtypes_RTTResult_t */
|
||||
t_u8 tlv_buffer[];
|
||||
} __ATTRIB_PACK__ wls_subevent_rtt_results_t;
|
||||
|
||||
/**Structure for FTM complete subevent*/
|
||||
typedef struct _wls_subevent_ftm_complete {
|
||||
/** BSS Number */
|
||||
t_u8 bssNum;
|
||||
/** BSS Type */
|
||||
t_u8 bssType;
|
||||
/** MAC address of the responder */
|
||||
t_u8 mac[ETH_ALEN];
|
||||
/** Average RTT */
|
||||
t_u32 avg_rtt;
|
||||
/** Average Clock offset */
|
||||
t_u32 avg_clk_offset;
|
||||
/** Measure start timestamp */
|
||||
t_u32 meas_start_tsf;
|
||||
} __ATTRIB_PACK__ wls_subevent_ftm_complete_t;
|
||||
|
||||
/** TLV for FTM Range Report */
|
||||
typedef struct _range_report_tlv_t {
|
||||
/**Type*/
|
||||
t_u16 type;
|
||||
/**Length*/
|
||||
t_u16 len;
|
||||
/** MAC address of the responder */
|
||||
t_u8 mac[ETH_ALEN];
|
||||
/** Average RTT */
|
||||
t_u32 avg_rtt;
|
||||
/** Average Clock offset */
|
||||
t_u32 avg_clk_offset;
|
||||
/** LCI and Location Civic TLV */
|
||||
} __ATTRIB_PACK__ range_report_tlv_t;
|
||||
|
||||
/** Structure for FTM events*/
|
||||
typedef struct _wls_event_t {
|
||||
/** Event ID */
|
||||
t_u16 event_id;
|
||||
/** BSS index number for multiple BSS support */
|
||||
t_u8 bss_index;
|
||||
/** BSS type */
|
||||
t_u8 bss_type;
|
||||
/** sub event id */
|
||||
t_u8 sub_event_id;
|
||||
union {
|
||||
/** FTM Complete Sub event*/
|
||||
wls_subevent_ftm_complete_t ftm_complete;
|
||||
} e;
|
||||
} __ATTRIB_PACK__ wls_event_t;
|
||||
|
||||
/*Application Global Data*/
|
||||
typedef struct {
|
||||
/** Average RTT */
|
||||
t_u32 avg_rtt;
|
||||
/** Average Clock offset */
|
||||
t_u32 avg_clk_offset;
|
||||
/*Range*/
|
||||
t_s64 range;
|
||||
} range_results_t;
|
||||
|
||||
/** Structure for ftm command private data*/
|
||||
typedef struct _wls_app_data {
|
||||
/** 0 : 80211mc, 1:80211az*/
|
||||
t_u8 protocol_type;
|
||||
/** num of times to run FTM*/
|
||||
t_u8 loop_cnt;
|
||||
/** flag to run nonstop*/
|
||||
t_u8 run_nonstop;
|
||||
/** flag is associated */
|
||||
t_u8 associated;
|
||||
/** 0 - STA, 1- AP*/
|
||||
t_u8 bss_type;
|
||||
/**flag for ftm started */
|
||||
t_u8 ftm_started;
|
||||
/** flag for app to terminate ftm session*/
|
||||
t_u8 terminate_app;
|
||||
/**flag for debug print level */
|
||||
t_u8 debug_level;
|
||||
/**peer mac address */
|
||||
t_u8 peer_mac[ETH_ALEN];
|
||||
/**AP mac address */
|
||||
t_u8 ap_mac[ETH_ALEN];
|
||||
/** Channel number for FTM session*/
|
||||
t_u8 channel;
|
||||
/**SET/GET action */
|
||||
t_u8 hostcmd_action;
|
||||
/**Is LCI data available in cfg*/
|
||||
t_u8 lci_request;
|
||||
/** Is civic data available in cfg*/
|
||||
t_u8 civic_request;
|
||||
/**ntb cfg param*/
|
||||
ntb_ranging_cfg_t ntb_cfg;
|
||||
/** 11mc session cfg param*/
|
||||
ftm_session_cfg_t session_cfg;
|
||||
/** lci cfg data*/
|
||||
lci_cfg_t lci_cfg;
|
||||
/** civic cfg data - this should be last field*/
|
||||
civic_loc_cfg_t civic_cfg;
|
||||
} __ATTRIB_PACK__ wls_app_data_t;
|
||||
|
||||
int mlanwls_main(int argc, char *argv[]);
|
||||
#endif /* _WLS_H_ */
|
|
@ -4,20 +4,29 @@
|
|||
* It also defines the data structures used for APIs between MLAN and MOAL.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,22 +1,33 @@
|
|||
/** @file mlan_11ac.c
|
||||
*
|
||||
* @brief This file contains the functions for station ioctl.
|
||||
* @brief This file defines the private and adapter data
|
||||
* structures and declares global function prototypes used
|
||||
* in MLAN module.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -29,8 +40,6 @@
|
|||
#include "mlan_11n.h"
|
||||
#include "mlan_11ac.h"
|
||||
|
||||
#define NO_NSS_SUPPORT 0x3
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
********************************************************/
|
||||
|
@ -194,10 +203,9 @@ static t_u8 wlan_get_nss_num_vht_mcs(t_u16 mcs_map_set)
|
|||
* @return N/A
|
||||
*/
|
||||
static void wlan_fill_cap_info(mlan_private *priv, VHT_capa_t *vht_cap,
|
||||
t_u8 bands)
|
||||
t_u16 bands)
|
||||
{
|
||||
t_u32 usr_dot_11ac_dev_cap;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (bands & BAND_A)
|
||||
|
@ -207,6 +215,7 @@ static void wlan_fill_cap_info(mlan_private *priv, VHT_capa_t *vht_cap,
|
|||
|
||||
vht_cap->vht_cap_info = usr_dot_11ac_dev_cap;
|
||||
|
||||
RESET_VHTCAP_MAXMPDULEN(vht_cap->vht_cap_info);
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
|
@ -230,7 +239,8 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
t_u32 hw_value = 0;
|
||||
t_u8 nss = 0;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDNW62X) || \
|
||||
defined(PCIENW62X) || defined(USBNW62X) || defined(SD9097)
|
||||
t_u16 rx_nss = 0;
|
||||
t_u16 tx_nss = 0;
|
||||
#endif
|
||||
|
@ -313,8 +323,10 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
/** update the RX MCS map */
|
||||
if (cfg->param.vht_cfg.txrx & MLAN_RADIO_RX) {
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDNW62X(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (cfg->param.vht_cfg.band == BAND_SELECT_A) {
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
|
@ -345,7 +357,8 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
pmadapter->hw_dot_11ac_mcs_support,
|
||||
nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
|
@ -372,7 +385,8 @@ static mlan_status wlan_11ac_ioctl_vhtcfg(pmlan_adapter pmadapter,
|
|||
pmadapter->hw_dot_11ac_mcs_support,
|
||||
nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if ((tx_nss != 0) && (nss > tx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
|
@ -797,7 +811,8 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
|||
t_u16 mcs_resp = 0;
|
||||
t_u16 nss;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) | defined(USBNW62X)
|
||||
t_u16 rx_nss = 0, tx_nss = 0;
|
||||
#endif
|
||||
ENTER();
|
||||
|
@ -818,8 +833,10 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
|||
mcs_map_resp =
|
||||
wlan_le16_to_cpu(pvht_cap->vht_cap.mcs_sets.rx_mcs_map);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(priv->adapter->card_type) ||
|
||||
IS_CARDNW62X(priv->adapter->card_type) ||
|
||||
IS_CARD9097(priv->adapter->card_type)) {
|
||||
if (bands & BAND_A) {
|
||||
rx_nss = GET_RXMCSSUPP(priv->adapter->user_htstream >>
|
||||
|
@ -842,7 +859,8 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
|||
mcs_user = GET_VHTNSSMCS(mcs_map_user, nss);
|
||||
mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
mcs_user = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
|
@ -874,7 +892,8 @@ void wlan_fill_vht_cap_tlv(mlan_private *priv, MrvlIETypes_VHTCap_t *pvht_cap,
|
|||
mcs_user = GET_VHTNSSMCS(mcs_map_user, nss);
|
||||
mcs_resp = GET_VHTNSSMCS(mcs_map_resp, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if ((tx_nss != 0) && (nss > tx_nss))
|
||||
mcs_user = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
|
@ -1090,7 +1109,8 @@ t_u8 wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
{
|
||||
t_u8 ret = MFALSE;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
t_u16 rx_nss = 0, tx_nss = 0;
|
||||
IEEEtypes_VHTCap_t *pvht_cap = pbss_desc->pvht_cap;
|
||||
MrvlIEtypes_He_cap_t *phecap = MNULL;
|
||||
|
@ -1100,8 +1120,10 @@ t_u8 wlan_is_80_80_support(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc)
|
|||
ENTER();
|
||||
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (!IS_CARD9098(pmpriv->adapter->card_type) &&
|
||||
!IS_CARDNW62X(pmpriv->adapter->card_type) &&
|
||||
!IS_CARD9097(pmpriv->adapter->card_type))
|
||||
return ret;
|
||||
/** check band A */
|
||||
|
@ -1153,7 +1175,8 @@ int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
int ret_len = 0;
|
||||
t_u8 bw_80p80 = MFALSE;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDNW62X) || \
|
||||
defined(PCIENW62X) || defined(USBNW62X) || defined(SD9097)
|
||||
t_u16 rx_nss = 0;
|
||||
#endif
|
||||
|
||||
|
@ -1184,7 +1207,7 @@ int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
pvht_cap->header.len, sizeof(VHT_capa_t));
|
||||
bw_80p80 = wlan_is_80_80_support(pmpriv, pbss_desc);
|
||||
wlan_fill_vht_cap_tlv(pmpriv, pvht_cap, pbss_desc->bss_band,
|
||||
MTRUE, bw_80p80);
|
||||
MFALSE, bw_80p80);
|
||||
|
||||
HEXDUMP("VHT_CAPABILITIES IE", (t_u8 *)pvht_cap,
|
||||
sizeof(MrvlIETypes_VHTCap_t));
|
||||
|
@ -1224,8 +1247,10 @@ int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
/** set default bandwidth:80M*/
|
||||
SET_OPER_MODE_80M(pmrvl_oper_mode->oper_mode);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDNW62X(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (pbss_desc->bss_band & BAND_A)
|
||||
rx_nss = GET_RXMCSSUPP(
|
||||
|
@ -1240,8 +1265,10 @@ int wlan_cmd_append_11ac_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
nss = wlan_get_nss_num_vht_mcs(mcs_map_user);
|
||||
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDNW62X(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
PRINTM(MCMND, "rx_nss=%d nss=%d\n", rx_nss, nss);
|
||||
nss = MIN(rx_nss, nss);
|
||||
|
|
|
@ -1,22 +1,33 @@
|
|||
/** @file mlan_11ac.h
|
||||
*
|
||||
* @brief This file contains the functions for station ioctl.
|
||||
* @brief This file defines the private and adapter data
|
||||
* structures and declares global function prototypes used
|
||||
* in MLAN module.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,22 +1,33 @@
|
|||
/** @file mlan_11ax.c
|
||||
*
|
||||
* @brief This file contains the functions for 11ax related features.
|
||||
* @brief This file defines the private and adapter data
|
||||
* structures and declares global function prototypes used
|
||||
* in MLAN module.
|
||||
*
|
||||
*
|
||||
* Copyright 2018-2021 NXP
|
||||
* Copyright 2018-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -142,6 +153,140 @@ static void wlan_show_dot11axphycap(pmlan_adapter pmadapter, t_u32 support)
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function fills the HE CAP IE w/ output format LE, not CPU
|
||||
*
|
||||
* @param priv A pointer to mlan_private structure
|
||||
* @param hecap_ie A pointer to IEEEtypes_HECap_t structure
|
||||
* @param band BAND_A (5G), otherwise, 2.4G
|
||||
*
|
||||
* @return bytes added to the phe_cap
|
||||
*/
|
||||
t_u8 wlan_fill_he_cap_ie(mlan_private *pmpriv, IEEEtypes_HECap_t *hecap_ie,
|
||||
t_u16 band)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
MrvlIEtypes_He_cap_t *user_hecap_tlv = MNULL;
|
||||
MrvlIEtypes_He_cap_t *hw_hecap_tlv = MNULL;
|
||||
IEEEtypes_HeMcsNss_t *he_mcsnss = MNULL;
|
||||
t_u8 nss = 0;
|
||||
t_u16 cfg_value = 0;
|
||||
t_u16 hw_value = 0;
|
||||
|
||||
if (band & BAND_A) {
|
||||
user_hecap_tlv = (MrvlIEtypes_He_cap_t *)(pmpriv->user_he_cap);
|
||||
hw_hecap_tlv = (MrvlIEtypes_He_cap_t *)pmadapter->hw_he_cap;
|
||||
} else {
|
||||
user_hecap_tlv =
|
||||
(MrvlIEtypes_He_cap_t *)(pmpriv->user_2g_he_cap);
|
||||
hw_hecap_tlv = (MrvlIEtypes_He_cap_t *)pmadapter->hw_2g_he_cap;
|
||||
}
|
||||
|
||||
// include PPE threshold
|
||||
memcpy_ext(pmadapter, (t_u8 *)hecap_ie + sizeof(IEEEtypes_Header_t),
|
||||
(t_u8 *)user_hecap_tlv + sizeof(MrvlIEtypesHeader_t),
|
||||
user_hecap_tlv->len,
|
||||
sizeof(IEEEtypes_HECap_t) - sizeof(IEEEtypes_Header_t));
|
||||
|
||||
hecap_ie->ieee_hdr.element_id = EXTENSION;
|
||||
hecap_ie->ieee_hdr.len =
|
||||
MIN(user_hecap_tlv->len,
|
||||
sizeof(IEEEtypes_HECap_t) - sizeof(IEEEtypes_Header_t));
|
||||
hecap_ie->ext_id = HE_CAPABILITY;
|
||||
|
||||
he_mcsnss = (IEEEtypes_HeMcsNss_t *)hecap_ie->he_txrx_mcs_support;
|
||||
|
||||
cfg_value = GET_HE_NSSMCS(user_hecap_tlv->rx_mcs_80, nss);
|
||||
hw_value = GET_HE_NSSMCS(hw_hecap_tlv->rx_mcs_80, nss);
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT)) {
|
||||
SET_HE_NSSMCS(he_mcsnss->rx_mcs, nss, NO_NSS_SUPPORT);
|
||||
} else {
|
||||
SET_HE_NSSMCS(he_mcsnss->rx_mcs, nss,
|
||||
MIN(cfg_value, hw_value));
|
||||
}
|
||||
}
|
||||
|
||||
cfg_value = GET_HE_NSSMCS(user_hecap_tlv->tx_mcs_80, nss);
|
||||
hw_value = GET_HE_NSSMCS(hw_hecap_tlv->tx_mcs_80, nss);
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT)) {
|
||||
SET_HE_NSSMCS(he_mcsnss->tx_mcs, nss, NO_NSS_SUPPORT);
|
||||
} else {
|
||||
SET_HE_NSSMCS(he_mcsnss->tx_mcs, nss,
|
||||
MIN(cfg_value, hw_value));
|
||||
}
|
||||
}
|
||||
PRINTM(MCMND,
|
||||
"fill_11ax_ie: HE rx mcs_80 = 0x%08x tx mcs 80 = 0x%08x\n",
|
||||
he_mcsnss->rx_mcs, he_mcsnss->tx_mcs);
|
||||
|
||||
DBG_HEXDUMP(MCMD_D, "fill_11ax_ie", (t_u8 *)hecap_ie,
|
||||
hecap_ie->ieee_hdr.len + sizeof(IEEEtypes_Header_t));
|
||||
return hecap_ie->ieee_hdr.len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function fills the HE cap tlv out put format is LE, not CPU
|
||||
*
|
||||
* @param priv A pointer to mlan_private structure
|
||||
* @param phe_cap A pointer to IEEEtypes_HECap_t structure
|
||||
* @param band BAND_A (5G), otherwise, 2.4G
|
||||
*
|
||||
* @return bytes added to the phe_cap
|
||||
*/
|
||||
t_u8 wlan_fill_he_op_ie(mlan_private *pmpriv, IEEEtypes_HeOp_t *heop_ie)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
BSSDescriptor_t *pbss_desc = &pmpriv->curr_bss_params.bss_descriptor;
|
||||
IEEEtypes_HeOp_t *bss_heop_ie = MNULL;
|
||||
|
||||
memset(pmadapter, (void *)heop_ie, 0, sizeof(IEEEtypes_HeOp_t));
|
||||
|
||||
heop_ie->ieee_hdr.element_id = EXTENSION;
|
||||
heop_ie->ieee_hdr.len = sizeof(IEEEtypes_HeOp_t) -
|
||||
sizeof(IEEEtypes_Header_t) -
|
||||
sizeof(heop_ie->option);
|
||||
heop_ie->ext_id = HE_OPERATION;
|
||||
|
||||
// HE Operation Parameters
|
||||
heop_ie->he_op_param.default_pe_dur = 7;
|
||||
heop_ie->he_op_param.twt_req = 0;
|
||||
heop_ie->he_op_param.txop_dur_rts_threshold = 12;
|
||||
heop_ie->he_op_param.vht_op_info_present = 0;
|
||||
heop_ie->he_op_param.co_located_bss = 0;
|
||||
heop_ie->he_op_param.er_su_disable = 0;
|
||||
// HE BSS Color Information (following the AP)
|
||||
if (pbss_desc->phe_oprat) {
|
||||
bss_heop_ie = (IEEEtypes_HeOp_t *)(pbss_desc->phe_oprat);
|
||||
heop_ie->bss_color_info.bss_color =
|
||||
bss_heop_ie->bss_color_info.bss_color;
|
||||
} else {
|
||||
// default color
|
||||
heop_ie->bss_color_info.bss_color = 1;
|
||||
}
|
||||
heop_ie->bss_color_info.partial_bss_color = 0;
|
||||
heop_ie->bss_color_info.bss_color_disabled = 0;
|
||||
// Rx HE MCS MAP
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_1ss = 0;
|
||||
#if defined(SD9177)
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_2ss = 3;
|
||||
#else
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_2ss = 0;
|
||||
#endif
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_3ss = 3;
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_4ss = 3;
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_5ss = 3;
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_6ss = 3;
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_7ss = 3;
|
||||
heop_ie->basic_he_mcs_nss.max_mcs_8ss = 3;
|
||||
|
||||
return heop_ie->ieee_hdr.len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function fills the HE cap tlv out put format is LE, not CPU
|
||||
*
|
||||
|
@ -153,39 +298,47 @@ static void wlan_show_dot11axphycap(pmlan_adapter pmadapter, t_u32 support)
|
|||
*
|
||||
* @return bytes added to the phe_cap
|
||||
*/
|
||||
t_u16 wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u8 band,
|
||||
t_u16 wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u16 band,
|
||||
MrvlIEtypes_Extension_t *phe_cap, t_u8 flag)
|
||||
{
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
t_u16 len = 0;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
t_u16 rx_nss = 0, tx_nss = 0;
|
||||
#endif
|
||||
MrvlIEtypes_He_cap_t *phecap = MNULL;
|
||||
t_u8 nss = 0;
|
||||
t_u16 cfg_value = 0;
|
||||
t_u16 hw_value = 0;
|
||||
MrvlIEtypes_He_cap_t *phw_hecap = MNULL;
|
||||
|
||||
if (!phe_cap) {
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
if (band & BAND_A) {
|
||||
if (band & BAND_AAX) {
|
||||
memcpy_ext(pmadapter, (t_u8 *)phe_cap, pmpriv->user_he_cap,
|
||||
pmpriv->user_hecap_len,
|
||||
sizeof(MrvlIEtypes_He_cap_t));
|
||||
len = pmpriv->user_hecap_len;
|
||||
phw_hecap = (MrvlIEtypes_He_cap_t *)pmadapter->hw_he_cap;
|
||||
} else {
|
||||
memcpy_ext(pmadapter, (t_u8 *)phe_cap, pmpriv->user_2g_he_cap,
|
||||
pmpriv->user_2g_hecap_len,
|
||||
sizeof(MrvlIEtypes_He_cap_t));
|
||||
len = pmpriv->user_2g_hecap_len;
|
||||
phw_hecap = (MrvlIEtypes_He_cap_t *)pmadapter->hw_2g_he_cap;
|
||||
}
|
||||
phe_cap->type = wlan_cpu_to_le16(phe_cap->type);
|
||||
phe_cap->len = wlan_cpu_to_le16(phe_cap->len);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(pmpriv->adapter->card_type) ||
|
||||
IS_CARD9097(pmpriv->adapter->card_type)) {
|
||||
if (band & BAND_A) {
|
||||
if (band & BAND_AAX) {
|
||||
rx_nss = GET_RXMCSSUPP(pmpriv->adapter->user_htstream >>
|
||||
8);
|
||||
tx_nss = GET_TXMCSSUPP(pmpriv->adapter->user_htstream >>
|
||||
|
@ -199,18 +352,41 @@ t_u16 wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u8 band,
|
|||
}
|
||||
#endif
|
||||
phecap = (MrvlIEtypes_He_cap_t *)phe_cap;
|
||||
phecap->rx_mcs_80 = wlan_cpu_to_le16(0xfffe);
|
||||
phecap->tx_mcs_80 = wlan_cpu_to_le16(0xfffe);
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
cfg_value = GET_HE_NSSMCS(phecap->rx_mcs_80, nss);
|
||||
hw_value = GET_HE_NSSMCS(phw_hecap->rx_mcs_80, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if (IS_CARD9098(pmpriv->adapter->card_type) ||
|
||||
IS_CARD9097(pmpriv->adapter->card_type)) {
|
||||
if (rx_nss == 2)
|
||||
phecap->rx_mcs_80 = wlan_cpu_to_le16(0xfffa);
|
||||
if (tx_nss == 2)
|
||||
phecap->tx_mcs_80 = wlan_cpu_to_le16(0xfffa);
|
||||
}
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT))
|
||||
SET_HE_NSSMCS(phecap->rx_mcs_80, nss, NO_NSS_SUPPORT);
|
||||
else
|
||||
SET_HE_NSSMCS(phecap->rx_mcs_80, nss,
|
||||
MIN(cfg_value, hw_value));
|
||||
}
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
cfg_value = GET_HE_NSSMCS(phecap->tx_mcs_80, nss);
|
||||
hw_value = GET_HE_NSSMCS(phw_hecap->tx_mcs_80, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if ((tx_nss != 0) && (nss > tx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT))
|
||||
SET_HE_NSSMCS(phecap->tx_mcs_80, nss, NO_NSS_SUPPORT);
|
||||
else
|
||||
SET_HE_NSSMCS(phecap->tx_mcs_80, nss,
|
||||
MIN(cfg_value, hw_value));
|
||||
}
|
||||
PRINTM(MCMND, "Set: HE rx mcs set 0x%08x tx mcs set 0x%08x\n",
|
||||
phecap->rx_mcs_80, phecap->tx_mcs_80);
|
||||
|
||||
DBG_HEXDUMP(MCMD_D, "fill_11ax_tlv", (t_u8 *)phecap, len);
|
||||
LEAVE();
|
||||
return len;
|
||||
|
@ -233,9 +409,14 @@ int wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
int len = 0;
|
||||
t_u8 bw_80p80 = MFALSE;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
t_u16 rx_nss = 0, tx_nss = 0;
|
||||
#endif
|
||||
t_u8 nss = 0;
|
||||
t_u16 cfg_value = 0;
|
||||
t_u16 hw_value = 0;
|
||||
MrvlIEtypes_He_cap_t *phw_hecap = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -260,18 +441,22 @@ int wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
pmpriv->user_hecap_len, pmpriv->user_hecap_len);
|
||||
*ppbuffer += pmpriv->user_hecap_len;
|
||||
len = pmpriv->user_hecap_len;
|
||||
phw_hecap = (MrvlIEtypes_He_cap_t *)pmadapter->hw_he_cap;
|
||||
} else {
|
||||
memcpy_ext(pmadapter, *ppbuffer, pmpriv->user_2g_he_cap,
|
||||
pmpriv->user_2g_hecap_len,
|
||||
pmpriv->user_2g_hecap_len);
|
||||
*ppbuffer += pmpriv->user_2g_hecap_len;
|
||||
len = pmpriv->user_2g_hecap_len;
|
||||
phw_hecap = (MrvlIEtypes_He_cap_t *)pmadapter->hw_2g_he_cap;
|
||||
}
|
||||
phecap->type = wlan_cpu_to_le16(phecap->type);
|
||||
phecap->len = wlan_cpu_to_le16(phecap->len);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(pmpriv->adapter->card_type) ||
|
||||
IS_CARDNW62X(pmpriv->adapter->card_type) ||
|
||||
IS_CARD9097(pmpriv->adapter->card_type)) {
|
||||
if (pbss_desc->bss_band & BAND_A) {
|
||||
rx_nss = GET_RXMCSSUPP(pmpriv->adapter->user_htstream >>
|
||||
|
@ -289,18 +474,40 @@ int wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
rx_nss = tx_nss = 1;
|
||||
}
|
||||
#endif
|
||||
phecap->rx_mcs_80 = wlan_cpu_to_le16(0xfffe);
|
||||
phecap->tx_mcs_80 = wlan_cpu_to_le16(0xfffe);
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
cfg_value = GET_HE_NSSMCS(phecap->rx_mcs_80, nss);
|
||||
hw_value = GET_HE_NSSMCS(phw_hecap->rx_mcs_80, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
if (IS_CARD9098(pmpriv->adapter->card_type) ||
|
||||
IS_CARD9097(pmpriv->adapter->card_type)) {
|
||||
if (rx_nss == 2)
|
||||
phecap->rx_mcs_80 = wlan_cpu_to_le16(0xfffa);
|
||||
if (tx_nss == 2)
|
||||
phecap->tx_mcs_80 = wlan_cpu_to_le16(0xfffa);
|
||||
}
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if ((rx_nss != 0) && (nss > rx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT))
|
||||
SET_HE_NSSMCS(phecap->rx_mcs_80, nss, NO_NSS_SUPPORT);
|
||||
else
|
||||
SET_HE_NSSMCS(phecap->rx_mcs_80, nss,
|
||||
MIN(cfg_value, hw_value));
|
||||
}
|
||||
for (nss = 1; nss <= 8; nss++) {
|
||||
cfg_value = GET_HE_NSSMCS(phecap->tx_mcs_80, nss);
|
||||
hw_value = GET_HE_NSSMCS(phw_hecap->tx_mcs_80, nss);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if ((tx_nss != 0) && (nss > tx_nss))
|
||||
cfg_value = NO_NSS_SUPPORT;
|
||||
#endif
|
||||
if ((hw_value == NO_NSS_SUPPORT) ||
|
||||
(cfg_value == NO_NSS_SUPPORT))
|
||||
SET_HE_NSSMCS(phecap->tx_mcs_80, nss, NO_NSS_SUPPORT);
|
||||
else
|
||||
SET_HE_NSSMCS(phecap->tx_mcs_80, nss,
|
||||
MIN(cfg_value, hw_value));
|
||||
}
|
||||
PRINTM(MCMND, "Set: HE rx mcs set 0x%08x tx mcs set 0x%08x\n",
|
||||
phecap->rx_mcs_80, phecap->tx_mcs_80);
|
||||
if (!bw_80p80) {
|
||||
/** reset BIT3 and BIT4 channel width ,not support 80 + 80*/
|
||||
/** not support 160Mhz now, if support,not reset bit3 */
|
||||
|
@ -394,13 +601,15 @@ void wlan_update_11ax_cap(mlan_adapter *pmadapter,
|
|||
* @brief This function check if 11AX is allowed in bandcfg
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param bss_band bss band
|
||||
* @param pbss_desc A pointer to BSSDescriptor_t
|
||||
*
|
||||
* @return 0--not allowed, other value allowed
|
||||
*/
|
||||
t_u16 wlan_11ax_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
||||
t_u16 wlan_11ax_bandconfig_allowed(mlan_private *pmpriv,
|
||||
BSSDescriptor_t *pbss_desc)
|
||||
{
|
||||
if (!IS_FW_SUPPORT_11AX(pmpriv->adapter))
|
||||
t_u16 bss_band = pbss_desc->bss_band;
|
||||
if (pbss_desc->disable_11n)
|
||||
return MFALSE;
|
||||
if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) {
|
||||
if (bss_band & BAND_G)
|
||||
|
@ -544,7 +753,6 @@ mlan_status wlan_cmd_11ax_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
cmd->size += hecfg->he_cap.len + sizeof(MrvlIEtypesHeader_t);
|
||||
pos += hecfg->he_cap.len + sizeof(MrvlIEtypesHeader_t);
|
||||
}
|
||||
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
|
||||
LEAVE();
|
||||
|
|
|
@ -1,22 +1,33 @@
|
|||
/** @file mlan_11ax.h
|
||||
*
|
||||
* @brief This file contains the functions for station ioctl.
|
||||
* @brief This file defines the private and adapter data
|
||||
* structures and declares global function prototypes used
|
||||
* in MLAN module.
|
||||
*
|
||||
*
|
||||
* Copyright 2018-2020 NXP
|
||||
* Copyright 2018-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -28,19 +39,34 @@
|
|||
/** device support 2.4G 242 tone RUs */
|
||||
#define AX_2G_20MHZ_SUPPORT MBIT(5)
|
||||
|
||||
/*
|
||||
* 0 indicates support for HE-MCS 0-7 for n spatial streams
|
||||
* 1 indicates support for HE-MCS 0-9 for n spatial streams
|
||||
* 2 indicates support for HE-MCS 0-11 for n spatial streams
|
||||
* 3 indicates that n spatial streams is not supported for HE PPDUs
|
||||
*/
|
||||
#define GET_HE_NSSMCS(MCSMapSet, nss) ((MCSMapSet >> (2 * (nss - 1))) & 0x3)
|
||||
#define SET_HE_NSSMCS(MCSMapSet, nss, value) \
|
||||
(MCSMapSet |= (value & 0x3) << (2 * (nss - 1)))
|
||||
|
||||
t_u8 wlan_check_11ax_twt_supported(mlan_private *pmpriv,
|
||||
BSSDescriptor_t *pbss_desc);
|
||||
mlan_status wlan_11ax_ioctl_twtcfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_cmd_twt_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
t_u16 wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u8 band,
|
||||
t_u8 wlan_fill_he_cap_ie(mlan_private *pmpriv, IEEEtypes_HECap_t *hecap_ie,
|
||||
t_u16 band);
|
||||
t_u8 wlan_fill_he_op_ie(mlan_private *pmpriv, IEEEtypes_HeOp_t *heop_ie);
|
||||
t_u16 wlan_fill_he_cap_tlv(mlan_private *pmpriv, t_u16 band,
|
||||
MrvlIEtypes_Extension_t *phe_cap, t_u8 flag);
|
||||
void wlan_update_11ax_cap(mlan_adapter *pmadapter,
|
||||
MrvlIEtypes_Extension_t *hw_he_cap);
|
||||
|
||||
int wlan_cmd_append_11ax_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||
t_u8 **ppbuffer);
|
||||
t_u16 wlan_11ax_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band);
|
||||
t_u16 wlan_11ax_bandconfig_allowed(mlan_private *pmpriv,
|
||||
BSSDescriptor_t *pbss_desc);
|
||||
mlan_status wlan_11ax_cfg_ioctl(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_11ax_ioctl_cmd(pmlan_adapter pmadapter,
|
||||
|
|
|
@ -3,20 +3,29 @@
|
|||
* @brief This file contains functions for 802.11D.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
/********************************************************
|
||||
|
@ -119,14 +128,16 @@ static chan_freq_power_t channel_freq_power_UN_AJ[] = {
|
|||
{153, 5765, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{157, 5785, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{161, 5805, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{165, 5825, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}
|
||||
{165, 5825, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{169, 5845, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{173, 5865, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{177, 5885, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}
|
||||
/* {240, 4920, TX_PWR_DEFAULT},
|
||||
{244, 4940, TX_PWR_DEFAULT},
|
||||
{248, 4960, TX_PWR_DEFAULT},
|
||||
{252, 4980, TX_PWR_DEFAULT},
|
||||
channels for 11J JP 10M channel gap */
|
||||
};
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
|
@ -172,7 +183,7 @@ static t_u8 *wlan_11d_code_2_region(pmlan_adapter pmadapter, t_u8 code)
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static t_u8 wlan_11d_channel_known(pmlan_adapter pmadapter, t_u8 band,
|
||||
static t_u8 wlan_11d_channel_known(pmlan_adapter pmadapter, t_u16 band,
|
||||
t_u8 chan,
|
||||
parsed_region_chan_11d_t *parsed_region_chan)
|
||||
{
|
||||
|
@ -294,6 +305,8 @@ wlan_11d_generate_domain_info(pmlan_adapter pmadapter,
|
|||
/* Should be only place that clear domain_reg (besides init) */
|
||||
memset(pmadapter, domain_info, 0, sizeof(wlan_802_11d_domain_reg_t));
|
||||
|
||||
domain_info->dfs_region = NXP_DFS_UNKNOWN;
|
||||
|
||||
/* Set country code */
|
||||
memcpy_ext(pmadapter, domain_info->country_code,
|
||||
wlan_11d_code_2_region(pmadapter,
|
||||
|
@ -375,7 +388,8 @@ static mlan_status wlan_11d_update_chan_pwr_table(mlan_private *pmpriv,
|
|||
|
||||
chan = pbss_desc->phy_param_set.ds_param_set.current_chan;
|
||||
|
||||
tx_power = wlan_get_txpwr_of_chan_from_cfp(pmpriv, chan);
|
||||
tx_power = wlan_get_txpwr_of_chan_from_cfp(pmpriv, pbss_desc->bss_band,
|
||||
chan);
|
||||
|
||||
if (!tx_power) {
|
||||
PRINTM(MMSG, "11D: Invalid channel\n");
|
||||
|
@ -426,7 +440,7 @@ static mlan_status wlan_11d_update_chan_pwr_table(mlan_private *pmpriv,
|
|||
*
|
||||
* @return MTRUE or MFALSE
|
||||
*/
|
||||
static t_u8 wlan_11d_get_chan(pmlan_adapter pmadapter, t_u8 band,
|
||||
static t_u8 wlan_11d_get_chan(pmlan_adapter pmadapter, t_u16 band,
|
||||
t_u8 first_chan, t_u8 no_of_chan, t_u8 *chan)
|
||||
{
|
||||
chan_freq_power_t *cfp = MNULL;
|
||||
|
@ -490,7 +504,7 @@ static mlan_status wlan_11d_process_country_info(mlan_private *pmpriv,
|
|||
|
||||
/* Parse 11D country info */
|
||||
if (wlan_11d_parse_domain_info(pmadapter, &pbss_desc->country_info,
|
||||
(t_u8)pbss_desc->bss_band,
|
||||
pbss_desc->bss_band,
|
||||
®ion_chan) != MLAN_STATUS_SUCCESS) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
|
@ -659,13 +673,14 @@ static mlan_status wlan_11d_send_domain_info(mlan_private *pmpriv,
|
|||
* @param country_code Intended country code
|
||||
* @param num_sub_band Count of tuples in list below
|
||||
* @param sub_band_list List of sub_band tuples
|
||||
* @param dfs_region 0-unset,1-fcc,2-etsi,3-JP, 0xff-unknown
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_11d_set_domain_info(mlan_private *pmpriv, t_u8 band,
|
||||
wlan_11d_set_domain_info(mlan_private *pmpriv, t_u16 band,
|
||||
t_u8 country_code[COUNTRY_CODE_LEN], t_u8 num_sub_band,
|
||||
IEEEtypes_SubbandSet_t *sub_band_list)
|
||||
IEEEtypes_SubbandSet_t *sub_band_list, t_u8 dfs_region)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
wlan_802_11d_domain_reg_t *pdomain = &pmadapter->domain_reg;
|
||||
|
@ -674,6 +689,7 @@ wlan_11d_set_domain_info(mlan_private *pmpriv, t_u8 band,
|
|||
ENTER();
|
||||
|
||||
memset(pmadapter, pdomain, 0, sizeof(wlan_802_11d_domain_reg_t));
|
||||
pdomain->dfs_region = dfs_region;
|
||||
memcpy_ext(pmadapter, pdomain->country_code, country_code,
|
||||
COUNTRY_CODE_LEN, COUNTRY_CODE_LEN);
|
||||
pdomain->band = band;
|
||||
|
@ -846,13 +862,15 @@ mlan_status wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
|||
&pcmd->params.domain_info;
|
||||
MrvlIEtypes_DomainParamSet_t *domain = &pdomain_info->domain;
|
||||
t_u8 no_of_sub_band = pmadapter->domain_reg.no_of_sub_band;
|
||||
MrvlIEtypes_Rgn_dom_code_t *rgn = MNULL;
|
||||
t_u8 i;
|
||||
|
||||
ENTER();
|
||||
PRINTM(MCMND, "11D:Country=%c%c band=%d sub-band=5d\n",
|
||||
PRINTM(MCMND, "11D:Country=%c%c band=%d sub-band=%d dfs_region=%d\n",
|
||||
pmadapter->domain_reg.country_code[0],
|
||||
pmadapter->domain_reg.country_code[1],
|
||||
pmadapter->domain_reg.band, no_of_sub_band);
|
||||
pmadapter->domain_reg.band, no_of_sub_band,
|
||||
pmadapter->domain_reg.dfs_region);
|
||||
for (i = 0; i < no_of_sub_band; i++) {
|
||||
PRINTM(MCMND,
|
||||
"11D: first chan=%d no_of_chan=%d, max_tx_pwr=%d\n",
|
||||
|
@ -890,15 +908,25 @@ mlan_status wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
|||
MRVDRV_MAX_SUBBAND_802_11D *
|
||||
sizeof(IEEEtypes_SubbandSet_t));
|
||||
|
||||
pcmd->size = wlan_cpu_to_le16(
|
||||
sizeof(pdomain_info->action) + domain->header.len +
|
||||
sizeof(MrvlIEtypesHeader_t) + S_DS_GEN);
|
||||
pcmd->size = sizeof(pdomain_info->action) + domain->header.len +
|
||||
sizeof(MrvlIEtypesHeader_t) + S_DS_GEN;
|
||||
|
||||
if (pmadapter->domain_reg.dfs_region != NXP_DFS_UNKNOWN) {
|
||||
rgn = (MrvlIEtypes_Rgn_dom_code_t
|
||||
*)((t_u8 *)&pdomain_info->domain +
|
||||
domain->header.len +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
rgn->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_REGION_DOMAIN_CODE);
|
||||
rgn->header.len = 2;
|
||||
rgn->domain_code = pmadapter->domain_reg.dfs_region;
|
||||
pcmd->size += sizeof(MrvlIEtypes_Rgn_dom_code_t);
|
||||
}
|
||||
} else {
|
||||
pcmd->size = wlan_cpu_to_le16(sizeof(pdomain_info->action) +
|
||||
S_DS_GEN);
|
||||
pcmd->size = sizeof(pdomain_info->action) + S_DS_GEN;
|
||||
}
|
||||
domain->header.len = wlan_cpu_to_le16(domain->header.len);
|
||||
|
||||
pcmd->size = wlan_cpu_to_le16(pcmd->size);
|
||||
HEXDUMP("11D: 802_11D_DOMAIN_INFO", (t_u8 *)pcmd,
|
||||
wlan_le16_to_cpu(pcmd->size));
|
||||
|
||||
|
@ -967,7 +995,7 @@ mlan_status wlan_ret_802_11d_domain_info(mlan_private *pmpriv,
|
|||
*
|
||||
* @return Channel frequency
|
||||
*/
|
||||
t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band)
|
||||
t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u16 band)
|
||||
{
|
||||
chan_freq_power_t *cf;
|
||||
t_u16 cnt;
|
||||
|
@ -976,15 +1004,19 @@ t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band)
|
|||
|
||||
ENTER();
|
||||
|
||||
/* Get channel-frequency-power trios */
|
||||
if (band & (BAND_A | BAND_AN | BAND_AAC)) {
|
||||
cf = channel_freq_power_UN_AJ;
|
||||
cnt = NELEMENTS(channel_freq_power_UN_AJ);
|
||||
} else {
|
||||
if (band & (BAND_B | BAND_G | BAND_GN | BAND_GAC)) {
|
||||
cf = channel_freq_power_UN_BG;
|
||||
cnt = NELEMENTS(channel_freq_power_UN_BG);
|
||||
}
|
||||
|
||||
/* Get channel-frequency-power trios */
|
||||
else if (band & (BAND_A | BAND_AN | BAND_AAC)) {
|
||||
cf = channel_freq_power_UN_AJ;
|
||||
cnt = NELEMENTS(channel_freq_power_UN_AJ);
|
||||
} else {
|
||||
PRINTM(MERROR, "11D: Wrong Band [%d]\n", band);
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
/* Locate channel and return corresponding frequency */
|
||||
for (i = 0; i < cnt; i++) {
|
||||
if (chan == cf[i].channel)
|
||||
|
@ -1008,7 +1040,7 @@ t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band)
|
|||
*/
|
||||
mlan_status wlan_11d_parse_domain_info(
|
||||
pmlan_adapter pmadapter, IEEEtypes_CountryInfoFullSet_t *country_info,
|
||||
t_u8 band, parsed_region_chan_11d_t *parsed_region_chan)
|
||||
t_u16 band, parsed_region_chan_11d_t *parsed_region_chan)
|
||||
{
|
||||
t_u8 no_of_sub_band, no_of_chan;
|
||||
t_u8 last_chan, first_chan, cur_chan = 0;
|
||||
|
@ -1096,7 +1128,7 @@ mlan_status wlan_11d_parse_domain_info(
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band)
|
||||
mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u16 band)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
t_u16 i = 0;
|
||||
|
@ -1166,7 +1198,7 @@ mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band)
|
|||
* @return PASSIVE if chan is unknown; ACTIVE
|
||||
* if chan is known
|
||||
*/
|
||||
t_u8 wlan_11d_get_scan_type(pmlan_adapter pmadapter, t_u8 band, t_u8 chan,
|
||||
t_u8 wlan_11d_get_scan_type(pmlan_adapter pmadapter, t_u16 band, t_u8 chan,
|
||||
parsed_region_chan_11d_t *parsed_region_chan)
|
||||
{
|
||||
t_u8 scan_type = MLAN_SCAN_TYPE_PASSIVE;
|
||||
|
@ -1218,7 +1250,7 @@ mlan_status wlan_11d_clear_parsedtable(mlan_private *pmpriv)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band)
|
||||
mlan_status wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u16 band)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
@ -1342,8 +1374,7 @@ mlan_status wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv,
|
|||
/* Parse domain info if available */
|
||||
ret = wlan_11d_parse_domain_info(
|
||||
pmadapter, &pbss_desc->country_info,
|
||||
(t_u8)pbss_desc->bss_band,
|
||||
&bssdesc_region_chan);
|
||||
pbss_desc->bss_band, &bssdesc_region_chan);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
/* Update the channel-power table */
|
||||
|
@ -1514,7 +1545,8 @@ mlan_status wlan_11d_cfg_domain_info(pmlan_adapter pmadapter,
|
|||
pmpriv, domain_info->band,
|
||||
wlan_11d_map_country_code(pmadapter, domain_info->country_code),
|
||||
domain_info->no_of_sub_band,
|
||||
(IEEEtypes_SubbandSet_t *)domain_info->sub_band);
|
||||
(IEEEtypes_SubbandSet_t *)domain_info->sub_band,
|
||||
domain_info->dfs_region);
|
||||
ret = wlan_11d_send_domain_info(pmpriv, pioctl_req);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
|
@ -1559,7 +1591,7 @@ done:
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u8 band,
|
||||
mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u16 band,
|
||||
t_u8 *domain_tlv,
|
||||
t_void *pioctl_buf)
|
||||
{
|
||||
|
@ -1603,7 +1635,8 @@ mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u8 band,
|
|||
* Add some checking or merging between STA & UAP domain_info
|
||||
*/
|
||||
wlan_11d_set_domain_info(pmpriv, band, pdomain_tlv->country_code,
|
||||
num_sub_band, pdomain_tlv->sub_band);
|
||||
num_sub_band, pdomain_tlv->sub_band,
|
||||
NXP_DFS_UNKNOWN);
|
||||
ret = wlan_11d_send_domain_info(pmpriv, pioctl_buf);
|
||||
|
||||
done:
|
||||
|
|
|
@ -5,18 +5,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -118,6 +127,8 @@ static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_mid_upper_band_1 = {
|
|||
/** U-NII sub-band config : Start Channel = 149, NumChans = 5 */
|
||||
static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_upper_band = {149,
|
||||
5};
|
||||
/** U-NII sub-band config : Start Channel = 169, NumChans = 3 */
|
||||
static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_4_band = {169, 3};
|
||||
|
||||
/** Internally passed structure used to send a CMD_802_11_TPC_INFO command */
|
||||
typedef struct {
|
||||
|
@ -298,7 +309,7 @@ static t_u32 wlan_11h_set_ibss_dfs_ie(mlan_private *priv,
|
|||
* - 0 if returned element is not setup
|
||||
*/
|
||||
static t_u16
|
||||
wlan_11h_set_supp_channels_ie(mlan_private *priv, t_u8 band,
|
||||
wlan_11h_set_supp_channels_ie(mlan_private *priv, t_u16 band,
|
||||
IEEEtypes_SupportedChannels_t *psup_chan)
|
||||
{
|
||||
t_u16 num_subbands = 0;
|
||||
|
@ -352,6 +363,17 @@ wlan_11h_set_supp_channels_ie(mlan_private *priv, t_u8 band,
|
|||
*/
|
||||
switch (cfp_a) {
|
||||
case 0x10: /* USA FCC */
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_lower_band;
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_middle_band;
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_mid_upper_band;
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_upper_band;
|
||||
psup_chan->subband[num_subbands++] =
|
||||
wlan_11h_unii_4_band;
|
||||
break;
|
||||
case 0x20: /* Canada IC */
|
||||
case 0x30: /* Europe ETSI */
|
||||
default:
|
||||
|
@ -589,6 +611,7 @@ static mlan_status wlan_11h_cmd_chan_rpt_req(mlan_private *priv,
|
|||
wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs;
|
||||
MrvlIEtypes_ChanRpt11hBasic_t *ptlv_basic;
|
||||
t_bool is_cancel_req = MFALSE;
|
||||
MrvlIEtypes_ZeroDfsOperation_t *ptlv_zero_dfs;
|
||||
t_u8 dfs53cfg = priv->adapter->dfs53cfg;
|
||||
MrvlIEtypes_DfsW53Cfg_t *ptlv_dfs53cfg;
|
||||
|
||||
|
@ -601,7 +624,8 @@ static mlan_status wlan_11h_cmd_chan_rpt_req(mlan_private *priv,
|
|||
if (pchan_rpt_req->millisec_dwell_time == 0)
|
||||
is_cancel_req = MTRUE;
|
||||
|
||||
if (pstate_dfs->dfs_check_pending && !is_cancel_req) {
|
||||
if (pstate_dfs->dfs_check_pending && !is_cancel_req &&
|
||||
priv->bss_type != MLAN_BSS_TYPE_DFS) {
|
||||
PRINTM(MERROR,
|
||||
"11h: ChanRptReq - previous CMD_CHAN_REPORT_REQUEST has"
|
||||
" not returned its result yet (as EVENT_CHANNEL_READY)."
|
||||
|
@ -650,6 +674,29 @@ static mlan_status wlan_11h_cmd_chan_rpt_req(mlan_private *priv,
|
|||
pcmd_ptr->size += sizeof(MrvlIEtypes_DfsW53Cfg_t);
|
||||
}
|
||||
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_DFS) {
|
||||
memcpy_ext(priv->adapter, &priv->chan_rep_req, pchan_rpt_req,
|
||||
sizeof(mlan_ds_11h_chan_rep_req),
|
||||
sizeof(priv->chan_rep_req));
|
||||
ptlv_zero_dfs =
|
||||
(MrvlIEtypes_ZeroDfsOperation_t *)(((t_u8 *)(pcmd_ptr)) +
|
||||
pcmd_ptr->size);
|
||||
ptlv_zero_dfs->Header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_ZERO_DFS_OPERATION);
|
||||
ptlv_zero_dfs->Header.len = wlan_cpu_to_le16(sizeof(t_u8));
|
||||
if (!is_cancel_req) {
|
||||
ptlv_zero_dfs->zero_dfs_enbl = MTRUE;
|
||||
PRINTM(MCMND, "ZeroDFS: START: chan=%d\n",
|
||||
pchan_rpt_req->chan_desc.chanNum);
|
||||
} else {
|
||||
ptlv_zero_dfs->zero_dfs_enbl = MFALSE;
|
||||
PRINTM(MCMND, "ZeroDFS: STOP\n");
|
||||
}
|
||||
pcmd_ptr->size += sizeof(MrvlIEtypes_ZeroDfsOperation_t);
|
||||
pcmd_ptr->size = wlan_cpu_to_le16(pcmd_ptr->size);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
pcmd_ptr->size = wlan_cpu_to_le16(pcmd_ptr->size);
|
||||
|
||||
/* update dfs sturcture.
|
||||
|
@ -733,7 +780,7 @@ static t_u32 wlan_11h_set_local_power_constraint_tlv(
|
|||
* buffer (ppbuffer)
|
||||
*/
|
||||
static t_u32 wlan_11h_process_infra_join(mlan_private *priv, t_u8 **ppbuffer,
|
||||
t_u8 band, t_u32 channel,
|
||||
t_u16 band, t_u32 channel,
|
||||
wlan_11h_bss_info_t *p11h_bss_info)
|
||||
{
|
||||
MrvlIEtypesHeader_t ie_header;
|
||||
|
@ -1306,6 +1353,8 @@ wlan_11h_prepare_custom_ie_chansw(mlan_adapter *pmadapter,
|
|||
pvhttpcEnv_ie->local_max_tp_20mhz = 0xff;
|
||||
pvhttpcEnv_ie->local_max_tp_40mhz = 0xff;
|
||||
pvhttpcEnv_ie->local_max_tp_80mhz = 0xff;
|
||||
pvhttpcEnv_ie->local_max_tp_160mhz_80_80mhz =
|
||||
0xff;
|
||||
pChanSwWrap_ie->len +=
|
||||
sizeof(IEEEtypes_VhtTpcEnvelope_t);
|
||||
|
||||
|
@ -1336,19 +1385,24 @@ wlan_11h_prepare_custom_ie_chansw(mlan_adapter *pmadapter,
|
|||
* @brief Check if start channel 165 is allowed to operate in
|
||||
* previous uAP channel's band config
|
||||
*
|
||||
* @param priv a pointer to mlan_private structure
|
||||
* @param start_chn Random Start channel choosen after radar detection
|
||||
* @param uap_band_cfg Private driver uAP band configuration information
|
||||
* structure
|
||||
*
|
||||
* @return MFALSE if the channel is not allowed in given band
|
||||
*/
|
||||
static t_bool wlan_11h_is_band_valid(t_u8 start_chn, Band_Config_t uap_band_cfg)
|
||||
static t_bool wlan_11h_is_band_valid(mlan_private *priv, t_u8 start_chn,
|
||||
Band_Config_t uap_band_cfg)
|
||||
{
|
||||
/* if band width is not 20MHZ (either 40 or 80MHz)
|
||||
* return MFALSE, 165 is not allowed in bands other than 20MHZ
|
||||
*/
|
||||
if (start_chn == 165 && (uap_band_cfg.chanWidth != CHAN_BW_20MHZ)) {
|
||||
return MFALSE;
|
||||
if (start_chn == 165) {
|
||||
if (priv->adapter->region_code == COUNTRY_CODE_US)
|
||||
return MTRUE;
|
||||
if (uap_band_cfg.chanWidth != CHAN_BW_20MHZ)
|
||||
return MFALSE;
|
||||
}
|
||||
return MTRUE;
|
||||
}
|
||||
|
@ -1443,7 +1497,7 @@ static t_u8 wlan_11h_get_uap_start_channel(mlan_private *priv,
|
|||
wlan_11h_radar_detect_required(
|
||||
priv, start_chn)) ||
|
||||
!(wlan_11h_is_band_valid(
|
||||
start_chn,
|
||||
priv, start_chn,
|
||||
uap_band_cfg)))) &&
|
||||
(++rand_tries <
|
||||
chn_tbl->num_cfp)) {
|
||||
|
@ -1911,6 +1965,7 @@ t_void wlan_11h_cleanup(mlan_adapter *adapter)
|
|||
{
|
||||
wlan_dfs_device_state_t *pstate_dfs = &adapter->state_dfs;
|
||||
wlan_dfs_timestamp_t *pdfs_ts;
|
||||
mlan_private *priv = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1921,6 +1976,10 @@ t_void wlan_11h_cleanup(mlan_adapter *adapter)
|
|||
util_unlink_list(adapter->pmoal_handle,
|
||||
&pstate_dfs->dfs_ts_head,
|
||||
(pmlan_linked_list)pdfs_ts, MNULL, MNULL);
|
||||
priv = wlan_get_priv(adapter, MLAN_BSS_ROLE_ANY);
|
||||
if (priv)
|
||||
wlan_set_chan_dfs_state(priv, BAND_A, pdfs_ts->channel,
|
||||
DFS_USABLE);
|
||||
adapter->callbacks.moal_mfree(adapter->pmoal_handle,
|
||||
(t_u8 *)pdfs_ts);
|
||||
|
||||
|
@ -2443,7 +2502,7 @@ t_s32 wlan_11h_process_start(mlan_private *priv, t_u8 **ppbuffer,
|
|||
* or MLAN_STATUS_SUCCESS (0)
|
||||
*/
|
||||
t_s32 wlan_11h_process_join(mlan_private *priv, t_u8 **ppbuffer,
|
||||
IEEEtypes_CapInfo_t *pcap_info, t_u8 band,
|
||||
IEEEtypes_CapInfo_t *pcap_info, t_u16 band,
|
||||
t_u32 channel, wlan_11h_bss_info_t *p11h_bss_info)
|
||||
{
|
||||
t_s32 ret = 0;
|
||||
|
@ -2618,6 +2677,8 @@ mlan_status wlan_11h_cmdresp_process(mlan_private *priv,
|
|||
break;
|
||||
|
||||
case HostCmd_CMD_CHAN_REPORT_REQUEST:
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_DFS)
|
||||
break;
|
||||
priv->adapter->state_dfs.dfs_check_priv = priv;
|
||||
priv->adapter->state_dfs.dfs_check_pending = MTRUE;
|
||||
|
||||
|
@ -2927,7 +2988,7 @@ mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter,
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 802.11h IOCTL to handle channel NOP status check
|
||||
* @brief 802.11h IOCTL to handle channel NOP status check/clear
|
||||
* @brief If given channel is under NOP, return a new non-dfs
|
||||
* @brief channel
|
||||
*
|
||||
|
@ -2936,8 +2997,8 @@ mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status wlan_11h_ioctl_get_channel_nop_info(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
mlan_status wlan_11h_ioctl_channel_nop_info(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = MNULL;
|
||||
mlan_ds_11h_cfg *ds_11hcfg = MNULL;
|
||||
|
@ -2961,6 +3022,7 @@ mlan_status wlan_11h_ioctl_get_channel_nop_info(pmlan_adapter pmadapter,
|
|||
if (ch_nop_info->chan_width == CHAN_BW_80MHZ ||
|
||||
ch_nop_info->chan_width == CHAN_BW_40MHZ)
|
||||
wlan_11h_update_bandcfg(
|
||||
pmpriv,
|
||||
&ch_nop_info->new_chan.bandcfg,
|
||||
ch_nop_info->new_chan.channel);
|
||||
if (ch_nop_info->chan_width == CHAN_BW_80MHZ)
|
||||
|
@ -2971,6 +3033,8 @@ mlan_status wlan_11h_ioctl_get_channel_nop_info(pmlan_adapter pmadapter,
|
|||
.channel,
|
||||
ch_nop_info->chan_width);
|
||||
}
|
||||
} else if (pioctl_req->action == MLAN_ACT_CLEAR) {
|
||||
wlan_11h_cleanup(pmadapter);
|
||||
}
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -3010,6 +3074,52 @@ mlan_status wlan_11h_ioctl_chan_switch_count(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get/Set 802.11h channel dfs state
|
||||
*
|
||||
* @param pmadapter Pointer to mlan_adapter
|
||||
* @param pioctl_req Pointer to mlan_ioctl_req
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status wlan_11h_ioctl_chan_dfs_state(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_ds_11h_cfg *ds_11hcfg = MNULL;
|
||||
t_s32 ret = MLAN_STATUS_FAILURE;
|
||||
pmlan_private priv = pmadapter->priv[pioctl_req->bss_index];
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_req) {
|
||||
ds_11hcfg = (mlan_ds_11h_cfg *)pioctl_req->pbuf;
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_GET) {
|
||||
wlan_11h_is_channel_under_nop(
|
||||
pmadapter,
|
||||
ds_11hcfg->param.ch_dfs_state.channel);
|
||||
ds_11hcfg->param.ch_dfs_state.dfs_required =
|
||||
wlan_11h_radar_detect_required(
|
||||
priv,
|
||||
ds_11hcfg->param.ch_dfs_state.channel);
|
||||
if (ds_11hcfg->param.ch_dfs_state.dfs_required)
|
||||
ds_11hcfg->param.ch_dfs_state
|
||||
.dfs_state = wlan_get_chan_dfs_state(
|
||||
priv, BAND_A,
|
||||
ds_11hcfg->param.ch_dfs_state.channel);
|
||||
} else {
|
||||
wlan_set_chan_dfs_state(
|
||||
priv, BAND_A,
|
||||
ds_11hcfg->param.ch_dfs_state.channel,
|
||||
ds_11hcfg->param.ch_dfs_state.dfs_state);
|
||||
}
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 802.11h DFS chan report
|
||||
*
|
||||
|
@ -3056,6 +3166,7 @@ t_bool wlan_11h_is_channel_under_nop(mlan_adapter *pmadapter, t_u8 channel)
|
|||
wlan_dfs_timestamp_t *pdfs_ts = MNULL;
|
||||
t_u32 now_sec, now_usec;
|
||||
t_bool ret = MFALSE;
|
||||
mlan_private *priv;
|
||||
ENTER();
|
||||
pdfs_ts = wlan_11h_find_dfs_timestamp(pmadapter, channel);
|
||||
|
||||
|
@ -3081,6 +3192,10 @@ t_bool wlan_11h_is_channel_under_nop(mlan_adapter *pmadapter, t_u8 channel)
|
|||
/* if entry is expired, remove it */
|
||||
if (!ret) {
|
||||
wlan_11h_remove_dfs_timestamp(pmadapter, pdfs_ts);
|
||||
priv = wlan_get_priv(pmadapter, MLAN_BSS_ROLE_ANY);
|
||||
if (priv)
|
||||
wlan_set_chan_dfs_state(priv, BAND_A, channel,
|
||||
DFS_USABLE);
|
||||
} else
|
||||
PRINTM(MMSG,
|
||||
"11h: channel %d is under NOP - can't use.\n",
|
||||
|
@ -3115,12 +3230,16 @@ mlan_status wlan_11h_handle_event_chanrpt_ready(mlan_private *priv,
|
|||
wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs;
|
||||
t_u8 dfs_radar_found = MFALSE;
|
||||
t_u8 dfs_check_channel = pstate_dfs->dfs_check_channel;
|
||||
MrvlIEtypes_channel_band_t *tlv;
|
||||
|
||||
ENTER();
|
||||
pchan_rpt_rsp = (HostCmd_DS_CHAN_RPT_RSP *)&pevent->event_buf;
|
||||
DBG_HEXDUMP(MCMD_D, "11h: Event ChanRptReady (HostCmd_DS_CHAN_RPT_RSP)",
|
||||
(t_u8 *)pchan_rpt_rsp, pevent->event_len);
|
||||
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_DFS)
|
||||
dfs_check_channel = priv->chan_rep_req.chanNum;
|
||||
|
||||
if (wlan_le32_to_cpu(pchan_rpt_rsp->cmd_result) ==
|
||||
MLAN_CMD_RESULT_SUCCESS) {
|
||||
pbuffer = (t_u8 *)&pchan_rpt_rsp->tlv_buffer;
|
||||
|
@ -3139,6 +3258,10 @@ mlan_status wlan_11h_handle_event_chanrpt_ready(mlan_private *priv,
|
|||
if (pmeas_rpt_basic->radar)
|
||||
dfs_radar_found = MTRUE;
|
||||
break;
|
||||
case TLV_TYPE_CHANNELBANDLIST:
|
||||
tlv = (MrvlIEtypes_channel_band_t *)ptlv;
|
||||
dfs_check_channel = tlv->channel;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3158,13 +3281,18 @@ mlan_status wlan_11h_handle_event_chanrpt_ready(mlan_private *priv,
|
|||
dfs_check_channel);
|
||||
}
|
||||
*radar_chan = dfs_check_channel;
|
||||
if (dfs_radar_found)
|
||||
wlan_set_chan_dfs_state(priv, BAND_A, dfs_check_channel,
|
||||
DFS_UNAVAILABLE);
|
||||
else
|
||||
wlan_set_chan_dfs_state(priv, BAND_A, dfs_check_channel,
|
||||
DFS_AVAILABLE);
|
||||
pstate_dfs->dfs_radar_found = dfs_radar_found;
|
||||
/* Update DFS structure. */
|
||||
priv->adapter->callbacks.moal_get_system_time(
|
||||
priv->adapter->pmoal_handle, &sec, &usec);
|
||||
pstate_dfs->dfs_report_time_sec = sec;
|
||||
pstate_dfs->dfs_check_pending = MFALSE;
|
||||
pstate_dfs->dfs_check_priv = MNULL;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -3185,8 +3313,20 @@ mlan_status wlan_11h_print_event_radar_detected(mlan_private *priv,
|
|||
t_u8 *radar_chan)
|
||||
{
|
||||
wlan_dfs_device_state_t *pstate_dfs = &priv->adapter->state_dfs;
|
||||
MrvlIEtypes_channel_band_t *tlv;
|
||||
ENTER();
|
||||
*radar_chan = pstate_dfs->dfs_check_channel;
|
||||
if (pevent->event_len >= sizeof(MrvlIEtypes_channel_band_t)) {
|
||||
tlv = (MrvlIEtypes_channel_band_t *)&pevent->event_buf;
|
||||
*radar_chan = tlv->channel;
|
||||
} else {
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_DFS)
|
||||
*radar_chan = priv->chan_rep_req.chanNum;
|
||||
}
|
||||
wlan_11h_add_dfs_timestamp(priv->adapter, DFS_TS_REPR_NOP_START,
|
||||
*radar_chan);
|
||||
wlan_set_chan_dfs_state(priv, BAND_A, *radar_chan, DFS_UNAVAILABLE);
|
||||
PRINTM(MEVENT, "ZeroDFS: Radar detected on %d\n", *radar_chan);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -3324,7 +3464,8 @@ void wlan_dfs_rep_bw_change(mlan_adapter *pmadapter)
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE or MLAN_STATUS_PENDING
|
||||
*/
|
||||
void wlan_11h_update_bandcfg(Band_Config_t *uap_band_cfg, t_u8 new_channel)
|
||||
void wlan_11h_update_bandcfg(mlan_private *pmpriv, Band_Config_t *uap_band_cfg,
|
||||
t_u8 new_channel)
|
||||
{
|
||||
t_u8 chan_offset;
|
||||
ENTER();
|
||||
|
@ -3333,7 +3474,7 @@ void wlan_11h_update_bandcfg(Band_Config_t *uap_band_cfg, t_u8 new_channel)
|
|||
* Clear the channel bandwidth for 20MHz
|
||||
* since channel switch could be happening from 40/80MHz to 20MHz
|
||||
*/
|
||||
chan_offset = wlan_get_second_channel_offset(new_channel);
|
||||
chan_offset = wlan_get_second_channel_offset(pmpriv, new_channel);
|
||||
uap_band_cfg->chan2Offset = chan_offset;
|
||||
|
||||
if (!chan_offset) { /* 40MHz/80MHz */
|
||||
|
@ -3895,7 +4036,7 @@ mlan_status wlan_11h_radar_detected_handling(mlan_adapter *pmadapter,
|
|||
|
||||
/* DFS only in 5GHz */
|
||||
wlan_11h_update_bandcfg(
|
||||
&pstate_rdh->uap_band_cfg,
|
||||
pmpriv, &pstate_rdh->uap_band_cfg,
|
||||
pstate_rdh->new_channel);
|
||||
PRINTM(MCMD_D,
|
||||
"RDH_SET_NEW_CHANNEL: uAP band config = 0x%x channel=%d\n",
|
||||
|
@ -4113,7 +4254,8 @@ mlan_status wlan_11h_dfs_event_preprocessing(mlan_adapter *pmadapter)
|
|||
pmpriv = priv_list[0];
|
||||
PRINTM(MINFO, "%s: found dfs_slave priv=%p\n", __func__,
|
||||
pmpriv);
|
||||
} else if (pmadapter->state_dfs.dfs_check_pending) {
|
||||
} else if (pmadapter->state_dfs.dfs_check_pending ||
|
||||
pmadapter->state_dfs.dfs_check_channel) {
|
||||
pmpriv = (mlan_private *)(pmadapter->state_dfs
|
||||
.dfs_check_priv);
|
||||
PRINTM(MINFO, "%s: found dfs priv=%p\n", __func__,
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* function declarations of 802.11h
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -111,7 +120,7 @@ extern t_s32 wlan_11h_process_start(mlan_private *priv, t_u8 **ppbuffer,
|
|||
|
||||
/** Add any 11h TLVs necessary to complete a join command (adhoc or infra) */
|
||||
extern t_s32 wlan_11h_process_join(mlan_private *priv, t_u8 **ppbuffer,
|
||||
IEEEtypes_CapInfo_t *pcap_info, t_u8 band,
|
||||
IEEEtypes_CapInfo_t *pcap_info, t_u16 band,
|
||||
t_u32 channel,
|
||||
wlan_11h_bss_info_t *p11h_bss_info);
|
||||
|
||||
|
@ -146,15 +155,18 @@ t_s32 wlan_11h_cancel_radar_detect(mlan_private *priv);
|
|||
/** Handler for DFS_TESTING IOCTL */
|
||||
extern mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
extern mlan_status
|
||||
wlan_11h_ioctl_get_channel_nop_info(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
extern mlan_status wlan_11h_ioctl_channel_nop_info(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
extern mlan_status wlan_11h_ioctl_dfs_chan_report(mlan_private *priv,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
extern mlan_status wlan_11h_ioctl_chan_switch_count(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
/** get/set channel dfs state */
|
||||
mlan_status wlan_11h_ioctl_chan_dfs_state(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
/** get/set dfs w53 cfg */
|
||||
mlan_status wlan_11h_ioctl_dfs_w53_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
@ -192,7 +204,8 @@ extern mlan_status wlan_11h_dfs_event_preprocessing(mlan_adapter *pmadapter);
|
|||
/** DFS switch to non-DFS channel */
|
||||
extern mlan_status wlan_11h_switch_non_dfs_chan(mlan_private *priv, t_u8 *chan);
|
||||
|
||||
extern void wlan_11h_update_bandcfg(Band_Config_t *uap_band_cfg,
|
||||
extern void wlan_11h_update_bandcfg(mlan_private *pmpriv,
|
||||
Band_Config_t *uap_band_cfg,
|
||||
t_u8 new_channel);
|
||||
|
||||
/** function checks if interface is active. **/
|
||||
|
|
|
@ -5,18 +5,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1330,7 +1339,7 @@ static TxBAStreamTbl *wlan_11n_get_txbastream_status(mlan_private *priv,
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void wlan_fill_cap_info(mlan_private *priv, HTCap_t *ht_cap, t_u8 bands)
|
||||
static void wlan_fill_cap_info(mlan_private *priv, HTCap_t *ht_cap, t_u16 bands)
|
||||
{
|
||||
t_u32 usr_dot_11n_dev_cap;
|
||||
|
||||
|
@ -1419,7 +1428,8 @@ static void wlan_fill_cap_info(mlan_private *priv, HTCap_t *ht_cap, t_u8 bands)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void wlan_reset_cap_info(mlan_private *priv, HTCap_t *ht_cap, t_u8 bands)
|
||||
static void wlan_reset_cap_info(mlan_private *priv, HTCap_t *ht_cap,
|
||||
t_u16 bands)
|
||||
{
|
||||
t_u32 usr_dot_11n_dev_cap;
|
||||
|
||||
|
@ -1513,8 +1523,10 @@ void wlan_fill_ht_cap_tlv(mlan_private *priv, MrvlIETypes_HTCap_t *pht_cap,
|
|||
|
||||
rx_mcs_supp = GET_RXMCSSUPP(priv->usr_dev_mcs_support);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDNW62X(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (bands & BAND_A)
|
||||
rx_mcs_supp = MIN(
|
||||
|
@ -1587,8 +1599,10 @@ void wlan_fill_ht_cap_ie(mlan_private *priv, IEEEtypes_HTCap_t *pht_cap,
|
|||
|
||||
rx_mcs_supp = GET_RXMCSSUPP(priv->usr_dev_mcs_support);
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(pmadapter->card_type) ||
|
||||
IS_CARDNW62X(pmadapter->card_type) ||
|
||||
IS_CARD9097(pmadapter->card_type)) {
|
||||
if (bands & BAND_A)
|
||||
rx_mcs_supp = MIN(
|
||||
|
@ -2289,10 +2303,14 @@ mlan_status wlan_ret_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
* @param chan channel num
|
||||
* @return second channel offset
|
||||
*/
|
||||
t_u8 wlan_get_second_channel_offset(int chan)
|
||||
t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
|
||||
{
|
||||
t_u8 chan2Offset = SEC_CHAN_NONE;
|
||||
|
||||
/* Special Case: 20Mhz-only Channel */
|
||||
if (priv->adapter->region_code != COUNTRY_CODE_US && chan == 165)
|
||||
return chan2Offset;
|
||||
|
||||
switch (chan) {
|
||||
case 36:
|
||||
case 44:
|
||||
|
@ -2306,6 +2324,8 @@ t_u8 wlan_get_second_channel_offset(int chan)
|
|||
case 140:
|
||||
case 149:
|
||||
case 157:
|
||||
case 165:
|
||||
case 173:
|
||||
chan2Offset = SEC_CHAN_ABOVE;
|
||||
break;
|
||||
case 40:
|
||||
|
@ -2320,12 +2340,10 @@ t_u8 wlan_get_second_channel_offset(int chan)
|
|||
case 144:
|
||||
case 153:
|
||||
case 161:
|
||||
case 169:
|
||||
case 177:
|
||||
chan2Offset = SEC_CHAN_BELOW;
|
||||
break;
|
||||
case 165:
|
||||
/* Special Case: 20Mhz-only Channel */
|
||||
chan2Offset = SEC_CHAN_NONE;
|
||||
break;
|
||||
}
|
||||
return chan2Offset;
|
||||
}
|
||||
|
@ -2371,7 +2389,8 @@ t_u8 wlan_validate_chan_offset(mlan_private *pmpriv, t_u16 band, t_u32 chan,
|
|||
if ((chan == 8) || (chan == 9))
|
||||
chan_offset = SEC_CHAN_BELOW;
|
||||
} else if (band & BAND_AN)
|
||||
chan_offset = wlan_get_second_channel_offset(chan);
|
||||
chan_offset =
|
||||
wlan_get_second_channel_offset(pmpriv, chan);
|
||||
}
|
||||
return chan_offset;
|
||||
}
|
||||
|
@ -2554,7 +2573,7 @@ int wlan_cmd_append_11n_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
|||
pchan_list->chan_scan_param[0].chan_number =
|
||||
pbss_desc->pht_info->ht_info.pri_chan;
|
||||
pchan_list->chan_scan_param[0].bandcfg.chanBand =
|
||||
wlan_band_to_radio_type((t_u8)pbss_desc->bss_band);
|
||||
wlan_band_to_radio_type(pbss_desc->bss_band);
|
||||
/* support the VHT if the network to be join has the VHT
|
||||
* operation */
|
||||
if (ISSUPP_11ACENABLED(pmadapter->fw_cap_info) &&
|
||||
|
@ -3126,7 +3145,7 @@ int wlan_get_txbastream_tbl(mlan_private *priv, tx_ba_stream_tbl *buf)
|
|||
*
|
||||
* @return 0--not allowed, other value allowed
|
||||
*/
|
||||
t_u8 wlan_11n_bandconfig_allowed(mlan_private *pmpriv, t_u8 bss_band)
|
||||
t_u8 wlan_11n_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band)
|
||||
{
|
||||
if (pmpriv->bss_mode == MLAN_BSS_MODE_IBSS) {
|
||||
if (bss_band & BAND_G)
|
||||
|
|
|
@ -6,20 +6,29 @@
|
|||
* implemented in mlan_11n.c.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -65,7 +74,7 @@ mlan_status wlan_cmd_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
mlan_status wlan_ret_tx_bf_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
#ifdef STA_SUPPORT
|
||||
t_u8 wlan_11n_bandconfig_allowed(mlan_private *pmpriv, t_u8 bss_band);
|
||||
t_u8 wlan_11n_bandconfig_allowed(mlan_private *pmpriv, t_u16 bss_band);
|
||||
/** Append the 802_11N tlv */
|
||||
int wlan_cmd_append_11n_tlv(mlan_private *pmpriv, BSSDescriptor_t *pbss_desc,
|
||||
t_u8 **ppbuffer);
|
||||
|
@ -123,7 +132,7 @@ mlan_status wlan_cmd_amsdu_aggr_ctrl(mlan_private *priv,
|
|||
t_u8 wlan_validate_chan_offset(mlan_private *pmpriv, t_u16 band, t_u32 chan,
|
||||
t_u8 chan_bw);
|
||||
/** get channel offset */
|
||||
t_u8 wlan_get_second_channel_offset(int chan);
|
||||
t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan);
|
||||
|
||||
void wlan_update_11n_cap(mlan_private *pmpriv);
|
||||
|
||||
|
@ -271,12 +280,6 @@ static INLINE void wlan_update_station_del_ba_count(mlan_private *priv,
|
|||
static INLINE void wlan_update_del_ba_count(mlan_private *priv, raListTbl *ptr)
|
||||
{
|
||||
t_s8 rssi;
|
||||
#ifdef UAP_802_11N
|
||||
#ifdef UAP_SUPPORT
|
||||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)
|
||||
return wlan_update_station_del_ba_count(priv, ptr);
|
||||
#endif /* UAP_SUPPORT */
|
||||
#endif /* UAP_802_11N */
|
||||
if (ptr->is_tdls_link)
|
||||
return wlan_update_station_del_ba_count(priv, ptr);
|
||||
rssi = priv->snr - priv->nf;
|
||||
|
|
|
@ -5,18 +5,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -230,6 +239,12 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
t_u8 hdr_len = sizeof(Eth803Hdr_t);
|
||||
t_u8 eapol_type[2] = {0x88, 0x8e};
|
||||
t_u8 tdls_action_type[2] = {0x89, 0x0d};
|
||||
t_u32 in_ts_sec, in_ts_usec;
|
||||
t_u32 out_ts_sec, out_ts_usec;
|
||||
t_u32 in_copy_ts_sec, in_copy_ts_usec;
|
||||
t_u32 out_copy_ts_sec, out_copy_ts_usec;
|
||||
t_u32 copy_delay = 0;
|
||||
t_u32 delay = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -260,7 +275,9 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
total_pkt_len);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &in_ts_sec, &in_ts_usec);
|
||||
pmbuf->use_count = wlan_11n_get_num_aggrpkts(data, total_pkt_len);
|
||||
|
||||
// rx_trace 7
|
||||
|
@ -272,7 +289,20 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
}
|
||||
if (pmadapter->tp_state_drop_point == 7 /*RX_DROP_P3*/)
|
||||
goto done;
|
||||
|
||||
prx_pkt = (RxPacketHdr_t *)data;
|
||||
if (pmbuf->pdesc && !memcmp(pmadapter, prx_pkt->eth803_hdr.dest_addr,
|
||||
priv->curr_addr, MLAN_MAC_ADDR_LENGTH)) {
|
||||
if (pmadapter->callbacks.moal_recv_amsdu_packet) {
|
||||
ret = pmadapter->callbacks.moal_recv_amsdu_packet(
|
||||
pmadapter->pmoal_handle, pmbuf);
|
||||
if (ret == MLAN_STATUS_PENDING) {
|
||||
priv->msdu_in_rx_amsdu_cnt += pmbuf->use_count;
|
||||
priv->amsdu_rx_cnt++;
|
||||
return ret;
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
while (total_pkt_len >= hdr_len) {
|
||||
prx_pkt = (RxPacketHdr_t *)data;
|
||||
/* Length will be in network format, change it to host */
|
||||
|
@ -321,10 +351,23 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
daggr_mbuf->extra_ts_usec = pmbuf->extra_ts_usec;
|
||||
daggr_mbuf->pparent = pmbuf;
|
||||
daggr_mbuf->priority = pmbuf->priority;
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &in_copy_ts_sec,
|
||||
&in_copy_ts_usec);
|
||||
memcpy_ext(pmadapter,
|
||||
daggr_mbuf->pbuf + daggr_mbuf->data_offset, data,
|
||||
pkt_len, daggr_mbuf->data_len);
|
||||
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &out_copy_ts_sec,
|
||||
&out_copy_ts_usec);
|
||||
copy_delay +=
|
||||
(t_s32)(out_copy_ts_sec - in_copy_ts_sec) *
|
||||
1000000;
|
||||
copy_delay +=
|
||||
(t_s32)(out_copy_ts_usec - in_copy_ts_usec);
|
||||
}
|
||||
#ifdef UAP_SUPPORT
|
||||
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) {
|
||||
ret = wlan_uap_recv_packet(priv, daggr_mbuf);
|
||||
|
@ -385,6 +428,14 @@ mlan_status wlan_11n_deaggregate_pkt(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
|
||||
data += pkt_len + pad;
|
||||
}
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &out_ts_sec, &out_ts_usec);
|
||||
delay += (t_s32)(out_ts_sec - in_ts_sec) * 1000000;
|
||||
delay += (t_s32)(out_ts_usec - in_ts_usec);
|
||||
pmadapter->callbacks.moal_amsdu_tp_accounting(
|
||||
pmadapter->pmoal_handle, delay, copy_delay);
|
||||
}
|
||||
|
||||
done:
|
||||
priv->msdu_in_rx_amsdu_cnt += pmbuf->use_count;
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* of 11n aggregation functionalities
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -6,18 +6,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* of 11n RxReordering functionalities
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,20 +5,29 @@
|
|||
* related code
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2021 NXP
|
||||
* Copyright 2009-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -92,10 +101,16 @@ static country_code_mapping_t country_code_mapping[] = {
|
|||
|
||||
/** Country code for ETSI */
|
||||
static t_u8 eu_country_code_table[][COUNTRY_CODE_LEN] = {
|
||||
"AL", "AD", "AT", "AU", "BY", "BE", "BA", "BG", "HR", "CY", "CZ", "DK",
|
||||
"EE", "FI", "FR", "MK", "DE", "GR", "HU", "IS", "IE", "IT", "KR", "LV",
|
||||
"LI", "LT", "LU", "MT", "MD", "MC", "ME", "NL", "NO", "PL", "RO", "RU",
|
||||
"SM", "RS", "SI", "SK", "ES", "SE", "CH", "TR", "UA", "UK", "GB", "NZ"};
|
||||
"AL", "AD", "AT", "AU", "BE", "BA", "BG", "HR", "CY", "CZ", "DK", "EE",
|
||||
"FI", "FR", "MK", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT",
|
||||
"LU", "MT", "MD", "MC", "ME", "NL", "NO", "PL", "RO", "SM", "RS", "SI",
|
||||
"SK", "ES", "SE", "CH", "TR", "UA", "UK", "GB", "NZ", "DZ", "AO", "AM",
|
||||
"AW", "BH", "BD", "BT", "BO", "BQ", "BW", "VG", "BF", "BI", "KH", "CL",
|
||||
"KM", "CG", "CD", "CW", "EG", "FO", "GF", "PF", "GE", "GI", "GP", "HK",
|
||||
"IN", "ID", "IM", "IL", "JE", "KE", "XK", "KW", "LA", "LR", "MW", "MV",
|
||||
"MQ", "MR", "YT", "MA", "MZ", "MM", "NA", "NC", "NE", "NG", "OM", "PS",
|
||||
"PT", "QA", "RW", "RE", "BL", "MF", "VC", "SA", "SC", "ZA", "SZ", "SY",
|
||||
"TZ", "TG", "TN", "AE", "VA", "EH", "YE", "ZM", "ZW"};
|
||||
|
||||
/**
|
||||
* The structure for Channel-Frequency-Power table
|
||||
|
@ -340,7 +355,10 @@ static chan_freq_power_t channel_freq_power_A[] = {
|
|||
{153, 5765, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{157, 5785, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{161, 5805, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}}};
|
||||
{165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{169, 5845, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{173, 5865, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
|
||||
{177, 5885, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}}};
|
||||
|
||||
/** Band: 'A', Region: Canada IC */
|
||||
static chan_freq_power_t channel_freq_power_CAN_A[] = {
|
||||
|
@ -964,8 +982,6 @@ static const rate_map rate_map_table_1x1[] = {
|
|||
t_u16 region_code_index[MRVDRV_MAX_REGION_CODE] = {0x00, 0x10, 0x20, 0x30, 0x40,
|
||||
0x41, 0x50, 0xfe, 0xff};
|
||||
|
||||
/** The table to keep CFP code for BG */
|
||||
t_u16 cfp_code_index_bg[MRVDRV_MAX_CFP_CODE_BG] = {};
|
||||
/** The table to keep CFP code for A */
|
||||
t_u16 cfp_code_index_a[MRVDRV_MAX_CFP_CODE_A] = {0x1, 0x2, 0x3, 0x4, 0x5};
|
||||
|
||||
|
@ -1179,7 +1195,7 @@ static void *wlan_memchr(pmlan_adapter pmadapter, void *s, int c, int n)
|
|||
* @return A pointer to CFP
|
||||
*/
|
||||
static chan_freq_power_t *wlan_get_region_cfp_table(pmlan_adapter pmadapter,
|
||||
t_u8 region, t_u8 band,
|
||||
t_u8 region, t_u16 band,
|
||||
int *cfp_no)
|
||||
{
|
||||
t_u32 i;
|
||||
|
@ -1244,7 +1260,6 @@ static chan_freq_power_t *wlan_get_region_cfp_table(pmlan_adapter pmadapter,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!region)
|
||||
PRINTM(MERROR, "Error Band[0x%x] or code[BG:%#x, A:%#x]\n",
|
||||
band, cfp_bg, cfp_a);
|
||||
|
@ -1284,6 +1299,7 @@ static t_void wlan_cfp_copy_dynamic(pmlan_adapter pmadapter,
|
|||
/* do not clear the flags */
|
||||
for (i = 0; i < num_cfp; i++) {
|
||||
cfp[i].dynamic.blacklist = MFALSE;
|
||||
cfp[i].dynamic.dfs_state = DFS_USABLE;
|
||||
}
|
||||
|
||||
/* copy dynamic blacklisted entries from source where channels match */
|
||||
|
@ -1293,6 +1309,8 @@ static t_void wlan_cfp_copy_dynamic(pmlan_adapter pmadapter,
|
|||
if (cfp[i].channel == cfp_src[j].channel) {
|
||||
cfp[i].dynamic.blacklist =
|
||||
cfp_src[j].dynamic.blacklist;
|
||||
cfp[i].dynamic.dfs_state =
|
||||
cfp_src[j].dynamic.dfs_state;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1872,11 +1890,13 @@ t_u32 wlan_get_active_data_rates(mlan_private *pmpriv, t_u32 bss_mode,
|
|||
* present in all the regions.
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param band band.
|
||||
* @param channel Channel number.
|
||||
*
|
||||
* @return The Tx power
|
||||
*/
|
||||
t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u8 channel)
|
||||
t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u16 band,
|
||||
t_u8 channel)
|
||||
{
|
||||
t_u8 i = 0;
|
||||
t_u8 j = 0;
|
||||
|
@ -1888,38 +1908,46 @@ t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u8 channel)
|
|||
|
||||
ENTER();
|
||||
|
||||
for (i = 0; i < MLAN_CFP_TABLE_SIZE_BG; i++) {
|
||||
/* Get CFP */
|
||||
cfp = cfp_table_BG[i].cfp;
|
||||
cfp_no = cfp_table_BG[i].cfp_no;
|
||||
/* Find matching channel and get Tx power */
|
||||
for (j = 0; j < cfp_no; j++) {
|
||||
if ((cfp + j)->channel == channel) {
|
||||
if (tx_power != 0)
|
||||
tx_power = MIN(tx_power,
|
||||
(cfp + j)->max_tx_power);
|
||||
else
|
||||
tx_power =
|
||||
(t_u8)(cfp + j)->max_tx_power;
|
||||
break;
|
||||
if (band & (BAND_B | BAND_G)) {
|
||||
for (i = 0; i < MLAN_CFP_TABLE_SIZE_BG; i++) {
|
||||
/* Get CFP */
|
||||
cfp = cfp_table_BG[i].cfp;
|
||||
cfp_no = cfp_table_BG[i].cfp_no;
|
||||
/* Find matching channel and get Tx power */
|
||||
for (j = 0; j < cfp_no; j++) {
|
||||
if ((cfp + j)->channel == channel) {
|
||||
if (tx_power != 0)
|
||||
tx_power = MIN(
|
||||
tx_power,
|
||||
(cfp + j)->max_tx_power);
|
||||
else
|
||||
tx_power =
|
||||
(t_u8)(cfp + j)
|
||||
->max_tx_power;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MLAN_CFP_TABLE_SIZE_A; i++) {
|
||||
/* Get CFP */
|
||||
cfp_a = cfp_table_A[i].cfp;
|
||||
cfp_no_a = cfp_table_A[i].cfp_no;
|
||||
for (j = 0; j < cfp_no_a; j++) {
|
||||
if ((cfp_a + j)->channel == channel) {
|
||||
if (tx_power != 0)
|
||||
tx_power =
|
||||
MIN(tx_power,
|
||||
(cfp_a + j)->max_tx_power);
|
||||
else
|
||||
tx_power = (t_u8)(
|
||||
(cfp_a + j)->max_tx_power);
|
||||
break;
|
||||
if (band & BAND_A) {
|
||||
for (i = 0; i < MLAN_CFP_TABLE_SIZE_A; i++) {
|
||||
/* Get CFP */
|
||||
cfp_a = cfp_table_A[i].cfp;
|
||||
cfp_no_a = cfp_table_A[i].cfp_no;
|
||||
for (j = 0; j < cfp_no_a; j++) {
|
||||
if ((cfp_a + j)->channel == channel) {
|
||||
if (tx_power != 0)
|
||||
tx_power = MIN(
|
||||
tx_power,
|
||||
(cfp_a + j)
|
||||
->max_tx_power);
|
||||
else
|
||||
tx_power = (t_u8)(
|
||||
(cfp_a + j)
|
||||
->max_tx_power);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1941,7 +1969,7 @@ t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u8 channel)
|
|||
*/
|
||||
|
||||
chan_freq_power_t *
|
||||
wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, t_u8 band,
|
||||
wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, t_u16 band,
|
||||
t_u16 channel, region_chan_t *region_channel)
|
||||
{
|
||||
region_chan_t *rc;
|
||||
|
@ -2024,7 +2052,7 @@ wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, t_u8 band,
|
|||
* found.
|
||||
*/
|
||||
chan_freq_power_t *wlan_find_cfp_by_band_and_channel(mlan_adapter *pmadapter,
|
||||
t_u8 band, t_u16 channel)
|
||||
t_u16 band, t_u16 channel)
|
||||
{
|
||||
chan_freq_power_t *cfp = MNULL;
|
||||
|
||||
|
@ -2053,7 +2081,7 @@ chan_freq_power_t *wlan_find_cfp_by_band_and_channel(mlan_adapter *pmadapter,
|
|||
* @return Pointer to chan_freq_power_t structure; MNULL if not found
|
||||
*/
|
||||
chan_freq_power_t *wlan_find_cfp_by_band_and_freq(mlan_adapter *pmadapter,
|
||||
t_u8 band, t_u32 freq)
|
||||
t_u16 band, t_u32 freq)
|
||||
{
|
||||
chan_freq_power_t *cfp = MNULL;
|
||||
region_chan_t *rc;
|
||||
|
@ -2176,6 +2204,27 @@ int wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 *rate_bitmap, int size)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert config_bands to B/G/A band
|
||||
*
|
||||
* @param config_bands The specified band configuration
|
||||
*
|
||||
* @return BAND_B|BAND_G|BAND_A
|
||||
*/
|
||||
t_u16 wlan_convert_config_bands(t_u16 config_bands)
|
||||
{
|
||||
t_u16 bands = 0;
|
||||
if (config_bands & BAND_B)
|
||||
bands |= BAND_B;
|
||||
if (config_bands & BAND_G || config_bands & BAND_GN ||
|
||||
config_bands & BAND_GAC || config_bands & BAND_GAX)
|
||||
bands |= BAND_G;
|
||||
if (config_bands & BAND_A || config_bands & BAND_AN ||
|
||||
config_bands & BAND_AAC || config_bands & BAND_AAX)
|
||||
bands |= BAND_A;
|
||||
return bands;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get supported data rates
|
||||
*
|
||||
|
@ -2190,109 +2239,64 @@ t_u32 wlan_get_supported_rates(mlan_private *pmpriv, t_u32 bss_mode,
|
|||
t_u16 config_bands, WLAN_802_11_RATES rates)
|
||||
{
|
||||
t_u32 k = 0;
|
||||
t_u16 bands = 0;
|
||||
|
||||
ENTER();
|
||||
bands = wlan_convert_config_bands(config_bands);
|
||||
|
||||
if (bss_mode == MLAN_BSS_MODE_INFRA) {
|
||||
/* Infra. mode */
|
||||
switch (config_bands) {
|
||||
case (t_u8)BAND_B:
|
||||
PRINTM(MINFO, "Infra Band=%d SupportedRates_B\n",
|
||||
config_bands);
|
||||
if (bands == BAND_B) {
|
||||
/* B only */
|
||||
PRINTM(MINFO, "Band: Infra B\n");
|
||||
k = wlan_copy_rates(rates, k, SupportedRates_B,
|
||||
sizeof(SupportedRates_B));
|
||||
break;
|
||||
case (t_u8)BAND_G:
|
||||
case BAND_G | BAND_GN:
|
||||
case BAND_G | BAND_GN | BAND_GAC:
|
||||
case BAND_G | BAND_GN | BAND_GAC | BAND_GAX:
|
||||
PRINTM(MINFO, "Infra band=%d SupportedRates_G\n",
|
||||
config_bands);
|
||||
} else if (bands == BAND_G) {
|
||||
/* G only */
|
||||
PRINTM(MINFO, "Band: Infra G\n");
|
||||
k = wlan_copy_rates(rates, k, SupportedRates_G,
|
||||
sizeof(SupportedRates_G));
|
||||
break;
|
||||
case BAND_B | BAND_G:
|
||||
case BAND_A | BAND_B | BAND_G:
|
||||
case BAND_A | BAND_B:
|
||||
case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN:
|
||||
case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC:
|
||||
case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC |
|
||||
BAND_GAC:
|
||||
case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC |
|
||||
BAND_AAX:
|
||||
case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC |
|
||||
BAND_GAC | BAND_AAX | BAND_GAX:
|
||||
case BAND_B | BAND_G | BAND_GN:
|
||||
case BAND_B | BAND_G | BAND_GN | BAND_GAC:
|
||||
case BAND_B | BAND_G | BAND_GN | BAND_GAC | BAND_GAX:
|
||||
PRINTM(MINFO, "Infra band=%d SupportedRates_BG\n",
|
||||
config_bands);
|
||||
|
||||
} else if (bands & (BAND_B | BAND_G)) {
|
||||
/* BG only */
|
||||
PRINTM(MINFO, "Band: Infra BG\n");
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
if (pmpriv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT)
|
||||
k = wlan_copy_rates(rates, k, SupportedRates_G,
|
||||
sizeof(SupportedRates_G));
|
||||
else
|
||||
#endif
|
||||
k = wlan_copy_rates(rates, k, SupportedRates_BG,
|
||||
sizeof(SupportedRates_BG));
|
||||
#else
|
||||
k = wlan_copy_rates(rates, k, SupportedRates_BG,
|
||||
sizeof(SupportedRates_BG));
|
||||
#endif
|
||||
break;
|
||||
case BAND_A:
|
||||
case BAND_A | BAND_G:
|
||||
PRINTM(MINFO, "Infra band=%d SupportedRates_A\n",
|
||||
config_bands);
|
||||
} else if (bands & BAND_A) {
|
||||
/* support A */
|
||||
PRINTM(MINFO, "Band: Infra A\n");
|
||||
k = wlan_copy_rates(rates, k, SupportedRates_A,
|
||||
sizeof(SupportedRates_A));
|
||||
break;
|
||||
case BAND_AN:
|
||||
case BAND_A | BAND_AN:
|
||||
case BAND_A | BAND_G | BAND_AN | BAND_GN:
|
||||
case BAND_A | BAND_AN | BAND_AAC:
|
||||
case BAND_A | BAND_G | BAND_AN | BAND_GN | BAND_AAC:
|
||||
case BAND_A | BAND_AN | BAND_AAC | BAND_AAX:
|
||||
case BAND_A | BAND_G | BAND_AN | BAND_GN | BAND_AAC | BAND_AAX:
|
||||
PRINTM(MINFO, "Infra band=%d SupportedRates_A\n",
|
||||
config_bands);
|
||||
k = wlan_copy_rates(rates, k, SupportedRates_A,
|
||||
sizeof(SupportedRates_A));
|
||||
break;
|
||||
case BAND_GN:
|
||||
case BAND_GN | BAND_GAC:
|
||||
case BAND_GN | BAND_GAC | BAND_GAX:
|
||||
PRINTM(MINFO, "Infra band=%d SupportedRates_N\n",
|
||||
config_bands);
|
||||
k = wlan_copy_rates(rates, k, SupportedRates_N,
|
||||
sizeof(SupportedRates_N));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/* Ad-hoc mode */
|
||||
switch (config_bands) {
|
||||
case (t_u8)BAND_B:
|
||||
/* Adhoc. mode */
|
||||
if (bands == BAND_B) {
|
||||
/* B only */
|
||||
PRINTM(MINFO, "Band: Adhoc B\n");
|
||||
k = wlan_copy_rates(rates, k, AdhocRates_B,
|
||||
sizeof(AdhocRates_B));
|
||||
break;
|
||||
case (t_u8)BAND_G:
|
||||
PRINTM(MINFO, "Band: Adhoc G only\n");
|
||||
} else if (bands == BAND_G) {
|
||||
/* G only */
|
||||
PRINTM(MINFO, "Band: Adhoc G\n");
|
||||
k = wlan_copy_rates(rates, k, AdhocRates_G,
|
||||
sizeof(AdhocRates_G));
|
||||
break;
|
||||
case BAND_B | BAND_G:
|
||||
PRINTM(MINFO, "Band: Adhoc BG\n");
|
||||
k = wlan_copy_rates(rates, k, AdhocRates_BG,
|
||||
sizeof(AdhocRates_BG));
|
||||
break;
|
||||
case BAND_A:
|
||||
case BAND_A | BAND_AN | BAND_AAC:
|
||||
case BAND_A | BAND_AN | BAND_AAC | BAND_AAX:
|
||||
|
||||
} else if (bands & BAND_A) {
|
||||
/* support A */
|
||||
PRINTM(MINFO, "Band: Adhoc A\n");
|
||||
k = wlan_copy_rates(rates, k, AdhocRates_A,
|
||||
sizeof(AdhocRates_A));
|
||||
break;
|
||||
|
||||
} else {
|
||||
PRINTM(MINFO, "Band: Adhoc BG\n");
|
||||
k = wlan_copy_rates(rates, k, AdhocRates_BG,
|
||||
sizeof(AdhocRates_BG));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2670,7 +2674,7 @@ int wlan_add_supported_oper_class_ie(mlan_private *pmpriv, t_u8 **pptlv_out,
|
|||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u8 band)
|
||||
mlan_status wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u16 band)
|
||||
{
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
int i = 0, j;
|
||||
|
@ -2727,7 +2731,7 @@ mlan_status wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u8 band)
|
|||
i++;
|
||||
}
|
||||
if (band & (BAND_A | BAND_AN | BAND_AAC)) {
|
||||
if (pmadapter->cfp_code_bg)
|
||||
if (pmadapter->cfp_code_a)
|
||||
cfp_code_a = pmadapter->cfp_code_a;
|
||||
PRINTM(MCMND, "%s: 5G 0x%x\n", __func__, cfp_code_a);
|
||||
cfp = wlan_get_region_cfp_table(pmadapter, cfp_code_a, BAND_A,
|
||||
|
@ -2756,6 +2760,7 @@ mlan_status wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u8 band)
|
|||
} else if (cfp) {
|
||||
wlan_cfp_copy_dynamic(pmadapter, cfp, cfp_no, MNULL, 0);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
|
@ -2817,7 +2822,6 @@ done:
|
|||
* - MTRUE if scan type is passive
|
||||
* - MFALSE otherwise
|
||||
*/
|
||||
|
||||
t_bool wlan_bg_scan_type_is_passive(mlan_private *priv, t_u8 chnl)
|
||||
{
|
||||
int i, j;
|
||||
|
@ -2866,7 +2870,7 @@ done:
|
|||
* - MFALSE otherwise
|
||||
*/
|
||||
|
||||
t_bool wlan_is_chan_passive(mlan_private *priv, t_u8 band, t_u8 chan)
|
||||
t_bool wlan_is_chan_passive(mlan_private *priv, t_u16 band, t_u8 chan)
|
||||
{
|
||||
int i, j;
|
||||
t_bool passive = MFALSE;
|
||||
|
@ -2909,7 +2913,7 @@ t_bool wlan_is_chan_passive(mlan_private *priv, t_u8 band, t_u8 chan)
|
|||
* - MFALSE otherwise
|
||||
*/
|
||||
|
||||
t_bool wlan_is_chan_disabled(mlan_private *priv, t_u8 band, t_u8 chan)
|
||||
t_bool wlan_is_chan_disabled(mlan_private *priv, t_u16 band, t_u8 chan)
|
||||
{
|
||||
int i, j;
|
||||
t_bool disabled = MFALSE;
|
||||
|
@ -2953,7 +2957,7 @@ t_bool wlan_is_chan_disabled(mlan_private *priv, t_u8 band, t_u8 chan)
|
|||
* - MFALSE otherwise
|
||||
*/
|
||||
|
||||
t_bool wlan_is_chan_blacklisted(mlan_private *priv, t_u8 band, t_u8 chan)
|
||||
t_bool wlan_is_chan_blacklisted(mlan_private *priv, t_u16 band, t_u8 chan)
|
||||
{
|
||||
int i, j;
|
||||
t_bool blacklist = MFALSE;
|
||||
|
@ -2996,7 +3000,7 @@ t_bool wlan_is_chan_blacklisted(mlan_private *priv, t_u8 band, t_u8 chan)
|
|||
* - MFALSE otherwise
|
||||
*/
|
||||
|
||||
t_bool wlan_set_chan_blacklist(mlan_private *priv, t_u8 band, t_u8 chan,
|
||||
t_bool wlan_set_chan_blacklist(mlan_private *priv, t_u16 band, t_u8 chan,
|
||||
t_bool bl)
|
||||
{
|
||||
int i, j;
|
||||
|
@ -3028,6 +3032,84 @@ t_bool wlan_set_chan_blacklist(mlan_private *priv, t_u8 band, t_u8 chan,
|
|||
return set_bl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set channel's dfs state
|
||||
*
|
||||
* @param priv Private driver information structure
|
||||
* @param band Band to check
|
||||
* @param chan Channel to check
|
||||
* @param dfs_state dfs state
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
t_void wlan_set_chan_dfs_state(mlan_private *priv, t_u16 band, t_u8 chan,
|
||||
dfs_state_t dfs_state)
|
||||
{
|
||||
int i, j;
|
||||
chan_freq_power_t *pcfp = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
/*get the cfp table first*/
|
||||
for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) {
|
||||
if (priv->adapter->region_channel[i].band & band) {
|
||||
pcfp = priv->adapter->region_channel[i].pcfp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pcfp) {
|
||||
/*check table according to chan num*/
|
||||
for (j = 0; j < priv->adapter->region_channel[i].num_cfp; j++) {
|
||||
if (pcfp[j].channel == chan) {
|
||||
pcfp[j].dynamic.dfs_state = dfs_state;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get channel's dfs state
|
||||
*
|
||||
* @param priv Private driver information structure
|
||||
* @param band Band to check
|
||||
* @param chan Channel to check
|
||||
*
|
||||
* @return channel's dfs state
|
||||
*/
|
||||
dfs_state_t wlan_get_chan_dfs_state(mlan_private *priv, t_u16 band, t_u8 chan)
|
||||
{
|
||||
int i, j;
|
||||
chan_freq_power_t *pcfp = MNULL;
|
||||
dfs_state_t dfs_state = DFS_USABLE;
|
||||
|
||||
ENTER();
|
||||
|
||||
/*get the cfp table first*/
|
||||
for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) {
|
||||
if (priv->adapter->region_channel[i].band & band) {
|
||||
pcfp = priv->adapter->region_channel[i].pcfp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pcfp) {
|
||||
/*check table according to chan num*/
|
||||
for (j = 0; j < priv->adapter->region_channel[i].num_cfp; j++) {
|
||||
if (pcfp[j].channel == chan) {
|
||||
dfs_state = pcfp[j].dynamic.dfs_state;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return dfs_state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert rateid in IEEE format to MRVL format
|
||||
*
|
||||
|
@ -3272,10 +3354,12 @@ void wlan_add_fw_cfp_tables(pmlan_private pmpriv, t_u8 *buf, t_u16 buf_left)
|
|||
pmadapter->domain_reg.country_code[1] =
|
||||
pmadapter->otp_region->country_code[1];
|
||||
pmadapter->domain_reg.country_code[2] = '\0';
|
||||
PRINTM(MCMND, "OTP region: region_code=%d %c%c\n",
|
||||
PRINTM(MCMND,
|
||||
"OTP region: region_code=%d %c%c dfs_region=%d\n",
|
||||
pmadapter->otp_region->region_code,
|
||||
pmadapter->country_code[0],
|
||||
pmadapter->country_code[1]);
|
||||
pmadapter->country_code[1],
|
||||
pmadapter->otp_region->dfs_region);
|
||||
pmadapter->cfp_code_bg =
|
||||
pmadapter->otp_region->region_code;
|
||||
pmadapter->cfp_code_a =
|
||||
|
@ -3360,6 +3444,8 @@ void wlan_add_fw_cfp_tables(pmlan_private pmpriv, t_u8 *buf, t_u16 buf_left)
|
|||
data++;
|
||||
(pmadapter->cfp_otp_a + i)->dynamic.flags =
|
||||
*data;
|
||||
(pmadapter->cfp_otp_a + i)->dynamic.dfs_state =
|
||||
DFS_USABLE;
|
||||
if (*data & NXP_CHANNEL_DFS)
|
||||
(pmadapter->cfp_otp_a + i)
|
||||
->passive_scan_or_radar_detect =
|
||||
|
@ -3392,7 +3478,7 @@ void wlan_add_fw_cfp_tables(pmlan_private pmpriv, t_u8 *buf, t_u16 buf_left)
|
|||
while ((i <
|
||||
pmadapter->tx_power_table_bg_rows *
|
||||
pmadapter->tx_power_table_bg_cols) &&
|
||||
(i < tlv_buf_len) && (*tmp != 36)) {
|
||||
(i < tlv_buf_len)) {
|
||||
i++;
|
||||
tmp++;
|
||||
}
|
||||
|
@ -3444,9 +3530,12 @@ void wlan_add_fw_cfp_tables(pmlan_private pmpriv, t_u8 *buf, t_u16 buf_left)
|
|||
((power_table_attr_t *)data)->rows_5g;
|
||||
pmadapter->tx_power_table_a_cols =
|
||||
((power_table_attr_t *)data)->cols_5g;
|
||||
PRINTM(MCMD_D, "OTP region: bg_row=%d, a_row=%d\n",
|
||||
PRINTM(MCMD_D,
|
||||
"OTP region: bg_row=%d,bg_cols=%d a_row=%d, a_cols=%d\n",
|
||||
pmadapter->tx_power_table_bg_rows,
|
||||
pmadapter->tx_power_table_a_rows);
|
||||
pmadapter->tx_power_table_bg_cols,
|
||||
pmadapter->tx_power_table_a_rows,
|
||||
pmadapter->tx_power_table_a_cols);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,20 +3,29 @@
|
|||
* @brief This file declares the generic data structures and APIs.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -24,7 +33,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "266"
|
||||
#define MLAN_RELEASE_VERSION "322.p3"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
@ -98,6 +107,8 @@ typedef t_s32 t_sval;
|
|||
/** MLAN FALSE */
|
||||
#define MFALSE (0)
|
||||
|
||||
#define CHANNEL_SPEC_SNIFFER_MODE 1
|
||||
|
||||
#ifndef MACSTR
|
||||
/** MAC address security format */
|
||||
#define MACSTR "%02x:XX:XX:XX:%02x:%02x"
|
||||
|
@ -138,6 +149,9 @@ typedef t_s32 t_sval;
|
|||
/** NET IP alignment */
|
||||
#define MLAN_NET_IP_ALIGN 2
|
||||
|
||||
/** US country code */
|
||||
#define COUNTRY_CODE_US 0x10
|
||||
|
||||
/** DMA alignment */
|
||||
/* SDIO3.0 Inrevium Adapter require 32 bit DMA alignment */
|
||||
#define DMA_ALIGNMENT 32
|
||||
|
@ -372,6 +386,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_9177 0x09
|
||||
/** 8801 card type */
|
||||
#define CARD_TYPE_8801 0x0a
|
||||
/** OWL card type */
|
||||
#define CARD_TYPE_NW62X 0x0b
|
||||
|
||||
/** 9098 A0 reverion num */
|
||||
#define CHIP_9098_REV_A0 1
|
||||
|
@ -403,6 +419,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_SD9177 (CARD_TYPE_9177 | (INTF_SD << 8))
|
||||
/** SD8801 card type */
|
||||
#define CARD_TYPE_SD8801 (CARD_TYPE_8801 | (INTF_SD << 8))
|
||||
/** SD_NW62X card type */
|
||||
#define CARD_TYPE_SDNW62X (CARD_TYPE_NW62X | (INTF_SD << 8))
|
||||
|
||||
#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct))
|
||||
#define IS_SD8897(ct) (CARD_TYPE_SD8897 == (ct))
|
||||
|
@ -414,6 +432,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_SD9098(ct) (CARD_TYPE_SD9098 == (ct))
|
||||
#define IS_SD9177(ct) (CARD_TYPE_SD9177 == (ct))
|
||||
#define IS_SD8801(ct) (CARD_TYPE_SD8801 == (ct))
|
||||
#define IS_SDNW62X(ct) (CARD_TYPE_SDNW62X == (ct))
|
||||
|
||||
/** SD8887 Card */
|
||||
#define CARD_SD8887 "SD8887"
|
||||
|
@ -428,15 +447,15 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
/** SD8987 Card */
|
||||
#define CARD_SD8987 "SD8987"
|
||||
/** SD9097 Card */
|
||||
#define CARD_SD9097 "SD9097"
|
||||
/** SDIW620 Card */
|
||||
#define CARD_SDIW620 "SDIW620"
|
||||
#define CARD_SD9097 "SDIW620"
|
||||
/** SD9098 Card */
|
||||
#define CARD_SD9098 "SD9098"
|
||||
/** SD9177 Card */
|
||||
#define CARD_SD9177 "SD9177"
|
||||
/** SD9177 Card */
|
||||
#define CARD_SD8801 "SD9177"
|
||||
/** SD8801 Card */
|
||||
#define CARD_SD8801 "SD8801"
|
||||
/** SDNW62X Card */
|
||||
#define CARD_SDNW62X "SDNW62X"
|
||||
#endif
|
||||
|
||||
#ifdef PCIE
|
||||
|
@ -448,26 +467,29 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_PCIE9097 (CARD_TYPE_9097 | (INTF_PCIE << 8))
|
||||
/** PCIE9098 card type */
|
||||
#define CARD_TYPE_PCIE9098 (CARD_TYPE_9098 | (INTF_PCIE << 8))
|
||||
/** PCIENW62X card type */
|
||||
#define CARD_TYPE_PCIENW62X (CARD_TYPE_NW62X | (INTF_PCIE << 8))
|
||||
|
||||
#define IS_PCIE8897(ct) (CARD_TYPE_PCIE8897 == (ct))
|
||||
#define IS_PCIE8997(ct) (CARD_TYPE_PCIE8997 == (ct))
|
||||
#define IS_PCIE9097(ct) (CARD_TYPE_PCIE9097 == (ct))
|
||||
#define IS_PCIE9098(ct) (CARD_TYPE_PCIE9098 == (ct))
|
||||
#define IS_PCIENW62X(ct) (CARD_TYPE_PCIENW62X == (ct))
|
||||
|
||||
/** PCIE8897 Card */
|
||||
#define CARD_PCIE8897 "PCIE8897"
|
||||
/** PCIE8997 Card */
|
||||
#define CARD_PCIE8997 "PCIE8997"
|
||||
/** PCIE9097 Card */
|
||||
#define CARD_PCIE9097 "PCIE9097"
|
||||
/** PCIEIW620 Card */
|
||||
#define CARD_PCIEIW620 "PCIEIW620"
|
||||
#define CARD_PCIE9097 "PCIEIW620"
|
||||
/** PCIE9000S Card */
|
||||
#define CARD_PCIE9000S "PCIE9000S"
|
||||
/** PCIE9098 Card */
|
||||
#define CARD_PCIE9098 "PCIE9098"
|
||||
/** PCIEAW690 Card */
|
||||
#define CARD_PCIEAW690 "PCIEAW690"
|
||||
/** PCIENW62X Card */
|
||||
#define CARD_PCIENW62X "PCIENW62X"
|
||||
#endif
|
||||
|
||||
#ifdef USB
|
||||
|
@ -483,6 +505,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_USB9098 (CARD_TYPE_9098 | (INTF_USB << 8))
|
||||
/** USB9097 card type */
|
||||
#define CARD_TYPE_USB9097 (CARD_TYPE_9097 | (INTF_USB << 8))
|
||||
/** USBNW62X card type */
|
||||
#define CARD_TYPE_USBNW62X (CARD_TYPE_NW62X | (INTF_USB << 8))
|
||||
|
||||
#define IS_USB8801(ct) (CARD_TYPE_USB8801 == (ct))
|
||||
#define IS_USB8897(ct) (CARD_TYPE_USB8897 == (ct))
|
||||
|
@ -490,6 +514,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_USB8978(ct) (CARD_TYPE_USB8978 == (ct))
|
||||
#define IS_USB9098(ct) (CARD_TYPE_USB9098 == (ct))
|
||||
#define IS_USB9097(ct) (CARD_TYPE_USB9097 == (ct))
|
||||
#define IS_USBNW62X(ct) (CARD_TYPE_USBNW62X == (ct))
|
||||
|
||||
/** USB8801 Card */
|
||||
#define CARD_USB8801 "USB8801"
|
||||
|
@ -502,9 +527,9 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
/** USB9098 Card */
|
||||
#define CARD_USB9098 "USB9098"
|
||||
/** USB9097 Card */
|
||||
#define CARD_USB9097 "USB9097"
|
||||
/** USBIW620 Card */
|
||||
#define CARD_USBIW620 "USBIW620"
|
||||
#define CARD_USB9097 "USBIW620"
|
||||
/** USBNW62X Card */
|
||||
#define CARD_USBNW62X "USBNW62X"
|
||||
#endif
|
||||
|
||||
#define IS_CARD8801(ct) (CARD_TYPE_8801 == ((ct)&0xf))
|
||||
|
@ -516,6 +541,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_CARD9098(ct) (CARD_TYPE_9098 == ((ct)&0xf))
|
||||
#define IS_CARD9097(ct) (CARD_TYPE_9097 == ((ct)&0xf))
|
||||
#define IS_CARD9177(ct) (CARD_TYPE_9177 == ((ct)&0xf))
|
||||
#define IS_CARDNW62X(ct) (CARD_TYPE_NW62X == ((ct)&0xf))
|
||||
|
||||
typedef struct _card_type_entry {
|
||||
t_u16 card_type;
|
||||
|
@ -575,6 +601,9 @@ typedef enum {
|
|||
/** Buffer flag for TX_STATUS */
|
||||
#define MLAN_BUF_FLAG_TX_STATUS MBIT(10)
|
||||
|
||||
/** Buffer flag for NET_MONITOR */
|
||||
#define MLAN_BUF_FLAG_NET_MONITOR MBIT(11)
|
||||
|
||||
/** Buffer flag for NULL data packet */
|
||||
#define MLAN_BUF_FLAG_NULL_PKT MBIT(12)
|
||||
/** Buffer flag for Diag pkt */
|
||||
|
@ -582,6 +611,8 @@ typedef enum {
|
|||
|
||||
#define MLAN_BUF_FLAG_TX_CTRL MBIT(14)
|
||||
|
||||
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
/** Debug level bit definition */
|
||||
#define MMSG MBIT(0)
|
||||
|
@ -691,6 +722,7 @@ typedef enum _mlan_bss_type {
|
|||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
MLAN_BSS_TYPE_WIFIDIRECT = 2,
|
||||
#endif
|
||||
MLAN_BSS_TYPE_DFS = 8,
|
||||
MLAN_BSS_TYPE_ANY = 0xff,
|
||||
} mlan_bss_type;
|
||||
|
||||
|
@ -764,6 +796,7 @@ typedef enum _mlan_event_id {
|
|||
#if defined(PCIE)
|
||||
MLAN_EVENT_ID_SSU_DUMP_FILE = 0x00000039,
|
||||
#endif /* SSU_SUPPORT */
|
||||
MLAN_EVENT_ID_CSI = 0x00000040,
|
||||
/* Event generated by MLAN driver (MSB=1) */
|
||||
MLAN_EVENT_ID_DRV_CONNECTED = 0x80000001,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING = 0x80000002,
|
||||
|
@ -786,6 +819,7 @@ typedef enum _mlan_event_id {
|
|||
#ifdef UAP_SUPPORT
|
||||
MLAN_EVENT_ID_DRV_UAP_CHAN_INFO = 0x80000020,
|
||||
#endif
|
||||
MLAN_EVENT_ID_FW_ROAM_OFFLOAD_RESULT = 0x80000023,
|
||||
MLAN_EVENT_ID_DRV_ASSOC_FAILURE_LOGGER = 0x80000026,
|
||||
MLAN_EVENT_ID_DRV_ASSOC_SUCC_LOGGER = 0x80000027,
|
||||
MLAN_EVENT_ID_DRV_DISCONNECT_LOGGER = 0x80000028,
|
||||
|
@ -872,6 +906,7 @@ enum mlan_channel_type {
|
|||
enum { BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_4GHZ = 2,
|
||||
BAND_6GHZ = 3,
|
||||
};
|
||||
|
||||
/** channel offset */
|
||||
|
@ -922,16 +957,6 @@ typedef enum _dfs_w53_cfg_t {
|
|||
|
||||
/** Band_Config_t */
|
||||
typedef MLAN_PACK_START struct _Band_Config_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
|
||||
t_u8 scanMode : 2;
|
||||
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
|
||||
t_u8 chan2Offset : 2;
|
||||
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
|
||||
t_u8 chanWidth : 2;
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz */
|
||||
t_u8 chanBand : 2;
|
||||
#else
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz */
|
||||
t_u8 chanBand : 2;
|
||||
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
|
||||
|
@ -940,7 +965,6 @@ typedef MLAN_PACK_START struct _Band_Config_t {
|
|||
t_u8 chan2Offset : 2;
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=Adoption mode*/
|
||||
t_u8 scanMode : 2;
|
||||
#endif
|
||||
} MLAN_PACK_END Band_Config_t;
|
||||
|
||||
/** channel_band_t */
|
||||
|
@ -1030,6 +1054,45 @@ typedef struct _mlan_cmdresp_event {
|
|||
} mlan_cmdresp_event, *pmlan_cmdresp_event;
|
||||
|
||||
/** csi event data structure */
|
||||
typedef MLAN_PACK_START struct _csi_record_ds {
|
||||
/** Length in DWORDS, including header */
|
||||
t_u16 Len;
|
||||
/** CSI signature. 0xABCD fixed */
|
||||
t_u16 CSI_Sign;
|
||||
/** User defined HeaderID */
|
||||
t_u32 CSI_HeaderID;
|
||||
/** Packet info field */
|
||||
t_u16 PKT_info;
|
||||
/** Frame control field for the received packet*/
|
||||
t_u16 FCF;
|
||||
/** Timestamp when packet received */
|
||||
t_u64 TSF;
|
||||
/** Received Packet Destination MAC Address */
|
||||
t_u8 Dst_MAC[6];
|
||||
/** Received Packet Source MAC Address */
|
||||
t_u8 Src_MAC[6];
|
||||
/** RSSI for antenna A */
|
||||
t_u8 Rx_RSSI_A;
|
||||
/** RSSI for antenna B */
|
||||
t_u8 Rx_RSSI_B;
|
||||
/** Noise floor for antenna A */
|
||||
t_u8 Rx_NF_A;
|
||||
/** Noise floor for antenna A */
|
||||
t_u8 Rx_NF_B;
|
||||
/** Rx signal strength above noise floor */
|
||||
t_u8 Rx_SINR;
|
||||
/** Channel */
|
||||
t_u8 channel;
|
||||
/** user defined Chip ID */
|
||||
t_u16 chip_id;
|
||||
/** Reserved */
|
||||
t_u32 rsvd;
|
||||
/** CSI data length in DWORDs */
|
||||
t_u32 CSI_Data_Length;
|
||||
/** Start of CSI data */
|
||||
t_u8 CSI_Data[0];
|
||||
/** At the end of CSI raw data, user defined TailID of 4 bytes*/
|
||||
} MLAN_PACK_END csi_record_ds, *pcsi_record_ds;
|
||||
|
||||
/** mlan_ioctl_req data structure */
|
||||
typedef struct _mlan_ioctl_req {
|
||||
|
@ -1057,18 +1120,52 @@ typedef struct _mlan_ioctl_req {
|
|||
t_ptr reserved_1;
|
||||
} mlan_ioctl_req, *pmlan_ioctl_req;
|
||||
|
||||
typedef MLAN_PACK_START struct _mix_rate_info {
|
||||
/** bit0: LGI: gi=0, SGI: gi= 1 */
|
||||
/** bit1-2: 20M: bw=0, 40M: bw=1, 80M: bw=2, 160M: bw=3 */
|
||||
/** bit3-4: LG: format=0, HT: format=1, VHT: format=2 */
|
||||
/** bit5: LDPC: 0-not support, 1-support */
|
||||
/** bit6-7:reserved */
|
||||
t_u8 rate_info;
|
||||
/** MCS index */
|
||||
t_u8 mcs_index;
|
||||
/** bitrate, in 500Kbps */
|
||||
t_u16 bitrate;
|
||||
} MLAN_PACK_END mix_rate_info, *pmix_rate_info;
|
||||
|
||||
typedef MLAN_PACK_START struct _rxpd_extra_info {
|
||||
/** flags */
|
||||
t_u8 flags;
|
||||
/** channel.flags */
|
||||
t_u16 channel_flags;
|
||||
/** mcs.known */
|
||||
t_u8 mcs_known;
|
||||
/** mcs.flags */
|
||||
t_u8 mcs_flags;
|
||||
/** vht sig1 */
|
||||
t_u32 vht_sig1;
|
||||
/** vht sig2 */
|
||||
t_u32 vht_sig2;
|
||||
} MLAN_PACK_END rxpd_extra_info, *prxpd_extra_info;
|
||||
|
||||
typedef MLAN_PACK_START struct _radiotap_info {
|
||||
/** Rate Info */
|
||||
mix_rate_info rate_info;
|
||||
/** SNR */
|
||||
t_s8 snr;
|
||||
/** Noise Floor */
|
||||
t_s8 nf;
|
||||
/** band config */
|
||||
t_u8 band_config;
|
||||
/** chan number */
|
||||
t_u8 chan_num;
|
||||
t_u8 antenna;
|
||||
/** extra rxpd info from FW */
|
||||
rxpd_extra_info extra_info;
|
||||
} MLAN_PACK_END radiotap_info, *pradiotap_info;
|
||||
|
||||
/** txpower structure */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Host tx power ctrl:
|
||||
0x0: use fw setting for TX power
|
||||
0x1: value specified in bit[6] and bit[5:0] are valid */
|
||||
t_u8 hostctl : 1;
|
||||
/** Sign of the power specified in bit[5:0] */
|
||||
t_u8 sign : 1;
|
||||
/** Power to be used for transmission(in dBm) */
|
||||
t_u8 abs_val : 6;
|
||||
#else
|
||||
/** Power to be used for transmission(in dBm) */
|
||||
t_u8 abs_val : 6;
|
||||
/** Sign of the power specified in bit[5:0] */
|
||||
|
@ -1077,7 +1174,6 @@ typedef MLAN_PACK_START struct {
|
|||
0x0: use fw setting for TX power
|
||||
0x1: value specified in bit[6] and bit[5:0] are valid */
|
||||
t_u8 hostctl : 1;
|
||||
#endif
|
||||
} MLAN_PACK_END tx_power_t;
|
||||
/* pkt_txctrl */
|
||||
typedef MLAN_PACK_START struct _pkt_txctrl {
|
||||
|
@ -1108,6 +1204,25 @@ typedef MLAN_PACK_START struct _pkt_rxinfo {
|
|||
t_u8 rssi;
|
||||
} MLAN_PACK_END pkt_rxinfo, *ppkt_rxinfo;
|
||||
|
||||
#define MC_FLAG_RETRY MBIT(0)
|
||||
#define MC_FLAG_START_CYCLE MBIT(1)
|
||||
#define MC_FLAG_END_CYCLE MBIT(2)
|
||||
#define MC_FLAG_START_AMPDU MBIT(3)
|
||||
#define MC_FLAG_END_AMPDU MBIT(4)
|
||||
/* mc pkt txcontrol */
|
||||
typedef MLAN_PACK_START struct _mc_txcontrol {
|
||||
/** Data rate in mcs index, 0-7 */
|
||||
t_u8 mcs_index;
|
||||
/** band width 0-20Mhz, 1-40Mhz */
|
||||
t_u8 bandwidth;
|
||||
/** seq_num */
|
||||
t_u16 seq_num;
|
||||
/** packet expiry time */
|
||||
t_u32 pkt_expiry;
|
||||
/** mc_pkt_flags */
|
||||
t_u8 mc_pkt_flags;
|
||||
} MLAN_PACK_END mc_txcontrol, *pmc_txcontrol;
|
||||
|
||||
/** mlan_buffer data structure */
|
||||
typedef struct _mlan_buffer {
|
||||
/** Pointer to previous mlan_buffer */
|
||||
|
@ -1159,6 +1274,7 @@ typedef struct _mlan_buffer {
|
|||
/** Use count for this buffer */
|
||||
t_u32 use_count;
|
||||
union {
|
||||
mc_txcontrol mc_tx_info;
|
||||
pkt_txctrl tx_info;
|
||||
pkt_rxinfo rx_info;
|
||||
} u;
|
||||
|
@ -1916,6 +2032,9 @@ typedef struct _mlan_callbacks {
|
|||
t_u32 port, mlan_status status);
|
||||
/** moal_recv_packet */
|
||||
mlan_status (*moal_recv_packet)(t_void *pmoal, pmlan_buffer pmbuf);
|
||||
/** moal_recv_amsdu_packet */
|
||||
mlan_status (*moal_recv_amsdu_packet)(t_void *pmoal,
|
||||
pmlan_buffer pmbuf);
|
||||
/** moal_recv_event */
|
||||
mlan_status (*moal_recv_event)(t_void *pmoal, pmlan_event pmevent);
|
||||
/** moal_ioctl_complete */
|
||||
|
@ -2039,7 +2158,8 @@ typedef struct _mlan_callbacks {
|
|||
t_u32 drop_point);
|
||||
void (*moal_tp_accounting_rx_param)(t_void *pmoal, unsigned int type,
|
||||
unsigned int rsvd1);
|
||||
|
||||
void (*moal_amsdu_tp_accounting)(t_void *pmoal, t_s32 delay,
|
||||
t_s32 copy_delay);
|
||||
} mlan_callbacks, *pmlan_callbacks;
|
||||
|
||||
/** Parameter unchanged, use MLAN default setting */
|
||||
|
@ -2180,6 +2300,8 @@ typedef struct _mlan_device {
|
|||
t_u32 drv_mode;
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
/** extend enhance scan */
|
||||
t_u8 ext_scan;
|
||||
} mlan_device, *pmlan_device;
|
||||
|
||||
/** MLAN API function prototype */
|
||||
|
@ -2231,6 +2353,9 @@ MLAN_API mlan_status mlan_recv_packet_complete(t_void *padapter,
|
|||
pmlan_buffer pmbuf,
|
||||
mlan_status status);
|
||||
|
||||
/** handle amsdu deaggregated packet */
|
||||
void mlan_process_deaggr_pkt(t_void *padapter, pmlan_buffer pmbuf, t_u8 *drop);
|
||||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/** interrupt handler */
|
||||
MLAN_API mlan_status mlan_interrupt(t_u16 msg_id, t_void *padapter);
|
||||
|
@ -2253,4 +2378,11 @@ MLAN_API mlan_status mlan_ioctl(t_void *padapter, pmlan_ioctl_req pioctl_req);
|
|||
/** mlan select wmm queue */
|
||||
MLAN_API t_u8 mlan_select_wmm_queue(t_void *padapter, t_u8 bss_num, t_u8 tid);
|
||||
|
||||
/** mlan mask host interrupt */
|
||||
MLAN_API mlan_status mlan_disable_host_int(t_void *padapter);
|
||||
/** mlan unmask host interrupt */
|
||||
MLAN_API mlan_status mlan_enable_host_int(t_void *padapter);
|
||||
|
||||
#define CSI_SIGNATURE 0xABCD
|
||||
|
||||
#endif /* !_MLAN_DECL_H_ */
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,20 +4,29 @@
|
|||
* definitions used in MLAN and MOAL module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -46,17 +55,10 @@ typedef enum _WLAN_802_11_NETWORK_TYPE {
|
|||
Wlan802_11NetworkTypeMax
|
||||
} WLAN_802_11_NETWORK_TYPE;
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Frame control: Type Mgmt frame */
|
||||
#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x3000
|
||||
/** Frame control: SubType Mgmt frame */
|
||||
#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc)&0xF000) >> 12)
|
||||
#else
|
||||
/** Frame control: Type Mgmt frame */
|
||||
#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x000C
|
||||
/** Frame control: SubType Mgmt frame */
|
||||
#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc)&0x00F0) >> 4)
|
||||
#endif
|
||||
|
||||
#ifdef PRAGMA_PACK
|
||||
#pragma pack(push, 1)
|
||||
|
@ -67,7 +69,8 @@ typedef enum _WLAN_802_11_NETWORK_TYPE {
|
|||
|
||||
typedef enum _IEEEtypes_Ext_ElementId_e {
|
||||
HE_CAPABILITY = 35,
|
||||
HE_OPERATION = 36
|
||||
HE_OPERATION = 36,
|
||||
HE_6G_CAPABILITY = 59
|
||||
} IEEEtypes_Ext_ElementId_e;
|
||||
|
||||
/** IEEE Type definitions */
|
||||
|
@ -178,21 +181,12 @@ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t {
|
|||
|
||||
/**ft capability policy*/
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_FtCapPolicy_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Reserved */
|
||||
t_u8 reserved : 6;
|
||||
/** RIC support */
|
||||
t_u8 ric : 1;
|
||||
/** FT over the DS capable */
|
||||
t_u8 ft_over_ds : 1;
|
||||
#else
|
||||
/** FT over the DS capable */
|
||||
t_u8 ft_over_ds : 1;
|
||||
/** RIC support */
|
||||
t_u8 ric : 1;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 6;
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_FtCapPolicy_t;
|
||||
|
||||
/** Mobility domain IE */
|
||||
|
@ -325,25 +319,6 @@ typedef MLAN_PACK_START struct _TLV_Generic_t {
|
|||
#define CAPINFO_MASK (~(MBIT(15) | MBIT(14) | MBIT(11) | MBIT(9)))
|
||||
|
||||
/** Capability Bit Map*/
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
|
||||
t_u8 rsrvd1 : 2;
|
||||
t_u8 dsss_ofdm : 1;
|
||||
t_u8 radio_measurement : 1;
|
||||
t_u8 rsvrd2 : 1;
|
||||
t_u8 short_slot_time : 1;
|
||||
t_u8 rsrvd3 : 1;
|
||||
t_u8 spectrum_mgmt : 1;
|
||||
t_u8 chan_agility : 1;
|
||||
t_u8 pbcc : 1;
|
||||
t_u8 short_preamble : 1;
|
||||
t_u8 privacy : 1;
|
||||
t_u8 cf_poll_rqst : 1;
|
||||
t_u8 cf_pollable : 1;
|
||||
t_u8 ibss : 1;
|
||||
t_u8 ess : 1;
|
||||
} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
|
||||
/** Capability Bit Map : ESS */
|
||||
t_u8 ess : 1;
|
||||
|
@ -376,7 +351,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
|
|||
/** Capability Bit Map : Reserved */
|
||||
t_u8 rsrvd1 : 2;
|
||||
} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
|
||||
/** IEEEtypes_Ssid_t */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_Ssid_t {
|
||||
|
@ -591,35 +565,16 @@ typedef MLAN_PACK_START struct _IEEEtypes_Wpa_t {
|
|||
|
||||
/** Data structure of WMM QoS information */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_WmmQosInfo_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** QoS UAPSD */
|
||||
t_u8 qos_uapsd : 1;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 3;
|
||||
/** Parameter set count */
|
||||
t_u8 para_set_count : 4;
|
||||
#else
|
||||
/** Parameter set count */
|
||||
t_u8 para_set_count : 4;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 3;
|
||||
/** QoS UAPSD */
|
||||
t_u8 qos_uapsd : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} MLAN_PACK_END IEEEtypes_WmmQosInfo_t, *pIEEEtypes_WmmQosInfo_t;
|
||||
|
||||
/** Data structure of WMM Aci/Aifsn */
|
||||
typedef MLAN_PACK_START 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 */
|
||||
|
@ -628,22 +583,14 @@ typedef MLAN_PACK_START struct _IEEEtypes_WmmAciAifsn_t {
|
|||
t_u8 aci : 2;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} MLAN_PACK_END IEEEtypes_WmmAciAifsn_t, *pIEEEtypes_WmmAciAifsn_t;
|
||||
|
||||
/** Data structure of WMM ECW */
|
||||
typedef MLAN_PACK_START 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 /* BIG_ENDIAN_SUPPORT */
|
||||
} MLAN_PACK_END IEEEtypes_WmmEcw_t, *pIEEEtypes_WmmEcw_t;
|
||||
|
||||
/** Data structure of WMM AC parameters */
|
||||
|
@ -731,22 +678,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e {
|
|||
|
||||
/** Data structure of WMM TSPEC information */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u8 Reserved17_23 : 7; /* ! Reserved */
|
||||
t_u8 Schedule : 1;
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||
// IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /*
|
||||
// !Legacy/Trigg*/
|
||||
t_u8 PowerSaveBehavior : 1;
|
||||
t_u8 Aggregation : 1; /* ! Reserved */
|
||||
t_u8 AccessPolicy2 : 1; /* ! */
|
||||
t_u8 AccessPolicy1 : 1; /* ! */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
||||
t_u8 TID : 4; /* ! Unique identifier */
|
||||
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
||||
t_u8 TrafficType : 1;
|
||||
#else
|
||||
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
||||
t_u8 TrafficType : 1;
|
||||
t_u8 TID : 4; /* ! Unique identifier */
|
||||
|
@ -761,31 +692,19 @@ typedef MLAN_PACK_START struct {
|
|||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||
t_u8 Schedule : 1;
|
||||
t_u8 Reserved17_23 : 7; /* ! Reserved */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_t;
|
||||
|
||||
/** Data structure of WMM TSPEC Nominal Size */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
|
||||
nominal */
|
||||
t_u16 Size : 15; /* ! Nominal size in octets */
|
||||
#else
|
||||
t_u16 Size : 15; /* ! Nominal size in octets */
|
||||
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
|
||||
nominal */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t;
|
||||
|
||||
/** Data structure of WMM TSPEC SBWA */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u16 Whole : 3; /* ! Whole portion */
|
||||
t_u16 Fractional : 13; /* ! Fractional portion */
|
||||
#else
|
||||
t_u16 Fractional : 13; /* ! Fractional portion */
|
||||
t_u16 Whole : 3; /* ! Whole portion */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_SBWA;
|
||||
|
||||
/** Data structure of WMM TSPEC Body */
|
||||
|
@ -1126,26 +1045,6 @@ typedef MLAN_PACK_START struct _VHT_MCS_set {
|
|||
/** VHT Capabilities info field, reference 802.11ac D1.4 p89 */
|
||||
typedef MLAN_PACK_START struct _VHT_capa {
|
||||
#if 0
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u8 mpdu_max_len:2;
|
||||
t_u8 chan_width:2;
|
||||
t_u8 rx_LDPC:1;
|
||||
t_u8 sgi_80:1;
|
||||
t_u8 sgi_160:1;
|
||||
t_u8 tx_STBC:1;
|
||||
t_u8 rx_STBC:3;
|
||||
t_u8 SU_beamformer_capa:1;
|
||||
t_u8 SU_beamformee_capa:1;
|
||||
t_u8 beamformer_ante_num:3;
|
||||
t_u8 sounding_dim_num:3;
|
||||
t_u8 MU_beamformer_capa:1;
|
||||
t_u8 MU_beamformee_capa:1;
|
||||
t_u8 VHT_TXOP_ps:1;
|
||||
t_u8 HTC_VHT_capa:1;
|
||||
t_u8 max_ampdu_len:3;
|
||||
t_u8 link_apapt_capa:2;
|
||||
t_u8 reserved_1:4;
|
||||
#else
|
||||
t_u8 reserved_1:4;
|
||||
t_u8 link_apapt_capa:2;
|
||||
t_u8 max_ampdu_len:3;
|
||||
|
@ -1164,7 +1063,6 @@ typedef MLAN_PACK_START struct _VHT_capa {
|
|||
t_u8 rx_LDPC:1;
|
||||
t_u8 chan_width:2;
|
||||
t_u8 mpdu_max_len:2;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
#endif
|
||||
t_u32 vht_cap_info;
|
||||
VHT_MCS_set_t mcs_sets;
|
||||
|
@ -1272,6 +1170,32 @@ typedef MLAN_PACK_START struct _IEEEtypes_Extension_t {
|
|||
t_u8 data[];
|
||||
} MLAN_PACK_END IEEEtypes_Extension_t, *pIEEEtypes_Extension_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsMap_t {
|
||||
/** Max HE-MAC for 1 SS */
|
||||
t_u8 max_mcs_1ss : 2;
|
||||
/** Max HE-MAC for 2 SS */
|
||||
t_u8 max_mcs_2ss : 2;
|
||||
/** Max HE-MAC for 3 SS */
|
||||
t_u8 max_mcs_3ss : 2;
|
||||
/** Max HE-MAC for 4 SS */
|
||||
t_u8 max_mcs_4ss : 2;
|
||||
/** Max HE-MAC for 5 SS */
|
||||
t_u8 max_mcs_5ss : 2;
|
||||
/** Max HE-MAC for 6 SS */
|
||||
t_u8 max_mcs_6ss : 2;
|
||||
/** Max HE-MAC for 7 SS */
|
||||
t_u8 max_mcs_7ss : 2;
|
||||
/** Max HE-MAC for 8 SS */
|
||||
t_u8 max_mcs_8ss : 2;
|
||||
} MLAN_PACK_END IEEEtypes_HeMcsMap_t, *pIEEEtypes_HeMcsMap_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsNss_t {
|
||||
/** HE Rx MCS and NSS Set */
|
||||
t_u16 rx_mcs;
|
||||
/** HE Tx MCS and NSS Set*/
|
||||
t_u16 tx_mcs;
|
||||
} MLAN_PACK_END IEEEtypes_HeMcsNss_t, *pIEEEtypes_HeMcsNss_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
|
@ -1281,11 +1205,55 @@ typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
|||
t_u8 he_mac_cap[6];
|
||||
/** he phy capability info */
|
||||
t_u8 he_phy_cap[11];
|
||||
/** he txrx mcs support , size would be 4 or 8 or 12 */
|
||||
/** he txrx mcs support (for 80 MHz) */
|
||||
t_u8 he_txrx_mcs_support[4];
|
||||
/** PPE Thresholds (optional) */
|
||||
/** Optional Field, including he_txrx_mcs_support for 160 and 80+80 MHz,
|
||||
* and PPE Thresholds */
|
||||
t_u8 option[28];
|
||||
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeOpParam_t {
|
||||
/** Default PE Duration */
|
||||
t_u16 default_pe_dur : 3; /* bit 0-2 */
|
||||
/** TWT Required */
|
||||
t_u16 twt_req : 1; /* bit 3 */
|
||||
/** TXOP Duration RTS Threshold */
|
||||
t_u16 txop_dur_rts_threshold : 10; /* bit 4-13 */
|
||||
/** VHT Operation Info Present */
|
||||
t_u16 vht_op_info_present : 1; /* bit 14 */
|
||||
/** Co-Hosted BSS */
|
||||
t_u16 co_located_bss : 1; /* bit 15 */
|
||||
/** ER SU Disable */
|
||||
t_u8 er_su_disable : 1; /* bit 16 */
|
||||
/** Reserved, including 6G Operation Info Pressent (bit17) */
|
||||
t_u8 reserved : 7; /* bit 17-23 */
|
||||
} MLAN_PACK_END IEEEtypes_HeOpParam_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeBssColorInfo_t {
|
||||
/** BSS Color */
|
||||
t_u8 bss_color : 6; /* bit 0-5 */
|
||||
/** Partial BSS Color */
|
||||
t_u8 partial_bss_color : 1; /* bit 6 */
|
||||
/** BSS Color Disabled */
|
||||
t_u8 bss_color_disabled : 1; /* bit 7 */
|
||||
} MLAN_PACK_END IEEEtypes_HeBssColorInfo_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeOp_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** HE Operation Parameters */
|
||||
IEEEtypes_HeOpParam_t he_op_param;
|
||||
/** BSS Color Info */
|
||||
IEEEtypes_HeBssColorInfo_t bss_color_info;
|
||||
/** Basic HE-MCS and NSS Set */
|
||||
IEEEtypes_HeMcsMap_t basic_he_mcs_nss;
|
||||
/** Optional Field, including VHT Operation Info Max Co-Hosted BSSID
|
||||
* Indicator, and 6Ghz Operation Info */
|
||||
t_u8 option[9];
|
||||
} MLAN_PACK_END IEEEtypes_HeOp_t;
|
||||
|
||||
/** default channel switch count */
|
||||
#define DEF_CHAN_SWITCH_COUNT 5
|
||||
|
||||
|
@ -1321,8 +1289,7 @@ typedef MLAN_PACK_START struct {
|
|||
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
|
||||
|
||||
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
|
||||
#define WLAN_11H_MAX_SUBBANDS 5
|
||||
|
||||
#define WLAN_11H_MAX_SUBBANDS 6
|
||||
/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */
|
||||
#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25
|
||||
|
||||
|
@ -1403,6 +1370,8 @@ typedef MLAN_PACK_START struct {
|
|||
t_u8 local_max_tp_20mhz; /**< Local Maximum Transmit Power for 20 MHZ>*/
|
||||
t_u8 local_max_tp_40mhz; /**< Local Maximum Transmit Power for 40 MHZ>*/
|
||||
t_u8 local_max_tp_80mhz; /**< Local Maximum Transmit Power for 80 MHZ>*/
|
||||
t_u8 local_max_tp_160mhz_80_80mhz; /**< Local Maximum Transmit Power for
|
||||
160/80+80 MHZ>*/
|
||||
} MLAN_PACK_END IEEEtypes_VhtTpcEnvelope_t;
|
||||
|
||||
/* IEEE Quiet Period Element (7.3.2.23) */
|
||||
|
@ -1428,20 +1397,6 @@ typedef MLAN_PACK_START struct {
|
|||
*** @brief Map octet of the basic measurement report (7.3.2.22.1)
|
||||
**/
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/**< Reserved */
|
||||
t_u8 rsvd5_7 : 3;
|
||||
/**< Channel is unmeasured */
|
||||
t_u8 unmeasured : 1;
|
||||
/**< Radar detected on channel */
|
||||
t_u8 radar : 1;
|
||||
/**< Unidentified signal found on channel */
|
||||
t_u8 unidentified_sig : 1;
|
||||
/**< OFDM preamble detected on channel */
|
||||
t_u8 ofdm_preamble : 1;
|
||||
/**< At least one valid MPDU received on channel */
|
||||
t_u8 bss : 1;
|
||||
#else
|
||||
/**< At least one valid MPDU received on channel */
|
||||
t_u8 bss : 1;
|
||||
/**< OFDM preamble detected on channel */
|
||||
|
@ -1454,7 +1409,6 @@ typedef MLAN_PACK_START struct {
|
|||
t_u8 unmeasured : 1;
|
||||
/**< Reserved */
|
||||
t_u8 rsvd5_7 : 3;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
|
||||
} MLAN_PACK_END MeasRptBasicMap_t;
|
||||
|
||||
|
@ -1974,6 +1928,10 @@ typedef struct _BSSDescriptor_t {
|
|||
IEEEtypes_Generic_t *prsn_ie;
|
||||
/** RSN IE offset in the beacon buffer */
|
||||
t_u16 rsn_offset;
|
||||
/** RSNX IE */
|
||||
IEEEtypes_Generic_t *prsnx_ie;
|
||||
/** RSNX IE offset in the beacon buffer */
|
||||
t_u16 rsnx_offset;
|
||||
#ifdef STA_SUPPORT
|
||||
/** WAPI IE */
|
||||
IEEEtypes_Generic_t *pwapi_ie;
|
||||
|
|
|
@ -6,18 +6,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -240,9 +249,10 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
|
|||
t_u32 buf_size;
|
||||
BSSDescriptor_t *ptemp_scan_table = MNULL;
|
||||
t_u8 chan_2g[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
|
||||
t_u8 chan_5g[] = {12, 16, 34, 38, 42, 46, 36, 40, 44, 48, 52,
|
||||
56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128,
|
||||
132, 136, 140, 144, 149, 153, 157, 161, 165};
|
||||
t_u8 chan_5g[] = {12, 16, 34, 38, 42, 46, 36, 40, 44,
|
||||
48, 52, 56, 60, 64, 100, 104, 108, 112,
|
||||
116, 120, 124, 128, 132, 136, 140, 144, 149,
|
||||
153, 157, 161, 165, 169, 173, 177};
|
||||
#endif
|
||||
#ifdef SDIO
|
||||
t_u32 max_mp_regs = 0;
|
||||
|
@ -474,6 +484,9 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
wlan_11h_priv_init(priv);
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
priv->is_11n_enabled = MFALSE;
|
||||
priv->is_11ac_enabled = MFALSE;
|
||||
priv->is_11ax_enabled = MFALSE;
|
||||
priv->uap_bss_started = MFALSE;
|
||||
priv->uap_host_based = MFALSE;
|
||||
memset(pmadapter, &priv->uap_state_chan_cb, 0,
|
||||
|
@ -516,10 +529,13 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
#if defined(STA_SUPPORT)
|
||||
priv->pmfcfg.mfpc = 0;
|
||||
priv->pmfcfg.mfpr = 0;
|
||||
memset(pmadapter, &priv->pmfcfg, 0, sizeof(priv->pmfcfg));
|
||||
#endif
|
||||
priv->sec_info.wapi_enabled = MFALSE;
|
||||
priv->wapi_ie_len = 0;
|
||||
priv->sec_info.wapi_key_on = MFALSE;
|
||||
priv->osen_ie_len = 0;
|
||||
memset(pmadapter, &priv->osen_ie, 0, sizeof(priv->osen_ie));
|
||||
|
||||
memset(pmadapter, &priv->wps, 0, sizeof(priv->wps));
|
||||
memset(pmadapter, &priv->gen_ie_buf, 0, sizeof(priv->gen_ie_buf));
|
||||
|
@ -527,6 +543,7 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
#endif /* STA_SUPPORT */
|
||||
priv->wmm_required = MTRUE;
|
||||
priv->wmm_enabled = MFALSE;
|
||||
priv->disconnect_reason_code = 0;
|
||||
priv->wmm_qosinfo = 0;
|
||||
priv->saved_wmm_qosinfo = 0;
|
||||
priv->host_tdls_cs_support = MTRUE;
|
||||
|
@ -534,8 +551,14 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
priv->tdls_cs_channel = 0;
|
||||
priv->supp_regulatory_class_len = 0;
|
||||
priv->chan_supp_len = 0;
|
||||
memset(pmadapter, &priv->chan_supp, 0, sizeof(priv->chan_supp));
|
||||
memset(pmadapter, &priv->supp_regulatory_class, 0,
|
||||
sizeof(priv->supp_regulatory_class));
|
||||
priv->tdls_idle_time = TDLS_IDLE_TIMEOUT;
|
||||
priv->txaggrctrl = MTRUE;
|
||||
for (i = 0; i < MAX_MGMT_IE_INDEX; i++)
|
||||
memset(pmadapter, &priv->mgmt_ie[i], 0, sizeof(custom_ie));
|
||||
priv->mgmt_frame_passthru_mask = 0;
|
||||
#ifdef STA_SUPPORT
|
||||
priv->pcurr_bcn_buf = MNULL;
|
||||
priv->curr_bcn_size = 0;
|
||||
|
@ -549,6 +572,10 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
sizeof(priv->ext_cap), sizeof(priv->def_ext_cap));
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
priv->amsdu_rx_cnt = 0;
|
||||
priv->msdu_in_rx_amsdu_cnt = 0;
|
||||
priv->amsdu_tx_cnt = 0;
|
||||
priv->msdu_in_tx_amsdu_cnt = 0;
|
||||
for (i = 0; i < MAX_NUM_TID; i++)
|
||||
priv->addba_reject[i] = ADDBA_RSP_STATUS_ACCEPT;
|
||||
priv->addba_reject[6] = ADDBA_RSP_STATUS_REJECT;
|
||||
|
@ -578,11 +605,15 @@ mlan_status wlan_init_priv(pmlan_private priv)
|
|||
}
|
||||
#endif
|
||||
priv->user_rxwinsize = priv->add_ba_param.rx_win_size;
|
||||
|
||||
memset(pmadapter, priv->rx_seq, 0, sizeof(priv->rx_seq));
|
||||
priv->port_ctrl_mode = MTRUE;
|
||||
priv->port_open = MFALSE;
|
||||
priv->prior_port_status = MFALSE;
|
||||
priv->tx_pause = MFALSE;
|
||||
priv->hotspot_cfg = 0;
|
||||
|
||||
priv->intf_hr_len = pmadapter->ops.intf_header_len;
|
||||
memset(pmadapter, &priv->chan_rep_req, 0, sizeof(priv->chan_rep_req));
|
||||
#ifdef USB
|
||||
if (IS_USB(pmadapter->card_type)) {
|
||||
pusb_tx_aggr =
|
||||
|
@ -634,7 +665,17 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
#ifdef STA_SUPPORT
|
||||
pmadapter->pwarm_reset_ioctl_req = MNULL;
|
||||
#endif
|
||||
pmadapter->pscan_ioctl_req = MNULL;
|
||||
pmadapter->cmd_sent = MFALSE;
|
||||
pmadapter->mlan_processing = MFALSE;
|
||||
pmadapter->main_process_cnt = 0;
|
||||
pmadapter->mlan_rx_processing = MFALSE;
|
||||
pmadapter->more_rx_task_flag = MFALSE;
|
||||
pmadapter->more_task_flag = MFALSE;
|
||||
pmadapter->delay_task_flag = MFALSE;
|
||||
pmadapter->data_sent = MFALSE;
|
||||
pmadapter->data_sent_cnt = 0;
|
||||
|
||||
#ifdef SDIO
|
||||
if (IS_SD(pmadapter->card_type)) {
|
||||
pmadapter->pcard_sd->int_mode = pmadapter->init_para.int_mode;
|
||||
|
@ -687,13 +728,22 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
pmadapter->cmd_resp_received = MFALSE;
|
||||
pmadapter->event_received = MFALSE;
|
||||
pmadapter->data_received = MFALSE;
|
||||
|
||||
pmadapter->seq_num = 0;
|
||||
pmadapter->num_cmd_timeout = 0;
|
||||
pmadapter->last_init_cmd = 0;
|
||||
pmadapter->pending_ioctl = MFALSE;
|
||||
pmadapter->scan_processing = MFALSE;
|
||||
pmadapter->fw_roaming = MFALSE;
|
||||
pmadapter->userset_passphrase = MFALSE;
|
||||
pmadapter->cmd_timer_is_set = MFALSE;
|
||||
pmadapter->dnld_cmd_in_secs = 0;
|
||||
|
||||
/* PnP and power profile */
|
||||
pmadapter->surprise_removed = MFALSE;
|
||||
/* FW hang report */
|
||||
pmadapter->fw_hang_report = MFALSE;
|
||||
pmadapter->ecsa_enable = MFALSE;
|
||||
pmadapter->getlog_enable = MFALSE;
|
||||
|
||||
if (!pmadapter->init_para.ps_mode) {
|
||||
pmadapter->ps_mode = DEFAULT_PS_MODE;
|
||||
|
@ -727,7 +777,14 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
memset(pmadapter, pmadapter->pscan_table, 0,
|
||||
(sizeof(BSSDescriptor_t) * MRVDRV_MAX_BSSID_LIST));
|
||||
pmadapter->active_scan_triggered = MFALSE;
|
||||
pmadapter->ext_scan = EXT_SCAN_TYPE_ENH;
|
||||
if (!pmadapter->init_para.ext_scan)
|
||||
pmadapter->ext_scan = EXT_SCAN_TYPE_ENH;
|
||||
else if (pmadapter->init_para.ext_scan == EXT_SCAN_TYPE_ENH)
|
||||
pmadapter->ext_scan = EXT_SCAN_TYPE_ENH;
|
||||
else
|
||||
pmadapter->ext_scan = MTRUE;
|
||||
pmadapter->ext_scan_enh = MFALSE;
|
||||
pmadapter->ext_scan_timeout = MFALSE;
|
||||
pmadapter->scan_probes = DEFAULT_PROBES;
|
||||
|
||||
memset(pmadapter, pmadapter->bcn_buf, 0, pmadapter->bcn_buf_size);
|
||||
|
@ -760,6 +817,7 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
*/
|
||||
|
||||
pmadapter->pm_wakeup_card_req = MFALSE;
|
||||
pmadapter->pm_wakeup_timeout = 0;
|
||||
|
||||
pmadapter->pm_wakeup_fw_try = MFALSE;
|
||||
|
||||
|
@ -871,6 +929,8 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
memset(pmadapter, &pmadapter->saved_sleep_period, 0,
|
||||
sizeof(pmadapter->saved_sleep_period));
|
||||
pmadapter->tx_lock_flag = MFALSE;
|
||||
pmadapter->rx_lock_flag = MFALSE;
|
||||
pmadapter->main_lock_flag = MFALSE;
|
||||
pmadapter->null_pkt_interval = 0;
|
||||
pmadapter->fw_bands = 0;
|
||||
pmadapter->config_bands = 0;
|
||||
|
@ -889,6 +949,11 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
MRVDRV_DEFAULT_COUNTRY_CODE, COUNTRY_CODE_LEN,
|
||||
COUNTRY_CODE_LEN);
|
||||
pmadapter->bcn_miss_time_out = DEFAULT_BCN_MISS_TIMEOUT;
|
||||
#ifdef STA_SUPPORT
|
||||
memset(pmadapter, &pmadapter->arp_filter, 0,
|
||||
sizeof(pmadapter->arp_filter));
|
||||
pmadapter->arp_filter_size = 0;
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
#ifdef PCIE
|
||||
if (IS_PCIE(pmadapter->card_type)) {
|
||||
|
@ -905,7 +970,7 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|||
EVT_RW_PTR_ROLLOVER_IND;
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
pmadapter->pcard_pcie->rxbd_wrptr =
|
||||
pmadapter->pcard_pcie->txrx_bd_size;
|
||||
|
@ -1102,7 +1167,10 @@ mlan_status wlan_init_lock_list(pmlan_adapter pmadapter)
|
|||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->scan_pending_q, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
|
||||
/* Initialize ext_cmd_pending_q */
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->ext_cmd_pending_q, MTRUE,
|
||||
pmadapter->callbacks.moal_init_lock);
|
||||
/* Initialize ioctl_pending_q */
|
||||
util_init_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->ioctl_pending_q, MTRUE,
|
||||
|
@ -1194,6 +1262,10 @@ t_void wlan_free_lock_list(pmlan_adapter pmadapter)
|
|||
&pmadapter->scan_pending_q,
|
||||
pmadapter->callbacks.moal_free_lock);
|
||||
|
||||
util_free_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->ext_cmd_pending_q,
|
||||
pmadapter->callbacks.moal_free_lock);
|
||||
|
||||
util_free_list_head((t_void *)pmadapter->pmoal_handle,
|
||||
&pmadapter->ioctl_pending_q,
|
||||
pmadapter->callbacks.moal_free_lock);
|
||||
|
@ -1844,7 +1916,9 @@ static mlan_status wlan_init_interface(pmlan_adapter pmadapter)
|
|||
pmadapter->priv[i]->bss_role =
|
||||
MLAN_BSS_ROLE_STA;
|
||||
else if (pmadapter->bss_attr[i].bss_type ==
|
||||
MLAN_BSS_TYPE_UAP)
|
||||
MLAN_BSS_TYPE_UAP ||
|
||||
pmadapter->bss_attr[i].bss_type ==
|
||||
MLAN_BSS_TYPE_DFS)
|
||||
pmadapter->priv[i]->bss_role =
|
||||
MLAN_BSS_ROLE_UAP;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* structures.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -104,22 +113,9 @@ typedef MLAN_PACK_START struct _FWSyncPkt {
|
|||
t_u32 fw_ready;
|
||||
} MLAN_PACK_END FWSyncPkt;
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Convert sequence number and command fields
|
||||
* of fwheader to correct endian format
|
||||
*/
|
||||
#define endian_convert_syncfwheader(x) \
|
||||
{ \
|
||||
(x)->cmd = wlan_le32_to_cpu((x)->cmd); \
|
||||
(x)->seq_num = wlan_le32_to_cpu((x)->seq_num); \
|
||||
(x)->status = wlan_le32_to_cpu((x)->status); \
|
||||
(x)->offset = wlan_le32_to_cpu((x)->offset); \
|
||||
}
|
||||
#else
|
||||
/** Convert sequence number and command fields
|
||||
* of fwheader to correct endian format
|
||||
*/
|
||||
#define endian_convert_syncfwheader(x)
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
|
||||
#endif /* _MLAN_INIT_H_ */
|
||||
|
|
|
@ -3,20 +3,29 @@
|
|||
* @brief This file declares the IOCTL data structures and APIs.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -86,6 +95,9 @@ enum _mlan_ioctl_req_id {
|
|||
#endif
|
||||
|
||||
MLAN_OID_BSS_FIND_BSSID = 0x0002001D,
|
||||
#ifdef UAP_SUPPORT
|
||||
MLAN_OID_ACTION_CHAN_SWITCH = 0x0002001E,
|
||||
#endif
|
||||
|
||||
/* Radio Configuration Group */
|
||||
MLAN_IOCTL_RADIO_CFG = 0x00030000,
|
||||
|
@ -107,6 +119,8 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_SNMP_MIB_DTIM_PERIOD = 0x00040006,
|
||||
MLAN_OID_SNMP_MIB_SIGNALEXT_ENABLE = 0x00040007,
|
||||
MLAN_OID_SNMP_MIB_CTRL_DEAUTH = 0x00040008,
|
||||
MLAN_OID_SNMP_MIB_DOT11H_FAKERADAR = 0x00040009,
|
||||
MLAN_OID_SNMP_MIB_CHAN_TRACK = 0x0004000A,
|
||||
|
||||
/* Status Information Group */
|
||||
MLAN_IOCTL_GET_INFO = 0x00050000,
|
||||
|
@ -229,6 +243,7 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_11H_CHAN_REPORT_REQUEST = 0x00110004,
|
||||
MLAN_OID_11H_CHAN_SWITCH_COUNT = 0x00110005,
|
||||
MLAN_OID_11H_CHAN_NOP_INFO = 0x00110006,
|
||||
MLAN_OID_11H_CHAN_DFS_STATE = 0x00110007,
|
||||
MLAN_OID_11H_DFS_W53_CFG = 0x00110008,
|
||||
|
||||
/* 802.11n Configuration Group RANDYTODO for value assign */
|
||||
|
@ -259,6 +274,7 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D,
|
||||
MLAN_OID_MISC_CUSTOM_IE = 0x0020000F,
|
||||
MLAN_OID_MISC_TDLS_CONFIG = 0x00200010,
|
||||
MLAN_OID_MISC_NET_MONITOR = 0x00200011,
|
||||
MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012,
|
||||
MLAN_OID_MISC_IP_ADDR = 0x00200013,
|
||||
MLAN_OID_MISC_MAC_CONTROL = 0x00200014,
|
||||
|
@ -298,10 +314,13 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_COALESCE_CFG = 0x0020002E,
|
||||
MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F,
|
||||
MLAN_OID_MISC_GET_SENSOR_TEMP = 0x00200030,
|
||||
MLAN_OID_MISC_IPV6_RA_OFFLOAD = 0x00200036,
|
||||
MLAN_OID_MISC_GTK_REKEY_OFFLOAD = 0x00200037,
|
||||
MLAN_OID_MISC_OPER_CLASS = 0x00200038,
|
||||
MLAN_OID_MISC_PMIC_CFG = 0x00200039,
|
||||
MLAN_OID_MISC_IND_RST_CFG = 0x00200040,
|
||||
MLAN_OID_MISC_ROAM_OFFLOAD = 0x00200042,
|
||||
MLAN_OID_MISC_ROAM_OFFLOAD_APLIST = 0x00200043,
|
||||
MLAN_OID_MISC_GET_TSF = 0x00200045,
|
||||
MLAN_OID_MISC_GET_CHAN_REGION_CFG = 0x00200046,
|
||||
MLAN_OID_MISC_CLOUD_KEEP_ALIVE = 0x00200048,
|
||||
|
@ -320,6 +339,7 @@ enum _mlan_ioctl_req_id {
|
|||
#if defined(PCIE)
|
||||
MLAN_OID_MISC_SSU = 0x00200062,
|
||||
#endif
|
||||
MLAN_OID_MISC_CSI = 0x00200064,
|
||||
MLAN_OID_MISC_DMCS_CONFIG = 0x00200065,
|
||||
MLAN_OID_MISC_RX_ABORT_CFG = 0x00200066,
|
||||
MLAN_OID_MISC_RX_ABORT_CFG_EXT = 0x00200067,
|
||||
|
@ -340,6 +360,15 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
||||
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
||||
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
||||
#ifdef UAP_SUPPORT
|
||||
MLAN_OID_MISC_WACP_MODE = 0x00200081,
|
||||
#endif
|
||||
MLAN_OID_MISC_GPIO_TSF_LATCH = 0x00200082,
|
||||
MLAN_OID_MISC_GET_TSF_INFO = 0x00200083,
|
||||
MLAN_OID_MISC_ASSOC_REQ = 0x00200084,
|
||||
MLAN_OID_MISC_IPS_CFG = 0x00200085,
|
||||
MLAN_OID_MISC_MC_AGGR_CFG = 0x00200086,
|
||||
MLAN_OID_MISC_CH_LOAD = 0x00200087,
|
||||
};
|
||||
|
||||
/** Sub command size */
|
||||
|
@ -589,6 +618,8 @@ enum _mlan_bss_mode {
|
|||
|
||||
/** Maximum key length */
|
||||
#define MLAN_MAX_KEY_LENGTH 32
|
||||
/** Maximum PMK R0 NAME key length */
|
||||
#define MLAN_MAX_PMKR0_NAME_LENGTH 16
|
||||
|
||||
/** Maximum atim window in milliseconds */
|
||||
#define MLAN_MAX_ATIM_WINDOW 50
|
||||
|
@ -621,7 +652,7 @@ typedef struct _mlan_multicast_list {
|
|||
} mlan_multicast_list, *pmlan_multicast_list;
|
||||
|
||||
/** Max channel */
|
||||
#define MLAN_MAX_CHANNEL 165
|
||||
#define MLAN_MAX_CHANNEL 177
|
||||
/** Maximum number of channels in table */
|
||||
#define MLAN_MAX_CHANNEL_NUM 128
|
||||
|
||||
|
@ -683,6 +714,26 @@ typedef struct _mlan_ds_misc_assoc_rsp {
|
|||
t_u32 assoc_resp_len;
|
||||
} mlan_ds_misc_assoc_rsp, *pmlan_ds_misc_assoc_rsp;
|
||||
|
||||
/** Type definition of mlan_ds_misc_assoc_req for MLAN_OID_MISC_ASSOC_REQ */
|
||||
typedef struct _mlan_ds_misc_assoc_req {
|
||||
/** Associate req buffer */
|
||||
t_u8 assoc_req_buf[ASSOC_RSP_BUF_SIZE];
|
||||
/** Response buffer length */
|
||||
t_u32 assoc_req_len;
|
||||
} mlan_ds_misc_assoc_req, *pmlan_ds_misc_assoc_req;
|
||||
|
||||
/** mlan_ds_assoc_info */
|
||||
typedef struct _mlan_ds_assoc_info {
|
||||
/** Associate req buffer */
|
||||
t_u8 assoc_resp_buf[ASSOC_RSP_BUF_SIZE];
|
||||
/** Response buffer length */
|
||||
t_u32 assoc_resp_len;
|
||||
/** Associate req buffer */
|
||||
t_u8 assoc_req_buf[ASSOC_RSP_BUF_SIZE];
|
||||
/** Response buffer length */
|
||||
t_u32 assoc_req_len;
|
||||
} mlan_ds_assoc_info, *pmlan_ds_assoc_info;
|
||||
|
||||
/** mlan_ssid_bssid data structure for
|
||||
* MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS
|
||||
*/
|
||||
|
@ -715,31 +766,14 @@ typedef struct _mlan_ssid_bssid {
|
|||
|
||||
/** Data structure of WMM ECW */
|
||||
typedef struct _wmm_ecw_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 /* BIG_ENDIAN_SUPPORT */
|
||||
} wmm_ecw_t, *pwmm_ecw_t;
|
||||
|
||||
/** Data structure of WMM Aci/Aifsn */
|
||||
typedef struct _wmm_aci_aifsn_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 */
|
||||
|
@ -748,7 +782,6 @@ typedef struct _wmm_aci_aifsn_t {
|
|||
t_u8 aci : 2;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} wmm_aci_aifsn_t, *pwmm_aci_aifsn_t;
|
||||
|
||||
/** Data structure of WMM AC parameters */
|
||||
|
@ -955,21 +988,12 @@ typedef struct _wep_param {
|
|||
|
||||
/** Data structure of WMM QoS information */
|
||||
typedef struct _wmm_qos_info_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** QoS UAPSD */
|
||||
t_u8 qos_uapsd : 1;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 3;
|
||||
/** Parameter set count */
|
||||
t_u8 para_set_count : 4;
|
||||
#else
|
||||
/** Parameter set count */
|
||||
t_u8 para_set_count : 4;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 3;
|
||||
/** QoS UAPSD */
|
||||
t_u8 qos_uapsd : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} wmm_qos_info_t, *pwmm_qos_info_t;
|
||||
|
||||
/** Data structure of WMM parameter IE */
|
||||
|
@ -1055,6 +1079,10 @@ typedef struct _mlan_uap_bss_param {
|
|||
t_u8 channel;
|
||||
/** auth mode */
|
||||
t_u16 auth_mode;
|
||||
/** PWE derivation */
|
||||
t_u8 pwe_derivation;
|
||||
/** transition disable */
|
||||
t_u8 transition_disable;
|
||||
/** encryption protocol */
|
||||
t_u16 protocol;
|
||||
/** key managment type */
|
||||
|
@ -1113,6 +1141,22 @@ typedef struct _mlan_uap_scan_channels {
|
|||
scan_chan_list chan_list[MLAN_MAX_CHANNEL];
|
||||
} mlan_uap_scan_channels;
|
||||
|
||||
#define MAX_NUM_PKTS 9
|
||||
#define DEF_NUM_PKTS 3
|
||||
/** mlan_chan_switch_param */
|
||||
typedef struct _mlan_action_chan_switch {
|
||||
/** mode*/
|
||||
t_u8 mode;
|
||||
/** switch mode*/
|
||||
t_u8 chan_switch_mode;
|
||||
/** oper class*/
|
||||
t_u8 new_oper_class;
|
||||
/** new channel */
|
||||
t_u8 new_channel_num;
|
||||
/** chan_switch_count */
|
||||
t_u8 chan_switch_count;
|
||||
} mlan_action_chan_switch;
|
||||
|
||||
/** mlan_uap_oper_ctrl */
|
||||
typedef struct _mlan_uap_oper_ctrl {
|
||||
/** control value
|
||||
|
@ -1226,6 +1270,8 @@ typedef struct _mlan_ds_bss {
|
|||
wmm_parameter_t ap_wmm_para;
|
||||
/** ap scan channels for MLAN_OID_UAP_SCAN_CHANNELS*/
|
||||
mlan_uap_scan_channels ap_scan_channels;
|
||||
/** channel switch for MLAN_OID_UAP_CHAN_SWITCH */
|
||||
mlan_action_chan_switch chanswitch;
|
||||
/** ap channel for MLAN_OID_UAP_CHANNEL*/
|
||||
chan_band_info ap_channel;
|
||||
/** ap operation control for MLAN_OID_UAP_OPER_CTRL*/
|
||||
|
@ -1288,7 +1334,6 @@ enum _mlan_band_def {
|
|||
BAND_AAC = 64,
|
||||
BAND_GAX = 256,
|
||||
BAND_AAX = 512,
|
||||
|
||||
};
|
||||
|
||||
/** Channel bandwidth */
|
||||
|
@ -1435,6 +1480,7 @@ typedef struct _mlan_ds_snmp_mib {
|
|||
t_u8 signalext_enable;
|
||||
/** Control deauth when uap switch channel */
|
||||
t_u8 deauthctrl;
|
||||
t_u8 chan_track;
|
||||
} param;
|
||||
} mlan_ds_snmp_mib, *pmlan_ds_snmp_mib;
|
||||
|
||||
|
@ -1646,6 +1692,14 @@ typedef struct _mlan_ds_get_stats {
|
|||
t_u32 dwMgtErrCnt;
|
||||
/*Control Ownership error count*/
|
||||
t_u32 dwDatErrCnt;
|
||||
/*BIGTK MME good count*/
|
||||
t_u32 bigtk_mmeGoodCnt;
|
||||
/*BIGTK Replay error count*/
|
||||
t_u32 bigtk_replayErrCnt;
|
||||
/*BIGTK MIC error count*/
|
||||
t_u32 bigtk_micErrCnt;
|
||||
/*BIGTK MME not included count*/
|
||||
t_u32 bigtk_mmeNotFoundCnt;
|
||||
} mlan_ds_get_stats, *pmlan_ds_get_stats;
|
||||
|
||||
/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */
|
||||
|
@ -1783,6 +1837,8 @@ typedef struct _mlan_fw_info {
|
|||
t_u32 fw_ver;
|
||||
/** Firmware Hotfix version */
|
||||
t_u8 hotfix_version;
|
||||
/** tx buf size */
|
||||
t_u16 tx_buf_size;
|
||||
/** MAC address */
|
||||
mlan_802_11_mac_addr mac_addr;
|
||||
/** 802.11n device capabilities */
|
||||
|
@ -1825,8 +1881,12 @@ typedef struct _mlan_fw_info {
|
|||
t_u8 antinfo;
|
||||
/** max AP associated sta count supported by fw */
|
||||
t_u8 max_ap_assoc_sta;
|
||||
/** FW support roaming offload */
|
||||
t_u8 fw_roaming_support;
|
||||
/** Bandwidth not support 80Mhz */
|
||||
t_u8 prohibit_80mhz;
|
||||
/** FW support beacon protection */
|
||||
t_u8 fw_beacon_prot;
|
||||
} mlan_fw_info, *pmlan_fw_info;
|
||||
|
||||
/** Version string buffer length */
|
||||
|
@ -1840,92 +1900,6 @@ typedef struct _mlan_ver_ext {
|
|||
char version_str[MLAN_MAX_VER_STR_LEN];
|
||||
} mlan_ver_ext, *pmlan_ver_ext;
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Extended Capabilities Data */
|
||||
typedef struct MLAN_PACK_START _ExtCap_t {
|
||||
/** Extended Capabilities value */
|
||||
t_u8 rsvdBit79 : 1; /* bit 79 */
|
||||
t_u8 TWTResp : 1; /* bit 78 */
|
||||
t_u8 TWTReq : 1; /* bit 77 */
|
||||
t_u8 rsvdBit76 : 1; /* bit 76 */
|
||||
t_u8 rsvdBit75 : 1; /* bit 75 */
|
||||
t_u8 rsvdBit74 : 1; /* bit 74 */
|
||||
t_u8 rsvdBit73 : 1; /* bit 73 */
|
||||
t_u8 FILS : 1; /* bit 72 */
|
||||
t_u8 FTMI : 1; /* bit 71 */
|
||||
t_u8 FTMR : 1; /* bit 70 */
|
||||
t_u8 CAQ : 1; /* bit 69 */
|
||||
t_u8 rsvdBit68 : 1; /* bit 68 */
|
||||
t_u8 NCC : 1; /* bit 67 */
|
||||
t_u8 rsvdBit66 : 1; /* bit 66 */
|
||||
t_u8 chanSchedMgnt : 1; /* bit 65 */
|
||||
t_u8 MaxAMSDU1 : 1; /* bit 64 */
|
||||
t_u8 MaxAMSDU0 : 1; /* bit 63 */
|
||||
t_u8 OperModeNtf : 1; /* bit 62 */
|
||||
t_u8 TDLSWildBandwidth : 1; /* bit 61 */
|
||||
t_u8 rsvdBit60 : 1; /* bit 60 */
|
||||
t_u8 rsvdBit59 : 1; /* bit 59 */
|
||||
t_u8 rsvdBit58 : 1; /* bit 58 */
|
||||
t_u8 rsvdBit57 : 1; /* bit 57 */
|
||||
t_u8 rsvdBit56 : 1; /* bit 56 */
|
||||
t_u8 rsvdBit55 : 1; /* bit 55 */
|
||||
t_u8 rsvdBit54 : 1; /* bit 54 */
|
||||
t_u8 rsvdBit53 : 1; /* bit 53 */
|
||||
t_u8 rsvdBit52 : 1; /* bit 52 */
|
||||
t_u8 rsvdBit51 : 1; /* bit 51 */
|
||||
t_u8 rsvdBit50 : 1; /* bit 50 */
|
||||
t_u8 rsvdBit49 : 1; /* bit 49 */
|
||||
t_u8 rsvdBit48 : 1; /* bit 48 */
|
||||
t_u8 rsvdBit47 : 1; /* bit 47 */
|
||||
t_u8 rsvdBit46 : 1; /* bit 46 */
|
||||
t_u8 rsvdBit45 : 1; /* bit 45 */
|
||||
t_u8 rsvdBit44 : 1; /* bit 44 */
|
||||
t_u8 rsvdBit43 : 1; /* bit 43 */
|
||||
t_u8 rsvdBit42 : 1; /* bit 42 */
|
||||
t_u8 rsvdBit41 : 1; /* bit 41 */
|
||||
t_u8 rsvdBit40 : 1; /* bit 40 */
|
||||
t_u8 TDLSChlSwitchProhib : 1; /* bit 39 */
|
||||
t_u8 TDLSProhibited : 1; /* bit 38 */
|
||||
t_u8 TDLSSupport : 1; /* bit 37 */
|
||||
t_u8 MSGCF_Capa : 1; /* bit 36 */
|
||||
t_u8 Reserved35 : 1; /* bit 35 */
|
||||
t_u8 SSPN_Interface : 1; /* bit 34 */
|
||||
t_u8 EBR : 1; /* bit 33 */
|
||||
t_u8 Qos_Map : 1; /* bit 32 */
|
||||
t_u8 Interworking : 1; /* bit 31 */
|
||||
t_u8 TDLSChannelSwitching : 1; /* bit 30 */
|
||||
t_u8 TDLSPeerPSMSupport : 1; /* bit 29 */
|
||||
t_u8 TDLSPeerUAPSDSupport : 1; /* bit 28 */
|
||||
t_u8 UTC : 1; /* bit 27 */
|
||||
t_u8 DMS : 1; /* bit 26 */
|
||||
t_u8 SSID_List : 1; /* bit 25 */
|
||||
t_u8 ChannelUsage : 1; /* bit 24 */
|
||||
t_u8 TimingMeasurement : 1; /* bit 23 */
|
||||
t_u8 MultipleBSSID : 1; /* bit 22 */
|
||||
t_u8 AC_StationCount : 1; /* bit 21 */
|
||||
t_u8 QoSTrafficCap : 1; /* bit 20 */
|
||||
t_u8 BSS_Transition : 1; /* bit 19 */
|
||||
t_u8 TIM_Broadcast : 1; /* bit 18 */
|
||||
t_u8 WNM_Sleep : 1; /* bit 17 */
|
||||
t_u8 TFS : 1; /* bit 16 */
|
||||
t_u8 GeospatialLocation : 1; /* bit 15 */
|
||||
t_u8 CivicLocation : 1; /* bit 14 */
|
||||
t_u8 CollocatedIntf : 1; /* bit 13 */
|
||||
t_u8 ProxyARPService : 1; /* bit 12 */
|
||||
t_u8 FMS : 1; /* bit 11 */
|
||||
t_u8 LocationTracking : 1; /* bit 10 */
|
||||
t_u8 MulticastDiagnostics : 1; /* bit 9 */
|
||||
t_u8 Diagnostics : 1; /* bit 8 */
|
||||
t_u8 Event : 1; /* bit 7 */
|
||||
t_u8 SPSMP_Support : 1; /* bit 6 */
|
||||
t_u8 Reserved5 : 1; /* bit 5 */
|
||||
t_u8 PSMP_Capable : 1; /* bit 4 */
|
||||
t_u8 RejectUnadmFrame : 1; /* bit 3 */
|
||||
t_u8 ExtChanSwitching : 1; /* bit 2 */
|
||||
t_u8 Reserved1 : 1; /* bit 1 */
|
||||
t_u8 BSS_CoexistSupport : 1; /* bit 0 */
|
||||
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
|
||||
#else
|
||||
/** Extended Capabilities Data */
|
||||
typedef struct MLAN_PACK_START _ExtCap_t {
|
||||
/** Extended Capabilities value */
|
||||
|
@ -2009,8 +1983,15 @@ typedef struct MLAN_PACK_START _ExtCap_t {
|
|||
t_u8 TWTReq : 1; /* bit 77 */
|
||||
t_u8 TWTResp : 1; /* bit 78 */
|
||||
t_u8 rsvdBit79 : 1; /* bit 79 */
|
||||
t_u8 rsvdBit80 : 1; /* bit 80 */
|
||||
t_u8 rsvdBit81 : 1; /* bit 81 */
|
||||
t_u8 rsvdBit82 : 1; /* bit 82 */
|
||||
t_u8 rsvdBit83 : 1; /* bit 83 */
|
||||
t_u8 beacon_prot : 1; /* bit 84 */
|
||||
t_u8 rsvdBit85 : 1; /* bit 85 */
|
||||
t_u8 rsvdBit86 : 1; /* bit 86 */
|
||||
t_u8 rsvdBit87 : 1; /* bit 87 */
|
||||
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
|
||||
#endif
|
||||
|
||||
/** ExtCap : TDLS prohibited */
|
||||
#define IS_EXTCAP_TDLS_PROHIBITED(ext_cap) (ext_cap.TDLSProhibited)
|
||||
|
@ -2136,6 +2117,8 @@ typedef struct _tdls_peer_info {
|
|||
t_u8 ht_cap[IEEE_MAX_IE_SIZE];
|
||||
/** VHT Capabilities IE */
|
||||
t_u8 vht_cap[IEEE_MAX_IE_SIZE];
|
||||
/** HE Capabilities IE */
|
||||
t_u8 he_cap[IEEE_MAX_IE_SIZE];
|
||||
} tdls_peer_info;
|
||||
|
||||
/** max ralist num */
|
||||
|
@ -2215,7 +2198,7 @@ typedef struct _mlan_debug_info {
|
|||
/** Corresponds to port_open member of mlan_private */
|
||||
t_u8 port_open;
|
||||
/** bypass pkt count */
|
||||
t_u16 bypass_pkt_count;
|
||||
t_u32 bypass_pkt_count;
|
||||
/** Corresponds to scan_processing member of mlan_adapter */
|
||||
t_u32 scan_processing;
|
||||
/** Corresponds to mlan_processing member of mlan_adapter */
|
||||
|
@ -2265,6 +2248,10 @@ typedef struct _mlan_debug_info {
|
|||
t_u32 mpa_sent_no_ports;
|
||||
/** last recv wr_bitmap */
|
||||
t_u32 last_recv_wr_bitmap;
|
||||
/** last recv rd_bitmap */
|
||||
t_u32 last_recv_rd_bitmap;
|
||||
/** mp_data_port_mask */
|
||||
t_u32 mp_data_port_mask;
|
||||
/** last mp_wr_bitmap */
|
||||
t_u32 last_mp_wr_bitmap[SDIO_MP_DBG_NUM];
|
||||
/** last ports for cmd53 write data */
|
||||
|
@ -2413,8 +2400,6 @@ typedef struct _sta_info_data {
|
|||
sta_stats stats;
|
||||
/** ie length */
|
||||
t_u16 ie_len;
|
||||
/** ie buffer */
|
||||
t_u8 ie_buf[1];
|
||||
} sta_info_data;
|
||||
|
||||
/** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */
|
||||
|
@ -2423,6 +2408,7 @@ typedef struct _mlan_ds_sta_list {
|
|||
t_u16 sta_count;
|
||||
/** station list */
|
||||
sta_info_data info[MAX_NUM_CLIENTS];
|
||||
/* ie_buf will be append at the end */
|
||||
} mlan_ds_sta_list, *pmlan_ds_sta_list;
|
||||
#endif
|
||||
|
||||
|
@ -2480,7 +2466,7 @@ typedef enum {
|
|||
AssocAgentAuth_FastBss,
|
||||
AssocAgentAuth_FastBss_Skip,
|
||||
AssocAgentAuth_Network_EAP,
|
||||
AssocAgentAuth_Wpa3Sae,
|
||||
AssocAgentAuth_Wpa3Sae = 6,
|
||||
AssocAgentAuth_Auto,
|
||||
} AssocAgentAuthType_e;
|
||||
|
||||
|
@ -2549,6 +2535,10 @@ enum _mlan_psk_type {
|
|||
#define KEY_FLAG_GCMP_256 0x00000040
|
||||
/** key flag for ccmp 256 */
|
||||
#define KEY_FLAG_CCMP_256 0x00000080
|
||||
/** key flag for GMAC_128 */
|
||||
#define KEY_FLAG_GMAC_128 0x00000100
|
||||
/** key flag for GMAC_256 */
|
||||
#define KEY_FLAG_GMAC_256 0x00000200
|
||||
|
||||
/** Type definition of mlan_ds_encrypt_key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */
|
||||
typedef struct _mlan_ds_encrypt_key {
|
||||
|
@ -2600,6 +2590,8 @@ typedef struct _mlan_sae_password_t {
|
|||
typedef struct _mlan_pmk_t {
|
||||
/** PMK */
|
||||
t_u8 pmk[MLAN_MAX_KEY_LENGTH];
|
||||
t_u8 pmk_r0[MLAN_MAX_KEY_LENGTH];
|
||||
t_u8 pmk_r0_name[MLAN_MAX_PMKR0_NAME_LENGTH];
|
||||
} mlan_pmk_t;
|
||||
|
||||
/** Embedded supplicant RSN type: No RSN */
|
||||
|
@ -2650,10 +2642,20 @@ typedef struct _mlan_ds_ewpa_mode {
|
|||
t_u32 act_groupcipher;
|
||||
} mlan_ds_esupp_mode, *pmlan_ds_esupp_mode;
|
||||
|
||||
/* Security SSID MAX number support by firmware*/
|
||||
#define MAX_SEC_SSID_NUM 6
|
||||
|
||||
/** Type definition of mlan_ds_sec_cfg for MLAN_IOCTL_SEC_CFG */
|
||||
typedef struct _mlan_ds_sec_cfg {
|
||||
/** Sub-command */
|
||||
t_u32 sub_command;
|
||||
/** Flag to extend some structures to support multiple values.
|
||||
** For example, mlan_ds_passphrase can only contain one value,
|
||||
** if need use mlan_ds_passphrase[N], just set this flag and
|
||||
** use mlan_ds_passphrase[] instead to avoid modify
|
||||
** more already exist code.
|
||||
*/
|
||||
t_u8 multi_passphrase;
|
||||
/** Security configuration parameter */
|
||||
union {
|
||||
/** Authentication mode for MLAN_OID_SEC_CFG_AUTH_MODE */
|
||||
|
@ -2679,6 +2681,7 @@ typedef struct _mlan_ds_sec_cfg {
|
|||
#ifdef UAP_SUPPORT
|
||||
t_u8 sta_mac[MLAN_MAC_ADDR_LENGTH];
|
||||
#endif
|
||||
mlan_ds_passphrase roam_passphrase[MAX_SEC_SSID_NUM];
|
||||
} param;
|
||||
} mlan_ds_sec_cfg, *pmlan_ds_sec_cfg;
|
||||
|
||||
|
@ -2993,6 +2996,8 @@ typedef struct _mlan_ds_hs_cfg {
|
|||
t_u8 ext_gap;
|
||||
/** GPIO wave level for extend hscfg*/
|
||||
t_u8 gpio_wave;
|
||||
/** Minimum delay between HsActive and HostWake (in msec) */
|
||||
t_u16 min_wake_holdoff;
|
||||
} mlan_ds_hs_cfg, *pmlan_ds_hs_cfg;
|
||||
|
||||
#define MAX_MGMT_FRAME_FILTER 2
|
||||
|
@ -3840,7 +3845,7 @@ typedef MLAN_PACK_START struct _mlan_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*/
|
||||
/** band, BIT0:2.4G, BIT1:5G BIT2:6G*/
|
||||
t_u8 band;
|
||||
/** mlan_ds_11ax_he_capa */
|
||||
mlan_ds_11ax_he_capa he_cap;
|
||||
|
@ -4035,12 +4040,19 @@ typedef struct _mlan_ds_subband_set_t {
|
|||
t_u8 max_tx_pwr;
|
||||
} mlan_ds_subband_set_t;
|
||||
|
||||
#define NXP_DFS_UNSET 0
|
||||
#define NXP_DFS_FCC 1
|
||||
#define NXP_DFS_ETSI 2
|
||||
#define NXP_DFS_JP 3
|
||||
#define NXP_DFS_UNKNOWN 0xFF
|
||||
/** Domain regulatory information */
|
||||
typedef struct _mlan_ds_11d_domain_info {
|
||||
/** DFS region code */
|
||||
t_u8 dfs_region;
|
||||
/** Country Code */
|
||||
t_u8 country_code[COUNTRY_CODE_LEN];
|
||||
/** Band that channels in sub_band belong to */
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
/** No. of subband in below */
|
||||
t_u8 no_of_sub_band;
|
||||
/** Subband data to send/last sent */
|
||||
|
@ -4084,7 +4096,14 @@ enum _mlan_reg_type {
|
|||
MLAN_REG_PSU = 6,
|
||||
MLAN_REG_BCA = 7,
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDNW62X) || \
|
||||
defined(PCIENW62X) || defined(USBNW62X) || defined(SD9097) || \
|
||||
defined(SD9177)
|
||||
MLAN_REG_CIU = 8,
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDNW62X) || \
|
||||
defined(PCIENW62X) || defined(USBNW62X) || defined(SD9097)
|
||||
MLAN_REG_MAC2 = 0x81,
|
||||
MLAN_REG_BBP2 = 0x82,
|
||||
MLAN_REG_RF2 = 0x83,
|
||||
|
@ -4179,6 +4198,16 @@ typedef struct _mlan_ds_11h_chan_rep_req {
|
|||
t_u8 host_based;
|
||||
} mlan_ds_11h_chan_rep_req;
|
||||
|
||||
/** channel dfs state for MLAN_OID_11H_CHAN_DFS_STATE */
|
||||
typedef struct _mlan_ds_11h_chan_dfs_state {
|
||||
/** channel */
|
||||
t_u8 channel;
|
||||
/** is dfs channel */
|
||||
t_u8 dfs_required;
|
||||
/** dfs state */
|
||||
dfs_state_t dfs_state;
|
||||
} mlan_ds_11h_chan_dfs_state;
|
||||
|
||||
typedef struct _mlan_ds_11h_dfs_w53_cfg {
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
|
@ -4200,6 +4229,8 @@ typedef struct _mlan_ds_11h_cfg {
|
|||
mlan_ds_11h_chan_rep_req chan_rpt_req;
|
||||
/** channel switch count for MLAN_OID_11H_CHAN_SWITCH_COUNT*/
|
||||
t_s8 cs_count;
|
||||
/** channel dfs state for MLAN_OID_11H_CHAN_DFS_STATE */
|
||||
mlan_ds_11h_chan_dfs_state ch_dfs_state;
|
||||
mlan_ds_11h_dfs_w53_cfg dfs_w53_cfg;
|
||||
} param;
|
||||
} mlan_ds_11h_cfg, *pmlan_ds_11h_cfg;
|
||||
|
@ -4219,6 +4250,9 @@ typedef struct _mlan_ds_11h_cfg {
|
|||
/** Enumeration for IE type */
|
||||
enum _mlan_ie_type {
|
||||
MLAN_IE_TYPE_GEN_IE = 0,
|
||||
#ifdef STA_SUPPORT
|
||||
MLAN_IE_TYPE_ARP_FILTER,
|
||||
#endif /* STA_SUPPORT */
|
||||
};
|
||||
|
||||
/** Type definition of mlan_ds_misc_gen_ie for MLAN_OID_MISC_GEN_IE */
|
||||
|
@ -4285,6 +4319,26 @@ enum _mlan_func_cmd {
|
|||
MLAN_FUNC_SHUTDOWN,
|
||||
};
|
||||
|
||||
/** Net monitor filter: management frame */
|
||||
#define MLAN_NETMON_MANAGEMENT_FRAME MBIT(0)
|
||||
/** Net monitor filter: control frame */
|
||||
#define MLAN_NETMON_CONTROL_FRAME MBIT(1)
|
||||
/** Net monitor filter: data frame */
|
||||
#define MLAN_NETMON_DATA_FRAME MBIT(2)
|
||||
|
||||
typedef struct _mlan_ds_misc_net_monitor {
|
||||
/** Enable/disable network monitor */
|
||||
t_u32 enable_net_mon;
|
||||
/** Set net monitor filer flag */
|
||||
t_u32 filter_flag;
|
||||
/** Radio type */
|
||||
t_u32 band;
|
||||
/** Channel */
|
||||
t_u32 channel;
|
||||
/** Secondary channel bandwidth */
|
||||
t_u32 chan_bandwidth;
|
||||
} mlan_ds_misc_net_monitor;
|
||||
|
||||
/** Type definition of mlan_ds_misc_tx_datapause
|
||||
* for MLAN_OID_MISC_TX_DATAPAUSE
|
||||
*/
|
||||
|
@ -4376,6 +4430,8 @@ typedef struct _mlan_ds_misc_cck_desense_cfg {
|
|||
#define IPADDR_TYPE_IPV4 (1)
|
||||
/** IP operation remove */
|
||||
#define MLAN_IPADDR_OP_IP_REMOVE (0)
|
||||
/** IP operation ARP filter */
|
||||
#define MLAN_IPADDR_OP_ARP_FILTER MBIT(0)
|
||||
/** IP operation ARP response */
|
||||
#define MLAN_IPADDR_OP_AUTO_ARP_RESP MBIT(1)
|
||||
|
||||
|
@ -4391,6 +4447,14 @@ typedef struct _mlan_ds_misc_ipaddr_cfg {
|
|||
t_u8 ip_addr[MAX_IPADDR][IPADDR_LEN];
|
||||
} mlan_ds_misc_ipaddr_cfg;
|
||||
|
||||
/** Type definnition of mlan_ds_misc_ipv6_ra_offload for
|
||||
* MLAN_OID_MISC_IPV6_RA_OFFLOAD*/
|
||||
typedef struct _mlan_ds_misc_ipv6_ra_offload {
|
||||
/** 0: disable; 1: enable*/
|
||||
t_u8 enable;
|
||||
t_u8 ipv6_addr[16];
|
||||
} mlan_ds_misc_ipv6_ra_offload;
|
||||
|
||||
/* MEF configuration disable */
|
||||
#define MEF_CFG_DISABLE 0
|
||||
/* MEF configuration Rx filter enable */
|
||||
|
@ -4647,6 +4711,33 @@ typedef struct _mlan_ds_wifi_direct_config {
|
|||
} mlan_ds_wifi_direct_config;
|
||||
#endif
|
||||
|
||||
/** Type definition of mlan_ds_gpio_tsf_latch */
|
||||
typedef struct _mlan_ds_gpio_tsf_latch {
|
||||
/**clock sync Mode */
|
||||
t_u8 clock_sync_mode;
|
||||
/**clock sync Role */
|
||||
t_u8 clock_sync_Role;
|
||||
/**clock sync GPIO Pin Number */
|
||||
t_u8 clock_sync_gpio_pin_number;
|
||||
/**clock sync GPIO Level or Toggle */
|
||||
t_u8 clock_sync_gpio_level_toggle;
|
||||
/**clock sync GPIO Pulse Width */
|
||||
t_u16 clock_sync_gpio_pulse_width;
|
||||
} mlan_ds_gpio_tsf_latch;
|
||||
|
||||
/** Type definition of mlan_ds_tsf_info */
|
||||
typedef struct _mlan_ds_tsf_info {
|
||||
/**get tsf info format */
|
||||
t_u16 tsf_format;
|
||||
/**tsf info */
|
||||
t_u16 tsf_info;
|
||||
/**tsf */
|
||||
t_u64 tsf;
|
||||
/**Positive or negative offset in microsecond from Beacon TSF to GPIO
|
||||
* toggle TSF */
|
||||
t_s32 tsf_offset;
|
||||
} mlan_ds_tsf_info;
|
||||
|
||||
#if defined(STA_SUPPORT)
|
||||
typedef struct _mlan_ds_misc_pmfcfg {
|
||||
/** Management Frame Protection Capable */
|
||||
|
@ -4658,6 +4749,166 @@ typedef struct _mlan_ds_misc_pmfcfg {
|
|||
|
||||
#define MAX_SSID_NUM 16
|
||||
#define MAX_AP_LIST 8
|
||||
#define RETRY_UNLIMITED_TIME 0xFF
|
||||
|
||||
#define FW_ROAM_ENABLE MBIT(0)
|
||||
#define FW_ROAM_TRIGGER_COND MBIT(1)
|
||||
#define FW_ROAM_BSSID MBIT(2)
|
||||
#define FW_ROAM_SSID MBIT(3)
|
||||
#define FW_ROAM_RETRY_COUNT MBIT(4)
|
||||
#define FW_ROAM_RSSI_PARA MBIT(5)
|
||||
#define FW_ROAM_BAND_RSSI MBIT(6)
|
||||
#define FW_ROAM_BGSCAN_PARAM MBIT(7)
|
||||
#define FW_ROAM_EES_PARAM MBIT(8)
|
||||
#define FW_ROAM_BCN_MISS_THRESHOLD MBIT(9)
|
||||
#define FW_ROAM_PRE_BCN_MISS_THRESHOLD MBIT(10)
|
||||
#define FW_ROAM_BLACKLIST MBIT(11)
|
||||
#define FW_ROAM_REPEAT_CNT MBIT(12)
|
||||
|
||||
/*Roam offload configuration for auto reconnection when suspend and resume*/
|
||||
typedef enum _roam_offload_config_mode {
|
||||
ROAM_OFFLOAD_ENABLE = 1,
|
||||
ROAM_OFFLOAD_SUSPEND_CFG,
|
||||
ROAM_OFFLOAD_RESUME_CFG,
|
||||
ROAM_OFFLOAD_PARAM_CFG,
|
||||
} roam_offload_config_mode;
|
||||
|
||||
typedef enum _roam_offload_set_mode {
|
||||
ROAM_OFFLOAD_DISABLE = 0,
|
||||
ROAM_OFFLOAD_WITH_APLIST,
|
||||
ROAM_OFFLOAD_WITHOUT_APLIST,
|
||||
ROAM_OFFLOAD_WITH_BSSID,
|
||||
ROAM_OFFLOAD_WITH_SSID,
|
||||
AUTO_RECONNECT,
|
||||
} roam_offload_set_mode;
|
||||
|
||||
typedef enum _roam_offload_trigger_mode {
|
||||
NO_TRIGGER = 0x00,
|
||||
RSSI_LOW_TRIGGER = 0x01,
|
||||
PRE_BEACON_LOST_TRIGGER = 0x02,
|
||||
LINK_LOST_TRIGGER = 0x04,
|
||||
DEAUTH_WITH_EXT_AP_TRIGGER = 0x08,
|
||||
} roam_offload_trigger_mode;
|
||||
|
||||
/** mlan_ds_misc_ees_cfg structure */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_ees_cfg {
|
||||
/* EES mode*/
|
||||
t_u16 ees_mode;
|
||||
/* EES report condition*/
|
||||
t_u16 ees_rpt_condition;
|
||||
/* High scan period(milliseconds)*/
|
||||
t_u16 high_scan_period;
|
||||
/* High scan count*/
|
||||
t_u16 high_scan_count;
|
||||
/* Middle scan period(milliseconds)*/
|
||||
t_u16 mid_scan_period;
|
||||
/* Middle scan count*/
|
||||
t_u16 mid_scan_count;
|
||||
/* Low scan period(milliseconds)*/
|
||||
t_u16 low_scan_period;
|
||||
/* Low scan count*/
|
||||
t_u16 low_scan_count;
|
||||
} MLAN_PACK_END mlan_ds_misc_ees_cfg;
|
||||
|
||||
/** mlan_ds_misc_bgscan_cfg structure */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_bgscan_cfg {
|
||||
/* BSS Type 0x1-bss independent, 0x2-bss infrastructure, 0x3-bss any*/
|
||||
t_u8 bss_type;
|
||||
/* Number of channels scanned for each scan*/
|
||||
t_u8 channels_per_scan;
|
||||
/* Interval between consective scans*/
|
||||
t_u32 scan_interval;
|
||||
/* Conditons to trigger report to host*/
|
||||
t_u32 bg_rpt_condition;
|
||||
} MLAN_PACK_END mlan_ds_misc_bgscan_cfg;
|
||||
|
||||
/** mlan_ds_misc_band_rssi structure */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_band_rssi {
|
||||
/* RSSI hysteresis*/
|
||||
t_u8 rssi_hysteresis;
|
||||
/* Preferred channel band for fw roaming
|
||||
* 0:2.4G band; 1: 5G band; 2:4G band; 0xFF:band not set(invalid)
|
||||
*/
|
||||
t_u8 band_preferred;
|
||||
} MLAN_PACK_END mlan_ds_misc_band_rssi;
|
||||
|
||||
/** mlan_ds_misc_ssid_list structure */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_ssid_list {
|
||||
/* SSID number*/
|
||||
t_u8 ssid_num;
|
||||
/* SSID for fw roaming/auto_reconnect*/
|
||||
mlan_802_11_ssid ssids[MAX_SSID_NUM];
|
||||
} MLAN_PACK_END mlan_ds_misc_ssid_list;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload_aplist {
|
||||
/** Number of AP**/
|
||||
t_u8 ap_num;
|
||||
/** AP mac addrs**/
|
||||
t_u8 ap_mac[MAX_AP_LIST][MLAN_MAC_ADDR_LENGTH];
|
||||
} MLAN_PACK_END mlan_ds_misc_roam_offload_aplist;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload_para_rssi {
|
||||
/** Setting flag**/
|
||||
t_u8 set_flag;
|
||||
/** Max value of RSSI threshold**/
|
||||
t_u8 max_rssi;
|
||||
/** Min value of RSSI threshold**/
|
||||
t_u8 min_rssi;
|
||||
/** Adjusting step value of RSSI threshold**/
|
||||
t_u8 step_rssi;
|
||||
} MLAN_PACK_END mlan_ds_misc_roam_offload_para_rssi;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload {
|
||||
/** Enable roam offload**/
|
||||
t_u8 enable;
|
||||
/** User set passphrase**/
|
||||
t_u8 userset_passphrase;
|
||||
/* Condition to trigger roaming
|
||||
* Bit0 : RSSI low trigger
|
||||
* Bit1 : Pre-beacon lost trigger
|
||||
* Bit2 : Link Lost trigger
|
||||
* Bit3 : Deauth by ext-AP trigger
|
||||
* Bit4 ~ Bit15 : Reserved
|
||||
* value 0 : no trigger
|
||||
* value 0xff : invalid
|
||||
*/
|
||||
t_u16 trigger_condition;
|
||||
/** AP list**/
|
||||
mlan_ds_misc_roam_offload_aplist aplist;
|
||||
/*Roam offload configuration mode for auto connection when suspend and
|
||||
* resume*/
|
||||
roam_offload_config_mode config_mode;
|
||||
/** Retry count**/
|
||||
t_u8 retry_count;
|
||||
/** RSSI para**/
|
||||
mlan_ds_misc_roam_offload_para_rssi para_rssi;
|
||||
/** BSSID of reconnection**/
|
||||
mlan_802_11_mac_addr bssid_reconnect;
|
||||
/* SSID List(White list)*/
|
||||
mlan_ds_misc_ssid_list ssid_list;
|
||||
/* Black list(BSSID list)*/
|
||||
mlan_ds_misc_roam_offload_aplist black_list;
|
||||
/* BAND and RSSI_HYSTERESIS set flag*/
|
||||
t_u8 band_rssi_flag;
|
||||
mlan_ds_misc_band_rssi band_rssi;
|
||||
|
||||
/* BGSCAN params set flag*/
|
||||
t_u8 bgscan_set_flag;
|
||||
mlan_ds_misc_bgscan_cfg bgscan_cfg;
|
||||
|
||||
/* EES mode params set flag*/
|
||||
t_u8 ees_param_set_flag;
|
||||
mlan_ds_misc_ees_cfg ees_cfg;
|
||||
|
||||
/* Beacon miss threshold*/
|
||||
t_u8 bcn_miss_threshold;
|
||||
|
||||
/* Beacon miss threshold*/
|
||||
t_u8 pre_bcn_miss_threshold;
|
||||
|
||||
/* Scan repeat count*/
|
||||
t_u16 repeat_count;
|
||||
} MLAN_PACK_END mlan_ds_misc_roam_offload;
|
||||
|
||||
/**Action ID for TDLS disable link*/
|
||||
#define WLAN_TDLS_DISABLE_LINK 0x00
|
||||
|
@ -4711,6 +4962,8 @@ typedef struct _mlan_ds_misc_tdls_oper {
|
|||
#define TDLS_IE_FLAGS_QOS_INFO 0x0080
|
||||
/** flag for TDLS SETUP */
|
||||
#define TDLS_IE_FLAGS_SETUP 0x0100
|
||||
#define TDLS_IE_FLAGS_HECAP 0x0200
|
||||
#define TDLS_IE_FLAGS_HEOP 0x0400
|
||||
|
||||
/** TDLS ie buffer */
|
||||
typedef struct _mlan_ds_misc_tdls_ies {
|
||||
|
@ -4732,6 +4985,10 @@ typedef struct _mlan_ds_misc_tdls_ies {
|
|||
t_u8 vht_oprat[IEEE_MAX_IE_SIZE];
|
||||
/** aid Info */
|
||||
t_u8 aid_info[IEEE_MAX_IE_SIZE];
|
||||
/** HE Capabilities IE */
|
||||
t_u8 he_cap[IEEE_MAX_IE_SIZE];
|
||||
/** HE Operation IE */
|
||||
t_u8 he_op[IEEE_MAX_IE_SIZE];
|
||||
/** supported channels */
|
||||
t_u8 supp_chan[IEEE_MAX_IE_SIZE];
|
||||
/** supported regulatory class */
|
||||
|
@ -4851,6 +5108,8 @@ typedef struct _mef_entry_t {
|
|||
typedef struct _mlan_ds_misc_mef_flt_cfg {
|
||||
/** Type of action*/
|
||||
int mef_act_type;
|
||||
/** Operation code*/
|
||||
t_u32 op_code;
|
||||
/** NV Filter Criteria*/
|
||||
t_u32 criteria;
|
||||
/** NV MEF entry*/
|
||||
|
@ -4988,6 +5247,34 @@ typedef struct _mlan_ds_ssu_params {
|
|||
} mlan_ds_ssu_params;
|
||||
#endif
|
||||
|
||||
#define CSI_FILTER_MAX 16
|
||||
/** Structure of CSI filters */
|
||||
typedef MLAN_PACK_START struct _mlan_csi_filter_t {
|
||||
/** Source address of the packet to receive */
|
||||
t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Pakcet type of the interested CSI */
|
||||
t_u8 pkt_type;
|
||||
/* Packet subtype of the interested CSI */
|
||||
t_u8 subtype;
|
||||
/* Other filter flags */
|
||||
t_u8 flags;
|
||||
} MLAN_PACK_END mlan_csi_filter_t;
|
||||
/** Structure of CSI parameters */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_csi_params {
|
||||
/** CSI enable flag. 1: enable, 0: disable */
|
||||
t_u16 csi_enable;
|
||||
/** Header ID*/
|
||||
t_u32 head_id;
|
||||
/** Tail ID */
|
||||
t_u32 tail_id;
|
||||
/** Number of CSI filters */
|
||||
t_u8 csi_filter_cnt;
|
||||
/** Chip ID */
|
||||
t_u8 chip_id;
|
||||
/** CSI filters */
|
||||
mlan_csi_filter_t csi_filter[CSI_FILTER_MAX];
|
||||
} MLAN_PACK_END mlan_ds_csi_params;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_hal_phy_cfg_params {
|
||||
/** 11b pwr spectral density mask enable/disable */
|
||||
t_u8 dot11b_psd_mask_cfg;
|
||||
|
@ -5195,6 +5482,31 @@ typedef struct _mlan_ds_misc_cfp_tbl {
|
|||
chan_freq_power_t cfp_tbl[];
|
||||
} mlan_ds_misc_cfp_tbl;
|
||||
|
||||
/** mlan_ds_mc_aggr_cfg for MLAN_OID_MISC_MC_AGGR_CFG */
|
||||
typedef struct _mlan_ds_mc_aggr_cfg {
|
||||
/** action */
|
||||
t_u8 action;
|
||||
/* 1 enable, 0 disable
|
||||
* bit 0 MC aggregation
|
||||
* bit 1 packet expiry
|
||||
* bit 2 CTS2Self
|
||||
* bit 3 CTS2Self duration offset*/
|
||||
t_u8 enable_bitmap;
|
||||
/* 1 valid, 0 invalid
|
||||
* bit 0 MC aggregation
|
||||
* bit 1 packet expiry
|
||||
* bit 2 CTS2Self
|
||||
* bit 3 CTS2Self duration offset*/
|
||||
t_u8 mask_bitmap;
|
||||
/** CTS2Self duration offset */
|
||||
t_u16 cts2self_offset;
|
||||
} mlan_ds_mc_aggr_cfg;
|
||||
typedef struct _mlan_ds_ch_load {
|
||||
/** action */
|
||||
t_u8 action;
|
||||
t_u16 ch_load_param;
|
||||
} mlan_ds_ch_load;
|
||||
|
||||
/** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */
|
||||
typedef struct _mlan_ds_misc_cfg {
|
||||
/** Sub-command */
|
||||
|
@ -5217,6 +5529,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
t_u32 wws_cfg;
|
||||
/** Get associate response for MLAN_OID_MISC_ASSOC_RSP */
|
||||
mlan_ds_misc_assoc_rsp assoc_resp;
|
||||
/** Get associate request for MLAN_OID_MISC_ASSOC_REQ */
|
||||
mlan_ds_misc_assoc_req assoc_req;
|
||||
/** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */
|
||||
t_u32 func_init_shutdown;
|
||||
/** Custom IE for MLAN_OID_MISC_CUSTOM_IE */
|
||||
|
@ -5232,10 +5546,14 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_misc_tdls_ies tdls_ies;
|
||||
/**tdls cs off channel*/
|
||||
t_u8 tdls_cs_channel;
|
||||
/** Net monitor for MLAN_OID_MISC_NET_MONITOR */
|
||||
mlan_ds_misc_net_monitor net_mon;
|
||||
/** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */
|
||||
mlan_ds_misc_tx_datapause tx_datapause;
|
||||
/** IP address configuration */
|
||||
mlan_ds_misc_ipaddr_cfg ipaddr_cfg;
|
||||
/** IPv6 Router Advertisement offload configuration */
|
||||
mlan_ds_misc_ipv6_ra_offload ipv6_ra_offload;
|
||||
/** MAC control for MLAN_OID_MISC_MAC_CONTROL */
|
||||
t_u32 mac_ctrl;
|
||||
/** MEF configuration for MLAN_OID_MISC_MEF_CFG */
|
||||
|
@ -5274,6 +5592,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
mlan_ds_wifi_direct_config p2p_config;
|
||||
#endif
|
||||
mlan_ds_gpio_tsf_latch gpio_tsf_latch_config;
|
||||
mlan_ds_tsf_info tsf_info;
|
||||
mlan_ds_coalesce_cfg coalesce_cfg;
|
||||
t_u8 low_pwr_mode;
|
||||
/** MEF-FLT-CONFIG for MLAN_OID_MISC_NV_FLT_CFG */
|
||||
|
@ -5289,6 +5609,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_misc_gtk_rekey_data gtk_rekey;
|
||||
mlan_ds_bw_chan_oper bw_chan_oper;
|
||||
mlan_ds_ind_rst_cfg ind_rst_cfg;
|
||||
/** Roam offload */
|
||||
mlan_ds_misc_roam_offload roam_offload;
|
||||
t_u64 misc_tsf;
|
||||
mlan_ds_custom_reg_domain custom_reg_domain;
|
||||
mlan_ds_misc_keep_alive keep_alive;
|
||||
|
@ -5300,6 +5622,7 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
#if defined(PCIE)
|
||||
mlan_ds_ssu_params ssu_params;
|
||||
#endif
|
||||
mlan_ds_csi_params csi_params;
|
||||
/** boot sleep enable or disable */
|
||||
t_u16 boot_sleep;
|
||||
/** Mapping Policy */
|
||||
|
@ -5325,6 +5648,12 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_misc_dot11mc_unassoc_ftm_cfg dot11mc_unassoc_ftm_cfg;
|
||||
mlan_ds_misc_tp_state tp_state;
|
||||
mlan_ds_hal_phy_cfg_params hal_phy_cfg_params;
|
||||
mlan_ds_mc_aggr_cfg mc_aggr_cfg;
|
||||
#ifdef UAP_SUPPORT
|
||||
t_u8 wacp_mode;
|
||||
#endif
|
||||
t_u32 ips_ctrl;
|
||||
mlan_ds_ch_load ch_load;
|
||||
} param;
|
||||
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
||||
|
||||
|
|
|
@ -9,18 +9,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -869,7 +878,7 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
MrvlIEtypes_PhyParamSet_t *pphy_tlv;
|
||||
MrvlIEtypes_SsParamSet_t *pss_tlv;
|
||||
MrvlIEtypes_RatesParamSet_t *prates_tlv;
|
||||
MrvlIEtypes_AuthType_t *pauth_tlv;
|
||||
MrvlIEtypes_AuthType_t *pauth_tlv = MNULL;
|
||||
MrvlIEtypes_RsnParamSet_t *prsn_ie_tlv = MNULL;
|
||||
MrvlIEtypes_SecurityCfg_t *psecurity_cfg_ie = MNULL;
|
||||
MrvlIEtypes_ChanListParamSet_t *pchan_tlv;
|
||||
|
@ -898,6 +907,7 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
pmpriv->pattempted_bss_desc = pbss_desc;
|
||||
/* clear assoc_rsp_size */
|
||||
pmpriv->assoc_rsp_size = 0;
|
||||
pmpriv->assoc_req_size = 0;
|
||||
|
||||
memcpy_ext(pmadapter, passo->peer_sta_addr, pbss_desc->mac_address,
|
||||
sizeof(pbss_desc->mac_address),
|
||||
|
@ -983,6 +993,27 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
pauth_tlv->header.len = wlan_cpu_to_le16(pauth_tlv->header.len);
|
||||
}
|
||||
|
||||
if ((pauth_tlv != MNULL) &&
|
||||
(pauth_tlv->auth_type ==
|
||||
wlan_cpu_to_le16(AssocAgentAuth_Wpa3Sae))) {
|
||||
if (pbss_desc->prsnx_ie && pbss_desc->prsnx_ie->ieee_hdr.len &&
|
||||
(pbss_desc->prsnx_ie->data[0] & (0x1 << SAE_H2E_BIT))) {
|
||||
MrvlIEtypes_SAE_PWE_Mode_t *psae_pwe_mode_tlv;
|
||||
|
||||
/* Setup the sae pwe derivation mode TLV in the
|
||||
* association command */
|
||||
psae_pwe_mode_tlv = (MrvlIEtypes_SAE_PWE_Mode_t *)pos;
|
||||
psae_pwe_mode_tlv->header.type = wlan_cpu_to_le16(
|
||||
TLV_TYPE_WPA3_SAE_PWE_DERIVATION_MODE);
|
||||
psae_pwe_mode_tlv->header.len =
|
||||
sizeof(psae_pwe_mode_tlv->pwe);
|
||||
psae_pwe_mode_tlv->pwe[0] =
|
||||
pbss_desc->prsnx_ie->data[0];
|
||||
pos += sizeof(psae_pwe_mode_tlv->header) +
|
||||
sizeof(psae_pwe_mode_tlv->pwe);
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_SUPPORT_MULTI_BANDS(pmadapter) &&
|
||||
(pbss_desc->bss_band & pmpriv->config_bands) &&
|
||||
!(ISSUPP_11NENABLED(pmadapter->fw_cap_info) &&
|
||||
|
@ -1005,7 +1036,7 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
pchan_tlv->chan_scan_param[0].chan_number);
|
||||
|
||||
pchan_tlv->chan_scan_param[0].bandcfg.chanBand =
|
||||
wlan_band_to_radio_type((t_u8)pbss_desc->bss_band);
|
||||
wlan_band_to_radio_type(pbss_desc->bss_band);
|
||||
|
||||
PRINTM(MINFO, "Assoc: TLV Bandcfg = %x\n",
|
||||
pchan_tlv->chan_scan_param[0].bandcfg);
|
||||
|
@ -1183,8 +1214,8 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
wlan_11ac_bandconfig_allowed(pmpriv, pbss_desc->bss_band))
|
||||
wlan_cmd_append_11ac_tlv(pmpriv, pbss_desc, &pos);
|
||||
|
||||
if ((IS_FW_SUPPORT_11AX(pmadapter)) && (!pbss_desc->disable_11n) &&
|
||||
wlan_11ax_bandconfig_allowed(pmpriv, pbss_desc->bss_band))
|
||||
if ((IS_FW_SUPPORT_11AX(pmadapter)) &&
|
||||
wlan_11ax_bandconfig_allowed(pmpriv, pbss_desc))
|
||||
wlan_cmd_append_11ax_tlv(pmpriv, pbss_desc, &pos);
|
||||
|
||||
wlan_wmm_process_association_req(pmpriv, &pos, &pbss_desc->wmm_ie,
|
||||
|
@ -1226,8 +1257,7 @@ mlan_status wlan_cmd_802_11_associate(mlan_private *pmpriv,
|
|||
pos += sizeof(prev_bssid_tlv->header) + MLAN_MAC_ADDR_LENGTH;
|
||||
}
|
||||
|
||||
if (wlan_11d_create_dnld_countryinfo(pmpriv,
|
||||
(t_u8)pbss_desc->bss_band)) {
|
||||
if (wlan_11d_create_dnld_countryinfo(pmpriv, pbss_desc->bss_band)) {
|
||||
PRINTM(MERROR, "Dnld_countryinfo_11d failed\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
|
@ -1360,14 +1390,21 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
assoc_logger_data *assoc_succ;
|
||||
mlan_ds_bss *bss;
|
||||
IEEEtypes_MgmtHdr_t *hdr;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pmpriv->curr_bss_params.host_mlme)
|
||||
passoc_rsp =
|
||||
(IEEEtypes_AssocRsp_t *)((t_u8 *)(&resp->params) +
|
||||
if (pmpriv->curr_bss_params.host_mlme) {
|
||||
hdr = (IEEEtypes_MgmtHdr_t *)&resp->params;
|
||||
if (!memcmp(pmpriv->adapter, hdr->BssId,
|
||||
pmpriv->pattempted_bss_desc->mac_address,
|
||||
MLAN_MAC_ADDR_LENGTH))
|
||||
passoc_rsp = (IEEEtypes_AssocRsp_t
|
||||
*)((t_u8 *)(&resp->params) +
|
||||
sizeof(IEEEtypes_MgmtHdr_t));
|
||||
else
|
||||
else
|
||||
passoc_rsp = (IEEEtypes_AssocRsp_t *)&resp->params;
|
||||
} else
|
||||
|
||||
passoc_rsp = (IEEEtypes_AssocRsp_t *)&resp->params;
|
||||
passoc_rsp->status_code = wlan_le16_to_cpu(passoc_rsp->status_code);
|
||||
|
@ -1432,7 +1469,6 @@ mlan_status wlan_ret_802_11_associate(mlan_private *pmpriv,
|
|||
|
||||
/* Send a Media Connected event, according to the Spec */
|
||||
pmpriv->media_connected = MTRUE;
|
||||
|
||||
pmpriv->adapter->pps_uapsd_mode = MFALSE;
|
||||
pmpriv->adapter->tx_lock_flag = MFALSE;
|
||||
pmpriv->adapter->delay_null_pkt = MFALSE;
|
||||
|
@ -2083,7 +2119,7 @@ mlan_status wlan_cmd_802_11_ad_hoc_join(mlan_private *pmpriv,
|
|||
pchan_tlv->chan_scan_param[0].chan_number);
|
||||
|
||||
pchan_tlv->chan_scan_param[0].bandcfg.chanBand =
|
||||
wlan_band_to_radio_type((t_u8)pbss_desc->bss_band);
|
||||
wlan_band_to_radio_type(pbss_desc->bss_band);
|
||||
|
||||
PRINTM(MINFO, "ADHOC_J_CMD: TLV Bandcfg = %x\n",
|
||||
pchan_tlv->chan_scan_param[0].bandcfg);
|
||||
|
@ -2092,8 +2128,7 @@ mlan_status wlan_cmd_802_11_ad_hoc_join(mlan_private *pmpriv,
|
|||
sizeof(pchan_tlv->header) + sizeof(ChanScanParamSet_t);
|
||||
}
|
||||
|
||||
if (wlan_11d_create_dnld_countryinfo(pmpriv,
|
||||
(t_u8)pbss_desc->bss_band)) {
|
||||
if (wlan_11d_create_dnld_countryinfo(pmpriv, pbss_desc->bss_band)) {
|
||||
PRINTM(MERROR, "Dnld_countryinfo_11d failed\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
|
@ -2611,7 +2646,7 @@ mlan_status wlan_disconnect(mlan_private *pmpriv, mlan_ioctl_req *pioctl_req,
|
|||
*
|
||||
* @return Radio type designator for use in a channel TLV
|
||||
*/
|
||||
t_u8 wlan_band_to_radio_type(t_u8 band)
|
||||
t_u8 wlan_band_to_radio_type(t_u16 band)
|
||||
{
|
||||
t_u8 ret_radio_type;
|
||||
|
||||
|
|
|
@ -8,20 +8,29 @@
|
|||
* both adhoc and infrastructure networks
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,20 +5,29 @@
|
|||
* in MLAN module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -308,48 +317,6 @@ extern t_u32 mlan_drvdbg;
|
|||
(t_u64)(((t_u64)(x)&0x00ff000000000000ULL) >> 40) | \
|
||||
(t_u64)(((t_u64)(x)&0xff00000000000000ULL) >> 56)))
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Convert ulong n/w to host */
|
||||
#define mlan_ntohl(x) x
|
||||
/** Convert host ulong to n/w */
|
||||
#define mlan_htonl(x) x
|
||||
/** Convert n/w to host */
|
||||
#define mlan_ntohs(x) x
|
||||
/** Convert host to n/w */
|
||||
#define mlan_htons(x) x
|
||||
/** Convert from 16 bit little endian format to CPU format */
|
||||
#define wlan_le16_to_cpu(x) swap_byte_16(x)
|
||||
/** Convert from 32 bit little endian format to CPU format */
|
||||
#define wlan_le32_to_cpu(x) swap_byte_32(x)
|
||||
/** Convert from 64 bit little endian format to CPU format */
|
||||
#define wlan_le64_to_cpu(x) swap_byte_64(x)
|
||||
/** Convert to 16 bit little endian format from CPU format */
|
||||
#define wlan_cpu_to_le16(x) swap_byte_16(x)
|
||||
/** Convert to 32 bit little endian format from CPU format */
|
||||
#define wlan_cpu_to_le32(x) swap_byte_32(x)
|
||||
/** Convert to 64 bit little endian format from CPU format */
|
||||
#define wlan_cpu_to_le64(x) swap_byte_64(x)
|
||||
|
||||
/** Convert TxPD to little endian format from CPU format */
|
||||
#define endian_convert_TxPD(x) \
|
||||
{ \
|
||||
(x)->tx_pkt_length = wlan_cpu_to_le16((x)->tx_pkt_length); \
|
||||
(x)->tx_pkt_offset = wlan_cpu_to_le16((x)->tx_pkt_offset); \
|
||||
(x)->tx_pkt_type = wlan_cpu_to_le16((x)->tx_pkt_type); \
|
||||
(x)->tx_control = wlan_cpu_to_le32((x)->tx_control); \
|
||||
(x)->tx_control_1 = wlan_cpu_to_le32((x)->tx_control_1); \
|
||||
}
|
||||
/** Convert RxPD from little endian format to CPU format */
|
||||
#define endian_convert_RxPD(x) \
|
||||
{ \
|
||||
(x)->rx_pkt_length = wlan_le16_to_cpu((x)->rx_pkt_length); \
|
||||
(x)->rx_pkt_offset = wlan_le16_to_cpu((x)->rx_pkt_offset); \
|
||||
(x)->rx_pkt_type = wlan_le16_to_cpu((x)->rx_pkt_type); \
|
||||
(x)->seq_num = wlan_le16_to_cpu((x)->seq_num); \
|
||||
(x)->rx_info = wlan_le32_to_cpu((x)->rx_info);
|
||||
}
|
||||
|
||||
#else
|
||||
/** Convert ulong n/w to host */
|
||||
#define mlan_ntohl(x) swap_byte_32(x)
|
||||
/** Convert host ulong to n/w */
|
||||
|
@ -379,7 +346,10 @@ extern t_u32 mlan_drvdbg;
|
|||
#define endian_convert_RxPD(x) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
/** Convert RxPD extra header from little endian format to CPU format */
|
||||
#define endian_convert_RxPD_extra_header(x) \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
/** Global moal_assert_callback */
|
||||
extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
||||
|
@ -402,6 +372,11 @@ extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
|||
/** Maximum event buffer size */
|
||||
#define MAX_EVENT_SIZE (3 * 1024)
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/** Maximum buffer size for ARP filter */
|
||||
#define ARP_FILTER_MAX_BUF_SIZE 68
|
||||
#endif /* STA_SUPPORT */
|
||||
|
||||
/** 60 seconds */
|
||||
#define MRVDRV_TIMER_60S 60000
|
||||
/** 10 seconds */
|
||||
|
@ -553,7 +528,7 @@ extern t_void (*assert_callback)(t_void *pmoal_handle, t_u32 cond);
|
|||
/** Maximum numbfer of registers to read for multiple port */
|
||||
#if defined(SD8887) || defined(SD8997) || defined(SD8977) || \
|
||||
defined(SD8987) || defined(SD9098) || defined(SD9097) || \
|
||||
defined(SD8978) || defined(SD9177)
|
||||
defined(SDNW62X) || defined(SD8978) || defined(SD9177)
|
||||
#define MAX_MP_REGS 196
|
||||
#else
|
||||
/* upto 0xB7 */
|
||||
|
@ -749,7 +724,7 @@ struct _raListTbl {
|
|||
/** packet count threshold to setup BA */
|
||||
t_u8 ba_packet_threshold;
|
||||
/** is 11n enabled */
|
||||
t_u8 is_11n_enabled;
|
||||
t_u8 is_wmm_enabled;
|
||||
/** max amsdu size */
|
||||
t_u16 max_amsdu;
|
||||
/** BA stream status */
|
||||
|
@ -847,7 +822,7 @@ typedef struct {
|
|||
/** Uapsd enable?*/
|
||||
t_u8 wmm_uapsd_enabled;
|
||||
/** Band */
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
/** Number of rates supported */
|
||||
t_u32 num_of_rates;
|
||||
/** Supported rates*/
|
||||
|
@ -904,7 +879,7 @@ typedef struct _region_chan_t {
|
|||
/** Region code for US, Japan ... */
|
||||
t_u8 region;
|
||||
/** Band B/G/A, used for BAND_CONFIG cmd */
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
/** Actual No. of elements in the array below */
|
||||
t_u8 num_cfp;
|
||||
/** chan-freq-txpower mapping table */
|
||||
|
@ -921,10 +896,12 @@ typedef enum _state_11d_t {
|
|||
|
||||
/** Domain regulatory information */
|
||||
typedef struct _wlan_802_11d_domain_reg {
|
||||
/** dfs_region */
|
||||
t_u8 dfs_region;
|
||||
/** Country Code */
|
||||
t_u8 country_code[COUNTRY_CODE_LEN];
|
||||
/** band that channels in sub_band belong to */
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
/** No. of subband in below */
|
||||
t_u8 no_of_sub_band;
|
||||
/** Subband data to send/last sent */
|
||||
|
@ -1167,6 +1144,7 @@ typedef struct _mlan_private {
|
|||
/** AdHoc previous ssid used for Start */
|
||||
mlan_802_11_ssid adhoc_last_start_ssid;
|
||||
#endif
|
||||
mlan_ds_11h_chan_rep_req chan_rep_req;
|
||||
/** FSM variable for 11d support */
|
||||
wlan_802_11d_state_t state_11d;
|
||||
/** FSM variable for 11h support */
|
||||
|
@ -1273,7 +1251,10 @@ typedef struct _mlan_private {
|
|||
t_u8 assoc_rsp_buf[MRVDRV_ASSOC_RSP_BUF_SIZE];
|
||||
/** Length of the data stored in assoc_rsp_buf */
|
||||
t_u32 assoc_rsp_size;
|
||||
|
||||
/** Buffer to store the association req IEs */
|
||||
t_u8 assoc_req_buf[MRVDRV_ASSOC_RSP_BUF_SIZE];
|
||||
/** Length of the data stored in assoc_rsp_buf */
|
||||
t_u32 assoc_req_size;
|
||||
/** Generic IEEE IEs passed from the application to be inserted into the
|
||||
* association request to firmware
|
||||
*/
|
||||
|
@ -1537,6 +1518,10 @@ struct _sta_node {
|
|||
IEEEtypes_VHTCap_t vht_cap;
|
||||
/** VHT Operations IE */
|
||||
IEEEtypes_VHTOprat_t vht_oprat;
|
||||
/** HE Capabilities IE */
|
||||
IEEEtypes_HECap_t tdls_he_cap;
|
||||
/** HE Operations IE */
|
||||
IEEEtypes_HeOp_t he_op;
|
||||
/** wapi key on off flag */
|
||||
t_u8 wapi_key_on;
|
||||
/** tx pause status */
|
||||
|
@ -1817,6 +1802,8 @@ typedef struct _mef_cfg_data {
|
|||
|
||||
/** Type definition of mef_entry*/
|
||||
typedef struct _mef_entry {
|
||||
/** Flag for auto arp entry*/
|
||||
int enable_autoarp_entry;
|
||||
/** Num for wowlan entry*/
|
||||
int num_wowlan_entry;
|
||||
/** Num for IPv6 neighbor solicitation message offload */
|
||||
|
@ -1892,6 +1879,7 @@ typedef struct _mlan_init_para {
|
|||
/** adma ring size */
|
||||
t_u16 ring_size;
|
||||
#endif
|
||||
t_u8 ext_scan;
|
||||
} mlan_init_para, *pmlan_init_para;
|
||||
|
||||
#ifdef SDIO
|
||||
|
@ -2018,6 +2006,8 @@ typedef struct _mlan_sdio_card {
|
|||
t_u32 mpa_sent_no_ports;
|
||||
/** last wr_bitmap from FW */
|
||||
t_u32 last_recv_wr_bitmap;
|
||||
/** last wr_bitmap from FW */
|
||||
t_u32 last_recv_rd_bitmap;
|
||||
/** last mp_wr_bitmap */
|
||||
t_u32 last_mp_wr_bitmap[SDIO_MP_DBG_NUM];
|
||||
/** last ports for cmd53 write data */
|
||||
|
@ -2265,6 +2255,10 @@ typedef struct _adapter_operations {
|
|||
pmlan_buffer pmbuf);
|
||||
/** handle dump interface specific info */
|
||||
mlan_status (*debug_dump)(mlan_adapter *pmadapter);
|
||||
/** disable host interrupt */
|
||||
mlan_status (*disable_host_int)(mlan_adapter *pmadapter);
|
||||
/** enable host interrupt */
|
||||
mlan_status (*enable_host_int)(mlan_adapter *pmadapter);
|
||||
/**Interface header length*/
|
||||
t_u32 intf_header_len;
|
||||
} mlan_adapter_operations;
|
||||
|
@ -2352,7 +2346,8 @@ typedef struct _mlan_adapter {
|
|||
/** Extended firmware capability information */
|
||||
t_u32 fw_cap_ext;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
/** High byte for 5G, low byte for 2G, like 0x2211 0x22 for 5G, 0x11 for
|
||||
* 2G */
|
||||
t_u16 user_htstream;
|
||||
|
@ -2405,8 +2400,6 @@ typedef struct _mlan_adapter {
|
|||
* FALSE - No cmd response to process
|
||||
*/
|
||||
t_u8 cmd_resp_received;
|
||||
/** block download cmd to firmware */
|
||||
t_u8 cmd_lock;
|
||||
/** Event received:
|
||||
* TRUE - Event received from fw, and yet to process
|
||||
* FALSE - No events to process
|
||||
|
@ -2446,6 +2439,8 @@ typedef struct _mlan_adapter {
|
|||
mlan_list_head cmd_pending_q;
|
||||
/** Command queue for scanning */
|
||||
mlan_list_head scan_pending_q;
|
||||
/** Command pending queue while scanning */
|
||||
mlan_list_head ext_cmd_pending_q;
|
||||
/** ioctl pending queue */
|
||||
mlan_list_head ioctl_pending_q;
|
||||
/** pending_ioctl flag */
|
||||
|
@ -2453,6 +2448,10 @@ typedef struct _mlan_adapter {
|
|||
pmlan_private pending_disconnect_priv;
|
||||
/** mlan_processing */
|
||||
t_u32 scan_processing;
|
||||
/** firmware support for roaming*/
|
||||
t_u8 fw_roaming;
|
||||
/** User set passphrase*/
|
||||
t_u8 userset_passphrase;
|
||||
/** ext_scan enh support flag */
|
||||
t_u8 ext_scan_enh;
|
||||
/** scan type: 0 legacy, 1: enhance scan*/
|
||||
|
@ -2687,6 +2686,12 @@ typedef struct _mlan_adapter {
|
|||
/** RX pending for forwarding packets */
|
||||
mlan_scalar pending_bridge_pkts;
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
/** ARP filter buffer */
|
||||
t_u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE];
|
||||
/** ARP filter buffer size */
|
||||
t_u32 arp_filter_size;
|
||||
#endif /* STA_SUPPORT */
|
||||
/** Minimum delay between HsActive and HostWake (in msec) */
|
||||
t_u16 min_wake_holdoff;
|
||||
/** Host sleep wake interval(in msec) */
|
||||
|
@ -2714,7 +2719,7 @@ typedef struct _mlan_adapter {
|
|||
/** management frame wakeup filter config */
|
||||
mlan_mgmt_frame_wakeup mgmt_filter[MAX_MGMT_FRAME_FILTER];
|
||||
/** Bypass TX queue pkt count */
|
||||
t_u16 bypass_pkt_count;
|
||||
t_u32 bypass_pkt_count;
|
||||
#ifdef STA_SUPPORT
|
||||
/** warm-reset IOCTL request buffer pointer */
|
||||
pmlan_ioctl_req pwarm_reset_ioctl_req;
|
||||
|
@ -2736,6 +2741,8 @@ typedef struct _mlan_adapter {
|
|||
/** tdls status */
|
||||
/* TDLS_NOT_SETUP|TDLS_SWITCHING_CHANNEL|TDLS_IN_BASE_CHANNEL|TDLS_IN_SWITCH_CHANNEL*/
|
||||
tdlsStatus_e tdls_status;
|
||||
/** NetMon enabled */
|
||||
t_u32 enable_net_mon;
|
||||
/** Feature control bitmask */
|
||||
t_u32 feature_control;
|
||||
|
||||
|
@ -2747,6 +2754,7 @@ typedef struct _mlan_adapter {
|
|||
#if defined(PCIE)
|
||||
mlan_buffer *ssu_buf;
|
||||
#endif
|
||||
t_u8 csi_enabled;
|
||||
/** maximum sta connection */
|
||||
t_u8 max_sta_conn;
|
||||
otp_region_info_t *otp_region;
|
||||
|
@ -2789,6 +2797,18 @@ typedef struct _mlan_adapter {
|
|||
/** Ethernet packet type offset */
|
||||
#define MLAN_ETHER_PKT_TYPE_OFFSET (12)
|
||||
|
||||
mlan_status wlan_cmd_net_monitor(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
|
||||
mlan_status wlan_ret_net_monitor(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
mlan_status wlan_misc_ioctl_net_monitor(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
void wlan_rxpdinfo_to_radiotapinfo(pmlan_private priv, RxPD *prx_pd,
|
||||
radiotap_info *prt_info);
|
||||
|
||||
mlan_status wlan_init_lock_list(pmlan_adapter pmadapter);
|
||||
mlan_status wlan_init_priv_lock_list(pmlan_adapter pmadapter, t_u8 start_index);
|
||||
t_void wlan_free_lock_list(pmlan_adapter pmadapter);
|
||||
|
@ -2872,6 +2892,9 @@ mlan_status wlan_bss_ioctl_bss_role(pmlan_adapter pmadapter,
|
|||
mlan_status wlan_misc_ssu(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req);
|
||||
#endif
|
||||
|
||||
mlan_status wlan_misc_csi(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_process_csi_event(pmlan_private pmpriv);
|
||||
|
||||
mlan_status wlan_misc_hal_phy_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
|
@ -2901,6 +2924,7 @@ t_void wlan_release_cmd_lock(mlan_adapter *pmadapter);
|
|||
#ifdef STA_SUPPORT
|
||||
/** Flush the scan pending queue */
|
||||
t_void wlan_flush_scan_queue(pmlan_adapter pmadapter);
|
||||
t_void wlan_move_cmd_to_cmd_pending_q(pmlan_adapter pmadapter);
|
||||
mlan_status wlan_cancel_pending_scan_cmd(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
#endif
|
||||
|
@ -3118,6 +3142,17 @@ mlan_status wlan_ret_p2p_params_config(pmlan_private pmpriv,
|
|||
mlan_status wlan_misc_p2p_config(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
#endif
|
||||
mlan_status wlan_cmd_gpio_tsf_latch(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
||||
mlan_ioctl_req *pioctl_buf,
|
||||
t_void *pdata_buf);
|
||||
mlan_status wlan_ret_gpio_tsf_latch(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_misc_gpio_tsf_latch_config(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_misc_get_tsf_info(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
/** get ralist info */
|
||||
int wlan_get_ralist_info(mlan_private *priv, pralist_info buf);
|
||||
/** dump ralist */
|
||||
|
@ -3332,9 +3367,9 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect);
|
|||
t_void wlan_2040_coex_event(pmlan_private pmpriv);
|
||||
|
||||
/** convert band to radio type */
|
||||
t_u8 wlan_band_to_radio_type(t_u8 band);
|
||||
t_u8 wlan_band_to_radio_type(t_u16 band);
|
||||
/** convert radio_type to band */
|
||||
t_u8 radio_type_to_band(t_u8 chanBand);
|
||||
t_u16 radio_type_to_band(t_u8 chanBand);
|
||||
|
||||
/** Disconnect */
|
||||
mlan_status wlan_disconnect(mlan_private *pmpriv, mlan_ioctl_req *pioctl_req,
|
||||
|
@ -3380,18 +3415,19 @@ mlan_status wlan_ret_802_11_bgscan_query(mlan_private *pmpriv,
|
|||
|
||||
/** Get Channel-Frequency-Power by band and channel */
|
||||
chan_freq_power_t *
|
||||
wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, t_u8 band,
|
||||
wlan_get_cfp_by_band_and_channel(pmlan_adapter pmadapter, t_u16 band,
|
||||
t_u16 channel, region_chan_t *region_channel);
|
||||
/** Find Channel-Frequency-Power by band and channel */
|
||||
chan_freq_power_t *wlan_find_cfp_by_band_and_channel(mlan_adapter *pmadapter,
|
||||
t_u8 band, t_u16 channel);
|
||||
t_u16 band, t_u16 channel);
|
||||
/** Find Channel-Frequency-Power by band and frequency */
|
||||
chan_freq_power_t *wlan_find_cfp_by_band_and_freq(mlan_adapter *pmadapter,
|
||||
t_u8 band, t_u32 freq);
|
||||
t_u16 band, t_u32 freq);
|
||||
/** Get Tx power of channel from Channel-Frequency-Power */
|
||||
t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u8 channel);
|
||||
t_u8 wlan_get_txpwr_of_chan_from_cfp(mlan_private *pmpriv, t_u16 band,
|
||||
t_u8 channel);
|
||||
/** find frequency from band and channel */
|
||||
t_u32 wlan_find_freq_from_band_chan(t_u8, t_u8);
|
||||
t_u32 wlan_find_freq_from_band_chan(t_u16 band, t_u8 chan);
|
||||
|
||||
/* Save a beacon buffer of the current bss descriptor */
|
||||
t_void wlan_save_curr_bcn(mlan_private *pmpriv);
|
||||
|
@ -3445,7 +3481,10 @@ 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_ips_config(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
mlan_status wlan_ret_ips_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_cmd_rate_adapt_cfg(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
|
||||
t_void *pdata_buf);
|
||||
|
@ -3492,27 +3531,28 @@ mlan_status wlan_misc_ioctl_tp_state(pmlan_adapter pmadapter,
|
|||
/* CFP related functions */
|
||||
/** Region code index table */
|
||||
extern t_u16 region_code_index[MRVDRV_MAX_REGION_CODE];
|
||||
/** The table to keep CFP code for BG */
|
||||
extern t_u16 cfp_code_index_bg[MRVDRV_MAX_CFP_CODE_BG];
|
||||
/** The table to keep CFP code for A */
|
||||
extern t_u16 cfp_code_index_a[MRVDRV_MAX_CFP_CODE_A];
|
||||
|
||||
/** Set region table */
|
||||
mlan_status wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u8 band);
|
||||
mlan_status wlan_set_regiontable(mlan_private *pmpriv, t_u8 region, t_u16 band);
|
||||
/** Get radar detection requirements*/
|
||||
t_bool wlan_get_cfp_radar_detect(mlan_private *priv, t_u8 chnl);
|
||||
/** check if scan type is passive for b/g band*/
|
||||
t_bool wlan_bg_scan_type_is_passive(mlan_private *priv, t_u8 chnl);
|
||||
/** check if channel is NO_IR (passive) */
|
||||
t_bool wlan_is_chan_passive(mlan_private *priv, t_u8 band, t_u8 chan);
|
||||
t_bool wlan_is_chan_passive(mlan_private *priv, t_u16 band, t_u8 chan);
|
||||
/** check if channel is disabled */
|
||||
t_bool wlan_is_chan_disabled(mlan_private *priv, t_u8 band, t_u8 chan);
|
||||
t_bool wlan_is_chan_disabled(mlan_private *priv, t_u16 band, t_u8 chan);
|
||||
/** check if channel is blacklisted */
|
||||
t_bool wlan_is_chan_blacklisted(mlan_private *priv, t_u8 band, t_u8 chan);
|
||||
t_bool wlan_is_chan_blacklisted(mlan_private *priv, t_u16 band, t_u8 chan);
|
||||
/** set blacklist setting for a channel */
|
||||
t_bool wlan_set_chan_blacklist(mlan_private *priv, t_u8 band, t_u8 chan,
|
||||
t_bool wlan_set_chan_blacklist(mlan_private *priv, t_u16 band, t_u8 chan,
|
||||
t_bool bl);
|
||||
|
||||
dfs_state_t wlan_get_chan_dfs_state(mlan_private *priv, t_u16 band, t_u8 chan);
|
||||
t_void wlan_set_chan_dfs_state(mlan_private *priv, t_u16 band, t_u8 chan,
|
||||
dfs_state_t dfs_state);
|
||||
/* 802.11D related functions */
|
||||
/** Initialize 11D */
|
||||
t_void wlan_11d_priv_init(mlan_private *pmpriv);
|
||||
|
@ -3535,16 +3575,16 @@ mlan_status wlan_cmd_802_11d_domain_info(mlan_private *pmpriv,
|
|||
mlan_status wlan_ret_802_11d_domain_info(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *resp);
|
||||
/** Convert channel to frequency */
|
||||
t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u8 band);
|
||||
t_u32 wlan_11d_chan_2_freq(pmlan_adapter pmadapter, t_u8 chan, t_u16 band);
|
||||
#ifdef STA_SUPPORT
|
||||
/** Set 11D universal table */
|
||||
mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u8 band);
|
||||
mlan_status wlan_11d_set_universaltable(mlan_private *pmpriv, t_u16 band);
|
||||
/** Clear 11D region table */
|
||||
mlan_status wlan_11d_clear_parsedtable(mlan_private *pmpriv);
|
||||
/** Create 11D country information for downloading */
|
||||
mlan_status wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u8 band);
|
||||
mlan_status wlan_11d_create_dnld_countryinfo(mlan_private *pmpriv, t_u16 band);
|
||||
/** Get scan type from 11D info */
|
||||
t_u8 wlan_11d_get_scan_type(pmlan_adapter pmadapter, t_u8 band, t_u8 chan,
|
||||
t_u8 wlan_11d_get_scan_type(pmlan_adapter pmadapter, t_u16 band, t_u8 chan,
|
||||
parsed_region_chan_11d_t *parsed_region_chan);
|
||||
/** Parse 11D country info */
|
||||
mlan_status wlan_11d_parse_dnld_countryinfo(mlan_private *pmpriv,
|
||||
|
@ -3554,11 +3594,11 @@ mlan_status wlan_11d_prepare_dnld_domain_info_cmd(mlan_private *pmpriv);
|
|||
/** Parse 11D country information into domain info */
|
||||
mlan_status wlan_11d_parse_domain_info(
|
||||
pmlan_adapter pmadapter, IEEEtypes_CountryInfoFullSet_t *country_info,
|
||||
t_u8 band, parsed_region_chan_11d_t *parsed_region_chan);
|
||||
t_u16 band, parsed_region_chan_11d_t *parsed_region_chan);
|
||||
#endif /* STA_SUPPORT */
|
||||
#ifdef UAP_SUPPORT
|
||||
/** Handle 11D domain information from UAP */
|
||||
mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u8 band,
|
||||
mlan_status wlan_11d_handle_uap_domain_info(mlan_private *pmpriv, t_u16 band,
|
||||
t_u8 *domain_tlv,
|
||||
t_void *pioctl_buf);
|
||||
#endif
|
||||
|
@ -3804,6 +3844,7 @@ mlan_status wlan_set_drvdbg(pmlan_adapter pmadapter,
|
|||
|
||||
mlan_status wlan_misc_hotspot_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
mlan_status wlan_misc_ext_capa_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
@ -3922,6 +3963,19 @@ mlan_status wlan_ret_802_11_supplicant_pmk(pmlan_private pmpriv,
|
|||
mlan_status wlan_sec_ioctl_passphrase(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
|
||||
mlan_status wlan_cmd_mc_aggr_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
mlan_status wlan_ret_mc_aggr_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
mlan_status wlan_misc_ioctl_mc_aggr_cfg(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req);
|
||||
mlan_status wlan_misc_ioctl_ch_load(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req);
|
||||
mlan_status wlan_cmd_get_ch_load(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf);
|
||||
mlan_status wlan_ret_ch_load(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
mlan_status wlan_misc_ioctl_get_tsf(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
void wlan_add_fw_cfp_tables(pmlan_private pmpriv, t_u8 *buf, t_u16 buf_left);
|
||||
|
@ -3943,6 +3997,8 @@ mlan_status wlan_ret_get_tsf(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
|
||||
t_u8 wlan_ft_akm_is_used(mlan_private *pmpriv, t_u8 *rsn_ie);
|
||||
|
||||
mlan_status wlan_clear_fw_roaming_pmk(pmlan_private pmpriv);
|
||||
|
||||
mlan_status wlan_get_rgchnpwr_cfg(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req);
|
||||
mlan_status wlan_get_chan_trpc_cfg(pmlan_adapter pmadapter,
|
||||
|
@ -3986,6 +4042,12 @@ mlan_status wlan_cmd_config_dyn_bw(pmlan_private pmpriv,
|
|||
mlan_status wlan_ret_dyn_bw(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
/** wacp mode misc ioctl */
|
||||
mlan_status wlan_misc_ioctl_wacp_mode(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req);
|
||||
#endif
|
||||
|
||||
mlan_status wlan_power_ioctl_set_get_lpm(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_cmd_set_get_low_power_mode_cfg(pmlan_private pmpriv,
|
||||
|
@ -4001,6 +4063,14 @@ mlan_status wlan_cmd_range_ext(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
mlan_status wlan_ret_range_ext(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req);
|
||||
mlan_status wlan_cmd_get_sensor_temp(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action);
|
||||
mlan_status wlan_ret_get_sensor_temp(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf);
|
||||
|
||||
/**
|
||||
* @brief RA based queueing
|
||||
*
|
||||
|
|
|
@ -12,20 +12,29 @@
|
|||
* - ENABLE_MEAS
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -9,20 +9,29 @@
|
|||
* @sa mlan_meas.c
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,20 +3,29 @@
|
|||
* @brief This file declares the exported symbols from MLAN.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -45,6 +54,7 @@ EXPORT_SYMBOL(mlan_ioctl);
|
|||
EXPORT_SYMBOL(mlan_main_process);
|
||||
EXPORT_SYMBOL(mlan_rx_process);
|
||||
EXPORT_SYMBOL(mlan_select_wmm_queue);
|
||||
EXPORT_SYMBOL(mlan_process_deaggr_pkt);
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
EXPORT_SYMBOL(mlan_interrupt);
|
||||
#if defined(SYSKT)
|
||||
|
@ -57,6 +67,8 @@ EXPORT_SYMBOL(mlan_is_main_process_running);
|
|||
#ifdef PCIE
|
||||
EXPORT_SYMBOL(mlan_set_int_mode);
|
||||
#endif
|
||||
EXPORT_SYMBOL(mlan_disable_host_int);
|
||||
EXPORT_SYMBOL(mlan_enable_host_int);
|
||||
|
||||
MODULE_DESCRIPTION("M-WLAN MLAN Driver");
|
||||
MODULE_AUTHOR("NXP");
|
||||
|
|
|
@ -5,18 +5,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -118,7 +127,7 @@ static const struct _mlan_card_info mlan_card_info_pcie8997 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef PCIE9097
|
||||
#if defined(PCIE9097) || defined(PCIENW62X)
|
||||
static const struct _mlan_pcie_card_reg mlan_reg_pcie9097_b0 = {
|
||||
.reg_txbd_rdptr = PCIE9098_TXBD_RDPTR,
|
||||
.reg_txbd_wrptr = PCIE9098_TXBD_WRPTR,
|
||||
|
@ -152,7 +161,7 @@ static const struct _mlan_pcie_card_reg mlan_reg_pcie9097_b0 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
static const struct _mlan_pcie_card_reg mlan_reg_pcie9098 = {
|
||||
.reg_txbd_rdptr = PCIE9098_TXBD_RDPTR,
|
||||
.reg_txbd_wrptr = PCIE9098_TXBD_WRPTR,
|
||||
|
@ -204,7 +213,7 @@ static const struct _mlan_card_info mlan_card_info_pcie9098 = {
|
|||
static mlan_status wlan_pcie_delete_evtbd_ring(pmlan_adapter pmadapter);
|
||||
static mlan_status wlan_pcie_delete_rxbd_ring(pmlan_adapter pmadapter);
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
/**
|
||||
* @brief This function init the adma setting
|
||||
*
|
||||
|
@ -542,7 +551,7 @@ static void wlan_pcie_init_adma_ring_size(mlan_adapter *pmadapter)
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
/**
|
||||
* @brief This function set the host interrupt select mask
|
||||
*
|
||||
|
@ -590,7 +599,7 @@ static mlan_status wlan_pcie_set_host_int_select_mask(mlan_adapter *pmadapter,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
/**
|
||||
* @brief This function handles command response completion
|
||||
*
|
||||
|
@ -761,8 +770,9 @@ static mlan_status wlan_disable_pcie_host_int(mlan_adapter *pmadapter)
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if ((pmadapter->card_type == CARD_TYPE_PCIE9098) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIENW62X) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIE9097)) {
|
||||
ret = wlan_pcie_set_host_int_select_mask(pmadapter, MFALSE);
|
||||
if (ret) {
|
||||
|
@ -838,8 +848,9 @@ static mlan_status wlan_enable_pcie_host_int(mlan_adapter *pmadapter)
|
|||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if ((pmadapter->card_type == CARD_TYPE_PCIE9098) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIENW62X) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIE9097)) {
|
||||
ret = wlan_pcie_set_host_int_select_mask(pmadapter, MTRUE);
|
||||
if (ret) {
|
||||
|
@ -868,7 +879,7 @@ static mlan_status wlan_pcie_create_txbd_ring(mlan_adapter *pmadapter)
|
|||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
pmlan_pcie_data_buf ptx_bd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
padma_dual_desc_buf padma_bd_buf;
|
||||
#endif
|
||||
|
||||
|
@ -890,7 +901,7 @@ static mlan_status wlan_pcie_create_txbd_ring(mlan_adapter *pmadapter)
|
|||
pmadapter->pcard_pcie->txrx_bd_size;
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma)
|
||||
pmadapter->pcard_pcie->txbd_ring_size =
|
||||
sizeof(adma_dual_desc_buf) *
|
||||
|
@ -921,7 +932,7 @@ static mlan_status wlan_pcie_create_txbd_ring(mlan_adapter *pmadapter)
|
|||
|
||||
for (i = 0; i < pmadapter->pcard_pcie->txrx_bd_size; i++) {
|
||||
pmadapter->pcard_pcie->tx_buf_list[i] = MNULL;
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf
|
||||
|
@ -976,7 +987,7 @@ static mlan_status wlan_pcie_delete_txbd_ring(mlan_adapter *pmadapter)
|
|||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
mlan_pcie_data_buf *ptx_bd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
#endif
|
||||
|
||||
|
@ -1010,7 +1021,7 @@ static mlan_status wlan_pcie_delete_txbd_ring(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf *)
|
||||
|
@ -1062,7 +1073,7 @@ static mlan_status wlan_pcie_create_rxbd_ring(mlan_adapter *pmadapter)
|
|||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
mlan_pcie_data_buf *prxbd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
#endif
|
||||
|
||||
|
@ -1086,7 +1097,7 @@ static mlan_status wlan_pcie_create_rxbd_ring(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
/*
|
||||
* driver maintaines the write pointer and firmware maintaines the read
|
||||
* pointer. The read pointer starts at 0 (zero) while the write pointer
|
||||
|
@ -1175,7 +1186,7 @@ static mlan_status wlan_pcie_create_rxbd_ring(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf
|
||||
|
@ -1214,7 +1225,7 @@ static mlan_status wlan_pcie_delete_rxbd_ring(mlan_adapter *pmadapter)
|
|||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
mlan_pcie_data_buf *prxbd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
#endif
|
||||
|
||||
|
@ -1245,7 +1256,7 @@ static mlan_status wlan_pcie_delete_rxbd_ring(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf *)
|
||||
|
@ -1296,7 +1307,7 @@ static mlan_status wlan_pcie_create_evtbd_ring(mlan_adapter *pmadapter)
|
|||
pmlan_pcie_evt_buf pevtbd_buf;
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
#endif
|
||||
|
||||
|
@ -1315,7 +1326,7 @@ static mlan_status wlan_pcie_create_evtbd_ring(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
pmadapter->pcard_pcie->evtbd_wrptr = MLAN_MAX_EVT_BD;
|
||||
pmadapter->pcard_pcie->evtbd_ring_size =
|
||||
|
@ -1386,7 +1397,7 @@ static mlan_status wlan_pcie_create_evtbd_ring(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf
|
||||
|
@ -1425,7 +1436,7 @@ static mlan_status wlan_pcie_delete_evtbd_ring(mlan_adapter *pmadapter)
|
|||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
mlan_pcie_evt_buf *pevtbd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
#endif
|
||||
|
||||
|
@ -1455,7 +1466,7 @@ static mlan_status wlan_pcie_delete_evtbd_ring(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf *)
|
||||
|
@ -1652,7 +1663,7 @@ static t_u8 wlan_check_tx_pending_buffer(mlan_adapter *pmadapter, t_u32 rdptr)
|
|||
return MFALSE;
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
if ((pmadapter->pcard_pcie->txbd_rdptr &
|
||||
ADMA_RW_PTR_WRAP_MASK) != (rdptr & ADMA_RW_PTR_WRAP_MASK))
|
||||
|
@ -1686,7 +1697,7 @@ static mlan_status wlan_pcie_send_data_complete(mlan_adapter *pmadapter)
|
|||
pmadapter->pcard_pcie->reg->txrx_rw_ptr_rollover_ind;
|
||||
mlan_pcie_data_buf *ptx_bd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
t_u32 wrptr;
|
||||
#endif
|
||||
|
@ -1710,7 +1721,7 @@ static mlan_status wlan_pcie_send_data_complete(mlan_adapter *pmadapter)
|
|||
rdptr = rdptr >> TXBD_RW_PTR_START;
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
wrptr = rdptr & 0xffff;
|
||||
rdptr = rdptr >> ADMA_RPTR_START;
|
||||
|
@ -1770,7 +1781,7 @@ static mlan_status wlan_pcie_send_data_complete(mlan_adapter *pmadapter)
|
|||
txrx_rw_ptr_rollover_ind);
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf *)pmadapter->pcard_pcie
|
||||
|
@ -1810,7 +1821,7 @@ done:
|
|||
((wrptr & rollover_ind) == (rdptr & rollover_ind)))
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
#define ADMA_TXBD_IS_FULL(wrptr, rdptr, mask, rollover_ind) \
|
||||
(((wrptr & mask) == (rdptr & mask)) && \
|
||||
((wrptr & rollover_ind) != (rdptr & rollover_ind)))
|
||||
|
@ -1834,7 +1845,7 @@ static t_u8 wlan_check_txbd_not_full(mlan_adapter *pmadapter)
|
|||
return MFALSE;
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
txrx_rw_ptr_mask = pmadapter->pcard_pcie->txrx_bd_size - 1;
|
||||
txrx_rw_ptr_rollover_ind = pmadapter->pcard_pcie->txrx_bd_size;
|
||||
|
@ -1872,7 +1883,7 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
pmadapter->pcard_pcie->reg->txrx_rw_ptr_rollover_ind;
|
||||
mlan_pcie_data_buf *ptx_bd_buf = MNULL;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf = MNULL;
|
||||
#endif
|
||||
const t_u32 num_tx_buffs = pmadapter->pcard_pcie->txrx_bd_size;
|
||||
|
@ -1952,7 +1963,7 @@ static mlan_status wlan_pcie_send_data(mlan_adapter *pmadapter, t_u8 type,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
wr_ptr_start = ADMA_WPTR_START;
|
||||
padma_bd_buf = (adma_dual_desc_buf *)pmadapter
|
||||
|
@ -2043,7 +2054,7 @@ done_unmap:
|
|||
ptx_bd_buf->offset = 0;
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma && padma_bd_buf) {
|
||||
padma_bd_buf->paddr = 0;
|
||||
padma_bd_buf->len = 0;
|
||||
|
@ -2083,7 +2094,7 @@ static t_u8 wlan_check_rx_pending_buffer(mlan_adapter *pmadapter, t_u32 rdptr)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
if ((pmadapter->pcard_pcie->rxbd_rdptr &
|
||||
ADMA_RW_PTR_WRAP_MASK) != (rdptr & ADMA_RW_PTR_WRAP_MASK))
|
||||
|
@ -2129,7 +2140,7 @@ static t_u8 wlan_is_rx_pending_full(mlan_adapter *pmadapter, t_u32 rdptr)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
PRINTM(MDATA, "local wrptr: 0x%x -> reg rdptr: 0x%x\n",
|
||||
(pmadapter->pcard_pcie->rxbd_wrptr &
|
||||
|
@ -2169,7 +2180,7 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
|||
pmadapter->pcard_pcie->reg->txrx_rw_ptr_rollover_ind;
|
||||
mlan_pcie_data_buf *prxbd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
#endif
|
||||
t_u32 in_ts_sec, in_ts_usec;
|
||||
|
@ -2183,7 +2194,7 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma)
|
||||
rdptr = rdptr >> ADMA_RPTR_START;
|
||||
#endif
|
||||
|
@ -2341,7 +2352,7 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
|||
txbd_val = txbd_val << TXBD_RW_PTR_START;
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf *)pmadapter->pcard_pcie
|
||||
|
@ -2383,7 +2394,7 @@ static mlan_status wlan_pcie_process_recv_data(mlan_adapter *pmadapter)
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma)
|
||||
rdptr = rdptr >> ADMA_RPTR_START;
|
||||
#endif
|
||||
|
@ -2529,7 +2540,7 @@ static mlan_status wlan_pcie_send_cmd(mlan_adapter *pmadapter,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
/* To send a command, the driver will:
|
||||
1. driver prepare the cmdrep buffer for adma
|
||||
|
@ -2581,7 +2592,7 @@ static void mlan_delay_for_sleep_cookie(mlan_adapter *pmadapter,
|
|||
}
|
||||
|
||||
if (count >= max_delay_loop_cnt)
|
||||
PRINTM(MERROR, "sleep cookie not found!!\n");
|
||||
PRINTM(MINFO, "sleep cookie not found!!\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2697,7 +2708,7 @@ static mlan_status wlan_pcie_process_cmd_resp(mlan_adapter *pmadapter)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
/* Clear the cmd-rsp buffer address in adma registers.
|
||||
This will prevent firmware from writing to the same
|
||||
|
@ -2765,7 +2776,7 @@ static t_u8 wlan_check_evt_buffer(mlan_adapter *pmadapter, t_u32 rdptr)
|
|||
return MFALSE;
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
if ((pmadapter->pcard_pcie->evtbd_rdptr &
|
||||
ADMA_RW_PTR_WRAP_MASK) != (rdptr & ADMA_RW_PTR_WRAP_MASK))
|
||||
|
@ -2793,7 +2804,7 @@ static mlan_status wlan_pcie_process_event_ready(mlan_adapter *pmadapter)
|
|||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
mlan_pcie_evt_buf *pevtbd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
#endif
|
||||
ENTER();
|
||||
|
@ -2819,7 +2830,7 @@ static mlan_status wlan_pcie_process_event_ready(mlan_adapter *pmadapter)
|
|||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma)
|
||||
rdptr = rdptr >> ADMA_RPTR_START;
|
||||
#endif
|
||||
|
@ -2850,7 +2861,7 @@ static mlan_status wlan_pcie_process_event_ready(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf =
|
||||
(adma_dual_desc_buf *)pmadapter->pcard_pcie
|
||||
|
@ -2899,7 +2910,7 @@ static mlan_status wlan_pcie_process_event_ready(mlan_adapter *pmadapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma)
|
||||
pmadapter->pcard_pcie->evtbd_rdptr &=
|
||||
ADMA_RW_PTR_WRAP_MASK;
|
||||
|
@ -2944,7 +2955,7 @@ static mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
|||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
mlan_pcie_evt_buf *pevtbd_buf;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
adma_dual_desc_buf *padma_bd_buf;
|
||||
#endif
|
||||
|
||||
|
@ -2968,7 +2979,7 @@ static mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma)
|
||||
rdptr = rdptr >> ADMA_RPTR_START;
|
||||
#endif
|
||||
|
@ -2998,7 +3009,7 @@ static mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
padma_bd_buf = (adma_dual_desc_buf *)pmadapter
|
||||
->pcard_pcie->evtbd_ring[wrptr];
|
||||
|
@ -3034,7 +3045,7 @@ static mlan_status wlan_pcie_event_complete(mlan_adapter *pmadapter,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma)
|
||||
pmadapter->pcard_pcie->evtbd_wrptr &= ADMA_RW_PTR_WRAP_MASK;
|
||||
#endif
|
||||
|
@ -3267,6 +3278,10 @@ static mlan_status wlan_pcie_prog_fw_w_helper(mlan_adapter *pmadapter,
|
|||
if (IS_PCIE9097(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
#if defined(PCIENW62X)
|
||||
if (IS_PCIENW62X(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
|
||||
/* Perform firmware data transfer */
|
||||
do {
|
||||
|
@ -3475,18 +3490,21 @@ mlan_status wlan_get_pcie_device(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_pcie->txrx_bd_size = MAX_TXRX_BD;
|
||||
break;
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
case CARD_TYPE_PCIE9097:
|
||||
case CARD_TYPE_PCIE9098:
|
||||
case CARD_TYPE_PCIENW62X:
|
||||
pmadapter->pcard_pcie->reg = &mlan_reg_pcie9098;
|
||||
pmadapter->pcard_info = &mlan_card_info_pcie9098;
|
||||
pmadapter->pcard_pcie->txrx_bd_size = ADMA_DEF_TXRX_BD;
|
||||
pmadapter->pcard_pcie->txrx_num_desc = TXRX_DEF_NUM_DESC;
|
||||
#ifdef PCIE9097
|
||||
if (card_type == CARD_TYPE_PCIE9097 &&
|
||||
pmadapter->card_rev == CHIP_9097_REV_B0)
|
||||
#if defined(PCIE9097) || defined(PCIENW62X)
|
||||
if ((card_type == CARD_TYPE_PCIE9097 &&
|
||||
pmadapter->card_rev == CHIP_9097_REV_B0) ||
|
||||
(card_type == CARD_TYPE_PCIENW62X))
|
||||
pmadapter->pcard_pcie->reg = &mlan_reg_pcie9097_b0;
|
||||
#endif
|
||||
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
@ -3662,7 +3680,7 @@ mlan_status wlan_process_msix_int(mlan_adapter *pmadapter)
|
|||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->host_intr_cmd_dnld &&
|
||||
(pcie_ireg & pmadapter->pcard_pcie->reg->host_intr_cmd_dnld)) {
|
||||
if (pmadapter->cmd_sent)
|
||||
|
@ -3786,7 +3804,7 @@ static mlan_status wlan_process_pcie_int_status(mlan_adapter *pmadapter)
|
|||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->host_intr_cmd_dnld &&
|
||||
(pcie_ireg &
|
||||
pmadapter->pcard_pcie->reg->host_intr_cmd_dnld)) {
|
||||
|
@ -3947,7 +3965,7 @@ static mlan_status wlan_pcie_check_fw_status(mlan_adapter *pmadapter,
|
|||
ret = MLAN_STATUS_SUCCESS;
|
||||
break;
|
||||
} else {
|
||||
wlan_mdelay(pmadapter, 100);
|
||||
wlan_mdelay(pmadapter, 10);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
@ -4082,7 +4100,7 @@ mlan_status wlan_pcie_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
ret = wlan_pcie_send_data(pmadapter, type, pmbuf, tx_param);
|
||||
else if (type == MLAN_TYPE_CMD)
|
||||
ret = wlan_pcie_send_cmd(pmadapter, pmbuf);
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
else if (type == MLAN_TYPE_VDLL)
|
||||
ret = wlan_pcie_send_vdll(pmadapter, pmbuf);
|
||||
#endif
|
||||
|
@ -4210,8 +4228,9 @@ mlan_status wlan_alloc_pcie_ring_buf(pmlan_adapter pmadapter)
|
|||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if ((pmadapter->card_type == CARD_TYPE_PCIE9098) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIENW62X) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIE9097)) {
|
||||
wlan_pcie_init_adma_ring_size(pmadapter);
|
||||
}
|
||||
|
@ -4267,7 +4286,8 @@ mlan_status wlan_free_pcie_ring_buf(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_pcie->cmdrsp_buf = MNULL;
|
||||
#ifdef RPTR_MEM_COP
|
||||
if ((pmadapter->card_type == CARD_TYPE_PCIE9098) ||
|
||||
(pmadapter->card_type == CARD_TYPE_PCIE9097))
|
||||
(pmadapter->card_type ==
|
||||
CARD_TYPE_PCIENW62X)(pmadapter->card_type == CARD_TYPE_PCIE9097))
|
||||
wlan_pcie_free_rdptrs(pmadapter);
|
||||
#endif
|
||||
|
||||
|
@ -4351,7 +4371,7 @@ mlan_status wlan_set_pcie_buf_config(mlan_private *pmpriv)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (pmadapter->pcard_pcie->reg->use_adma) {
|
||||
/** config ADMA for Tx Data */
|
||||
wlan_init_adma(pmadapter, ADMA_TX_DATA,
|
||||
|
|
|
@ -6,18 +6,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -182,7 +191,7 @@ Change log:
|
|||
/** PF start bit */
|
||||
#define ADMA_MSIX_PF_BIT 24
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
/** PCIE9098 dev_id/vendor id reg */
|
||||
#define PCIE9098_DEV_ID_REG 0x0000
|
||||
/** PCIE revision ID register */
|
||||
|
|
|
@ -6,20 +6,29 @@
|
|||
* for sending scan commands to the firmware.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -46,7 +55,7 @@ Change log:
|
|||
/** minimum scan time for passive to active scan */
|
||||
#define MIN_PASSIVE_TO_ACTIVE_SCAN_TIME 150
|
||||
|
||||
#define MRVDRV_MAX_CHANNELS_PER_SCAN 40
|
||||
#define MRVDRV_MAX_CHANNELS_PER_SCAN 38
|
||||
/** The maximum number of channels the firmware can scan per command */
|
||||
#define MRVDRV_MAX_CHANNELS_PER_SPECIFIC_SCAN 4
|
||||
|
||||
|
@ -150,9 +159,9 @@ static t_u8 rsn_oui[CIPHER_SUITE_MAX][4] = {
|
|||
* @return Band type conversion of scanBand used in join/assoc cmds
|
||||
*
|
||||
*/
|
||||
t_u8 radio_type_to_band(t_u8 radio_type)
|
||||
t_u16 radio_type_to_band(t_u8 radio_type)
|
||||
{
|
||||
t_u8 ret_band;
|
||||
t_u16 ret_band;
|
||||
|
||||
switch (radio_type) {
|
||||
case BAND_5GHZ:
|
||||
|
@ -375,7 +384,7 @@ static t_u8 is_wpa_oui_present(mlan_adapter *pmadapter,
|
|||
*/
|
||||
static t_u8 wlan_is_band_compatible(t_u8 cfg_band, t_u8 scan_band)
|
||||
{
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
switch (scan_band) {
|
||||
case BAND_A:
|
||||
band = BAND_A | BAND_AN | BAND_AAC;
|
||||
|
@ -452,9 +461,9 @@ static t_s32 wlan_find_best_network_in_list(mlan_private *pmpriv)
|
|||
* of channels sent in a scan command and to disable the firmware channel scan
|
||||
* filter.
|
||||
*
|
||||
* @return N/A
|
||||
* @return num of channel
|
||||
*/
|
||||
static t_void wlan_scan_create_channel_list(
|
||||
static t_u8 wlan_scan_create_channel_list(
|
||||
mlan_private *pmpriv, const wlan_user_scan_cfg *puser_scan_in,
|
||||
ChanScanParamSet_t *pscan_chan_list, t_u8 filtered_scan)
|
||||
{
|
||||
|
@ -466,7 +475,7 @@ static t_void wlan_scan_create_channel_list(
|
|||
t_u32 next_chan;
|
||||
t_u8 scan_type;
|
||||
t_u8 radio_type;
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
t_u16 scan_dur = 0;
|
||||
|
||||
ENTER();
|
||||
|
@ -573,6 +582,7 @@ static t_void wlan_scan_create_channel_list(
|
|||
.chan_scan_mode.passive_to_active_scan =
|
||||
MTRUE;
|
||||
}
|
||||
|
||||
pscan_chan_list[chan_idx].max_scan_time =
|
||||
wlan_cpu_to_le16(scan_dur);
|
||||
|
||||
|
@ -602,6 +612,7 @@ static t_void wlan_scan_create_channel_list(
|
|||
}
|
||||
|
||||
LEAVE();
|
||||
return chan_idx;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -679,6 +690,14 @@ wlan_scan_channel_list(mlan_private *pmpriv, t_void *pioctl_buf,
|
|||
t_u32 done_early;
|
||||
t_u32 cmd_no;
|
||||
t_u32 first_chan = 1;
|
||||
t_u8 *ptlv_pos;
|
||||
MrvlIETypes_HTCap_t *pht_cap;
|
||||
|
||||
MrvlIETypes_VHTCap_t *pvht_cap;
|
||||
MrvlIEtypes_Extension_t *phe_cap;
|
||||
t_u16 len = 0;
|
||||
t_u8 radio_type = 0;
|
||||
|
||||
mlan_callbacks *pcb = (mlan_callbacks *)&pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
|
@ -752,7 +771,7 @@ wlan_scan_channel_list(mlan_private *pmpriv, t_void *pioctl_buf,
|
|||
MTRUE;
|
||||
first_chan = 0;
|
||||
}
|
||||
|
||||
radio_type = ptmp_chan_list->bandcfg.chanBand;
|
||||
PRINTM(MCMD_D,
|
||||
"Scan: Chan(%3d), bandcfg(%x), Mode(%d,%d), Dur(%d)\n",
|
||||
ptmp_chan_list->chan_number,
|
||||
|
@ -965,9 +984,10 @@ wlan_scan_channel_list(mlan_private *pmpriv, t_void *pioctl_buf,
|
|||
|
||||
/* The total scan time should be less than scan command timeout
|
||||
* value */
|
||||
if (total_scan_time > MRVDRV_MAX_TOTAL_SCAN_TIME) {
|
||||
if (!total_scan_time ||
|
||||
total_scan_time > MRVDRV_MAX_TOTAL_SCAN_TIME) {
|
||||
PRINTM(MMSG,
|
||||
"Total scan time %d ms is over limit (%d ms), scan skipped\n",
|
||||
"Total scan time %d ms is invalid, limit (%d ms), scan skipped\n",
|
||||
total_scan_time, MRVDRV_MAX_TOTAL_SCAN_TIME);
|
||||
if (pioctl_req)
|
||||
pioctl_req->status_code =
|
||||
|
@ -975,10 +995,59 @@ wlan_scan_channel_list(mlan_private *pmpriv, t_void *pioctl_buf,
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
break;
|
||||
}
|
||||
ptlv_pos = (t_u8 *)pchan_tlv_out + pchan_tlv_out->header.len +
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
|
||||
pchan_tlv_out->header.len =
|
||||
wlan_cpu_to_le16(pchan_tlv_out->header.len);
|
||||
|
||||
if (ISSUPP_11NENABLED(pmpriv->adapter->fw_cap_info) &&
|
||||
(pmpriv->config_bands & BAND_GN ||
|
||||
pmpriv->config_bands & BAND_AN)) {
|
||||
pht_cap = (MrvlIETypes_HTCap_t *)ptlv_pos;
|
||||
memset(pmadapter, pht_cap, 0,
|
||||
sizeof(MrvlIETypes_HTCap_t));
|
||||
pht_cap->header.type = wlan_cpu_to_le16(HT_CAPABILITY);
|
||||
pht_cap->header.len = sizeof(HTCap_t);
|
||||
wlan_fill_ht_cap_tlv(pmpriv, pht_cap,
|
||||
pmpriv->config_bands, MTRUE);
|
||||
HEXDUMP("SCAN: HT_CAPABILITIES IE", (t_u8 *)pht_cap,
|
||||
sizeof(MrvlIETypes_HTCap_t));
|
||||
ptlv_pos += sizeof(MrvlIETypes_HTCap_t);
|
||||
pht_cap->header.len =
|
||||
wlan_cpu_to_le16(pht_cap->header.len);
|
||||
}
|
||||
|
||||
if (ISSUPP_11ACENABLED(pmpriv->adapter->fw_cap_info) &&
|
||||
(pmpriv->config_bands & BAND_AAC)) {
|
||||
pvht_cap = (MrvlIETypes_VHTCap_t *)ptlv_pos;
|
||||
memset(pmadapter, pvht_cap, 0,
|
||||
sizeof(MrvlIETypes_VHTCap_t));
|
||||
pvht_cap->header.type =
|
||||
wlan_cpu_to_le16(VHT_CAPABILITY);
|
||||
pvht_cap->header.len = sizeof(VHT_capa_t);
|
||||
wlan_fill_vht_cap_tlv(pmpriv, pvht_cap,
|
||||
pmpriv->config_bands, MFALSE,
|
||||
MFALSE);
|
||||
HEXDUMP("SCAN: VHT_CAPABILITIES IE", (t_u8 *)pvht_cap,
|
||||
sizeof(MrvlIETypes_VHTCap_t));
|
||||
ptlv_pos += sizeof(MrvlIETypes_VHTCap_t);
|
||||
pvht_cap->header.len =
|
||||
wlan_cpu_to_le16(pvht_cap->header.len);
|
||||
}
|
||||
|
||||
if (IS_FW_SUPPORT_11AX(pmadapter)) {
|
||||
phe_cap = (MrvlIEtypes_Extension_t *)ptlv_pos;
|
||||
len = wlan_fill_he_cap_tlv(pmpriv, pmpriv->config_bands,
|
||||
phe_cap, MFALSE);
|
||||
HEXDUMP("SCAN: HE_CAPABILITIES IE", (t_u8 *)phe_cap,
|
||||
len);
|
||||
ptlv_pos += len;
|
||||
}
|
||||
|
||||
pscan_cfg_out->tlv_buf_len =
|
||||
(t_u32)((t_u8 *)ptlv_pos - pscan_cfg_out->tlv_buf);
|
||||
|
||||
pmadapter->pscan_channels = pstart_chan;
|
||||
|
||||
/* Send the scan command to the firmware with the specified cfg
|
||||
|
@ -1075,13 +1144,9 @@ static mlan_status wlan_scan_setup_scan_config(
|
|||
t_u8 ssid_filter;
|
||||
WLAN_802_11_RATES rates;
|
||||
t_u32 rates_size;
|
||||
MrvlIETypes_HTCap_t *pht_cap;
|
||||
|
||||
MrvlIETypes_VHTCap_t *pvht_cap;
|
||||
MrvlIEtypes_ScanChanGap_t *pscan_gap_tlv;
|
||||
MrvlIEtypes_BssMode_t *pbss_mode;
|
||||
MrvlIEtypes_Extension_t *phe_cap;
|
||||
t_u16 len = 0;
|
||||
t_u8 num_of_channel = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1335,43 +1400,6 @@ static mlan_status wlan_scan_setup_scan_config(
|
|||
|
||||
PRINTM(MINFO, "SCAN_CMD: Rates size = %d\n", rates_size);
|
||||
|
||||
if (ISSUPP_11NENABLED(pmpriv->adapter->fw_cap_info) &&
|
||||
(pmpriv->config_bands & BAND_GN ||
|
||||
pmpriv->config_bands & BAND_AN)) {
|
||||
pht_cap = (MrvlIETypes_HTCap_t *)ptlv_pos;
|
||||
memset(pmadapter, pht_cap, 0, sizeof(MrvlIETypes_HTCap_t));
|
||||
pht_cap->header.type = wlan_cpu_to_le16(HT_CAPABILITY);
|
||||
pht_cap->header.len = sizeof(HTCap_t);
|
||||
wlan_fill_ht_cap_tlv(pmpriv, pht_cap, pmpriv->config_bands,
|
||||
MTRUE);
|
||||
HEXDUMP("SCAN: HT_CAPABILITIES IE", (t_u8 *)pht_cap,
|
||||
sizeof(MrvlIETypes_HTCap_t));
|
||||
ptlv_pos += sizeof(MrvlIETypes_HTCap_t);
|
||||
pht_cap->header.len = wlan_cpu_to_le16(pht_cap->header.len);
|
||||
}
|
||||
|
||||
if (ISSUPP_11ACENABLED(pmpriv->adapter->fw_cap_info) &&
|
||||
(pmpriv->config_bands & BAND_AAC)) {
|
||||
pvht_cap = (MrvlIETypes_VHTCap_t *)ptlv_pos;
|
||||
memset(pmadapter, pvht_cap, 0, sizeof(MrvlIETypes_VHTCap_t));
|
||||
pvht_cap->header.type = wlan_cpu_to_le16(VHT_CAPABILITY);
|
||||
pvht_cap->header.len = sizeof(VHT_capa_t);
|
||||
wlan_fill_vht_cap_tlv(pmpriv, pvht_cap, pmpriv->config_bands,
|
||||
MFALSE, MFALSE);
|
||||
HEXDUMP("SCAN: VHT_CAPABILITIES IE", (t_u8 *)pvht_cap,
|
||||
sizeof(MrvlIETypes_VHTCap_t));
|
||||
ptlv_pos += sizeof(MrvlIETypes_VHTCap_t);
|
||||
pvht_cap->header.len = wlan_cpu_to_le16(pvht_cap->header.len);
|
||||
}
|
||||
|
||||
if (IS_FW_SUPPORT_11AX(pmadapter) &&
|
||||
(pmpriv->config_bands & BAND_AAX)) {
|
||||
phe_cap = (MrvlIEtypes_Extension_t *)ptlv_pos;
|
||||
len = wlan_fill_he_cap_tlv(pmpriv, BAND_A, phe_cap, MFALSE);
|
||||
HEXDUMP("SCAN: HE_CAPABILITIES IE", (t_u8 *)phe_cap, len);
|
||||
ptlv_pos += len;
|
||||
}
|
||||
|
||||
if (wlan_is_ext_capa_support(pmpriv))
|
||||
wlan_add_ext_capa_info_ie(pmpriv, MNULL, &ptlv_pos);
|
||||
if (pmpriv->adapter->ecsa_enable) {
|
||||
|
@ -1478,7 +1506,9 @@ static mlan_status wlan_scan_setup_scan_config(
|
|||
}
|
||||
}
|
||||
|
||||
if (wlan_is_chan_passive(pmpriv, radio_type, channel)) {
|
||||
if (wlan_is_chan_passive(pmpriv,
|
||||
radio_type_to_band(radio_type),
|
||||
channel)) {
|
||||
/* do not send probe requests on this channel */
|
||||
scan_type = MLAN_SCAN_TYPE_PASSIVE;
|
||||
}
|
||||
|
@ -1568,9 +1598,12 @@ static mlan_status wlan_scan_setup_scan_config(
|
|||
}
|
||||
|
||||
} else {
|
||||
PRINTM(MINFO, "Scan: Creating full region channel list\n");
|
||||
wlan_scan_create_channel_list(pmpriv, puser_scan_in,
|
||||
pscan_chan_list, *pfiltered_scan);
|
||||
num_of_channel =
|
||||
wlan_scan_create_channel_list(pmpriv, puser_scan_in,
|
||||
pscan_chan_list,
|
||||
*pfiltered_scan);
|
||||
PRINTM(MCMND, "Scan: Creating full region channel list %d\n",
|
||||
num_of_channel);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
|
@ -2070,6 +2103,16 @@ static mlan_status wlan_interpret_bss_desc_with_ie(pmlan_adapter pmadapter,
|
|||
(*(pbss_entry->prsn_ie)).ieee_hdr.len +
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
break;
|
||||
case RSNX_IE:
|
||||
pbss_entry->prsnx_ie =
|
||||
(IEEEtypes_Generic_t *)pcurrent_ptr;
|
||||
pbss_entry->rsnx_offset =
|
||||
(t_u16)(pcurrent_ptr - pbss_entry->pbeacon_buf);
|
||||
HEXDUMP("InterpretIE: Resp RSNX_IE",
|
||||
(t_u8 *)pbss_entry->prsnx_ie,
|
||||
(*(pbss_entry->prsnx_ie)).ieee_hdr.len +
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
break;
|
||||
case WAPI_IE:
|
||||
pbss_entry->pwapi_ie =
|
||||
(IEEEtypes_Generic_t *)pcurrent_ptr;
|
||||
|
@ -2380,6 +2423,11 @@ static t_void wlan_adjust_ie_in_bss_entry(mlan_private *pmpriv,
|
|||
*)(pbss_entry->pbeacon_buf +
|
||||
pbss_entry->he_oprat_offset);
|
||||
}
|
||||
if (pbss_entry->prsnx_ie) {
|
||||
pbss_entry->prsnx_ie =
|
||||
(IEEEtypes_Generic_t *)(pbss_entry->pbeacon_buf +
|
||||
pbss_entry->rsnx_offset);
|
||||
}
|
||||
} else {
|
||||
pbss_entry->pwpa_ie = MNULL;
|
||||
pbss_entry->wpa_offset = 0;
|
||||
|
@ -2710,6 +2758,10 @@ static t_void wlan_ret_802_11_scan_store_beacon(mlan_private *pmpriv,
|
|||
pnew_beacon->he_oprat_offset =
|
||||
pmadapter->pscan_table[beacon_idx]
|
||||
.he_oprat_offset;
|
||||
if (pnew_beacon->prsnx_ie)
|
||||
pnew_beacon->rsnx_offset =
|
||||
pmadapter->pscan_table[beacon_idx]
|
||||
.rsnx_offset;
|
||||
}
|
||||
/* Point the new entry to its permanent storage space */
|
||||
pnew_beacon->pbeacon_buf = pbcn_store;
|
||||
|
@ -2970,6 +3022,11 @@ static mlan_status wlan_update_curr_bcn(mlan_private *pmpriv)
|
|||
*)(pcurr_bss->pbeacon_buf +
|
||||
pcurr_bss->he_oprat_offset);
|
||||
}
|
||||
if (pcurr_bss->prsnx_ie) {
|
||||
pcurr_bss->prsnx_ie =
|
||||
(IEEEtypes_Generic_t *)(pcurr_bss->pbeacon_buf +
|
||||
pcurr_bss->rsnx_offset);
|
||||
}
|
||||
|
||||
PRINTM(MINFO, "current beacon restored %d\n",
|
||||
pmpriv->curr_bcn_size);
|
||||
|
@ -3185,6 +3242,8 @@ static t_void wlan_scan_process_results(mlan_private *pmpriv)
|
|||
MNULL;
|
||||
pmpriv->curr_bss_params.bss_descriptor.he_oprat_offset =
|
||||
0;
|
||||
pmpriv->curr_bss_params.bss_descriptor.prsnx_ie = MNULL;
|
||||
pmpriv->curr_bss_params.bss_descriptor.rsnx_offset = 0;
|
||||
pmpriv->curr_bss_params.bss_descriptor.pbeacon_buf =
|
||||
MNULL;
|
||||
pmpriv->curr_bss_params.bss_descriptor.beacon_buf_size =
|
||||
|
@ -4160,28 +4219,18 @@ mlan_status wlan_scan_networks(mlan_private *pmpriv, t_void *pioctl_buf,
|
|||
|
||||
/* Get scan command from scan_pending_q and put to cmd_pending_q */
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
if (pmadapter->ext_scan && pmadapter->ext_scan_enh &&
|
||||
pmadapter->ext_scan_type == EXT_SCAN_ENHANCE) {
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
if (util_peek_list(pmadapter->pmoal_handle,
|
||||
&pmadapter->scan_pending_q, MNULL, MNULL)) {
|
||||
pcmd_node = (cmd_ctrl_node *)util_dequeue_list(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->scan_pending_q, MNULL, MNULL);
|
||||
pmadapter->pscan_ioctl_req = pioctl_req;
|
||||
pmadapter->scan_processing = MTRUE;
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
} else {
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
if (util_peek_list(pmadapter->pmoal_handle,
|
||||
&pmadapter->scan_pending_q, MNULL,
|
||||
MNULL)) {
|
||||
pcmd_node = (cmd_ctrl_node *)util_dequeue_list(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->scan_pending_q, MNULL,
|
||||
MNULL);
|
||||
pmadapter->pscan_ioctl_req = pioctl_req;
|
||||
pmadapter->scan_processing = MTRUE;
|
||||
wlan_insert_cmd_to_pending_q(pmadapter,
|
||||
pcmd_node, MTRUE);
|
||||
}
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node,
|
||||
MTRUE);
|
||||
}
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
}
|
||||
if (pscan_cfg_out)
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle, (t_u8 *)pscan_cfg_out);
|
||||
|
@ -4443,7 +4492,7 @@ mlan_status wlan_ret_802_11_scan(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
chan_freq_power_t *cfp;
|
||||
MrvlIEtypes_ChanBandListParamSet_t *pchan_band_tlv = MNULL;
|
||||
ChanBandParamSet_t *pchan_band;
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
t_u8 is_bgscan_resp;
|
||||
t_u32 age_ts_usec;
|
||||
t_u8 null_ssid[MLAN_MAX_SSID_LENGTH] = {0};
|
||||
|
@ -4565,7 +4614,7 @@ mlan_status wlan_ret_802_11_scan(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
bss_new_entry->bss_band = band;
|
||||
bss_new_entry->age_in_secs = pmadapter->age_in_secs;
|
||||
cfp = wlan_find_cfp_by_band_and_channel(
|
||||
pmadapter, (t_u8)bss_new_entry->bss_band,
|
||||
pmadapter, bss_new_entry->bss_band,
|
||||
(t_u16)bss_new_entry->channel);
|
||||
if (cfp)
|
||||
bss_new_entry->freq = cfp->freq;
|
||||
|
@ -4832,7 +4881,6 @@ mlan_status wlan_cmd_802_11_scan_ext(mlan_private *pmpriv,
|
|||
(t_u16)(sizeof(pext_scan_cmd->reserved)) +
|
||||
S_DS_GEN));
|
||||
pext_scan_cmd->ext_scan_type = EXT_SCAN_CANCEL;
|
||||
pmpriv->adapter->cmd_lock = MFALSE;
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -4902,7 +4950,6 @@ mlan_status wlan_ret_802_11_scan_ext(mlan_private *pmpriv,
|
|||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
} else if (ext_scan_type == EXT_SCAN_ENHANCE) {
|
||||
pmpriv->adapter->cmd_lock = MTRUE;
|
||||
/* Setup the timer after scan command response */
|
||||
pcb->moal_start_timer(pmpriv->adapter->pmoal_handle,
|
||||
pmpriv->adapter->pmlan_cmd_timer, MFALSE,
|
||||
|
@ -5478,7 +5525,7 @@ static mlan_status wlan_parse_ext_scan_result(mlan_private *pmpriv,
|
|||
MrvlIEtypes_Data_t *ptlv = MNULL;
|
||||
MrvlIEtypes_Bss_Scan_Rsp_t *pscan_rsp_tlv = MNULL;
|
||||
MrvlIEtypes_Bss_Scan_Info_t *pscan_info_tlv = MNULL;
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
t_u32 age_ts_usec;
|
||||
|
||||
ENTER();
|
||||
|
@ -5635,7 +5682,7 @@ static mlan_status wlan_parse_ext_scan_result(mlan_private *pmpriv,
|
|||
bss_new_entry->age_in_secs = pmadapter->age_in_secs;
|
||||
|
||||
cfp = wlan_find_cfp_by_band_and_channel(
|
||||
pmadapter, (t_u8)bss_new_entry->bss_band,
|
||||
pmadapter, bss_new_entry->bss_band,
|
||||
(t_u16)bss_new_entry->channel);
|
||||
if (cfp)
|
||||
bss_new_entry->freq = cfp->freq;
|
||||
|
@ -5818,6 +5865,7 @@ mlan_status wlan_handle_event_ext_scan_status(mlan_private *pmpriv,
|
|||
MrvlIEtypesHeader_t *tlv;
|
||||
MrvlIEtypes_ChannelStats_t *tlv_chan_stats;
|
||||
t_u8 status;
|
||||
cmd_ctrl_node *pcmd_node = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -5861,6 +5909,46 @@ mlan_status wlan_handle_event_ext_scan_status(mlan_private *pmpriv,
|
|||
}
|
||||
|
||||
done:
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
if (util_peek_list(pmadapter->pmoal_handle, &pmadapter->scan_pending_q,
|
||||
MNULL, MNULL)) {
|
||||
/* If firmware not ready, do not issue any more scan
|
||||
* commands */
|
||||
if (pmadapter->hw_status != WlanHardwareStatusReady) {
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
/* Flush all pending scan commands */
|
||||
wlan_flush_scan_queue(pmadapter);
|
||||
wlan_request_cmd_lock(pmadapter);
|
||||
pmadapter->scan_processing = MFALSE;
|
||||
pioctl_req = pmadapter->pscan_ioctl_req;
|
||||
pmadapter->pscan_ioctl_req = MNULL;
|
||||
/* Indicate IOCTL complete */
|
||||
if (pioctl_req != MNULL) {
|
||||
pioctl_req->status_code =
|
||||
MLAN_ERROR_FW_NOT_READY;
|
||||
|
||||
/* Indicate ioctl complete */
|
||||
pcb->moal_ioctl_complete(
|
||||
pmadapter->pmoal_handle,
|
||||
(pmlan_ioctl_req)pioctl_req,
|
||||
MLAN_STATUS_FAILURE);
|
||||
}
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
} else {
|
||||
/* Get scan command from scan_pending_q and put
|
||||
* to cmd_pending_q */
|
||||
pcmd_node = (cmd_ctrl_node *)util_dequeue_list(
|
||||
pmadapter->pmoal_handle,
|
||||
&pmadapter->scan_pending_q, MNULL, MNULL);
|
||||
wlan_insert_cmd_to_pending_q(pmadapter, pcmd_node,
|
||||
MTRUE);
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
}
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
|
||||
/* Now we got response from FW, cancel the command timer */
|
||||
if (!pmadapter->curr_cmd && pmadapter->cmd_timer_is_set) {
|
||||
/* Cancel command timeout timer */
|
||||
|
@ -5902,6 +5990,7 @@ done:
|
|||
MLAN_STATUS_SUCCESS);
|
||||
}
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
wlan_move_cmd_to_cmd_pending_q(pmadapter);
|
||||
pmadapter->bgscan_reported = MFALSE;
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_SCAN_REPORT, MNULL);
|
||||
LEAVE();
|
||||
|
@ -5963,7 +6052,7 @@ wlan_bgscan_create_channel_list(mlan_private *pmpriv,
|
|||
t_u32 next_chan;
|
||||
t_u8 scan_type;
|
||||
t_u8 radio_type;
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -6122,7 +6211,7 @@ mlan_status wlan_cmd_bgscan_config(mlan_private *pmpriv,
|
|||
t_u8 radio_type;
|
||||
t_u16 scan_dur;
|
||||
t_u8 scan_type;
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
const t_u8 zero_mac[6] = {0, 0, 0, 0, 0, 0};
|
||||
|
||||
ENTER();
|
||||
|
@ -6346,10 +6435,10 @@ mlan_status wlan_cmd_bgscan_config(mlan_private *pmpriv,
|
|||
pvht_cap->header.len = wlan_cpu_to_le16(pvht_cap->header.len);
|
||||
}
|
||||
|
||||
if (IS_FW_SUPPORT_11AX(pmadapter) &&
|
||||
(pmpriv->config_bands & BAND_AAX)) {
|
||||
if (IS_FW_SUPPORT_11AX(pmadapter)) {
|
||||
phe_cap = (MrvlIEtypes_Extension_t *)tlv;
|
||||
len = wlan_fill_he_cap_tlv(pmpriv, BAND_A, phe_cap, MFALSE);
|
||||
len = wlan_fill_he_cap_tlv(pmpriv, pmpriv->config_bands,
|
||||
phe_cap, MFALSE);
|
||||
DBG_HEXDUMP(MCMD_D, "BGSCAN: HE_CAPABILITIES IE",
|
||||
(t_u8 *)phe_cap, len);
|
||||
tlv += len;
|
||||
|
|
|
@ -5,18 +5,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -221,8 +230,8 @@ static const struct _mlan_card_info mlan_card_info_sd8897 = {
|
|||
#endif
|
||||
|
||||
#if defined(SD8977) || defined(SD8997) || defined(SD8987) || \
|
||||
defined(SD9098) || defined(SD9097) || defined(SD8978) || \
|
||||
defined(SD9177)
|
||||
defined(SD9098) || defined(SD9097) || defined(SDNW62X) || \
|
||||
defined(SD8978) || defined(SD9177)
|
||||
static const struct _mlan_sdio_card_reg mlan_reg_sd8977_sd8997 = {
|
||||
.start_rd_port = 0,
|
||||
.start_wr_port = 0,
|
||||
|
@ -290,6 +299,7 @@ static const struct _mlan_sdio_card_reg mlan_reg_sd8977_sd8997 = {
|
|||
.winner_check_reg = 0xFC,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD8997
|
||||
static const struct _mlan_card_info mlan_card_info_sd8997 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
|
@ -308,6 +318,17 @@ static const struct _mlan_card_info mlan_card_info_sd9097 = {
|
|||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SDNW62X
|
||||
static const struct _mlan_card_info mlan_card_info_sdnw62x = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
.supp_ps_handshake = 0,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef SD9098
|
||||
static const struct _mlan_card_info mlan_card_info_sd9098 = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
|
@ -1023,14 +1044,12 @@ static mlan_status wlan_sdio_prog_fw_w_helper(pmlan_adapter pmadapter, t_u8 *fw,
|
|||
check_fw_status = MTRUE;
|
||||
}
|
||||
#endif
|
||||
#if defined(SD9097)
|
||||
if (IS_SD9097(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
#if defined(SD9177)
|
||||
if (IS_SD9177(pmadapter->card_type))
|
||||
#if defined(SD9097) || defined(SD9177) || defined(SDNW62X)
|
||||
if (IS_SD9097(pmadapter->card_type) ||
|
||||
IS_SDNW62X(pmadapter->card_type) || IS_SD9177(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
|
||||
/* Perform firmware data transfer */
|
||||
do {
|
||||
/* The host polls for the DN_LD_CARD_RDY and CARD_IO_READY bits
|
||||
|
@ -1235,6 +1254,8 @@ static mlan_status wlan_decode_rx_packet(mlan_adapter *pmadapter,
|
|||
{
|
||||
t_u8 *cmd_buf;
|
||||
t_u32 event;
|
||||
t_u32 in_ts_sec, in_ts_usec;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1277,19 +1298,43 @@ static mlan_status wlan_decode_rx_packet(mlan_adapter *pmadapter,
|
|||
pmbuf->data_len = (pmadapter->upld_len - SDIO_INTF_HEADER_LEN);
|
||||
pmbuf->data_offset += SDIO_INTF_HEADER_LEN;
|
||||
if (pmadapter->rx_work_flag) {
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
// rx_trace 5
|
||||
if (pmadapter->tp_state_on) {
|
||||
pmadapter->callbacks.moal_tp_accounting(
|
||||
pmadapter->pmoal_handle, pmbuf,
|
||||
5 /*RX_DROP_P1*/);
|
||||
pcb->moal_get_system_time(
|
||||
pmadapter->pmoal_handle, &in_ts_sec,
|
||||
&in_ts_usec);
|
||||
pmbuf->in_ts_sec = in_ts_sec;
|
||||
pmbuf->in_ts_usec = in_ts_usec;
|
||||
}
|
||||
if (pmadapter->tp_state_drop_point ==
|
||||
5 /*RX_DROP_P1*/) {
|
||||
pmadapter->ops.data_complete(
|
||||
pmadapter, pmbuf, MLAN_STATUS_SUCCESS);
|
||||
} else {
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_lock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
util_enqueue_list_tail(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||
&pmadapter->rx_data_queue,
|
||||
(pmlan_linked_list)pmbuf, MNULL,
|
||||
MNULL);
|
||||
pmadapter->rx_pkts_queued++;
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
&pmadapter->rx_data_queue,
|
||||
(pmlan_linked_list)pmbuf, MNULL, MNULL);
|
||||
pmadapter->rx_pkts_queued++;
|
||||
if (pmadapter->tp_state_on)
|
||||
pmadapter->callbacks
|
||||
.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle,
|
||||
1,
|
||||
pmadapter
|
||||
->rx_pkts_queued);
|
||||
if (lock_flag)
|
||||
pmadapter->callbacks.moal_spin_unlock(
|
||||
pmadapter->pmoal_handle,
|
||||
pmadapter->rx_data_queue.plock);
|
||||
}
|
||||
} else {
|
||||
wlan_handle_rx_packet(pmadapter, pmbuf);
|
||||
}
|
||||
|
@ -2381,6 +2426,12 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
|
|||
pmadapter->pcard_info = &mlan_card_info_sd9097;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SDNW62X
|
||||
case CARD_TYPE_SDNW62X:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
pmadapter->pcard_info = &mlan_card_info_sdnw62x;
|
||||
break;
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
case CARD_TYPE_SD9177:
|
||||
pmadapter->pcard_sd->reg = &mlan_reg_sd8977_sd8997;
|
||||
|
@ -2397,6 +2448,80 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function dump the mp registers when issue happened
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @return N/A
|
||||
*/
|
||||
void wlan_dump_mp_registers(pmlan_adapter pmadapter)
|
||||
{
|
||||
t_u32 mp_wr_bitmap;
|
||||
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;
|
||||
t_u32 mp_rd_bitmap;
|
||||
t_u16 rx_len = 0;
|
||||
const mlan_sdio_card_reg *reg = pmadapter->pcard_sd->reg;
|
||||
t_u8 cmd_rd_len_0 = reg->cmd_rd_len_0;
|
||||
t_u8 cmd_rd_len_1 = reg->cmd_rd_len_1;
|
||||
t_u8 host_int_status_reg = reg->host_int_status_reg;
|
||||
t_u32 sdio_ireg = 0;
|
||||
|
||||
mp_wr_bitmap = (t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_l];
|
||||
mp_wr_bitmap |= ((t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_u])
|
||||
<< 8;
|
||||
if (new_mode) {
|
||||
mp_wr_bitmap |=
|
||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_1l])
|
||||
<< 16;
|
||||
mp_wr_bitmap |=
|
||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->wr_bitmap_1u])
|
||||
<< 24;
|
||||
}
|
||||
PRINTM(MMSG, "wlan: mp_data_port_mask = 0x%x\n",
|
||||
pmadapter->pcard_sd->mp_data_port_mask);
|
||||
PRINTM(MMSG, "wlan: HW wr_bitmap=0x%08x Host: wr_bitmap=0x%08x\n",
|
||||
mp_wr_bitmap, pmadapter->pcard_sd->mp_wr_bitmap);
|
||||
mp_rd_bitmap = (t_u32)pmadapter->pcard_sd->mp_regs[reg->rd_bitmap_l];
|
||||
mp_rd_bitmap |= ((t_u32)pmadapter->pcard_sd->mp_regs[reg->rd_bitmap_u])
|
||||
<< 8;
|
||||
if (new_mode) {
|
||||
mp_rd_bitmap |=
|
||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->rd_bitmap_1l])
|
||||
<< 16;
|
||||
mp_rd_bitmap |=
|
||||
((t_u32)pmadapter->pcard_sd->mp_regs[reg->rd_bitmap_1u])
|
||||
<< 24;
|
||||
}
|
||||
PRINTM(MMSG, "wlan: HW rd_bitmap=0x%08x Host: rd_bitmap=0x%08x\n",
|
||||
mp_rd_bitmap, pmadapter->pcard_sd->mp_rd_bitmap);
|
||||
|
||||
if (new_mode) {
|
||||
rx_len = ((t_u16)pmadapter->pcard_sd->mp_regs[cmd_rd_len_1])
|
||||
<< 8;
|
||||
rx_len |= (t_u16)pmadapter->pcard_sd->mp_regs[cmd_rd_len_0];
|
||||
PRINTM(MMSG, "wlan: cmd rx buffer rx_len = %d\n", rx_len);
|
||||
}
|
||||
PRINTM(MMSG, "wlan: HW sdio_ireg = 0x%x\n",
|
||||
pmadapter->pcard_sd->mp_regs[host_int_status_reg]);
|
||||
sdio_ireg = pmadapter->pcard_sd->mp_regs[host_int_status_reg];
|
||||
|
||||
if (new_mode && rx_len)
|
||||
sdio_ireg |= UP_LD_CMD_PORT_HOST_INT_STATUS;
|
||||
|
||||
if (!(pmadapter->pcard_sd->mp_wr_bitmap &
|
||||
pmadapter->pcard_sd->mp_data_port_mask)) {
|
||||
if (mp_wr_bitmap & pmadapter->pcard_sd->mp_data_port_mask)
|
||||
sdio_ireg |= DN_LD_HOST_INT_STATUS;
|
||||
}
|
||||
|
||||
if ((!pmadapter->pcard_sd->mp_rd_bitmap) && mp_rd_bitmap)
|
||||
sdio_ireg |= UP_LD_HOST_INT_STATUS;
|
||||
|
||||
pmadapter->pcard_sd->mp_regs[host_int_status_reg] = sdio_ireg;
|
||||
PRINTM(MMSG, "wlan: recovered sdio_ireg=0x%x\n", sdio_ireg);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function gets interrupt status.
|
||||
*
|
||||
|
@ -2405,10 +2530,12 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
|
|||
*/
|
||||
static mlan_status wlan_sdio_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
mlan_buffer mbuf;
|
||||
t_u32 sdio_ireg = 0;
|
||||
t_u8 offset = 0;
|
||||
t_u8 i = 0;
|
||||
int max_mp_regs = pmadapter->pcard_sd->reg->max_mp_regs;
|
||||
t_u8 host_int_status_reg =
|
||||
pmadapter->pcard_sd->reg->host_int_status_reg;
|
||||
|
@ -2419,20 +2546,32 @@ static mlan_status wlan_sdio_interrupt(t_u16 msg_id, pmlan_adapter pmadapter)
|
|||
memset(pmadapter, &mbuf, 0, sizeof(mlan_buffer));
|
||||
mbuf.pbuf = pmadapter->pcard_sd->mp_regs + offset;
|
||||
mbuf.data_len = MIN(max_mp_regs, MLAN_SDIO_BLOCK_SIZE);
|
||||
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
pcb->moal_read_data_sync(pmadapter->pmoal_handle, &mbuf,
|
||||
(REG_PORT + offset) |
|
||||
MLAN_SDIO_BYTE_MODE_MASK,
|
||||
0)) {
|
||||
PRINTM(MERROR,
|
||||
"moal_read_data_sync: read registers failed\n");
|
||||
pmadapter->dbg.num_int_read_failure++;
|
||||
goto done;
|
||||
}
|
||||
do {
|
||||
ret = pcb->moal_read_data_sync(
|
||||
pmadapter->pmoal_handle, &mbuf,
|
||||
(REG_PORT + offset) | MLAN_SDIO_BYTE_MODE_MASK,
|
||||
0);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"wlan: cmd53 read regs failed: %d port=%x retry=%d\n",
|
||||
ret, REG_PORT + offset, i);
|
||||
i++;
|
||||
pcb->moal_write_reg(pmadapter->pmoal_handle,
|
||||
HOST_TO_CARD_EVENT_REG,
|
||||
HOST_TERM_CMD53);
|
||||
if (i > MAX_WRITE_IOMEM_RETRY) {
|
||||
PRINTM(MERROR,
|
||||
"wlan: Fail to read mp_regs\n");
|
||||
pmadapter->dbg.num_int_read_failure++;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
} while (ret == MLAN_STATUS_FAILURE);
|
||||
offset += mbuf.data_len;
|
||||
max_mp_regs -= mbuf.data_len;
|
||||
}
|
||||
if (i > 0)
|
||||
wlan_dump_mp_registers(pmadapter);
|
||||
|
||||
DBG_HEXDUMP(MIF_D, "SDIO MP Registers", pmadapter->pcard_sd->mp_regs,
|
||||
max_mp_regs);
|
||||
|
@ -2669,6 +2808,8 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
|||
if (pmadapter->data_sent &&
|
||||
(pmadapter->pcard_sd->mp_wr_bitmap &
|
||||
(1 << pmadapter->pcard_sd->curr_wr_port))) {
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 3, 0);
|
||||
PRINTM(MINFO, " <--- Tx DONE Interrupt --->\n");
|
||||
pmadapter->data_sent = MFALSE;
|
||||
}
|
||||
|
@ -2699,8 +2840,13 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
|||
->mp_regs[reg->rd_bitmap_1u])
|
||||
<< 24;
|
||||
}
|
||||
pmadapter->pcard_sd->last_recv_rd_bitmap =
|
||||
pmadapter->pcard_sd->mp_rd_bitmap;
|
||||
|
||||
PRINTM(MINTR, "UPLD: rd_bitmap=0x%08x\n",
|
||||
pmadapter->pcard_sd->mp_rd_bitmap);
|
||||
pmadapter->callbacks.moal_tp_accounting_rx_param(
|
||||
pmadapter->pmoal_handle, 0, 0);
|
||||
|
||||
while (MTRUE) {
|
||||
ret = wlan_get_rd_port(pmadapter, &port);
|
||||
|
@ -2728,8 +2874,7 @@ static mlan_status wlan_process_sdio_int_status(mlan_adapter *pmadapter)
|
|||
}
|
||||
rx_len = (t_u16)(rx_blocks * MLAN_SDIO_BLOCK_SIZE);
|
||||
|
||||
if ((rx_len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) ||
|
||||
(!new_mode && (port == CTRL_PORT)))
|
||||
if (!new_mode && (port == CTRL_PORT))
|
||||
pmbuf = wlan_alloc_mlan_buffer(
|
||||
pmadapter, rx_len, 0,
|
||||
MOAL_MALLOC_BUFFER);
|
||||
|
@ -2896,7 +3041,7 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if (defined(SD9098) || defined(SD9097) || defined(SD9177))
|
||||
#if (defined(SD9098) || defined(SD9097) || defined(SDNW62X) || defined(SD9177))
|
||||
/**
|
||||
* @brief This function sends vdll data to the card.
|
||||
*
|
||||
|
@ -2957,7 +3102,7 @@ static mlan_status wlan_sdio_host_to_card_ext(pmlan_private pmpriv, t_u8 type,
|
|||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_adapter *pmadapter = pmpriv->adapter;
|
||||
|
||||
#if (defined(SD9098) || defined(SD9097) || defined(SD9177))
|
||||
#if (defined(SD9098) || defined(SD9097) || defined(SDNW62X) || defined(SD9177))
|
||||
if (type == MLAN_TYPE_VDLL)
|
||||
return wlan_sdio_send_vdll(pmadapter, pmbuf);
|
||||
#endif
|
||||
|
@ -3420,8 +3565,8 @@ mlan_status wlan_reset_fw(pmlan_adapter pmadapter)
|
|||
goto done;
|
||||
}
|
||||
#if defined(SD8997) || defined(SD8977) || defined(SD8987) || \
|
||||
defined(SD9098) || defined(SD9097) || defined(SD8978) || \
|
||||
defined(SD9177)
|
||||
defined(SD9098) || defined(SD9097) || defined(SDNW62X) || \
|
||||
defined(SD8978) || defined(SD9177)
|
||||
if (MFALSE
|
||||
#ifdef SD8997
|
||||
|| IS_SD8997(pmadapter->card_type)
|
||||
|
@ -3441,6 +3586,9 @@ mlan_status wlan_reset_fw(pmlan_adapter pmadapter)
|
|||
#ifdef SD9097
|
||||
|| IS_SD9097(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SDNW62X
|
||||
|| IS_SDNW62X(pmadapter->card_type)
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
|| IS_SD9177(pmadapter->card_type)
|
||||
#endif
|
||||
|
@ -3522,6 +3670,8 @@ mlan_adapter_operations mlan_sdio_ops = {
|
|||
.data_complete = wlan_sdio_data_evt_complete,
|
||||
.cmdrsp_complete = wlan_sdio_data_evt_complete,
|
||||
.handle_rx_packet = wlan_sdio_handle_rx_packet,
|
||||
.disable_host_int = wlan_disable_sdio_host_int,
|
||||
.enable_host_int = wlan_enable_sdio_host_int,
|
||||
|
||||
.intf_header_len = SDIO_INTF_HEADER_LEN,
|
||||
};
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
/** @file mlan_sdio.h
|
||||
*
|
||||
* @brief This file contains definitions for SDIO interface.
|
||||
* driver.
|
||||
* @brief This file contains definitions for SDIO interface.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
/****************************************************
|
||||
|
|
|
@ -2,21 +2,60 @@
|
|||
*
|
||||
* @brief This file contains APIs to MOAL module.
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @mainpage MLAN Driver
|
||||
*
|
||||
* @section overview_sec Overview
|
||||
*
|
||||
* The MLAN is an OS independent WLAN driver for NXP 802.11
|
||||
* embedded chipset.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -257,6 +296,8 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (pmdevice->callbacks.moal_recv_amsdu_packet)
|
||||
PRINTM(MMSG, "Enable moal_recv_amsdu_packet\n");
|
||||
|
||||
/* Allocate memory for adapter structure */
|
||||
if (pmdevice->callbacks.moal_vmalloc && pmdevice->callbacks.moal_vfree)
|
||||
|
@ -414,6 +455,7 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
pmadapter->init_para.mfg_mode = pmdevice->mfg_mode;
|
||||
#endif
|
||||
pmadapter->init_para.auto_ds = pmdevice->auto_ds;
|
||||
pmadapter->init_para.ext_scan = pmdevice->ext_scan;
|
||||
pmadapter->init_para.ps_mode = pmdevice->ps_mode;
|
||||
if (pmdevice->max_tx_buf == MLAN_TX_DATA_BUF_SIZE_2K ||
|
||||
pmdevice->max_tx_buf == MLAN_TX_DATA_BUF_SIZE_4K ||
|
||||
|
@ -478,24 +520,40 @@ mlan_status mlan_register(pmlan_device pmdevice, t_void **ppmlan_adapter)
|
|||
memset(pmadapter, pmadapter->priv[0], 0, sizeof(mlan_private));
|
||||
|
||||
pmadapter->priv[0]->adapter = pmadapter;
|
||||
pmadapter->priv[0]->bss_type = (t_u8)pmdevice->bss_attr[0].bss_type;
|
||||
pmadapter->priv[0]->frame_type = (t_u8)pmdevice->bss_attr[0].frame_type;
|
||||
pmadapter->priv[0]->bss_priority =
|
||||
(t_u8)pmdevice->bss_attr[0].bss_priority;
|
||||
if (pmdevice->bss_attr[0].bss_type == MLAN_BSS_TYPE_STA)
|
||||
if (pmdevice->drv_mode & DRV_MODE_MASK) {
|
||||
/* Save bss_type, frame_type & bss_priority */
|
||||
pmadapter->priv[0]->bss_type = 0xff;
|
||||
pmadapter->priv[0]->frame_type = MLAN_DATA_FRAME_TYPE_ETH_II;
|
||||
pmadapter->priv[0]->bss_priority = 0;
|
||||
pmadapter->priv[0]->bss_role = MLAN_BSS_ROLE_STA;
|
||||
else if (pmdevice->bss_attr[0].bss_type == MLAN_BSS_TYPE_UAP)
|
||||
pmadapter->priv[0]->bss_role = MLAN_BSS_ROLE_UAP;
|
||||
|
||||
/* Save bss_index and bss_num */
|
||||
pmadapter->priv[0]->bss_index = 0;
|
||||
pmadapter->priv[0]->bss_num = 0xff;
|
||||
} else {
|
||||
pmadapter->priv[0]->bss_type =
|
||||
(t_u8)pmdevice->bss_attr[0].bss_type;
|
||||
pmadapter->priv[0]->frame_type =
|
||||
(t_u8)pmdevice->bss_attr[0].frame_type;
|
||||
pmadapter->priv[0]->bss_priority =
|
||||
(t_u8)pmdevice->bss_attr[0].bss_priority;
|
||||
if (pmdevice->bss_attr[0].bss_type == MLAN_BSS_TYPE_STA)
|
||||
pmadapter->priv[0]->bss_role = MLAN_BSS_ROLE_STA;
|
||||
else if (pmdevice->bss_attr[0].bss_type == MLAN_BSS_TYPE_UAP)
|
||||
pmadapter->priv[0]->bss_role = MLAN_BSS_ROLE_UAP;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
else if (pmdevice->bss_attr[0].bss_type == MLAN_BSS_TYPE_WIFIDIRECT) {
|
||||
pmadapter->priv[0]->bss_role = MLAN_BSS_ROLE_STA;
|
||||
if (pmdevice->bss_attr[0].bss_virtual)
|
||||
pmadapter->priv[0]->bss_virtual = MTRUE;
|
||||
}
|
||||
else if (pmdevice->bss_attr[0].bss_type ==
|
||||
MLAN_BSS_TYPE_WIFIDIRECT) {
|
||||
pmadapter->priv[0]->bss_role = MLAN_BSS_ROLE_STA;
|
||||
if (pmdevice->bss_attr[0].bss_virtual)
|
||||
pmadapter->priv[0]->bss_virtual = MTRUE;
|
||||
}
|
||||
#endif
|
||||
/* Save bss_index and bss_num */
|
||||
pmadapter->priv[0]->bss_index = 0;
|
||||
pmadapter->priv[0]->bss_num = (t_u8)pmdevice->bss_attr[0].bss_num;
|
||||
/* Save bss_index and bss_num */
|
||||
pmadapter->priv[0]->bss_index = 0;
|
||||
pmadapter->priv[0]->bss_num =
|
||||
(t_u8)pmdevice->bss_attr[0].bss_num;
|
||||
}
|
||||
|
||||
/* init function table */
|
||||
for (j = 0; mlan_ops[j]; j++) {
|
||||
|
@ -644,6 +702,74 @@ mlan_status mlan_dnld_fw(t_void *padapter, pmlan_fw_image pmfw)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function mask host interrupt from firmware
|
||||
*
|
||||
* @param padapter A pointer to a t_void pointer to store
|
||||
* mlan_adapter structure pointer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
* The firmware download succeeded.
|
||||
* MLAN_STATUS_FAILURE
|
||||
* The firmware download failed.
|
||||
*/
|
||||
mlan_status mlan_disable_host_int(t_void *padapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||
|
||||
ENTER();
|
||||
MASSERT(padapter);
|
||||
|
||||
/* mask host interrupt from firmware */
|
||||
if (pmadapter->ops.disable_host_int) {
|
||||
ret = pmadapter->ops.disable_host_int(pmadapter);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR,
|
||||
"mlan_disable_host_int fail ret = 0x%x\n", ret);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function unmask host interrupt from firmware
|
||||
*
|
||||
* @param padapter A pointer to a t_void pointer to store
|
||||
* mlan_adapter structure pointer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
* The firmware download succeeded.
|
||||
* MLAN_STATUS_FAILURE
|
||||
* The firmware download failed.
|
||||
*/
|
||||
mlan_status mlan_enable_host_int(t_void *padapter)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_FAILURE;
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||
|
||||
ENTER();
|
||||
MASSERT(padapter);
|
||||
|
||||
/* unmask host interrupt from firmware */
|
||||
if (pmadapter->ops.enable_host_int) {
|
||||
ret = pmadapter->ops.enable_host_int(pmadapter);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR, "mlan_enable_host_int fail ret = 0x%x\n",
|
||||
ret);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function pass init param to MLAN
|
||||
*
|
||||
|
@ -1164,7 +1290,6 @@ process_start:
|
|||
wlan_11h_radar_detected_tx_blocked(pmadapter)) {
|
||||
if (pmadapter->cmd_sent ||
|
||||
pmadapter->curr_cmd ||
|
||||
pmadapter->cmd_lock ||
|
||||
!wlan_is_send_cmd_allowed(
|
||||
pmadapter->tdls_status) ||
|
||||
!wlan_is_cmd_pending(pmadapter)) {
|
||||
|
@ -1224,7 +1349,6 @@ process_start:
|
|||
pmadapter->vdll_ctrl.pending_block = MNULL;
|
||||
}
|
||||
if (!pmadapter->cmd_sent && !pmadapter->curr_cmd &&
|
||||
!pmadapter->cmd_lock &&
|
||||
wlan_is_send_cmd_allowed(pmadapter->tdls_status)) {
|
||||
if (wlan_exec_next_cmd(pmadapter) ==
|
||||
MLAN_STATUS_FAILURE) {
|
||||
|
@ -1632,6 +1756,50 @@ t_u8 mlan_select_wmm_queue(t_void *padapter, t_u8 bss_num, t_u8 tid)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief this function handle the amsdu packet after deaggreate.
|
||||
*
|
||||
* @param padapter A pointer to mlan_adapter structure
|
||||
* @param pmbuf A pointer to the deaggreated buf
|
||||
* @param drop A pointer to return the drop flag.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void mlan_process_deaggr_pkt(t_void *padapter, pmlan_buffer pmbuf, t_u8 *drop)
|
||||
{
|
||||
mlan_adapter *pmadapter = (mlan_adapter *)padapter;
|
||||
mlan_private *pmpriv;
|
||||
t_u16 eth_type = 0;
|
||||
|
||||
*drop = MFALSE;
|
||||
pmpriv = pmadapter->priv[pmbuf->bss_index];
|
||||
eth_type =
|
||||
mlan_ntohs(*(t_u16 *)&pmbuf->pbuf[pmbuf->data_offset +
|
||||
MLAN_ETHER_PKT_TYPE_OFFSET]);
|
||||
switch (eth_type) {
|
||||
case MLAN_ETHER_PKT_TYPE_EAPOL:
|
||||
PRINTM(MEVENT, "Recevie AMSDU EAPOL frame\n");
|
||||
if (pmpriv->sec_info.ewpa_enabled) {
|
||||
*drop = MTRUE;
|
||||
wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_EAPOL_PKT,
|
||||
0, 0, MNULL, pmbuf);
|
||||
wlan_recv_event(pmpriv,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING,
|
||||
MNULL);
|
||||
}
|
||||
break;
|
||||
case MLAN_ETHER_PKT_TYPE_TDLS_ACTION:
|
||||
PRINTM(MEVENT, "Recevie AMSDU TDLS action frame\n");
|
||||
wlan_process_tdls_action_frame(pmpriv,
|
||||
pmbuf->pbuf + pmbuf->data_offset,
|
||||
pmbuf->data_len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/**
|
||||
* @brief This function gets interrupt status.
|
||||
|
|
|
@ -5,20 +5,29 @@
|
|||
* it is ready.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -291,6 +300,16 @@ static mlan_status wlan_cmd_802_11_snmp_mib(pmlan_private pmpriv,
|
|||
cmd->size += sizeof(t_u8);
|
||||
}
|
||||
break;
|
||||
case ChanTrackParam_i:
|
||||
psnmp_mib->oid = wlan_cpu_to_le16((t_u16)ChanTrackParam_i);
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
psnmp_mib->query_type =
|
||||
wlan_cpu_to_le16(HostCmd_ACT_GEN_SET);
|
||||
psnmp_mib->buf_size = wlan_cpu_to_le16(sizeof(t_u8));
|
||||
psnmp_mib->value[0] = *(t_u8 *)pdata_buf;
|
||||
cmd->size += sizeof(t_u8);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -686,7 +705,22 @@ static mlan_status wlan_cmd_802_11_hs_cfg(pmlan_private pmpriv,
|
|||
}
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11_HS_CFG_ENH);
|
||||
|
||||
cmd->size = S_DS_GEN + sizeof(HostCmd_DS_802_11_HS_CFG_ENH);
|
||||
if (!hs_activate && (pdata_buf->conditions != HOST_SLEEP_CFG_CANCEL) &&
|
||||
((pmadapter->arp_filter_size > 0) &&
|
||||
(pmadapter->arp_filter_size <= ARP_FILTER_MAX_BUF_SIZE))) {
|
||||
PRINTM(MINFO, "Attach %d bytes ArpFilter to HSCfg cmd\n",
|
||||
pmadapter->arp_filter_size);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
((t_u8 *)phs_cfg) +
|
||||
sizeof(HostCmd_DS_802_11_HS_CFG_ENH),
|
||||
pmadapter->arp_filter, pmadapter->arp_filter_size,
|
||||
pmadapter->arp_filter_size);
|
||||
cmd->size = pmadapter->arp_filter_size +
|
||||
sizeof(HostCmd_DS_802_11_HS_CFG_ENH) + S_DS_GEN;
|
||||
tlv = (t_u8 *)phs_cfg + sizeof(HostCmd_DS_802_11_HS_CFG_ENH) +
|
||||
pmadapter->arp_filter_size;
|
||||
} else
|
||||
cmd->size = S_DS_GEN + sizeof(HostCmd_DS_802_11_HS_CFG_ENH);
|
||||
|
||||
if (hs_activate) {
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
|
@ -1265,7 +1299,12 @@ static mlan_status wlan_cmd_802_11_key_material(pmlan_private pmpriv,
|
|||
~(wlan_cpu_to_le16(KEY_INFO_MCAST_KEY));
|
||||
pkey_material->key_param_set.key_info |=
|
||||
wlan_cpu_to_le16(KEY_INFO_AES_MCAST_IGTK);
|
||||
pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC;
|
||||
if (pkey->key_flags & KEY_FLAG_GMAC_128)
|
||||
pkey_material->key_param_set.key_type =
|
||||
KEY_TYPE_ID_BIP_GMAC_128;
|
||||
else
|
||||
pkey_material->key_param_set.key_type =
|
||||
KEY_TYPE_ID_AES_CMAC;
|
||||
pkey_material->key_param_set.key_params.cmac_aes.key_len =
|
||||
wlan_cpu_to_le16(pkey->key_len);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
|
@ -1277,7 +1316,39 @@ static mlan_status wlan_cmd_802_11_key_material(pmlan_private pmpriv,
|
|||
S_DS_GEN + KEY_PARAMS_FIXED_LEN +
|
||||
sizeof(cmac_aes_param) +
|
||||
sizeof(pkey_material->action));
|
||||
PRINTM(MCMND, "Set CMAC AES Key\n");
|
||||
if (pkey->key_flags & KEY_FLAG_GMAC_128)
|
||||
PRINTM(MCMND, "Set AES 128 GMAC Key\n");
|
||||
else
|
||||
PRINTM(MCMND, "Set CMAC AES Key\n");
|
||||
goto done;
|
||||
}
|
||||
if (pkey->key_len == WPA_IGTK_256_KEY_LEN &&
|
||||
(pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK)) {
|
||||
if (pkey->key_flags &
|
||||
(KEY_FLAG_RX_SEQ_VALID | KEY_FLAG_TX_SEQ_VALID))
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
pkey_material->key_param_set.key_params
|
||||
.cmac_aes.ipn,
|
||||
pkey->pn, SEQ_MAX_SIZE, IGTK_PN_SIZE);
|
||||
pkey_material->key_param_set.key_info &=
|
||||
~(wlan_cpu_to_le16(KEY_INFO_MCAST_KEY));
|
||||
pkey_material->key_param_set.key_info |=
|
||||
wlan_cpu_to_le16(KEY_INFO_AES_MCAST_IGTK);
|
||||
pkey_material->key_param_set.key_type =
|
||||
KEY_TYPE_ID_BIP_GMAC_256;
|
||||
pkey_material->key_param_set.key_params.cmac_aes.key_len =
|
||||
wlan_cpu_to_le16(pkey->key_len);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
pkey_material->key_param_set.key_params.cmac_aes.key,
|
||||
pkey->key_material, pkey->key_len,
|
||||
WPA_IGTK_256_KEY_LEN);
|
||||
pkey_material->key_param_set.length = wlan_cpu_to_le16(
|
||||
KEY_PARAMS_FIXED_LEN + sizeof(gmac_aes_256_param));
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) +
|
||||
S_DS_GEN + KEY_PARAMS_FIXED_LEN +
|
||||
sizeof(gmac_aes_256_param) +
|
||||
sizeof(pkey_material->action));
|
||||
PRINTM(MCMND, "Set AES 256 GMAC Key\n");
|
||||
goto done;
|
||||
}
|
||||
if (pkey->key_len == WPA_TKIP_KEY_LEN) {
|
||||
|
@ -1568,6 +1639,11 @@ static mlan_status wlan_cmd_mgmt_ie_list(pmlan_private pmpriv,
|
|||
pmgmt_ie_list->ds_mgmt_ie.len = wlan_cpu_to_le16(cust_ie->len);
|
||||
|
||||
req_len = cust_ie->len;
|
||||
if (req_len > sizeof(cust_ie->ie_data_list)) {
|
||||
PRINTM(MERROR, "Invalid cust_ie->len=%d\n", req_len);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
travel_len = 0;
|
||||
/* conversion for index, mask, len */
|
||||
if (req_len == sizeof(t_u16))
|
||||
|
@ -1812,6 +1888,8 @@ static mlan_status wlan_cmd_tdls_oper(pmlan_private pmpriv,
|
|||
MrvlIETypes_VHTCap_t *VHTcap_tlv = MNULL;
|
||||
MrvlIETypes_VHTOprat_t *VHTOper_tlv = MNULL;
|
||||
MrvlIETypes_AID_t *AidInfo = MNULL;
|
||||
MrvlIEtypes_Extension_t *hecap_tlv = MNULL;
|
||||
MrvlIEtypes_He_Op_t *heop_tlv = MNULL;
|
||||
MrvlIEtypes_TDLS_Idle_Timeout_t *TdlsIdleTimeout = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
@ -2006,6 +2084,7 @@ static mlan_status wlan_cmd_tdls_oper(pmlan_private pmpriv,
|
|||
sta_ptr->aid_info.ieee_hdr.len);
|
||||
AidInfo->AID = wlan_cpu_to_le16(
|
||||
sta_ptr->aid_info.AID);
|
||||
travel_len += sizeof(MrvlIETypes_AID_t);
|
||||
}
|
||||
/* Vht capability */
|
||||
if (sta_ptr->vht_cap.ieee_hdr.element_id ==
|
||||
|
@ -2035,7 +2114,8 @@ static mlan_status wlan_cmd_tdls_oper(pmlan_private pmpriv,
|
|||
pbss_desc->bss_band, MTRUE,
|
||||
MTRUE);
|
||||
DBG_HEXDUMP(
|
||||
MCMD_D, "FW Vhtcap",
|
||||
MCMD_D,
|
||||
"TDLS Config Link: VHT Capability",
|
||||
(t_u8 *)VHTcap_tlv,
|
||||
sizeof(MrvlIETypes_VHTCap_t));
|
||||
}
|
||||
|
@ -2052,15 +2132,82 @@ static mlan_status wlan_cmd_tdls_oper(pmlan_private pmpriv,
|
|||
&VHTOper_tlv->chan_width,
|
||||
&sta_ptr->vht_oprat.chan_width,
|
||||
sta_ptr->vht_oprat.ieee_hdr.len,
|
||||
sizeof(VHTOper_tlv->chan_width));
|
||||
(sizeof(MrvlIETypes_VHTOprat_t) -
|
||||
sizeof(MrvlIEtypesHeader_t)));
|
||||
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",
|
||||
DBG_HEXDUMP(MCMD_D,
|
||||
"TDLS Config Link: VHT operation",
|
||||
(t_u8 *)VHTOper_tlv,
|
||||
sizeof(MrvlIETypes_VHTOprat_t));
|
||||
}
|
||||
/* Check if we need enable the 11AX */
|
||||
if (sta_ptr &&
|
||||
(sta_ptr->he_op.ieee_hdr.element_id == EXTENSION) &&
|
||||
(sta_ptr->he_op.ext_id == HE_OPERATION)) {
|
||||
/* HE Capability */
|
||||
hecap_tlv =
|
||||
(MrvlIEtypes_Extension_t *)(pos +
|
||||
travel_len);
|
||||
/* fill the peer HE CAP IE */
|
||||
memcpy_ext(pmpriv->adapter, &hecap_tlv->ext_id,
|
||||
&sta_ptr->tdls_he_cap.ext_id,
|
||||
sta_ptr->tdls_he_cap.ieee_hdr.len,
|
||||
sizeof(MrvlIEtypes_He_cap_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
hecap_tlv->type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_EXTENSION_ID);
|
||||
hecap_tlv->len = MIN(
|
||||
sta_ptr->tdls_he_cap.ieee_hdr.len,
|
||||
sizeof(MrvlIEtypes_He_cap_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
hecap_tlv->len =
|
||||
wlan_cpu_to_le16(hecap_tlv->len);
|
||||
#if 0
|
||||
wlan_fill_he_cap_tlv(pmpriv,
|
||||
pmpriv->config_bands,
|
||||
hecap_tlv, MFALSE);
|
||||
#endif
|
||||
|
||||
travel_len += wlan_le16_to_cpu(hecap_tlv->len) +
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
|
||||
DBG_HEXDUMP(
|
||||
MCMD_D,
|
||||
"TDLS Config Link: HE Capability",
|
||||
(t_u8 *)hecap_tlv,
|
||||
wlan_le16_to_cpu(hecap_tlv->len) +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
|
||||
/* HE Operation */
|
||||
heop_tlv = (MrvlIEtypes_He_Op_t *)(pos +
|
||||
travel_len);
|
||||
heop_tlv->header.type =
|
||||
wlan_cpu_to_le16(EXTENSION);
|
||||
heop_tlv->header.len = wlan_cpu_to_le16(
|
||||
sta_ptr->he_op.ieee_hdr.len);
|
||||
memcpy_ext(pmpriv->adapter, &heop_tlv->ext_id,
|
||||
&sta_ptr->he_op.ext_id,
|
||||
sta_ptr->he_op.ieee_hdr.len,
|
||||
sizeof(MrvlIEtypes_He_Op_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
heop_tlv->he_op_param1 = wlan_cpu_to_le16(
|
||||
heop_tlv->he_op_param1);
|
||||
heop_tlv->basic_he_mcs_nss = wlan_cpu_to_le16(
|
||||
heop_tlv->basic_he_mcs_nss);
|
||||
travel_len +=
|
||||
wlan_le16_to_cpu(heop_tlv->header.len) +
|
||||
sizeof(MrvlIEtypesHeader_t);
|
||||
DBG_HEXDUMP(
|
||||
MCMD_D,
|
||||
"TDLS Config Link: HE Operation",
|
||||
(t_u8 *)heop_tlv,
|
||||
wlan_le16_to_cpu(heop_tlv->header.len) +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
}
|
||||
|
||||
TdlsIdleTimeout =
|
||||
(MrvlIEtypes_TDLS_Idle_Timeout_t *)(pos +
|
||||
travel_len);
|
||||
|
@ -2464,6 +2611,87 @@ static mlan_status wlan_cmd_inactivity_timeout(HostCmd_DS_COMMAND *cmd,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares network monitor command
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action the action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_cmd_net_monitor(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf)
|
||||
{
|
||||
mlan_ds_misc_net_monitor *net_mon;
|
||||
HostCmd_DS_802_11_NET_MONITOR *cmd_net_mon = &cmd->params.net_mon;
|
||||
ChanBandParamSet_t *pchan_band = MNULL;
|
||||
t_u8 sec_chan_offset = 0;
|
||||
t_u32 bw_offset = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
net_mon = (mlan_ds_misc_net_monitor *)pdata_buf;
|
||||
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN +
|
||||
sizeof(HostCmd_DS_802_11_NET_MONITOR));
|
||||
cmd->command = wlan_cpu_to_le16(cmd->command);
|
||||
cmd_net_mon->action = wlan_cpu_to_le16(cmd_action);
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
cmd_net_mon->enable_net_mon =
|
||||
wlan_cpu_to_le16((t_u16)net_mon->enable_net_mon);
|
||||
if (net_mon->enable_net_mon) {
|
||||
pchan_band =
|
||||
&cmd_net_mon->monitor_chan.chan_band_param[0];
|
||||
cmd_net_mon->filter_flag =
|
||||
wlan_cpu_to_le16((t_u16)net_mon->filter_flag);
|
||||
cmd_net_mon->monitor_chan.header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_CHANNELBANDLIST);
|
||||
cmd_net_mon->monitor_chan.header.len =
|
||||
wlan_cpu_to_le16(sizeof(ChanBandParamSet_t));
|
||||
pchan_band->chan_number = (t_u8)net_mon->channel;
|
||||
pchan_band->bandcfg.chanBand =
|
||||
wlan_band_to_radio_type((t_u16)net_mon->band);
|
||||
|
||||
if (net_mon->band & BAND_GN ||
|
||||
net_mon->band & BAND_AN ||
|
||||
net_mon->band & BAND_GAC ||
|
||||
net_mon->band & BAND_AAC) {
|
||||
bw_offset = net_mon->chan_bandwidth;
|
||||
if (bw_offset == CHANNEL_BW_40MHZ_ABOVE) {
|
||||
pchan_band->bandcfg.chan2Offset =
|
||||
SEC_CHAN_ABOVE;
|
||||
pchan_band->bandcfg.chanWidth =
|
||||
CHAN_BW_40MHZ;
|
||||
} else if (bw_offset ==
|
||||
CHANNEL_BW_40MHZ_BELOW) {
|
||||
pchan_band->bandcfg.chan2Offset =
|
||||
SEC_CHAN_BELOW;
|
||||
pchan_band->bandcfg.chanWidth =
|
||||
CHAN_BW_40MHZ;
|
||||
} else if (bw_offset == CHANNEL_BW_80MHZ) {
|
||||
sec_chan_offset =
|
||||
wlan_get_second_channel_offset(
|
||||
pmpriv,
|
||||
net_mon->channel);
|
||||
if (sec_chan_offset == SEC_CHAN_ABOVE)
|
||||
pchan_band->bandcfg.chan2Offset =
|
||||
SEC_CHAN_ABOVE;
|
||||
else if (sec_chan_offset ==
|
||||
SEC_CHAN_BELOW)
|
||||
pchan_band->bandcfg.chan2Offset =
|
||||
SEC_CHAN_BELOW;
|
||||
pchan_band->bandcfg.chanWidth =
|
||||
CHAN_BW_80MHZ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares Low Power Mode
|
||||
*
|
||||
|
@ -2618,25 +2846,6 @@ static mlan_status wlan_cmd_coalesce_config(pmlan_private pmpriv,
|
|||
* Global Functions
|
||||
********************************************************/
|
||||
|
||||
static mlan_status wlan_cmd_get_sensor_temp(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action)
|
||||
{
|
||||
ENTER();
|
||||
|
||||
if (cmd_action != HostCmd_ACT_GEN_GET) {
|
||||
PRINTM(MERROR, "wlan_cmd_get_sensor_temp: support GET only.\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_DS_GET_SENSOR_TEMP);
|
||||
cmd->size = wlan_cpu_to_le16(S_DS_GEN + 4);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepares command of arb cfg
|
||||
*
|
||||
|
@ -2679,6 +2888,47 @@ mlan_status wlan_cmd_arb_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function set ipv6 ra offload configuration.
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param pcmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action Command action
|
||||
* @param pdata_buf A pointer to information buffer
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
mlan_status wlan_cmd_ipv6_ra_offload(mlan_private *pmpriv,
|
||||
HostCmd_DS_COMMAND *pcmd, t_u16 cmd_action,
|
||||
void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_IPV6_RA_OFFLOAD *ipv6_ra_cfg = &pcmd->params.ipv6_ra_offload;
|
||||
mlan_ds_misc_ipv6_ra_offload *ipv6_ra_offload =
|
||||
(mlan_ds_misc_ipv6_ra_offload *)pdata_buf;
|
||||
MrvlIEtypesHeader_t *ie = &ipv6_ra_cfg->ipv6_addr_param.Header;
|
||||
|
||||
ENTER();
|
||||
|
||||
pcmd->command = wlan_cpu_to_le16(HostCmd_CMD_IPV6_RA_OFFLOAD_CFG);
|
||||
ipv6_ra_cfg->action = wlan_cpu_to_le16(cmd_action);
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
ipv6_ra_cfg->enable = ipv6_ra_offload->enable;
|
||||
ie->type = wlan_cpu_to_le16(TLV_TYPE_IPV6_RA_OFFLOAD);
|
||||
ie->len = wlan_cpu_to_le16(16);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
ipv6_ra_cfg->ipv6_addr_param.ipv6_addr,
|
||||
ipv6_ra_offload->ipv6_addr, 16,
|
||||
sizeof(ipv6_ra_cfg->ipv6_addr_param.ipv6_addr));
|
||||
pcmd->size = wlan_cpu_to_le16(
|
||||
S_DS_GEN + sizeof(HostCmd_DS_IPV6_RA_OFFLOAD));
|
||||
} else if (cmd_action == HostCmd_ACT_GEN_GET)
|
||||
pcmd->size = wlan_cpu_to_le16(S_DS_GEN +
|
||||
sizeof(ipv6_ra_cfg->action));
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function sends get sta band channel command to firmware.
|
||||
*
|
||||
|
@ -2728,6 +2978,379 @@ static mlan_status wlan_cmd_sta_config(pmlan_private pmpriv,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepare the config tlvs of roam offload.
|
||||
*
|
||||
* @param priv A pointer to mlan_private structure
|
||||
* @param tlv_no TLV type
|
||||
* @param value Pointer to mlan_ds_misc_roam_offload structure
|
||||
* @param pointer Value of trigger_condition
|
||||
* @param size Pointer to the buffer of HostCmd_DS_ROAM_OFFLOAD
|
||||
* @return N/A
|
||||
*/
|
||||
static t_u16 mlan_prepare_roam_offload_tlv(pmlan_private pmpriv, t_u32 type,
|
||||
mlan_ds_misc_roam_offload *roam,
|
||||
t_u8 trigger_condition, t_u8 *pos)
|
||||
{
|
||||
MrvlIEtypes_fw_roam_enable_t *enable_tlv = MNULL;
|
||||
MrvlIEtypes_fw_roam_trigger_condition_t *trigger_condition_tlv = MNULL;
|
||||
MrvlIEtypes_Bssid_t *bssid_tlv = MNULL;
|
||||
MrvlIEtypes_SsIdParamSet_t *ssid_tlv = MNULL;
|
||||
MrvlIEtypes_fw_roam_retry_count_t *retry_count_tlv = MNULL;
|
||||
MrvlIEtypes_para_rssi_t *rssi_para_tlv = MNULL;
|
||||
MrvlIEtypes_fw_roam_bgscan_setting_t *bgscan_set_tlv = MNULL;
|
||||
MrvlIEtypes_roam_blacklist_t *blacklist_tlv = MNULL;
|
||||
MrvlIEtypes_ees_param_set_t *ees_param_tlv = MNULL;
|
||||
MrvlIEtypes_band_rssi_t *band_rssi_tlv = MNULL;
|
||||
MrvlIEtypes_beacon_miss_threshold_t *bcn_miss_threshold_tlv = MNULL;
|
||||
MrvlIEtypes_pre_beacon_miss_threshold_t *pre_bcn_miss_threshold_tlv =
|
||||
MNULL;
|
||||
MrvlIEtypes_RepeatCount_t *tlv_repeat = MNULL;
|
||||
t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = {0}, *begin;
|
||||
int i = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
begin = pos;
|
||||
if (type & FW_ROAM_ENABLE) {
|
||||
enable_tlv = (MrvlIEtypes_fw_roam_enable_t *)pos;
|
||||
enable_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_ROAM);
|
||||
enable_tlv->header.len =
|
||||
wlan_cpu_to_le16(sizeof(MrvlIEtypes_fw_roam_enable_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
if (roam->enable <= ROAM_OFFLOAD_WITHOUT_APLIST)
|
||||
enable_tlv->roam_enable = roam->enable;
|
||||
else
|
||||
enable_tlv->roam_enable = ROAM_OFFLOAD_WITHOUT_APLIST;
|
||||
pos += sizeof(MrvlIEtypes_fw_roam_enable_t);
|
||||
}
|
||||
if (type & FW_ROAM_TRIGGER_COND) {
|
||||
trigger_condition_tlv =
|
||||
(MrvlIEtypes_fw_roam_trigger_condition_t *)pos;
|
||||
trigger_condition_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_ROM_TRIGGER);
|
||||
trigger_condition_tlv->header.len = wlan_cpu_to_le16(
|
||||
sizeof(trigger_condition_tlv->trigger_condition));
|
||||
trigger_condition_tlv->trigger_condition =
|
||||
wlan_cpu_to_le16(trigger_condition);
|
||||
pos += sizeof(trigger_condition_tlv->header) +
|
||||
sizeof(trigger_condition_tlv->trigger_condition);
|
||||
}
|
||||
if (type & FW_ROAM_BSSID) {
|
||||
bssid_tlv = (MrvlIEtypes_Bssid_t *)pos;
|
||||
bssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_BSSID);
|
||||
bssid_tlv->header.len =
|
||||
wlan_cpu_to_le16(sizeof(bssid_tlv->bssid));
|
||||
if (memcmp(pmpriv->adapter, roam->bssid_reconnect, zero_mac,
|
||||
sizeof(zero_mac)) != 0)
|
||||
memcpy_ext(pmpriv->adapter, bssid_tlv->bssid,
|
||||
roam->bssid_reconnect,
|
||||
sizeof(bssid_tlv->bssid),
|
||||
sizeof(bssid_tlv->bssid));
|
||||
else {
|
||||
if (roam->config_mode == ROAM_OFFLOAD_SUSPEND_CFG)
|
||||
memcpy_ext(pmpriv->adapter, bssid_tlv->bssid,
|
||||
pmpriv->curr_bss_params
|
||||
.bss_descriptor.mac_address,
|
||||
sizeof(bssid_tlv->bssid),
|
||||
sizeof(bssid_tlv->bssid));
|
||||
else if (roam->config_mode == ROAM_OFFLOAD_RESUME_CFG)
|
||||
memcpy_ext(pmpriv->adapter, bssid_tlv->bssid,
|
||||
zero_mac, sizeof(bssid_tlv->bssid),
|
||||
sizeof(bssid_tlv->bssid));
|
||||
}
|
||||
pos += sizeof(bssid_tlv->header) + sizeof(bssid_tlv->bssid);
|
||||
}
|
||||
if (type & FW_ROAM_SSID) {
|
||||
for (i = 0; i < roam->ssid_list.ssid_num; i++) {
|
||||
ssid_tlv = (MrvlIEtypes_SsIdParamSet_t *)pos;
|
||||
ssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_SSID);
|
||||
memcpy_ext(pmpriv->adapter, ssid_tlv->ssid,
|
||||
roam->ssid_list.ssids[i].ssid,
|
||||
roam->ssid_list.ssids[i].ssid_len,
|
||||
roam->ssid_list.ssids[i].ssid_len);
|
||||
pos += sizeof(ssid_tlv->header) +
|
||||
wlan_strlen(ssid_tlv->ssid);
|
||||
ssid_tlv->header.len =
|
||||
wlan_cpu_to_le16(wlan_strlen(ssid_tlv->ssid));
|
||||
}
|
||||
if (!roam->ssid_list.ssid_num) {
|
||||
ssid_tlv = (MrvlIEtypes_SsIdParamSet_t *)pos;
|
||||
ssid_tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_SSID);
|
||||
memcpy_ext(
|
||||
pmpriv->adapter, ssid_tlv->ssid,
|
||||
pmpriv->curr_bss_params.bss_descriptor.ssid.ssid,
|
||||
pmpriv->curr_bss_params.bss_descriptor.ssid
|
||||
.ssid_len,
|
||||
pmpriv->curr_bss_params.bss_descriptor.ssid
|
||||
.ssid_len);
|
||||
ssid_tlv->header.len =
|
||||
wlan_cpu_to_le16(wlan_strlen(ssid_tlv->ssid));
|
||||
pos += sizeof(ssid_tlv->header) + ssid_tlv->header.len;
|
||||
}
|
||||
}
|
||||
if (type & FW_ROAM_RETRY_COUNT) {
|
||||
retry_count_tlv = (MrvlIEtypes_fw_roam_retry_count_t *)pos;
|
||||
retry_count_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_ROM_RETRY_COUNT);
|
||||
retry_count_tlv->header.len =
|
||||
wlan_cpu_to_le16(sizeof(retry_count_tlv->retry_count));
|
||||
if (roam->retry_count)
|
||||
retry_count_tlv->retry_count =
|
||||
wlan_cpu_to_le16(roam->retry_count);
|
||||
else
|
||||
retry_count_tlv->retry_count =
|
||||
wlan_cpu_to_le16(RETRY_UNLIMITED_TIME);
|
||||
pos += sizeof(retry_count_tlv->header) +
|
||||
sizeof(retry_count_tlv->retry_count);
|
||||
}
|
||||
if (type & FW_ROAM_RSSI_PARA) {
|
||||
rssi_para_tlv = (MrvlIEtypes_para_rssi_t *)pos;
|
||||
rssi_para_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_ROM_PARA_RSSI);
|
||||
rssi_para_tlv->header.len =
|
||||
wlan_cpu_to_le16(sizeof(rssi_para_tlv->max_rssi) +
|
||||
sizeof(rssi_para_tlv->min_rssi) +
|
||||
sizeof(rssi_para_tlv->step_rssi));
|
||||
rssi_para_tlv->max_rssi = roam->para_rssi.max_rssi;
|
||||
rssi_para_tlv->min_rssi = roam->para_rssi.min_rssi;
|
||||
rssi_para_tlv->step_rssi = roam->para_rssi.step_rssi;
|
||||
pos += sizeof(rssi_para_tlv->header) +
|
||||
sizeof(rssi_para_tlv->max_rssi) +
|
||||
sizeof(rssi_para_tlv->min_rssi) +
|
||||
sizeof(rssi_para_tlv->step_rssi);
|
||||
}
|
||||
if (type & FW_ROAM_BAND_RSSI) {
|
||||
band_rssi_tlv = (MrvlIEtypes_band_rssi_t *)pos;
|
||||
band_rssi_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_BAND_RSSI);
|
||||
band_rssi_tlv->header.len =
|
||||
wlan_cpu_to_le16(sizeof(MrvlIEtypes_band_rssi_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
band_rssi_tlv->band_rssi.band_preferred =
|
||||
roam->band_rssi.band_preferred;
|
||||
band_rssi_tlv->band_rssi.rssi_hysteresis =
|
||||
roam->band_rssi.rssi_hysteresis;
|
||||
pos += sizeof(MrvlIEtypes_band_rssi_t);
|
||||
}
|
||||
|
||||
if (type & FW_ROAM_BGSCAN_PARAM) {
|
||||
bgscan_set_tlv = (MrvlIEtypes_fw_roam_bgscan_setting_t *)pos;
|
||||
bgscan_set_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_ROM_BGSCAN);
|
||||
bgscan_set_tlv->header.len = wlan_cpu_to_le16(
|
||||
sizeof(MrvlIEtypes_fw_roam_bgscan_setting_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
bgscan_set_tlv->bss_type = roam->bgscan_cfg.bss_type;
|
||||
bgscan_set_tlv->channels_perscan =
|
||||
roam->bgscan_cfg.channels_per_scan;
|
||||
bgscan_set_tlv->scan_interval =
|
||||
wlan_cpu_to_le32(roam->bgscan_cfg.scan_interval);
|
||||
bgscan_set_tlv->report_condition =
|
||||
wlan_cpu_to_le32(roam->bgscan_cfg.bg_rpt_condition);
|
||||
pos += sizeof(MrvlIEtypes_fw_roam_bgscan_setting_t);
|
||||
}
|
||||
|
||||
if (type & FW_ROAM_EES_PARAM) {
|
||||
ees_param_tlv = (MrvlIEtypes_ees_param_set_t *)pos;
|
||||
ees_param_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_ENERGYEFFICIENTSCAN);
|
||||
ees_param_tlv->header.len =
|
||||
wlan_cpu_to_le16(sizeof(MrvlIEtypes_ees_param_set_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
ees_param_tlv->ees_cfg.ees_mode =
|
||||
wlan_cpu_to_le16(roam->ees_cfg.ees_mode);
|
||||
ees_param_tlv->ees_cfg.ees_rpt_condition =
|
||||
wlan_cpu_to_le16(roam->ees_cfg.ees_rpt_condition);
|
||||
ees_param_tlv->ees_cfg.high_scan_period =
|
||||
wlan_cpu_to_le16(roam->ees_cfg.high_scan_period);
|
||||
ees_param_tlv->ees_cfg.high_scan_count =
|
||||
wlan_cpu_to_le16(roam->ees_cfg.high_scan_count);
|
||||
ees_param_tlv->ees_cfg.mid_scan_period =
|
||||
wlan_cpu_to_le16(roam->ees_cfg.mid_scan_period);
|
||||
ees_param_tlv->ees_cfg.mid_scan_count =
|
||||
wlan_cpu_to_le16(roam->ees_cfg.mid_scan_count);
|
||||
ees_param_tlv->ees_cfg.low_scan_period =
|
||||
wlan_cpu_to_le16(roam->ees_cfg.low_scan_period);
|
||||
ees_param_tlv->ees_cfg.low_scan_count =
|
||||
wlan_cpu_to_le16(roam->ees_cfg.low_scan_count);
|
||||
pos += sizeof(MrvlIEtypes_ees_param_set_t);
|
||||
}
|
||||
|
||||
if (type & FW_ROAM_BCN_MISS_THRESHOLD) {
|
||||
bcn_miss_threshold_tlv =
|
||||
(MrvlIEtypes_beacon_miss_threshold_t *)pos;
|
||||
bcn_miss_threshold_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_BCNMISS);
|
||||
bcn_miss_threshold_tlv->header.len = wlan_cpu_to_le16(
|
||||
sizeof(MrvlIEtypes_beacon_miss_threshold_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
bcn_miss_threshold_tlv->bcn_miss_threshold =
|
||||
roam->bcn_miss_threshold;
|
||||
pos += sizeof(MrvlIEtypes_beacon_miss_threshold_t);
|
||||
}
|
||||
|
||||
if (type & FW_ROAM_PRE_BCN_MISS_THRESHOLD) {
|
||||
pre_bcn_miss_threshold_tlv =
|
||||
(MrvlIEtypes_pre_beacon_miss_threshold_t *)pos;
|
||||
pre_bcn_miss_threshold_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_PRE_BCNMISS);
|
||||
pre_bcn_miss_threshold_tlv->header.len = wlan_cpu_to_le16(
|
||||
sizeof(MrvlIEtypes_pre_beacon_miss_threshold_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
pre_bcn_miss_threshold_tlv->pre_bcn_miss_threshold =
|
||||
roam->pre_bcn_miss_threshold;
|
||||
pos += sizeof(MrvlIEtypes_pre_beacon_miss_threshold_t);
|
||||
}
|
||||
|
||||
if (type & FW_ROAM_BLACKLIST) {
|
||||
blacklist_tlv = (MrvlIEtypes_roam_blacklist_t *)pos;
|
||||
blacklist_tlv->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_BLACKLIST_BSSID);
|
||||
blacklist_tlv->header.len =
|
||||
roam->black_list.ap_num * MLAN_MAC_ADDR_LENGTH +
|
||||
sizeof(roam->black_list.ap_num);
|
||||
memcpy_ext(pmpriv->adapter, (t_u8 *)&blacklist_tlv->blacklist,
|
||||
(t_u8 *)&roam->black_list, blacklist_tlv->header.len,
|
||||
sizeof(blacklist_tlv->blacklist));
|
||||
pos += sizeof(MrvlIEtypesHeader_t) + blacklist_tlv->header.len;
|
||||
blacklist_tlv->header.len =
|
||||
wlan_cpu_to_le16(blacklist_tlv->header.len);
|
||||
}
|
||||
|
||||
if (type & FW_ROAM_REPEAT_CNT) {
|
||||
tlv_repeat = (MrvlIEtypes_RepeatCount_t *)pos;
|
||||
tlv_repeat->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_REPEAT_COUNT);
|
||||
tlv_repeat->header.len =
|
||||
wlan_cpu_to_le16(sizeof(MrvlIEtypes_RepeatCount_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
tlv_repeat->repeat_count = wlan_cpu_to_le16(roam->repeat_count);
|
||||
pos += sizeof(MrvlIEtypes_RepeatCount_t);
|
||||
}
|
||||
LEAVE();
|
||||
return (pos - begin);
|
||||
}
|
||||
/**
|
||||
* @brief This function sends enable/disable roam offload command to firmware.
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param pcmd Hostcmd ID
|
||||
* @param cmd_action Command action
|
||||
* @return N/A
|
||||
*/
|
||||
static mlan_status wlan_cmd_roam_offload(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_void *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_ROAM_OFFLOAD *roam_cmd = &cmd->params.roam_offload;
|
||||
MrvlIEtypes_roam_aplist_t *aplist = MNULL;
|
||||
t_u8 *pos = (t_u8 *)roam_cmd + sizeof(roam_cmd->action);
|
||||
mlan_ds_misc_roam_offload *roam = MNULL;
|
||||
t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = {0};
|
||||
t_u32 type = 0;
|
||||
t_u8 trigger_condition = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_ROAM_OFFLOAD);
|
||||
cmd->size = S_DS_GEN + sizeof(HostCmd_DS_ROAM_OFFLOAD);
|
||||
roam_cmd->action = wlan_cpu_to_le16(cmd_action);
|
||||
|
||||
roam = (mlan_ds_misc_roam_offload *)pdata_buf;
|
||||
|
||||
if (roam->config_mode) {
|
||||
switch (roam->config_mode) {
|
||||
case ROAM_OFFLOAD_ENABLE:
|
||||
type |= FW_ROAM_ENABLE;
|
||||
if (roam->enable && roam->enable != AUTO_RECONNECT) {
|
||||
type |= FW_ROAM_TRIGGER_COND;
|
||||
trigger_condition |= RSSI_LOW_TRIGGER |
|
||||
PRE_BEACON_LOST_TRIGGER;
|
||||
}
|
||||
break;
|
||||
case ROAM_OFFLOAD_SUSPEND_CFG:
|
||||
type |= FW_ROAM_TRIGGER_COND | FW_ROAM_RETRY_COUNT;
|
||||
if (roam->enable == AUTO_RECONNECT) {
|
||||
type |= FW_ROAM_BSSID | FW_ROAM_SSID;
|
||||
trigger_condition = LINK_LOST_TRIGGER |
|
||||
DEAUTH_WITH_EXT_AP_TRIGGER;
|
||||
} else
|
||||
trigger_condition = LINK_LOST_TRIGGER |
|
||||
DEAUTH_WITH_EXT_AP_TRIGGER |
|
||||
RSSI_LOW_TRIGGER |
|
||||
PRE_BEACON_LOST_TRIGGER;
|
||||
|
||||
if (roam->enable == ROAM_OFFLOAD_WITH_BSSID)
|
||||
type |= FW_ROAM_BSSID;
|
||||
if (roam->enable == ROAM_OFFLOAD_WITH_SSID)
|
||||
type |= FW_ROAM_SSID;
|
||||
break;
|
||||
case ROAM_OFFLOAD_RESUME_CFG:
|
||||
type |= FW_ROAM_TRIGGER_COND;
|
||||
if (roam->enable == AUTO_RECONNECT)
|
||||
trigger_condition = NO_TRIGGER;
|
||||
else
|
||||
trigger_condition = RSSI_LOW_TRIGGER |
|
||||
PRE_BEACON_LOST_TRIGGER;
|
||||
if (roam->enable == ROAM_OFFLOAD_WITH_BSSID ||
|
||||
roam->enable == AUTO_RECONNECT)
|
||||
type |= FW_ROAM_BSSID;
|
||||
break;
|
||||
case ROAM_OFFLOAD_PARAM_CFG:
|
||||
if (roam->enable && roam->enable != AUTO_RECONNECT) {
|
||||
if (roam->retry_count != 0)
|
||||
type |= FW_ROAM_RETRY_COUNT;
|
||||
if (roam->ssid_list.ssid_num)
|
||||
type |= FW_ROAM_SSID;
|
||||
if (roam->para_rssi.set_flag)
|
||||
type |= FW_ROAM_RSSI_PARA;
|
||||
if (memcmp(pmpriv->adapter,
|
||||
roam->bssid_reconnect, zero_mac,
|
||||
sizeof(zero_mac)) != 0)
|
||||
type |= FW_ROAM_BSSID;
|
||||
if (roam->band_rssi_flag)
|
||||
type |= FW_ROAM_BAND_RSSI;
|
||||
if (roam->bgscan_set_flag)
|
||||
type |= FW_ROAM_BGSCAN_PARAM;
|
||||
if (roam->ees_param_set_flag)
|
||||
type |= FW_ROAM_EES_PARAM;
|
||||
if (roam->bcn_miss_threshold)
|
||||
type |= FW_ROAM_BCN_MISS_THRESHOLD;
|
||||
if (roam->pre_bcn_miss_threshold)
|
||||
type |= FW_ROAM_PRE_BCN_MISS_THRESHOLD;
|
||||
if (roam->black_list.ap_num)
|
||||
type |= FW_ROAM_BLACKLIST;
|
||||
if (roam->trigger_condition != 0xff) {
|
||||
type |= FW_ROAM_TRIGGER_COND;
|
||||
trigger_condition =
|
||||
roam->trigger_condition;
|
||||
}
|
||||
if (roam->repeat_count)
|
||||
type |= FW_ROAM_REPEAT_CNT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
cmd->size += mlan_prepare_roam_offload_tlv(
|
||||
pmpriv, type, roam, trigger_condition, pos);
|
||||
}
|
||||
if (roam->aplist.ap_num) {
|
||||
aplist = (MrvlIEtypes_roam_aplist_t *)pos;
|
||||
aplist->header.type = wlan_cpu_to_le16(TLV_TYPE_APLIST);
|
||||
aplist->header.len = roam->aplist.ap_num * MLAN_MAC_ADDR_LENGTH;
|
||||
memcpy_ext(pmpriv->adapter, aplist->ap_mac, roam->aplist.ap_mac,
|
||||
roam->aplist.ap_num * MLAN_MAC_ADDR_LENGTH,
|
||||
roam->aplist.ap_num * MLAN_MAC_ADDR_LENGTH);
|
||||
pos += sizeof(aplist->header) + aplist->header.len;
|
||||
cmd->size += sizeof(aplist->header) + aplist->header.len;
|
||||
aplist->header.len = wlan_cpu_to_le16(aplist->header.len);
|
||||
}
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function sends set and get auto tx command to firmware.
|
||||
*
|
||||
|
@ -2815,6 +3438,11 @@ static mlan_status wlan_cmd_auto_tx(pmlan_private pmpriv,
|
|||
.h803_len,
|
||||
eth_ip, sizeof(t_u16),
|
||||
sizeof(t_u16));
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
(t_u8 *)&pkt_tlv->ip_packet,
|
||||
misc_keep_alive->packet,
|
||||
misc_keep_alive->pkt_len,
|
||||
MKEEP_ALIVE_IP_PKT_MAX);
|
||||
pkt_tlv->header.len = wlan_cpu_to_le16(
|
||||
sizeof(Eth803Hdr_t) +
|
||||
misc_keep_alive->pkt_len);
|
||||
|
@ -2881,6 +3509,55 @@ static mlan_status wlan_is_cmd_allowed(mlan_private *priv, t_u16 cmd_no)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function enable/disable CSI support.
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param cmd A pointer to HostCmd_DS_COMMAND structure
|
||||
* @param cmd_action The action: GET or SET
|
||||
* @param pdata_buf A pointer to data buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
static mlan_status wlan_cmd_csi(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
|
||||
t_u16 cmd_action, t_u16 *pdata_buf)
|
||||
{
|
||||
HostCmd_DS_CSI_CFG *csi_cfg_cmd = &cmd->params.csi_params;
|
||||
mlan_ds_csi_params *csi_params = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_CSI);
|
||||
cmd->size = sizeof(HostCmd_DS_CSI_CFG) + S_DS_GEN;
|
||||
csi_cfg_cmd->action = wlan_cpu_to_le16(cmd_action);
|
||||
switch (cmd_action) {
|
||||
case CSI_CMD_ENABLE:
|
||||
csi_params = (mlan_ds_csi_params *)pdata_buf;
|
||||
csi_cfg_cmd->head_id = wlan_cpu_to_le32(csi_params->head_id);
|
||||
csi_cfg_cmd->tail_id = wlan_cpu_to_le32(csi_params->tail_id);
|
||||
csi_cfg_cmd->chip_id = csi_params->chip_id;
|
||||
csi_cfg_cmd->csi_filter_cnt = csi_params->csi_filter_cnt;
|
||||
if (csi_cfg_cmd->csi_filter_cnt > CSI_FILTER_MAX)
|
||||
csi_cfg_cmd->csi_filter_cnt = CSI_FILTER_MAX;
|
||||
memcpy_ext(pmpriv->adapter, (t_u8 *)csi_cfg_cmd->csi_filter,
|
||||
(t_u8 *)csi_params->csi_filter,
|
||||
sizeof(mlan_csi_filter_t) *
|
||||
csi_cfg_cmd->csi_filter_cnt,
|
||||
sizeof(csi_cfg_cmd->csi_filter));
|
||||
DBG_HEXDUMP(MCMD_D, "Enable CSI", csi_cfg_cmd,
|
||||
sizeof(HostCmd_DS_CSI_CFG));
|
||||
break;
|
||||
case CSI_CMD_DISABLE:
|
||||
DBG_HEXDUMP(MCMD_D, "Disable CSI", csi_cfg_cmd,
|
||||
sizeof(HostCmd_DS_CSI_CFG));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function prepare the command before sending to firmware.
|
||||
*
|
||||
|
@ -2975,10 +3652,17 @@ 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);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CSI:
|
||||
ret = wlan_cmd_csi(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_HAL_PHY_CFG:
|
||||
ret = wlan_cmd_hal_phy_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_IPS_CONFIG:
|
||||
ret = wlan_cmd_ips_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_PMIC_CONFIGURE:
|
||||
cmd_ptr->command = wlan_cpu_to_le16(cmd_no);
|
||||
cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN);
|
||||
|
@ -3204,6 +3888,7 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_TARGET_ACCESS:
|
||||
case HostCmd_CMD_802_11_EEPROM_ACCESS:
|
||||
case HostCmd_CMD_BCA_REG_ACCESS:
|
||||
case HostCmd_CMD_REG_ACCESS:
|
||||
ret = wlan_cmd_reg_access(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
@ -3240,6 +3925,10 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
sizeof(HostCmd_DS_SET_BSS_MODE) + S_DS_GEN);
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
break;
|
||||
case HostCmd_CMD_802_11_NET_MONITOR:
|
||||
ret = wlan_cmd_net_monitor(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MEASUREMENT_REQUEST:
|
||||
case HostCmd_CMD_MEASUREMENT_REPORT:
|
||||
ret = wlan_meas_cmd_process(pmpriv, cmd_ptr, pdata_buf);
|
||||
|
@ -3310,6 +3999,10 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_802_11_MIMO_SWITCH:
|
||||
ret = wlan_cmd_802_11_mimo_switch(pmpriv, cmd_ptr, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_IPV6_RA_OFFLOAD_CFG:
|
||||
ret = wlan_cmd_ipv6_ra_offload(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_STA_CONFIGURE:
|
||||
ret = wlan_cmd_sta_config(pmpriv, cmd_ptr, cmd_action,
|
||||
pioctl_buf, pdata_buf);
|
||||
|
@ -3319,6 +4012,11 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_ind_rst_cfg(cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
|
||||
case HostCmd_CMD_ROAM_OFFLOAD:
|
||||
ret = wlan_cmd_roam_offload(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
||||
case HostCmd_CMD_802_11_PS_INACTIVITY_TIMEOUT:
|
||||
ret = wlan_cmd_ps_inactivity_timeout(pmpriv, cmd_ptr,
|
||||
cmd_action, pdata_buf);
|
||||
|
@ -3368,6 +4066,10 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_TWT_CFG:
|
||||
ret = wlan_cmd_twt_cfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_cmd_gpio_tsf_latch(pmpriv, cmd_ptr, cmd_action,
|
||||
pioctl_buf, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RX_ABORT_CFG:
|
||||
ret = wlan_cmd_rxabortcfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
@ -3406,6 +4108,14 @@ mlan_status wlan_ops_sta_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_MFG_COMMAND:
|
||||
ret = wlan_cmd_mfg(pmpriv, cmd_ptr, cmd_action, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MC_AGGR_CFG:
|
||||
ret = wlan_cmd_mc_aggr_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GET_CH_LOAD:
|
||||
ret = wlan_cmd_get_ch_load(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no);
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* responses generated by firmware.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -191,12 +200,12 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
|||
pmadapter->pscan_ioctl_req = MNULL;
|
||||
/* Need to indicate IOCTL complete */
|
||||
if (pscan_ioctl_req) {
|
||||
pscan_ioctl_req->status_code = MLAN_ERROR_CMD_SCAN_FAIL;
|
||||
pscan_ioctl_req->status_code = MLAN_ERROR_NO_ERROR;
|
||||
/* Indicate ioctl complete */
|
||||
pcb->moal_ioctl_complete(
|
||||
pmadapter->pmoal_handle,
|
||||
(pmlan_ioctl_req)pscan_ioctl_req,
|
||||
MLAN_STATUS_FAILURE);
|
||||
MLAN_STATUS_SUCCESS);
|
||||
}
|
||||
wlan_release_cmd_lock(pmadapter);
|
||||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_SCAN_REPORT, MNULL);
|
||||
|
@ -320,6 +329,11 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
|
|||
}
|
||||
}
|
||||
} break;
|
||||
case HostCmd_CMD_ROAM_OFFLOAD:
|
||||
wlan_clear_fw_roaming_pmk(pmpriv);
|
||||
pmpriv->adapter->fw_roaming = MFALSE;
|
||||
PRINTM(MERROR, "FW do not support roaming!\n");
|
||||
break;
|
||||
case HostCmd_CMD_CHAN_REGION_CFG:
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
PRINTM(MCMND, "FW don't support chan region cfg command!\n");
|
||||
|
@ -751,6 +765,14 @@ static mlan_status wlan_ret_get_log(pmlan_private pmpriv,
|
|||
wlan_le32_to_cpu(pget_log->dwMgtErrCnt);
|
||||
pget_info->param.stats.dwDatErrCnt =
|
||||
wlan_le32_to_cpu(pget_log->dwDatErrCnt);
|
||||
pget_info->param.stats.bigtk_mmeGoodCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_mmeGoodCnt);
|
||||
pget_info->param.stats.bigtk_replayErrCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_replayErrCnt);
|
||||
pget_info->param.stats.bigtk_micErrCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_micErrCnt);
|
||||
pget_info->param.stats.bigtk_mmeNotFoundCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_mmeNotFoundCnt);
|
||||
|
||||
if (pmpriv->adapter->getlog_enable) {
|
||||
pget_info->param.stats.tx_frag_cnt =
|
||||
|
@ -2102,6 +2124,61 @@ static mlan_status wlan_ret_inactivity_timeout(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of
|
||||
* network monitor
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
* @param resp A pointer to HostCmd_DS_COMMAND
|
||||
* @param pioctl_buf A pointer to command buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_ret_net_monitor(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
mlan_ds_misc_cfg *pmisc = MNULL;
|
||||
mlan_ds_misc_net_monitor *net_mon = MNULL;
|
||||
HostCmd_DS_802_11_NET_MONITOR *cmd_net_mon =
|
||||
(HostCmd_DS_802_11_NET_MONITOR *)&resp->params.net_mon;
|
||||
ChanBandParamSet_t *pchan_band = MNULL;
|
||||
t_u16 band_info = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_buf && (pioctl_buf->action == MLAN_ACT_GET)) {
|
||||
pmisc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
net_mon = &pmisc->param.net_mon;
|
||||
net_mon->enable_net_mon =
|
||||
wlan_le16_to_cpu(cmd_net_mon->enable_net_mon);
|
||||
net_mon->filter_flag =
|
||||
wlan_le16_to_cpu(cmd_net_mon->filter_flag);
|
||||
pchan_band = &cmd_net_mon->monitor_chan.chan_band_param[0];
|
||||
/* Band information in the TLV is bits[1:0] */
|
||||
band_info = pchan_band->bandcfg.chanBand;
|
||||
net_mon->channel = pchan_band->chan_number;
|
||||
if (band_info == BAND_2GHZ)
|
||||
net_mon->band |= (BAND_B | BAND_G);
|
||||
if (band_info == BAND_5GHZ)
|
||||
net_mon->band |= BAND_A;
|
||||
net_mon->chan_bandwidth =
|
||||
GET_SECONDARYCHAN(pchan_band->bandcfg.chan2Offset);
|
||||
if (band_info == BAND_2GHZ)
|
||||
net_mon->band |= BAND_GN;
|
||||
if (band_info == BAND_5GHZ)
|
||||
net_mon->band |= BAND_AN;
|
||||
if (band_info == BAND_2GHZ)
|
||||
net_mon->band |= BAND_GAC;
|
||||
if (band_info == BAND_5GHZ)
|
||||
net_mon->band |= BAND_AAC;
|
||||
}
|
||||
pmpriv->adapter->enable_net_mon =
|
||||
wlan_le16_to_cpu(cmd_net_mon->enable_net_mon);
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of
|
||||
* subscribe event
|
||||
|
@ -2424,27 +2501,6 @@ static mlan_status wlan_ret_coalesce_config(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static mlan_status wlan_ret_get_sensor_temp(pmlan_private pmpriv,
|
||||
const HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
mlan_ds_misc_cfg *pcfg = MNULL;
|
||||
const HostCmd_DS_SENSOR_TEMP *pSensorT = &resp->params.temp_sensor;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_buf) {
|
||||
pcfg = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
pcfg->param.sensor_temp.temperature =
|
||||
wlan_le32_to_cpu(pSensorT->temperature);
|
||||
PRINTM(MCMND, "get SOC temperature %u C \n",
|
||||
pSensorT->temperature);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of arb Cfg
|
||||
*
|
||||
|
@ -2472,6 +2528,40 @@ mlan_status wlan_ret_arb_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of ipv6 ra offload feature
|
||||
*
|
||||
* @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_ipv6_ra_offload(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
HostCmd_DS_IPV6_RA_OFFLOAD *ipv6_ra_resp =
|
||||
&resp->params.ipv6_ra_offload;
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
mlan_ds_misc_ipv6_ra_offload *ipv6_ra = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_buf && (pioctl_buf->action == MLAN_ACT_GET)) {
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
|
||||
ipv6_ra = (mlan_ds_misc_ipv6_ra_offload *)&misc->param
|
||||
.ipv6_ra_offload;
|
||||
ipv6_ra->enable = ipv6_ra_resp->enable;
|
||||
memcpy_ext(pmpriv->adapter, ipv6_ra->ipv6_addr,
|
||||
ipv6_ra_resp->ipv6_addr_param.ipv6_addr, 16,
|
||||
sizeof(ipv6_ra->ipv6_addr));
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of sta get band and
|
||||
* channel
|
||||
|
@ -2529,6 +2619,71 @@ static mlan_status wlan_ret_sta_config(pmlan_private pmpriv,
|
|||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function clears PMK in fw for fw roaming
|
||||
*
|
||||
* @param pmpriv A pointer to mlan_private structure
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS
|
||||
*/
|
||||
mlan_status wlan_clear_fw_roaming_pmk(pmlan_private pmpriv)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_SUPPLICANT_PMK,
|
||||
HostCmd_ACT_GEN_REMOVE, 0, MNULL, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of enable/disable roaming
|
||||
* offload to fw
|
||||
*
|
||||
* @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_roam_offload(pmlan_private pmpriv,
|
||||
HostCmd_DS_COMMAND *resp,
|
||||
mlan_ioctl_req *pioctl_buf)
|
||||
{
|
||||
HostCmd_DS_ROAM_OFFLOAD *cmdrsp_roam_offload =
|
||||
(HostCmd_DS_ROAM_OFFLOAD *)&resp->params.roam_offload;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
MrvlIEtypesHeader_t *header = MNULL;
|
||||
MrvlIEtypes_fw_roam_enable_t *roam_offload_enable = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (resp->result == HostCmd_RESULT_OK) {
|
||||
header = (MrvlIEtypesHeader_t *)cmdrsp_roam_offload->tlv;
|
||||
header->type = wlan_le16_to_cpu(header->type);
|
||||
if (header->type == TLV_TYPE_ROAM) {
|
||||
roam_offload_enable = (MrvlIEtypes_fw_roam_enable_t *)
|
||||
cmdrsp_roam_offload->tlv;
|
||||
if ((t_u8)roam_offload_enable->roam_enable)
|
||||
pmpriv->adapter->fw_roaming = MTRUE;
|
||||
else {
|
||||
pmpriv->adapter->fw_roaming = MFALSE;
|
||||
wlan_clear_fw_roaming_pmk(pmpriv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles the command response of set/get auto tx
|
||||
*
|
||||
|
@ -2934,6 +3089,15 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
resp->params.ssu_params.rec_len);
|
||||
break;
|
||||
#endif
|
||||
case HostCmd_CMD_CSI:
|
||||
if (resp->params.csi_params.action == CSI_CMD_ENABLE) {
|
||||
pmadapter->csi_enabled = 1;
|
||||
PRINTM(MCMND, "CSI ENABLE cmdresp\n");
|
||||
} else {
|
||||
pmadapter->csi_enabled = 0;
|
||||
PRINTM(MCMND, "CSI DISABLE cmdresp\n");
|
||||
}
|
||||
break;
|
||||
case HostCmd_CMD_802_11_ASSOCIATE:
|
||||
ret = wlan_ret_802_11_associate(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -3121,6 +3285,7 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_TARGET_ACCESS:
|
||||
case HostCmd_CMD_802_11_EEPROM_ACCESS:
|
||||
case HostCmd_CMD_BCA_REG_ACCESS:
|
||||
case HostCmd_CMD_REG_ACCESS:
|
||||
ret = wlan_ret_reg_access(pmpriv->adapter, cmdresp_no, resp,
|
||||
pioctl_buf);
|
||||
break;
|
||||
|
@ -3140,6 +3305,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_MEASUREMENT_REPORT:
|
||||
ret = wlan_meas_cmdresp_process(pmpriv, resp);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_NET_MONITOR:
|
||||
ret = wlan_ret_net_monitor(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#if defined(PCIE)
|
||||
#if defined(PCIE8997) || defined(PCIE8897)
|
||||
case HostCmd_CMD_PCIE_HOST_BUF_DETAILS:
|
||||
|
@ -3196,6 +3364,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
break;
|
||||
case HostCmd_CMD_802_11_MIMO_SWITCH:
|
||||
break;
|
||||
case HostCmd_CMD_IPV6_RA_OFFLOAD_CFG:
|
||||
ret = wlan_ret_ipv6_ra_offload(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_STA_CONFIGURE:
|
||||
ret = wlan_ret_sta_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -3206,6 +3377,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
break;
|
||||
case HostCmd_CMD_802_11_PS_INACTIVITY_TIMEOUT:
|
||||
break;
|
||||
case HostCmd_CMD_ROAM_OFFLOAD:
|
||||
ret = wlan_ret_roam_offload(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GET_TSF:
|
||||
ret = wlan_ret_get_tsf(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -3240,6 +3414,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
break;
|
||||
case HostCmd_CMD_TWT_CFG:
|
||||
break;
|
||||
case HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_ret_gpio_tsf_latch(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RX_ABORT_CFG:
|
||||
ret = wlan_ret_rxabortcfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -3259,6 +3436,9 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_HAL_PHY_CFG:
|
||||
ret = wlan_ret_hal_phy_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_IPS_CONFIG:
|
||||
ret = wlan_ret_ips_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RATE_ADAPT_CFG:
|
||||
ret = wlan_ret_rate_adapt_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -3275,6 +3455,12 @@ mlan_status wlan_ops_sta_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_MFG_COMMAND:
|
||||
ret = wlan_ret_mfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MC_AGGR_CFG:
|
||||
ret = wlan_ret_mc_aggr_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GET_CH_LOAD:
|
||||
ret = wlan_ret_ch_load(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "CMD_RESP: Unknown command response %#x\n",
|
||||
resp->command);
|
||||
|
|
|
@ -3,20 +3,29 @@
|
|||
* @brief This file contains MLAN event handling.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -444,8 +453,6 @@ t_void wlan_reset_connect_state(pmlan_private priv, t_u8 drv_disconnect)
|
|||
pmadapter->tx_lock_flag = MFALSE;
|
||||
pmadapter->pps_uapsd_mode = MFALSE;
|
||||
pmadapter->delay_null_pkt = MFALSE;
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_STA)
|
||||
pmadapter->hs_wake_interval = 0;
|
||||
|
||||
if ((wlan_fw_11d_is_enabled(priv)) &&
|
||||
(priv->state_11d.user_enable_11d == DISABLE_11D)) {
|
||||
|
@ -669,6 +676,7 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
t_u16 reason_code;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
mlan_event *pevent = MNULL;
|
||||
t_u8 addr[MLAN_MAC_ADDR_LENGTH];
|
||||
chan_band_info *pchan_band_info = MNULL;
|
||||
t_u8 radar_chan;
|
||||
t_u16 enable = 0;
|
||||
|
@ -835,6 +843,14 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_ADHOC_LINK_LOST,
|
||||
MNULL);
|
||||
break;
|
||||
case EVENT_ASSOC_REQ_IE:
|
||||
pmpriv->assoc_req_size = pmbuf->data_len - sizeof(eventcause);
|
||||
evt_buf =
|
||||
(pmbuf->pbuf + pmbuf->data_offset + sizeof(eventcause));
|
||||
memcpy_ext(pmpriv->adapter, pmpriv->assoc_req_buf, evt_buf,
|
||||
pmbuf->data_len - sizeof(eventcause),
|
||||
MRVDRV_ASSOC_RSP_BUF_SIZE);
|
||||
break;
|
||||
|
||||
case EVENT_FW_DEBUG_INFO:
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
|
@ -1004,7 +1020,6 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
PRINTM(MEVENT, "EVENT: EXT_SCAN status report (%d)\n",
|
||||
pmbuf->data_len);
|
||||
pmadapter->ext_scan_timeout = MFALSE;
|
||||
pmadapter->cmd_lock = MFALSE;
|
||||
ret = wlan_handle_event_ext_scan_status(priv, pmbuf);
|
||||
break;
|
||||
case EVENT_MEAS_REPORT_RDY:
|
||||
|
@ -1298,6 +1313,10 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
wlan_free_ssu_pcie_buf(pmadapter);
|
||||
break;
|
||||
#endif
|
||||
case EVENT_CSI:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_CSI on STA\n");
|
||||
wlan_process_csi_event(pmpriv);
|
||||
break;
|
||||
case EVENT_MEF_HOST_WAKEUP:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_MEF_HOST_WAKEUP len=%d\n",
|
||||
pmbuf->data_len);
|
||||
|
@ -1305,6 +1324,41 @@ mlan_status wlan_ops_sta_process_event(t_void *priv)
|
|||
case EVENT_MANAGEMENT_FRAME_WAKEUP:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_MANAGEMENT_FRAME_WAKEUP HOST\n");
|
||||
break;
|
||||
case EVENT_ROAM_OFFLOAD:
|
||||
memcpy_ext(pmadapter, addr,
|
||||
pmpriv->curr_bss_params.bss_descriptor.mac_address,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
memcpy_ext(pmadapter,
|
||||
pmpriv->curr_bss_params.bss_descriptor.mac_address,
|
||||
(t_u8 *)(pmadapter->event_body + 2),
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
/** replace ralist's mac address with new mac address */
|
||||
if (0 ==
|
||||
wlan_ralist_update(
|
||||
pmpriv, addr,
|
||||
pmpriv->curr_bss_params.bss_descriptor.mac_address))
|
||||
wlan_ralist_add(pmpriv,
|
||||
pmpriv->curr_bss_params.bss_descriptor
|
||||
.mac_address);
|
||||
wlan_11n_cleanup_reorder_tbl(pmpriv);
|
||||
wlan_11n_deleteall_txbastream_tbl(pmpriv);
|
||||
/*Update the BSS for inform kernel, otherwise kernel will give
|
||||
* warning for not find BSS*/
|
||||
memcpy_ext(pmadapter, (t_u8 *)&pmadapter->pscan_table[0],
|
||||
(t_u8 *)&pmpriv->curr_bss_params.bss_descriptor,
|
||||
sizeof(BSSDescriptor_t), sizeof(BSSDescriptor_t));
|
||||
if (!pmadapter->num_in_scan_table)
|
||||
pmadapter->num_in_scan_table = 1;
|
||||
PRINTM(MEVENT, "EVENT: ROAM OFFLOAD IN FW SUCCESS\n");
|
||||
pevent->bss_index = pmpriv->bss_index;
|
||||
pevent->event_id = MLAN_EVENT_ID_FW_ROAM_OFFLOAD_RESULT;
|
||||
/** Drop event id length and 2 bytes reverved length*/
|
||||
pevent->event_len = pmbuf->data_len - sizeof(eventcause) - 2;
|
||||
memcpy_ext(pmadapter, (t_u8 *)pevent->event_buf,
|
||||
pmadapter->event_body + 2, pevent->event_len,
|
||||
pevent->event_len);
|
||||
wlan_recv_event(pmpriv, pevent->event_id, pevent);
|
||||
break;
|
||||
case EVENT_CLOUD_KEEP_ALIVE_RETRY_FAIL:
|
||||
break;
|
||||
case EVENT_VDLL_IND:
|
||||
|
|
|
@ -3,20 +3,29 @@
|
|||
* @brief This file contains the functions for station ioctl.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -356,12 +365,8 @@ static mlan_status wlan_get_info_bss_info(pmlan_adapter pmadapter,
|
|||
info->param.bss_info.listen_interval = pmpriv->listen_interval;
|
||||
|
||||
/* Association ID */
|
||||
if (pmpriv->assoc_rsp_buf)
|
||||
info->param.bss_info.assoc_id =
|
||||
(t_u16)((IEEEtypes_AssocRsp_t *)pmpriv->assoc_rsp_buf)
|
||||
->a_id;
|
||||
else
|
||||
info->param.bss_info.assoc_id = 0;
|
||||
info->param.bss_info.assoc_id =
|
||||
(t_u16)((IEEEtypes_AssocRsp_t *)pmpriv->assoc_rsp_buf)->a_id;
|
||||
|
||||
/* AP/Peer supported rates */
|
||||
memset(pmadapter, info->param.bss_info.peer_supp_rates, 0,
|
||||
|
@ -416,6 +421,8 @@ static mlan_status wlan_get_info_ioctl(pmlan_adapter pmadapter,
|
|||
pget_info->param.fw_info.fw_ver = pmadapter->fw_release_number;
|
||||
pget_info->param.fw_info.hotfix_version =
|
||||
pmadapter->fw_hotfix_ver;
|
||||
pget_info->param.fw_info.tx_buf_size = pmadapter->tx_buf_size;
|
||||
|
||||
memcpy_ext(pmadapter, &pget_info->param.fw_info.mac_addr,
|
||||
pmpriv->curr_addr, MLAN_MAC_ADDR_LENGTH,
|
||||
MLAN_MAC_ADDR_LENGTH);
|
||||
|
@ -462,6 +469,11 @@ static mlan_status wlan_get_info_ioctl(pmlan_adapter pmadapter,
|
|||
pget_info->param.fw_info.antinfo = pmadapter->antinfo;
|
||||
pget_info->param.fw_info.max_ap_assoc_sta =
|
||||
pmadapter->max_sta_conn;
|
||||
pget_info->param.fw_info.fw_roaming_support =
|
||||
(pmadapter->fw_cap_info & FW_ROAMING_SUPPORT) ? 0x01 :
|
||||
0x00;
|
||||
pget_info->param.fw_info.fw_beacon_prot =
|
||||
IS_FW_SUPPORT_BEACON_PROT(pmadapter) ? 0x01 : 0x00;
|
||||
break;
|
||||
case MLAN_OID_GET_BSS_INFO:
|
||||
status = wlan_get_info_bss_info(pmadapter, pioctl_req);
|
||||
|
@ -542,6 +554,13 @@ static mlan_status wlan_snmp_mib_ioctl(pmlan_adapter pmadapter,
|
|||
value = mib->param.signalext_enable;
|
||||
cmd_oid = SignalextEnable_i;
|
||||
break;
|
||||
case MLAN_OID_SNMP_MIB_CHAN_TRACK:
|
||||
if (!IS_FW_SUPPORT_CHAN_TRACK(pmadapter)) {
|
||||
goto exit;
|
||||
}
|
||||
value = mib->param.chan_track;
|
||||
cmd_oid = ChanTrackParam_i;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
|
@ -764,7 +783,7 @@ static mlan_status wlan_bss_ioctl_get_channel_list(pmlan_adapter pmadapter,
|
|||
(pmpriv->bss_mode == MLAN_BSS_MODE_IBSS &&
|
||||
pmpriv->adhoc_state != ADHOC_STARTED))) {
|
||||
t_u8 chan_no;
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
|
||||
parsed_region_chan_11d_t *parsed_region_chan = MNULL;
|
||||
parsed_region_chan_11d_t region_chan;
|
||||
|
@ -781,7 +800,7 @@ static mlan_status wlan_bss_ioctl_get_channel_list(pmlan_adapter pmadapter,
|
|||
|
||||
if (wlan_11d_parse_domain_info(
|
||||
pmadapter, &pbss_desc->country_info,
|
||||
(t_u8)pbss_desc->bss_band,
|
||||
pbss_desc->bss_band,
|
||||
®ion_chan) == MLAN_STATUS_SUCCESS) {
|
||||
parsed_region_chan = ®ion_chan;
|
||||
} else {
|
||||
|
@ -1004,6 +1023,12 @@ static mlan_status wlan_bss_ioctl_start(pmlan_adapter pmadapter,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (pmadapter->enable_net_mon == CHANNEL_SPEC_SNIFFER_MODE) {
|
||||
PRINTM(MINFO,
|
||||
"Association is blocked in Channel Specified Network Monitor mode...\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
/* Before ASSOC REQ, If "port ctrl" mode is enabled,
|
||||
* move the port to CLOSED state */
|
||||
if (pmpriv->port_ctrl_mode == MTRUE) {
|
||||
|
@ -1480,8 +1505,7 @@ wlan_bss_ioctl_bss_11d_check_channel(pmlan_adapter pmadapter,
|
|||
(t_u32)ssid_bssid->channel);
|
||||
|
||||
/* check if this channel is supported in the region */
|
||||
if (!wlan_find_cfp_by_band_and_channel(pmadapter,
|
||||
(t_u8)ssid_bssid->bss_band,
|
||||
if (!wlan_find_cfp_by_band_and_channel(pmadapter, ssid_bssid->bss_band,
|
||||
(t_u32)ssid_bssid->channel)) {
|
||||
PRINTM(MERROR, "Unsupported Channel for region 0x%x\n",
|
||||
pmadapter->region_code);
|
||||
|
@ -2882,9 +2906,9 @@ static mlan_status wlan_sec_ioctl_set_wep_key(pmlan_adapter pmadapter,
|
|||
/* Copy the required key as the current key */
|
||||
pwep_key = &pmpriv->wep_key[index];
|
||||
if (!pwep_key->key_length) {
|
||||
if (&pmpriv->sec_info.wpa_enabled ||
|
||||
&pmpriv->sec_info.wpa2_enabled ||
|
||||
&pmpriv->sec_info.wapi_enabled) {
|
||||
if (pmpriv->sec_info.wpa_enabled ||
|
||||
pmpriv->sec_info.wpa2_enabled ||
|
||||
pmpriv->sec_info.wapi_enabled) {
|
||||
ret = MLAN_STATUS_SUCCESS;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -3944,6 +3968,28 @@ static mlan_status wlan_misc_ioctl_gen_ie(pmlan_adapter pmadapter,
|
|||
(t_u16)misc->param.gen_ie.len);
|
||||
}
|
||||
break;
|
||||
case MLAN_IE_TYPE_ARP_FILTER:
|
||||
memset(pmadapter, pmadapter->arp_filter, 0,
|
||||
sizeof(pmadapter->arp_filter));
|
||||
if (misc->param.gen_ie.len > ARP_FILTER_MAX_BUF_SIZE) {
|
||||
pmadapter->arp_filter_size = 0;
|
||||
PRINTM(MERROR, "Invalid ARP Filter Size\n");
|
||||
pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
} else if (misc->param.gen_ie.len <=
|
||||
sizeof(MrvlIEtypesHeader_t)) {
|
||||
pmadapter->arp_filter_size = 0;
|
||||
PRINTM(MINFO, "Clear ARP filter\n");
|
||||
} else {
|
||||
memcpy_ext(pmadapter, pmadapter->arp_filter,
|
||||
misc->param.gen_ie.ie_data,
|
||||
misc->param.gen_ie.len,
|
||||
ARP_FILTER_MAX_BUF_SIZE);
|
||||
pmadapter->arp_filter_size = misc->param.gen_ie.len;
|
||||
HEXDUMP("ArpFilter", pmadapter->arp_filter,
|
||||
pmadapter->arp_filter_size);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "Invalid IE type\n");
|
||||
pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER;
|
||||
|
@ -4213,6 +4259,36 @@ static mlan_status wlan_misc_ioctl_get_assoc_rsp(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the associate request IEs
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS --success
|
||||
*/
|
||||
static mlan_status wlan_misc_ioctl_get_assoc_req(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
if ((pioctl_req->action == MLAN_ACT_GET) && pmpriv->assoc_req_size) {
|
||||
memcpy_ext(pmadapter, misc->param.assoc_req.assoc_req_buf,
|
||||
pmpriv->assoc_req_buf, pmpriv->assoc_req_size,
|
||||
ASSOC_RSP_BUF_SIZE);
|
||||
misc->param.assoc_req.assoc_req_len =
|
||||
MIN(ASSOC_RSP_BUF_SIZE, pmpriv->assoc_req_size);
|
||||
}
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send function softreset command to firmware
|
||||
*
|
||||
|
@ -4321,6 +4397,84 @@ static mlan_status wlan_misc_ioctl_subscribe_evt(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set ARP filter based on IP address
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
* @param ipv4_addr ipv4 Address
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
static mlan_status wlan_ipaddr_arp_filter(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req,
|
||||
t_u32 ipv4_addr)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
t_u8 *buf;
|
||||
arpfilter_header *arpfilter = MNULL;
|
||||
filter_entry *entry = MNULL;
|
||||
t_u32 len;
|
||||
|
||||
ENTER();
|
||||
|
||||
pcb->moal_malloc(pmadapter->pmoal_handle, MRVDRV_SIZE_OF_CMD_BUFFER,
|
||||
MLAN_MEM_DEF, &buf);
|
||||
if (!buf) {
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Construct the ARP filter TLV */
|
||||
arpfilter = (arpfilter_header *)buf;
|
||||
arpfilter->type = wlan_cpu_to_le16(TLV_TYPE_ARP_FILTER);
|
||||
|
||||
if (ipv4_addr) {
|
||||
arpfilter->len = wlan_cpu_to_le16(sizeof(filter_entry) * 3);
|
||||
entry = (filter_entry *)(buf + sizeof(arpfilter_header));
|
||||
entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_BROADCAST);
|
||||
entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ARP);
|
||||
entry->ipv4_addr = wlan_cpu_to_le32(ipv4_addr);
|
||||
entry++;
|
||||
entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_UNICAST);
|
||||
entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ANY);
|
||||
entry->ipv4_addr = wlan_cpu_to_le32(IPV4_ADDR_ANY);
|
||||
entry++;
|
||||
entry->addr_type = wlan_cpu_to_le16(ADDR_TYPE_MULTICAST);
|
||||
entry->eth_type = wlan_cpu_to_le16(ETHER_TYPE_ANY);
|
||||
entry->ipv4_addr = wlan_cpu_to_le32(IPV4_ADDR_ANY);
|
||||
} else
|
||||
arpfilter->len = 0;
|
||||
|
||||
/* Update the total length */
|
||||
len = sizeof(arpfilter_header) + wlan_le16_to_cpu(arpfilter->len);
|
||||
|
||||
memset(pmadapter, pmadapter->arp_filter, 0,
|
||||
sizeof(pmadapter->arp_filter));
|
||||
if (len > ARP_FILTER_MAX_BUF_SIZE) {
|
||||
pmadapter->arp_filter_size = 0;
|
||||
PRINTM(MERROR, "Invalid ARP Filter Size\n");
|
||||
pioctl_req->status_code = MLAN_ERROR_INVALID_PARAMETER;
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
} else if (len <= sizeof(MrvlIEtypesHeader_t)) {
|
||||
pmadapter->arp_filter_size = 0;
|
||||
PRINTM(MINFO, "Clear ARP filter\n");
|
||||
} else {
|
||||
memcpy_ext(pmadapter, pmadapter->arp_filter, buf, len,
|
||||
ARP_FILTER_MAX_BUF_SIZE);
|
||||
pmadapter->arp_filter_size = len;
|
||||
HEXDUMP("ArpFilter", pmadapter->arp_filter,
|
||||
pmadapter->arp_filter_size);
|
||||
}
|
||||
|
||||
done:
|
||||
if (buf)
|
||||
pcb->moal_mfree(pmadapter->pmoal_handle, buf);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MEF configuration
|
||||
*
|
||||
|
@ -4470,6 +4624,13 @@ static mlan_status wlan_misc_ioctl_ipaddr_cfg(pmlan_adapter pmadapter,
|
|||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
if (misc->param.ipaddr_cfg.op_code & MLAN_IPADDR_OP_ARP_FILTER)
|
||||
ret = wlan_ipaddr_arp_filter(pmadapter, pioctl_req,
|
||||
ipv4_addr[0]);
|
||||
else if (pmpriv->op_code & MLAN_IPADDR_OP_ARP_FILTER)
|
||||
ret = wlan_ipaddr_arp_filter(pmadapter, pioctl_req, 0);
|
||||
if (ret == MLAN_STATUS_FAILURE)
|
||||
goto done;
|
||||
|
||||
/* Save the values in MLAN */
|
||||
if (pioctl_req->action == MLAN_ACT_SET) {
|
||||
|
@ -4727,26 +4888,22 @@ mlan_status wlan_misc_ioctl_tp_state(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
static mlan_status wlan_misc_ioctl_ips_cfg(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
t_u16 cmd_action = 0;
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_GET)
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
else {
|
||||
PRINTM(MERROR, " sensor temp only support get operation \n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_DS_GET_SENSOR_TEMP, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_IPS_CONFIG, cmd_action, 0,
|
||||
(t_void *)pioctl_req, &misc->param.ips_ctrl);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
@ -4755,6 +4912,40 @@ static mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief IPv6 Router Advertisement offload configuration
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req Pointer to the IOCTL request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
mlan_status wlan_misc_ioctl_ipv6_ra_offload(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
t_u16 cmd_action = 0;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else if (pioctl_req->action == MLAN_ACT_GET)
|
||||
cmd_action = HostCmd_ACT_GEN_GET;
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_IPV6_RA_OFFLOAD_CFG,
|
||||
cmd_action, 0, (t_void *)pioctl_req,
|
||||
&misc->param.ipv6_ra_offload);
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gtk Rekey Offload
|
||||
*
|
||||
|
@ -4801,6 +4992,106 @@ static mlan_status wlan_misc_ioctl_gtk_rekey_offload(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief enable/disable roam offload in firmware
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req Pointer to the IOCTL request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_misc_roam_offload(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
t_u16 cmd_action = 0;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
if (!(pmadapter->fw_cap_info & FW_ROAMING_SUPPORT)) {
|
||||
PRINTM(MERROR, "Firmware roaming not support\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
if (!IS_FW_SUPPORT_SUPPLICANT(pmadapter)) {
|
||||
PRINTM(MERROR, "Embedded supplicant do not enable\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
if ((misc->param.roam_offload.config_mode == ROAM_OFFLOAD_ENABLE) &&
|
||||
misc->param.roam_offload.userset_passphrase) {
|
||||
pmpriv->adapter->userset_passphrase =
|
||||
misc->param.roam_offload.userset_passphrase;
|
||||
if (!misc->param.roam_offload.enable) {
|
||||
LEAVE();
|
||||
return MLAN_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else {
|
||||
PRINTM(MERROR, "Unsupported cmd_action\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_ROAM_OFFLOAD, cmd_action, 0,
|
||||
(t_void *)pioctl_req, &misc->param.roam_offload);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief set roam offload aplist to firmware
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req Pointer to the IOCTL request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
|
||||
*/
|
||||
static mlan_status wlan_misc_roam_offload_aplist(pmlan_adapter pmadapter,
|
||||
mlan_ioctl_req *pioctl_req)
|
||||
{
|
||||
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_ds_misc_cfg *misc = MNULL;
|
||||
t_u16 cmd_action = 0;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
|
||||
if (pioctl_req->action == MLAN_ACT_SET)
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
else {
|
||||
PRINTM(MERROR, "Unsupported cmd_action\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_ROAM_OFFLOAD, cmd_action, 0,
|
||||
(t_void *)pioctl_req, &misc->param.roam_offload);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief cloud keep alive
|
||||
*
|
||||
|
@ -4882,6 +5173,7 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
status = wlan_misc_ioctl_region(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_WARM_RESET:
|
||||
PRINTM(MCMND, "Request WARM RESET\n");
|
||||
util_enqueue_list_tail(pmadapter->pmoal_handle,
|
||||
&pmadapter->ioctl_pending_q,
|
||||
(pmlan_linked_list)pioctl_req,
|
||||
|
@ -4907,6 +5199,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_ASSOC_RSP:
|
||||
status = wlan_misc_ioctl_get_assoc_rsp(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_ASSOC_REQ:
|
||||
status = wlan_misc_ioctl_get_assoc_req(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_INIT_SHUTDOWN:
|
||||
status = wlan_misc_ioctl_init_shutdown(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
@ -4933,6 +5228,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
status = wlan_misc_ioctl_tdls_idle_time(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
||||
case MLAN_OID_MISC_NET_MONITOR:
|
||||
status = wlan_misc_ioctl_net_monitor(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_MAC_CONTROL:
|
||||
status = wlan_misc_ioctl_mac_control(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
@ -5022,6 +5320,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
status = wlan_misc_ioctl_operclass_validation(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_IPV6_RA_OFFLOAD:
|
||||
status = wlan_misc_ioctl_ipv6_ra_offload(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_GTK_REKEY_OFFLOAD:
|
||||
status = wlan_misc_ioctl_gtk_rekey_offload(pmadapter,
|
||||
pioctl_req);
|
||||
|
@ -5029,9 +5330,21 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_IND_RST_CFG:
|
||||
status = wlan_misc_ioctl_ind_rst_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_MC_AGGR_CFG:
|
||||
status = wlan_misc_ioctl_mc_aggr_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_CH_LOAD:
|
||||
status = wlan_misc_ioctl_ch_load(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_GET_TSF:
|
||||
status = wlan_misc_ioctl_get_tsf(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_ROAM_OFFLOAD:
|
||||
status = wlan_misc_roam_offload(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_ROAM_OFFLOAD_APLIST:
|
||||
status = wlan_misc_roam_offload_aplist(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_GET_CHAN_REGION_CFG:
|
||||
status = wlan_misc_chan_reg_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
@ -5070,9 +5383,18 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
status = wlan_misc_ssu(pmadapter, pioctl_req);
|
||||
break;
|
||||
#endif
|
||||
case MLAN_OID_MISC_CSI:
|
||||
status = wlan_misc_csi(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_HAL_PHY_CFG:
|
||||
status = wlan_misc_hal_phy_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_GPIO_TSF_LATCH:
|
||||
status = wlan_misc_gpio_tsf_latch_config(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_GET_TSF_INFO:
|
||||
status = wlan_misc_get_tsf_info(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_RX_ABORT_CFG:
|
||||
status = wlan_misc_ioctl_rxabortcfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
|
@ -5114,6 +5436,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
|
|||
case MLAN_OID_MISC_TP_STATE:
|
||||
status = wlan_misc_ioctl_tp_state(pmadapter, pioctl_req);
|
||||
break;
|
||||
case MLAN_OID_MISC_IPS_CFG:
|
||||
status = wlan_misc_ioctl_ips_cfg(pmadapter, pioctl_req);
|
||||
break;
|
||||
default:
|
||||
if (pioctl_req)
|
||||
pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID;
|
||||
|
@ -5218,6 +5543,13 @@ static mlan_status wlan_scan_ioctl(pmlan_adapter pmadapter,
|
|||
return status;
|
||||
}
|
||||
|
||||
if (pmadapter->enable_net_mon == CHANNEL_SPEC_SNIFFER_MODE) {
|
||||
PRINTM(MINFO,
|
||||
"Scan is blocked in Channel Specified Network Monitor mode...\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
if (pmadapter->scan_block && pioctl_req->action == MLAN_ACT_SET) {
|
||||
PRINTM(MERROR, "Scan is blocked during association...\n");
|
||||
LEAVE();
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -176,6 +185,7 @@ void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
|||
int ie_len = 0;
|
||||
t_u8 i;
|
||||
int rate_len;
|
||||
IEEEtypes_Extension_t *ext_ie;
|
||||
|
||||
#define TDLS_PAYLOAD_TYPE 2
|
||||
#define TDLS_CATEGORY 0x0c
|
||||
|
@ -329,7 +339,7 @@ void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
|||
pos, sizeof(IEEEtypes_VHTCap_t),
|
||||
sizeof(IEEEtypes_VHTCap_t));
|
||||
sta_ptr->is_11ac_enabled = 1;
|
||||
DBG_HEXDUMP(MDAT_D, "TDLS VHT capability",
|
||||
DBG_HEXDUMP(MCMD_D, "Rx TDLS VHT capability",
|
||||
(t_u8 *)(&sta_ptr->vht_cap),
|
||||
MIN(sizeof(IEEEtypes_VHTCap_t),
|
||||
MAX_DATA_DUMP_LEN));
|
||||
|
@ -338,7 +348,7 @@ void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
|||
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",
|
||||
DBG_HEXDUMP(MCMD_D, "Rx TDLS VHT Operation",
|
||||
(t_u8 *)(&sta_ptr->vht_oprat),
|
||||
MIN(sizeof(IEEEtypes_VHTOprat_t),
|
||||
MAX_DATA_DUMP_LEN));
|
||||
|
@ -347,11 +357,47 @@ void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
|||
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",
|
||||
DBG_HEXDUMP(MCMD_D, "Rx TDLS AID Info",
|
||||
(t_u8 *)(&sta_ptr->aid_info),
|
||||
MIN(sizeof(IEEEtypes_AID_t),
|
||||
MAX_DATA_DUMP_LEN));
|
||||
break;
|
||||
case EXTENSION:
|
||||
ext_ie = (IEEEtypes_Extension_t *)pos;
|
||||
if (ext_ie->ext_id == HE_CAPABILITY) {
|
||||
memcpy_ext(priv->adapter,
|
||||
(t_u8 *)&sta_ptr->tdls_he_cap, pos,
|
||||
ext_ie->ieee_hdr.len +
|
||||
sizeof(IEEEtypes_Header_t),
|
||||
sizeof(IEEEtypes_HECap_t));
|
||||
sta_ptr->tdls_he_cap.ieee_hdr.len =
|
||||
MIN(ext_ie->ieee_hdr.len,
|
||||
sizeof(IEEEtypes_HECap_t) -
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
sta_ptr->is_11ax_enabled = 1;
|
||||
DBG_HEXDUMP(MCMD_D, "Rx TDLS HE Capability",
|
||||
(t_u8 *)(&sta_ptr->tdls_he_cap),
|
||||
MIN(sizeof(IEEEtypes_Header_t) +
|
||||
sta_ptr->tdls_he_cap
|
||||
.ieee_hdr.len,
|
||||
sizeof(IEEEtypes_HECap_t)));
|
||||
} else if (ext_ie->ext_id == HE_OPERATION) {
|
||||
memcpy_ext(priv->adapter,
|
||||
(t_u8 *)&sta_ptr->he_op, pos,
|
||||
ext_ie->ieee_hdr.len +
|
||||
sizeof(IEEEtypes_Header_t),
|
||||
sizeof(IEEEtypes_HeOp_t));
|
||||
ext_ie->ieee_hdr.len =
|
||||
MIN(ext_ie->ieee_hdr.len,
|
||||
sizeof(IEEEtypes_HeOp_t) -
|
||||
sizeof(IEEEtypes_Header_t));
|
||||
DBG_HEXDUMP(MCMD_D, "Rx TDLS HE Operation",
|
||||
(t_u8 *)(&sta_ptr->he_op),
|
||||
MIN(sizeof(IEEEtypes_Header_t) +
|
||||
ext_ie->ieee_hdr.len,
|
||||
MAX_DATA_DUMP_LEN));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -359,6 +405,81 @@ void wlan_process_tdls_action_frame(pmlan_private priv, t_u8 *pbuf, t_u32 len)
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function get pxpd info for radiotap info
|
||||
*
|
||||
* @param priv A pointer to pmlan_private
|
||||
* @param prx_pd A pointer to RxPD
|
||||
* @param prt_info A pointer to radiotap_info
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void wlan_rxpdinfo_to_radiotapinfo(pmlan_private priv, RxPD *prx_pd,
|
||||
radiotap_info *prt_info)
|
||||
{
|
||||
radiotap_info rt_info_tmp;
|
||||
t_u8 rx_rate_info = 0;
|
||||
t_u8 mcs_index = 0;
|
||||
t_u8 format = 0;
|
||||
t_u8 bw = 0;
|
||||
t_u8 gi = 0;
|
||||
t_u8 ldpc = 0;
|
||||
t_u8 ext_rate_info = 0;
|
||||
|
||||
memset(priv->adapter, &rt_info_tmp, 0x00, sizeof(rt_info_tmp));
|
||||
rt_info_tmp.snr = prx_pd->snr;
|
||||
rt_info_tmp.nf = prx_pd->nf;
|
||||
rt_info_tmp.band_config = (prx_pd->rx_info & 0xf);
|
||||
rt_info_tmp.chan_num = (prx_pd->rx_info & RXPD_CHAN_MASK) >> 5;
|
||||
ext_rate_info = (t_u8)(prx_pd->rx_info >> 16);
|
||||
|
||||
rt_info_tmp.antenna = prx_pd->antenna;
|
||||
rx_rate_info = prx_pd->rate_info;
|
||||
if ((rx_rate_info & 0x3) == MLAN_RATE_FORMAT_VHT) {
|
||||
/* VHT rate */
|
||||
format = MLAN_RATE_FORMAT_VHT;
|
||||
mcs_index = MIN(prx_pd->rx_rate & 0xF, 9);
|
||||
/* 20M: bw=0, 40M: bw=1, 80M: bw=2, 160M: bw=3 */
|
||||
bw = (rx_rate_info & 0xC) >> 2;
|
||||
/* LGI: gi =0, SGI: gi = 1 */
|
||||
gi = (rx_rate_info & 0x10) >> 4;
|
||||
} else if ((rx_rate_info & 0x3) == MLAN_RATE_FORMAT_HT) {
|
||||
/* HT rate */
|
||||
format = MLAN_RATE_FORMAT_HT;
|
||||
mcs_index = prx_pd->rx_rate;
|
||||
/* 20M: bw=0, 40M: bw=1 */
|
||||
bw = (rx_rate_info & 0xC) >> 2;
|
||||
/* LGI: gi =0, SGI: gi = 1 */
|
||||
gi = (rx_rate_info & 0x10) >> 4;
|
||||
} else {
|
||||
/* LG rate */
|
||||
format = MLAN_RATE_FORMAT_LG;
|
||||
mcs_index = (prx_pd->rx_rate > MLAN_RATE_INDEX_OFDM0) ?
|
||||
prx_pd->rx_rate - 1 :
|
||||
prx_pd->rx_rate;
|
||||
}
|
||||
ldpc = rx_rate_info & 0x40;
|
||||
|
||||
rt_info_tmp.rate_info.mcs_index = mcs_index;
|
||||
rt_info_tmp.rate_info.rate_info =
|
||||
(ldpc << 5) | (format << 3) | (bw << 1) | gi;
|
||||
rt_info_tmp.rate_info.bitrate =
|
||||
wlan_index_to_data_rate(priv->adapter, prx_pd->rx_rate,
|
||||
prx_pd->rate_info, ext_rate_info);
|
||||
|
||||
if (prx_pd->flags & RXPD_FLAG_EXTRA_HEADER)
|
||||
memcpy_ext(priv->adapter, &rt_info_tmp.extra_info,
|
||||
(t_u8 *)prx_pd + sizeof(*prx_pd),
|
||||
sizeof(rt_info_tmp.extra_info),
|
||||
sizeof(rt_info_tmp.extra_info));
|
||||
|
||||
memset(priv->adapter, prt_info, 0x00, sizeof(radiotap_info));
|
||||
memcpy_ext(priv->adapter, prt_info, &rt_info_tmp, sizeof(rt_info_tmp),
|
||||
sizeof(radiotap_info));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function processes received packet and forwards it
|
||||
* to kernel/upper layer
|
||||
|
@ -498,6 +619,10 @@ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
PRINTM(MDATA, "%lu.%06lu : Data => kernel seq_num=%d tid=%d\n",
|
||||
pmbuf->out_ts_sec, pmbuf->out_ts_usec, prx_pd->seq_num,
|
||||
prx_pd->priority);
|
||||
if (pmadapter->enable_net_mon) {
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_NET_MONITOR;
|
||||
goto mon_process;
|
||||
}
|
||||
|
||||
#ifdef DRV_EMBEDDED_SUPPLICANT
|
||||
if (supplicantIsEnabled(priv->psapriv) &&
|
||||
|
@ -516,6 +641,16 @@ mlan_status wlan_process_rx_packet(pmlan_adapter pmadapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
#endif
|
||||
|
||||
mon_process:
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_NET_MONITOR) {
|
||||
// Use some rxpd space to save rxpd info for radiotap header
|
||||
// We should insure radiotap_info is not bigger than RxPD
|
||||
wlan_rxpdinfo_to_radiotapinfo(
|
||||
priv, prx_pd,
|
||||
(radiotap_info *)(pmbuf->pbuf + pmbuf->data_offset -
|
||||
sizeof(radiotap_info)));
|
||||
}
|
||||
|
||||
if (MFALSE || priv->rx_pkt_info) {
|
||||
ext_rate_info = (t_u8)(prx_pd->rx_info >> 16);
|
||||
pmbuf->u.rx_info.data_rate =
|
||||
|
@ -576,6 +711,10 @@ mlan_status wlan_ops_sta_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
prx_pd = (RxPD *)(pmbuf->pbuf + pmbuf->data_offset);
|
||||
/* Endian conversion */
|
||||
endian_convert_RxPD(prx_pd);
|
||||
if (prx_pd->flags & RXPD_FLAG_EXTRA_HEADER) {
|
||||
endian_convert_RxPD_extra_header(
|
||||
(rxpd_extra_info *)((t_u8 *)prx_pd + sizeof(*prx_pd)));
|
||||
}
|
||||
if (priv->adapter->pcard_info->v14_fw_api) {
|
||||
t_u8 rxpd_rate_info_orig = prx_pd->rate_info;
|
||||
prx_pd->rate_info = wlan_convert_v14_rx_rate_info(
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* transmission in MLAN module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -168,6 +177,37 @@ t_void *wlan_ops_sta_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_control |= TXPD_RETRY_ENABLE;
|
||||
}
|
||||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MC_AGGR_PKT) {
|
||||
tx_ctrl *ctrl = (tx_ctrl *)&plocal_tx_pd->tx_control;
|
||||
mc_tx_ctrl *mc_ctrl =
|
||||
(mc_tx_ctrl *)&plocal_tx_pd->pkt_delay_2ms;
|
||||
plocal_tx_pd->tx_pkt_type = PKT_TYPE_802DOT11_MC_AGGR;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_START_CYCLE)
|
||||
ctrl->mc_cycle_start = MTRUE;
|
||||
else
|
||||
ctrl->mc_cycle_start = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_END_CYCLE)
|
||||
ctrl->mc_cycle_end = MTRUE;
|
||||
else
|
||||
ctrl->mc_cycle_end = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_START_AMPDU)
|
||||
ctrl->mc_ampdu_start = MTRUE;
|
||||
else
|
||||
ctrl->mc_ampdu_start = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_END_AMPDU)
|
||||
ctrl->mc_ampdu_end = MTRUE;
|
||||
else
|
||||
ctrl->mc_ampdu_end = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_RETRY)
|
||||
ctrl->mc_pkt_retry = MTRUE;
|
||||
else
|
||||
ctrl->mc_pkt_retry = MFALSE;
|
||||
ctrl->bw = pmbuf->u.mc_tx_info.bandwidth & 0x7;
|
||||
ctrl->tx_rate = pmbuf->u.mc_tx_info.mcs_index & 0x1f;
|
||||
mc_ctrl->abs_tsf_expirytime =
|
||||
wlan_cpu_to_le32(pmbuf->u.mc_tx_info.pkt_expiry);
|
||||
mc_ctrl->mc_seq = wlan_cpu_to_le16(pmbuf->u.mc_tx_info.seq_num);
|
||||
}
|
||||
endian_convert_TxPD(plocal_tx_pd);
|
||||
|
||||
/* Adjust the data offset and length to include TxPD in pmbuf */
|
||||
|
|
|
@ -6,18 +6,27 @@
|
|||
*
|
||||
* Copyright 2009-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* of uap functionalities
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2020 NXP
|
||||
* Copyright 2009-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,20 +3,29 @@
|
|||
* @brief This file contains the handling of AP mode command and event
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2021 NXP
|
||||
* Copyright 2009-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -714,7 +723,8 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
t_u16 i;
|
||||
t_u16 ac;
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
int rx_mcs_supp = 0;
|
||||
#endif
|
||||
|
||||
|
@ -1099,7 +1109,9 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
tlv_auth_type = (MrvlIEtypes_auth_type_t *)tlv;
|
||||
tlv_auth_type->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_AUTH_TYPE);
|
||||
tlv_auth_type->header.len = wlan_cpu_to_le16(sizeof(t_u8));
|
||||
tlv_auth_type->header.len =
|
||||
wlan_cpu_to_le16(sizeof(MrvlIEtypes_auth_type_t) -
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
tlv_auth_type->auth_type =
|
||||
(t_u8)bss->param.bss_config.auth_mode;
|
||||
cmd_size += sizeof(MrvlIEtypes_auth_type_t);
|
||||
|
@ -1342,8 +1354,10 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
bss->param.bss_config.supported_mcs_set, 16,
|
||||
sizeof(tlv_htcap->ht_cap.supported_mcs_set));
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097)
|
||||
defined(PCIE9097) || defined(SD9097) || defined(USB9097) || \
|
||||
defined(SDNW62X) || defined(PCIENW62X) || defined(USBNW62X)
|
||||
if (IS_CARD9098(pmpriv->adapter->card_type) ||
|
||||
IS_CARDNW62X(pmpriv->adapter->card_type) ||
|
||||
IS_CARD9097(pmpriv->adapter->card_type)) {
|
||||
if (bss->param.bss_config.supported_mcs_set[0]) {
|
||||
if (bss->param.bss_config.bandcfg.chanBand ==
|
||||
|
@ -1462,7 +1476,6 @@ static mlan_status wlan_uap_cmd_ap_config(pmlan_private pmpriv,
|
|||
cmd_size += sizeof(MrvlIEtypes_preamble_t);
|
||||
tlv += sizeof(MrvlIEtypes_preamble_t);
|
||||
}
|
||||
|
||||
cmd->size = (t_u16)wlan_cpu_to_le16(cmd_size);
|
||||
PRINTM(MCMND, "AP config: cmd_size=%d\n", cmd_size);
|
||||
LEAVE();
|
||||
|
@ -1512,6 +1525,10 @@ static mlan_status wlan_uap_cmd_sys_configure(pmlan_private pmpriv,
|
|||
t_u16 req_len = 0, travel_len = 0;
|
||||
custom_ie *cptr = MNULL;
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
MrvlIEtypes_wacp_mode_t *tlv_wacp_mode = MNULL;
|
||||
MrvlIEtypes_action_chan_switch_t *tlv_chan_switch = MNULL;
|
||||
IEEEtypes_ChanSwitchAnn_t *csa_ie = MNULL;
|
||||
IEEEtypes_ExtChanSwitchAnn_t *ecsa_ie = MNULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1829,6 +1846,57 @@ static mlan_status wlan_uap_cmd_sys_configure(pmlan_private pmpriv,
|
|||
bss->param.ap_channel.bandcfg,
|
||||
bss->param.ap_channel.channel);
|
||||
}
|
||||
} else if (bss->sub_command == MLAN_OID_ACTION_CHAN_SWITCH) {
|
||||
cmd->size = sizeof(HostCmd_DS_SYS_CONFIG) - 1 +
|
||||
S_DS_GEN +
|
||||
sizeof(MrvlIEtypes_action_chan_switch_t);
|
||||
tlv_chan_switch = (MrvlIEtypes_action_chan_switch_t *)
|
||||
sys_config->tlv_buffer;
|
||||
tlv_chan_switch->header.type = wlan_cpu_to_le16(
|
||||
MRVL_ACTION_CHAN_SWITCH_ANNOUNCE);
|
||||
// mode reserve for future use
|
||||
tlv_chan_switch->mode = 0;
|
||||
tlv_chan_switch->num_pkt =
|
||||
bss->param.chanswitch.chan_switch_count;
|
||||
if (bss->param.chanswitch.new_oper_class) {
|
||||
tlv_chan_switch->header.len = wlan_cpu_to_le16(
|
||||
sizeof(MrvlIEtypes_action_chan_switch_t) -
|
||||
sizeof(MrvlIEtypesHeader_t) +
|
||||
sizeof(IEEEtypes_ExtChanSwitchAnn_t));
|
||||
ecsa_ie = (IEEEtypes_ExtChanSwitchAnn_t *)
|
||||
tlv_chan_switch->ie_buf;
|
||||
ecsa_ie->element_id = EXTEND_CHANNEL_SWITCH_ANN;
|
||||
ecsa_ie->len =
|
||||
sizeof(IEEEtypes_ExtChanSwitchAnn_t) -
|
||||
sizeof(IEEEtypes_Header_t);
|
||||
ecsa_ie->chan_switch_mode =
|
||||
bss->param.chanswitch.chan_switch_mode;
|
||||
ecsa_ie->chan_switch_count = 0;
|
||||
ecsa_ie->new_channel_num =
|
||||
bss->param.chanswitch.new_channel_num;
|
||||
ecsa_ie->new_oper_class =
|
||||
bss->param.chanswitch.new_oper_class;
|
||||
cmd->size +=
|
||||
sizeof(IEEEtypes_ExtChanSwitchAnn_t);
|
||||
} else {
|
||||
tlv_chan_switch->header.len = wlan_cpu_to_le16(
|
||||
sizeof(MrvlIEtypes_action_chan_switch_t) -
|
||||
sizeof(MrvlIEtypesHeader_t) +
|
||||
sizeof(IEEEtypes_ChanSwitchAnn_t));
|
||||
csa_ie = (IEEEtypes_ChanSwitchAnn_t *)
|
||||
tlv_chan_switch->ie_buf;
|
||||
csa_ie->element_id = CHANNEL_SWITCH_ANN;
|
||||
csa_ie->len =
|
||||
sizeof(IEEEtypes_ChanSwitchAnn_t) -
|
||||
sizeof(IEEEtypes_Header_t);
|
||||
csa_ie->chan_switch_mode =
|
||||
bss->param.chanswitch.chan_switch_mode;
|
||||
csa_ie->chan_switch_count = 0;
|
||||
csa_ie->new_channel_num =
|
||||
bss->param.chanswitch.new_channel_num;
|
||||
cmd->size += sizeof(IEEEtypes_ChanSwitchAnn_t);
|
||||
}
|
||||
cmd->size = wlan_cpu_to_le16(cmd->size);
|
||||
} else if ((bss->sub_command == MLAN_OID_UAP_BSS_CONFIG) &&
|
||||
(cmd_action == HostCmd_ACT_GEN_SET)) {
|
||||
ret = wlan_uap_cmd_ap_config(pmpriv, cmd, cmd_action,
|
||||
|
@ -1900,6 +1968,21 @@ static mlan_status wlan_uap_cmd_sys_configure(pmlan_private pmpriv,
|
|||
misc->param.cust_ie.len);
|
||||
}
|
||||
}
|
||||
if (misc->sub_command == MLAN_OID_MISC_WACP_MODE) {
|
||||
tlv_wacp_mode = (MrvlIEtypes_wacp_mode_t *)
|
||||
sys_config->tlv_buffer;
|
||||
tlv_wacp_mode->header.type =
|
||||
wlan_cpu_to_le16(TLV_TYPE_UAP_WACP_MODE);
|
||||
tlv_wacp_mode->header.len =
|
||||
wlan_cpu_to_le16(sizeof(t_u8));
|
||||
if (cmd_action == HostCmd_ACT_GEN_SET) {
|
||||
tlv_wacp_mode->wacp_mode =
|
||||
misc->param.wacp_mode;
|
||||
}
|
||||
cmd->size = wlan_cpu_to_le16(
|
||||
sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN +
|
||||
sizeof(MrvlIEtypes_wacp_mode_t));
|
||||
}
|
||||
}
|
||||
done:
|
||||
LEAVE();
|
||||
|
@ -2181,6 +2264,13 @@ static mlan_status wlan_uap_ret_cmd_ap_config(pmlan_private pmpriv,
|
|||
tlv_auth_type = (MrvlIEtypes_auth_type_t *)tlv;
|
||||
bss->param.bss_config.auth_mode =
|
||||
tlv_auth_type->auth_type;
|
||||
if (tlv_len == (sizeof(MrvlIEtypes_auth_type_t) -
|
||||
sizeof(MrvlIEtypesHeader_t))) {
|
||||
bss->param.bss_config.pwe_derivation =
|
||||
tlv_auth_type->PWE_derivation;
|
||||
bss->param.bss_config.transition_disable =
|
||||
tlv_auth_type->transition_disable;
|
||||
}
|
||||
break;
|
||||
case TLV_TYPE_UAP_ENCRYPT_PROTOCOL:
|
||||
tlv_encrypt_protocol =
|
||||
|
@ -2865,6 +2955,10 @@ static mlan_status wlan_uap_cmd_snmp_mib(pmlan_private pmpriv,
|
|||
psnmp_mib->value[0] = *((t_u8 *)pdata_buf);
|
||||
cmd->size += sizeof(t_u8);
|
||||
break;
|
||||
case Dot11H_fakeRadar:
|
||||
psnmp_mib->oid = wlan_cpu_to_le16((t_u16)cmd_oid);
|
||||
psnmp_mib->buf_size = 0;
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "Unsupported OID.\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
|
@ -3186,6 +3280,15 @@ static mlan_status wlan_uap_ret_get_log(pmlan_private pmpriv,
|
|||
wlan_le32_to_cpu(pget_log->dwMgtErrCnt);
|
||||
pget_info->param.stats.dwDatErrCnt =
|
||||
wlan_le32_to_cpu(pget_log->dwDatErrCnt);
|
||||
pget_info->param.stats.bigtk_mmeGoodCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_mmeGoodCnt);
|
||||
pget_info->param.stats.bigtk_replayErrCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_replayErrCnt);
|
||||
pget_info->param.stats.bigtk_micErrCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_micErrCnt);
|
||||
pget_info->param.stats.bigtk_mmeNotFoundCnt =
|
||||
wlan_le32_to_cpu(pget_log->bigtk_mmeNotFoundCnt);
|
||||
|
||||
if (pmpriv->adapter->getlog_enable) {
|
||||
pget_info->param.stats.tx_frag_cnt =
|
||||
wlan_le32_to_cpu(pget_log->tx_frag_cnt);
|
||||
|
@ -3426,7 +3529,7 @@ static mlan_status wlan_uap_cmd_key_material(pmlan_private pmpriv,
|
|||
else
|
||||
pkey_material->key_param_set.key_info |= KEY_INFO_UCAST_KEY;
|
||||
if (pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK)
|
||||
pkey_material->key_param_set.key_info = KEY_INFO_CMAC_AES_KEY;
|
||||
pkey_material->key_param_set.key_info |= KEY_INFO_CMAC_AES_KEY;
|
||||
if (pkey->key_flags & KEY_FLAG_SET_TX_KEY)
|
||||
pkey_material->key_param_set.key_info |=
|
||||
KEY_INFO_TX_KEY | KEY_INFO_RX_KEY;
|
||||
|
@ -3505,7 +3608,12 @@ static mlan_status wlan_uap_cmd_key_material(pmlan_private pmpriv,
|
|||
~(wlan_cpu_to_le16(KEY_INFO_MCAST_KEY));
|
||||
pkey_material->key_param_set.key_info |=
|
||||
wlan_cpu_to_le16(KEY_INFO_AES_MCAST_IGTK);
|
||||
pkey_material->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC;
|
||||
if (pkey->key_flags & KEY_FLAG_GMAC_128)
|
||||
pkey_material->key_param_set.key_type =
|
||||
KEY_TYPE_ID_BIP_GMAC_128;
|
||||
else
|
||||
pkey_material->key_param_set.key_type =
|
||||
KEY_TYPE_ID_AES_CMAC;
|
||||
pkey_material->key_param_set.key_params.cmac_aes.key_len =
|
||||
wlan_cpu_to_le16(pkey->key_len);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
|
@ -3517,7 +3625,39 @@ static mlan_status wlan_uap_cmd_key_material(pmlan_private pmpriv,
|
|||
S_DS_GEN + KEY_PARAMS_FIXED_LEN +
|
||||
sizeof(cmac_aes_param) +
|
||||
sizeof(pkey_material->action));
|
||||
PRINTM(MCMND, "Set CMAC AES Key\n");
|
||||
if (pkey->key_flags & KEY_FLAG_GMAC_128)
|
||||
PRINTM(MCMND, "Set AES 128 GMAC Key\n");
|
||||
else
|
||||
PRINTM(MCMND, "Set CMAC AES Key\n");
|
||||
goto done;
|
||||
}
|
||||
if (pkey->key_len == WPA_IGTK_256_KEY_LEN &&
|
||||
(pkey->key_flags & KEY_FLAG_AES_MCAST_IGTK)) {
|
||||
if (pkey->key_flags &
|
||||
(KEY_FLAG_RX_SEQ_VALID | KEY_FLAG_TX_SEQ_VALID))
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
pkey_material->key_param_set.key_params
|
||||
.cmac_aes.ipn,
|
||||
pkey->pn, SEQ_MAX_SIZE, IGTK_PN_SIZE);
|
||||
pkey_material->key_param_set.key_info &=
|
||||
~(wlan_cpu_to_le16(KEY_INFO_MCAST_KEY));
|
||||
pkey_material->key_param_set.key_info |=
|
||||
wlan_cpu_to_le16(KEY_INFO_AES_MCAST_IGTK);
|
||||
pkey_material->key_param_set.key_type =
|
||||
KEY_TYPE_ID_BIP_GMAC_256;
|
||||
pkey_material->key_param_set.key_params.cmac_aes.key_len =
|
||||
wlan_cpu_to_le16(pkey->key_len);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
pkey_material->key_param_set.key_params.cmac_aes.key,
|
||||
pkey->key_material, pkey->key_len,
|
||||
WPA_IGTK_256_KEY_LEN);
|
||||
pkey_material->key_param_set.length = wlan_cpu_to_le16(
|
||||
KEY_PARAMS_FIXED_LEN + sizeof(gmac_aes_256_param));
|
||||
cmd->size = wlan_cpu_to_le16(sizeof(MrvlIEtypesHeader_t) +
|
||||
S_DS_GEN + KEY_PARAMS_FIXED_LEN +
|
||||
sizeof(gmac_aes_256_param) +
|
||||
sizeof(pkey_material->action));
|
||||
PRINTM(MCMND, "Set AES 256 GMAC Key\n");
|
||||
goto done;
|
||||
}
|
||||
if (pkey->key_len == WPA_TKIP_KEY_LEN) {
|
||||
|
@ -3567,6 +3707,7 @@ static mlan_status wlan_uap_ret_sta_list(pmlan_private pmpriv,
|
|||
sta_node *sta_ptr;
|
||||
t_u8 tlv_len = 0;
|
||||
t_u8 *buf = MNULL;
|
||||
t_u8 *ie_buf = MNULL;
|
||||
|
||||
ENTER();
|
||||
if (pioctl_buf) {
|
||||
|
@ -3577,8 +3718,12 @@ static mlan_status wlan_uap_ret_sta_list(pmlan_private pmpriv,
|
|||
tlv = (MrvlIEtypes_sta_info_t *)buf;
|
||||
info->param.sta_list.sta_count =
|
||||
MIN(info->param.sta_list.sta_count, MAX_NUM_CLIENTS);
|
||||
ie_buf = (t_u8 *)&info->param.sta_list.info[0];
|
||||
ie_buf +=
|
||||
sizeof(sta_info_data) * info->param.sta_list.sta_count;
|
||||
pioctl_buf->data_read_written =
|
||||
sizeof(info->param.sta_list.sta_count);
|
||||
sizeof(mlan_ds_sta_list) -
|
||||
sizeof(sta_info_data) * MAX_NUM_CLIENTS;
|
||||
for (i = 0; i < info->param.sta_list.sta_count; i++) {
|
||||
tlv_len = wlan_le16_to_cpu(tlv->header.len);
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
|
@ -3588,12 +3733,12 @@ static mlan_status wlan_uap_ret_sta_list(pmlan_private pmpriv,
|
|||
info->param.sta_list.info[i].ie_len =
|
||||
tlv_len + sizeof(MrvlIEtypesHeader_t) -
|
||||
sizeof(MrvlIEtypes_sta_info_t);
|
||||
if (info->param.sta_list.info[i].ie_len)
|
||||
memcpy_ext(pmpriv->adapter,
|
||||
info->param.sta_list.info[i].ie_buf,
|
||||
tlv->ie_buf,
|
||||
if (info->param.sta_list.info[i].ie_len) {
|
||||
memcpy_ext(pmpriv->adapter, ie_buf, tlv->ie_buf,
|
||||
info->param.sta_list.info[i].ie_len,
|
||||
info->param.sta_list.info[i].ie_len);
|
||||
ie_buf += info->param.sta_list.info[i].ie_len;
|
||||
}
|
||||
info->param.sta_list.info[i].power_mgmt_status =
|
||||
tlv->power_mgmt_status;
|
||||
info->param.sta_list.info[i].rssi = tlv->rssi;
|
||||
|
@ -3610,7 +3755,7 @@ static mlan_status wlan_uap_ret_sta_list(pmlan_private pmpriv,
|
|||
} else
|
||||
info->param.sta_list.info[i].bandmode = 0xFF;
|
||||
pioctl_buf->data_read_written +=
|
||||
sizeof(sta_info_data) - 1 +
|
||||
sizeof(sta_info_data) +
|
||||
info->param.sta_list.info[i].ie_len;
|
||||
buf += sizeof(MrvlIEtypes_sta_info_t) +
|
||||
info->param.sta_list.info[i].ie_len;
|
||||
|
@ -4008,6 +4153,7 @@ static mlan_status wlan_uap_cmd_oper_ctrl(pmlan_private pmpriv,
|
|||
if (bandcfg->chanWidth)
|
||||
bandcfg->chan2Offset =
|
||||
wlan_get_second_channel_offset(
|
||||
pmpriv,
|
||||
uap_oper_ctrl->channel);
|
||||
bandcfg->scanMode = SCAN_MODE_MANUAL;
|
||||
poper_ctl->channel_band.channel =
|
||||
|
@ -4515,6 +4661,10 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
pdata_buf);
|
||||
break;
|
||||
#endif
|
||||
case HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_cmd_gpio_tsf_latch(pmpriv, cmd_ptr, cmd_action,
|
||||
pioctl_buf, pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_RF_ANTENNA:
|
||||
ret = wlan_cmd_802_11_rf_antenna(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
@ -4536,6 +4686,7 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
case HostCmd_CMD_TARGET_ACCESS:
|
||||
case HostCmd_CMD_802_11_EEPROM_ACCESS:
|
||||
case HostCmd_CMD_BCA_REG_ACCESS:
|
||||
case HostCmd_CMD_REG_ACCESS:
|
||||
ret = wlan_cmd_reg_access(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
|
@ -4574,6 +4725,10 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
sizeof(HostCmd_DS_CHAN_REGION_CFG) + S_DS_GEN);
|
||||
cmd_ptr->params.reg_cfg.action = wlan_cpu_to_le16(cmd_action);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_NET_MONITOR:
|
||||
ret = wlan_cmd_net_monitor(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_PACKET_AGGR_CTRL:
|
||||
ret = wlan_cmd_packet_aggr_ctrl(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
|
@ -4666,6 +4821,17 @@ mlan_status wlan_ops_uap_prepare_cmd(t_void *priv, t_u16 cmd_no,
|
|||
ret = wlan_cmd_hal_phy_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MC_AGGR_CFG:
|
||||
ret = wlan_cmd_mc_aggr_cfg(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GET_CH_LOAD:
|
||||
ret = wlan_cmd_get_ch_load(pmpriv, cmd_ptr, cmd_action,
|
||||
pdata_buf);
|
||||
break;
|
||||
case HostCmd_DS_GET_SENSOR_TEMP:
|
||||
wlan_cmd_get_sensor_temp(pmpriv, cmd_ptr, cmd_action);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "PREP_CMD: unknown command- %#x\n", cmd_no);
|
||||
if (pioctl_req)
|
||||
|
@ -4841,6 +5007,9 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
break;
|
||||
case HostCmd_CMD_SET_BSS_MODE:
|
||||
break;
|
||||
case HostCmd_CMD_802_11_NET_MONITOR:
|
||||
ret = wlan_ret_net_monitor(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_RECONFIGURE_TX_BUFF:
|
||||
wlan_set_tx_pause_flag(pmpriv, MFALSE);
|
||||
|
||||
|
@ -4921,6 +5090,9 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
ret = wlan_ret_p2p_params_config(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
#endif
|
||||
case HOST_CMD_GPIO_TSF_LATCH_PARAM_CONFIG:
|
||||
ret = wlan_ret_gpio_tsf_latch(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_802_11_RF_ANTENNA:
|
||||
ret = wlan_ret_802_11_rf_antenna(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
|
@ -4939,6 +5111,7 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
case HostCmd_CMD_TARGET_ACCESS:
|
||||
case HostCmd_CMD_802_11_EEPROM_ACCESS:
|
||||
case HostCmd_CMD_BCA_REG_ACCESS:
|
||||
case HostCmd_CMD_REG_ACCESS:
|
||||
ret = wlan_ret_reg_access(pmpriv->adapter, cmdresp_no, resp,
|
||||
pioctl_buf);
|
||||
break;
|
||||
|
@ -5043,6 +5216,15 @@ mlan_status wlan_ops_uap_process_cmdresp(t_void *priv, t_u16 cmdresp_no,
|
|||
ret = wlan_ret_set_get_beacon_stuck_cfg(pmpriv, resp,
|
||||
pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_MC_AGGR_CFG:
|
||||
ret = wlan_ret_mc_aggr_cfg(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_CMD_GET_CH_LOAD:
|
||||
ret = wlan_ret_ch_load(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
case HostCmd_DS_GET_SENSOR_TEMP:
|
||||
ret = wlan_ret_get_sensor_temp(pmpriv, resp, pioctl_buf);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MERROR, "CMD_RESP: Unknown command response %#x\n",
|
||||
resp->command);
|
||||
|
@ -5329,14 +5511,20 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
pevent->event_len, pevent->event_len);
|
||||
wlan_11h_print_event_radar_detected(pmpriv, pevent, &channel);
|
||||
*((t_u8 *)pevent->event_buf) = channel;
|
||||
if (pmpriv->bss_type == MLAN_BSS_TYPE_DFS) {
|
||||
wlan_recv_event(priv, MLAN_EVENT_ID_FW_RADAR_DETECTED,
|
||||
pevent);
|
||||
pevent->event_id = 0; /* clear to avoid
|
||||
resending at end of fcn
|
||||
*/
|
||||
break;
|
||||
}
|
||||
if (!pmpriv->intf_state_11h.is_11h_host) {
|
||||
if (pmadapter->state_rdh.stage == RDH_OFF) {
|
||||
pmadapter->state_rdh.stage = RDH_CHK_INTFS;
|
||||
wlan_11h_radar_detected_handling(pmadapter,
|
||||
pmpriv);
|
||||
if (pmpriv->uap_host_based)
|
||||
wlan_recv_event(
|
||||
priv,
|
||||
wlan_recv_event(priv,
|
||||
MLAN_EVENT_ID_FW_RADAR_DETECTED,
|
||||
pevent);
|
||||
} else {
|
||||
|
@ -5387,6 +5575,17 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
/* Handle / pass event data, and free buffer */
|
||||
ret = wlan_11h_handle_event_chanrpt_ready(pmpriv, pevent,
|
||||
&channel);
|
||||
if (pmpriv->bss_type == MLAN_BSS_TYPE_DFS) {
|
||||
*((t_u8 *)pevent->event_buf) =
|
||||
pmpriv->adapter->state_dfs.dfs_radar_found;
|
||||
*((t_u8 *)pevent->event_buf + 1) = channel;
|
||||
wlan_recv_event(pmpriv,
|
||||
MLAN_EVENT_ID_FW_CHANNEL_REPORT_RDY,
|
||||
pevent);
|
||||
pevent->event_id = 0; /* clear to avoid resending at end
|
||||
of fcn */
|
||||
break;
|
||||
}
|
||||
if (pmpriv->intf_state_11h.is_11h_host) {
|
||||
*((t_u8 *)pevent->event_buf) =
|
||||
pmpriv->adapter->state_dfs.dfs_radar_found;
|
||||
|
@ -5512,6 +5711,10 @@ mlan_status wlan_ops_uap_process_event(t_void *priv)
|
|||
case EVENT_VDLL_IND:
|
||||
wlan_process_vdll_event(pmpriv, pmbuf);
|
||||
break;
|
||||
case EVENT_CSI:
|
||||
PRINTM(MEVENT, "EVENT: EVENT_CSI on UAP\n");
|
||||
wlan_process_csi_event(pmpriv);
|
||||
break;
|
||||
|
||||
case EVENT_FW_HANG_REPORT:
|
||||
if (pmbuf->data_len < (sizeof(eventcause) + sizeof(t_u16))) {
|
||||
|
|
|
@ -3,20 +3,29 @@
|
|||
* @brief This file contains the handling of AP mode ioctls
|
||||
*
|
||||
*
|
||||
* Copyright 2009-2021 NXP
|
||||
* Copyright 2009-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -112,6 +121,7 @@ static mlan_status wlan_uap_callback_bss_ioctl_start(t_void *priv)
|
|||
wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb;
|
||||
t_u8 old_channel;
|
||||
t_bool under_nop = MFALSE;
|
||||
dfs_state_t dfs_state;
|
||||
ENTER();
|
||||
/* clear callback now that we're here */
|
||||
puap_state_chan_cb->get_chan_callback = MNULL;
|
||||
|
@ -123,6 +133,10 @@ static mlan_status wlan_uap_callback_bss_ioctl_start(t_void *priv)
|
|||
!wlan_can_radar_det_skip(pmpriv) &&
|
||||
wlan_11h_radar_detect_required(pmpriv,
|
||||
puap_state_chan_cb->channel)) {
|
||||
dfs_state = wlan_get_chan_dfs_state(
|
||||
pmpriv, BAND_A, puap_state_chan_cb->channel);
|
||||
if (dfs_state == DFS_AVAILABLE)
|
||||
goto prep_bss_start;
|
||||
/* If DFS repeater mode is on then before starting the uAP
|
||||
* make sure that mlan0 is connected to some external AP
|
||||
* for DFS channel operations.
|
||||
|
@ -171,6 +185,7 @@ static mlan_status wlan_uap_callback_bss_ioctl_start(t_void *priv)
|
|||
|
||||
if (ret == MLAN_STATUS_SUCCESS) {
|
||||
wlan_11h_update_bandcfg(
|
||||
pmpriv,
|
||||
&pmpriv->uap_state_chan_cb.bandcfg,
|
||||
puap_state_chan_cb->channel);
|
||||
PRINTM(MCMD_D,
|
||||
|
@ -280,6 +295,13 @@ static mlan_status wlan_uap_bss_ioctl_start(pmlan_adapter pmadapter,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (pmadapter->enable_net_mon == CHANNEL_SPEC_SNIFFER_MODE) {
|
||||
PRINTM(MINFO,
|
||||
"BSS start is blocked in Channel Specified Network Monitor mode...\n");
|
||||
LEAVE();
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
bss = (mlan_ds_bss *)pioctl_req->pbuf;
|
||||
pmpriv->uap_host_based = bss->param.host_based;
|
||||
if (!pmpriv->intf_state_11h.is_11h_host &&
|
||||
|
@ -349,11 +371,6 @@ static mlan_status wlan_uap_bss_ioctl_reset(pmlan_adapter pmadapter,
|
|||
pmpriv->addba_reject[6] = pmpriv->addba_reject[7] =
|
||||
ADDBA_RSP_STATUS_REJECT;
|
||||
|
||||
/* hs_configured, hs_activated are reset by main loop */
|
||||
pmadapter->hs_cfg.conditions = HOST_SLEEP_DEF_COND;
|
||||
pmadapter->hs_cfg.gpio = HOST_SLEEP_DEF_GPIO;
|
||||
pmadapter->hs_cfg.gap = HOST_SLEEP_DEF_GAP;
|
||||
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_RESET,
|
||||
HostCmd_ACT_GEN_SET, 0, (t_void *)pioctl_req,
|
||||
MNULL);
|
||||
|
@ -459,6 +476,37 @@ static mlan_status wlan_uap_bss_ioctl_uap_wmm_param(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Handle channel switch
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
*/
|
||||
static mlan_status
|
||||
wlan_uap_bss_ioctl_action_chan_switch(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
t_u16 cmd_action = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
cmd_action = HostCmd_ACT_GEN_SET;
|
||||
|
||||
/* Send request to firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HOST_CMD_APCMD_SYS_CONFIGURE, cmd_action,
|
||||
0, (t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get scan channels
|
||||
*
|
||||
|
@ -1284,7 +1332,7 @@ static mlan_status wlan_uap_callback_domain_info(t_void *priv)
|
|||
mlan_private *pmpriv = (mlan_private *)priv;
|
||||
wlan_uap_get_info_cb_t *puap_state_chan_cb = &pmpriv->uap_state_chan_cb;
|
||||
mlan_ds_11d_cfg *cfg11d;
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
pmlan_adapter pmadapter = pmpriv->adapter;
|
||||
pmlan_callbacks pcb = &pmadapter->callbacks;
|
||||
|
||||
|
@ -1384,6 +1432,7 @@ static mlan_status wlan_uap_callback_11h_channel_check_req(t_void *priv)
|
|||
Band_Config_t *pband_cfg = &puap_state_chan_cb->bandcfg;
|
||||
/* keep copy as local variable */
|
||||
pmlan_ioctl_req pioctl = puap_state_chan_cb->pioctl_req_curr;
|
||||
dfs_state_t dfs_state;
|
||||
ENTER();
|
||||
/* clear callback now that we're here */
|
||||
puap_state_chan_cb->get_chan_callback = MNULL;
|
||||
|
@ -1408,6 +1457,18 @@ static mlan_status wlan_uap_callback_11h_channel_check_req(t_void *priv)
|
|||
ret = wlan_11h_config_master_radar_det(pmpriv, MTRUE);
|
||||
ret = wlan_11h_check_update_radar_det_state(pmpriv);
|
||||
|
||||
dfs_state = wlan_get_chan_dfs_state(
|
||||
pmpriv, BAND_A, puap_state_chan_cb->channel);
|
||||
if (dfs_state == DFS_AVAILABLE) {
|
||||
wlan_11h_set_dfs_check_chan(
|
||||
pmpriv, puap_state_chan_cb->channel);
|
||||
PRINTM(MCMND, "ZERODFS: Channel %d is Avaliable\n",
|
||||
puap_state_chan_cb->channel);
|
||||
pcb->moal_ioctl_complete(pmpriv->adapter->pmoal_handle,
|
||||
pioctl, MLAN_STATUS_COMPLETE);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
/* Check for radar on the channel */
|
||||
ret = wlan_11h_issue_radar_detect(pmpriv, pioctl,
|
||||
puap_state_chan_cb->channel,
|
||||
|
@ -1454,7 +1515,8 @@ static mlan_status wlan_uap_11h_channel_check_req(pmlan_adapter pmadapter,
|
|||
pmpriv->intf_state_11h.is_11h_host =
|
||||
p11h_cfg->param.chan_rpt_req.host_based;
|
||||
|
||||
if (!pmpriv->intf_state_11h.is_11h_host) {
|
||||
if (!pmpriv->intf_state_11h.is_11h_host &&
|
||||
pmpriv->bss_type != MLAN_BSS_TYPE_DFS) {
|
||||
/* store params, issue command to get UAP channel, whose
|
||||
* CMD_RESP will callback remainder of 11H channel check
|
||||
* handling */
|
||||
|
@ -1472,7 +1534,8 @@ static mlan_status wlan_uap_11h_channel_check_req(pmlan_adapter pmadapter,
|
|||
ret = wlan_11h_config_master_radar_det(pmpriv, MTRUE);
|
||||
ret = wlan_11h_check_update_radar_det_state(pmpriv);
|
||||
}
|
||||
if (p11h_cfg->param.chan_rpt_req.millisec_dwell_time) {
|
||||
if (p11h_cfg->param.chan_rpt_req.millisec_dwell_time ||
|
||||
pmpriv->bss_type == MLAN_BSS_TYPE_DFS) {
|
||||
if (pmpriv->adapter->dfs_test_params
|
||||
.user_cac_period_msec) {
|
||||
PRINTM(MCMD_D,
|
||||
|
@ -1609,6 +1672,42 @@ static mlan_status wlan_uap_snmp_mib_11h(pmlan_adapter pmadapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set SNMP MIB for 11H
|
||||
*
|
||||
* @param pmadapter A pointer to mlan_adapter structure
|
||||
* @param pioctl_req A pointer to ioctl request buffer
|
||||
*
|
||||
* @return MLAN_STATUS_PENDING --success, otherwise fail
|
||||
* @sa wlan_uap_callback_snmp_mib_11h
|
||||
*/
|
||||
static mlan_status wlan_uap_snmp_mib_11h_fakeradar(pmlan_adapter pmadapter,
|
||||
pmlan_ioctl_req pioctl_req)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
mlan_private *pmpriv = pmadapter->priv[pioctl_req->bss_index];
|
||||
|
||||
ENTER();
|
||||
|
||||
if (pioctl_req->buf_len < sizeof(mlan_ds_snmp_mib)) {
|
||||
PRINTM(MWARN, "MLAN snmp_mib IOCTL length is too short.\n");
|
||||
pioctl_req->data_read_written = 0;
|
||||
pioctl_req->buf_len_needed = sizeof(mlan_ds_snmp_mib);
|
||||
LEAVE();
|
||||
return MLAN_STATUS_RESOURCE;
|
||||
}
|
||||
/* Send cmd to FW to trigger fakeradar in firmware */
|
||||
ret = wlan_prepare_cmd(pmpriv, HostCmd_CMD_802_11_SNMP_MIB,
|
||||
HostCmd_ACT_GEN_SET, Dot11H_fakeRadar,
|
||||
(t_void *)pioctl_req, MNULL);
|
||||
|
||||
if (ret == MLAN_STATUS_SUCCESS)
|
||||
ret = MLAN_STATUS_PENDING;
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ACS scan
|
||||
*
|
||||
|
@ -1858,6 +1957,9 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
else if (bss->sub_command == MLAN_OID_UAP_ADD_STATION)
|
||||
status = wlan_uap_bss_ioctl_add_station(pmadapter,
|
||||
pioctl_req);
|
||||
else if (bss->sub_command == MLAN_OID_ACTION_CHAN_SWITCH)
|
||||
status = wlan_uap_bss_ioctl_action_chan_switch(
|
||||
pmadapter, pioctl_req);
|
||||
break;
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
case MLAN_IOCTL_SCAN:
|
||||
|
@ -1906,6 +2008,9 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
pmadapter->fw_release_number;
|
||||
pget_info->param.fw_info.hotfix_version =
|
||||
pmadapter->fw_hotfix_ver;
|
||||
pget_info->param.fw_info.tx_buf_size =
|
||||
pmadapter->tx_buf_size;
|
||||
|
||||
pget_info->param.fw_info.fw_bands = pmadapter->fw_bands;
|
||||
pget_info->param.fw_info.ecsa_enable =
|
||||
pmadapter->ecsa_enable;
|
||||
|
@ -1965,6 +2070,10 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
break;
|
||||
case MLAN_IOCTL_MISC_CFG:
|
||||
misc = (mlan_ds_misc_cfg *)pioctl_req->pbuf;
|
||||
if (misc->sub_command == MLAN_OID_MISC_GET_SENSOR_TEMP) {
|
||||
status = wlan_misc_ioctl_get_sensor_temp(pmadapter,
|
||||
pioctl_req);
|
||||
}
|
||||
if (misc->sub_command == MLAN_OID_MISC_INIT_SHUTDOWN)
|
||||
status = wlan_misc_ioctl_init_shutdown(pmadapter,
|
||||
pioctl_req);
|
||||
|
@ -2007,6 +2116,11 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
if (misc->sub_command == MLAN_OID_MISC_WIFI_DIRECT_CONFIG)
|
||||
status = wlan_misc_p2p_config(pmadapter, pioctl_req);
|
||||
#endif
|
||||
if (misc->sub_command == MLAN_OID_MISC_GPIO_TSF_LATCH)
|
||||
status = wlan_misc_gpio_tsf_latch_config(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_GET_TSF_INFO)
|
||||
status = wlan_misc_get_tsf_info(pmadapter, pioctl_req);
|
||||
|
||||
if (misc->sub_command == MLAN_OID_MISC_DFS_REAPTER_MODE) {
|
||||
mlan_ds_misc_cfg *misc_cfg = MNULL;
|
||||
|
@ -2022,6 +2136,11 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
if (misc->sub_command == MLAN_OID_MISC_IND_RST_CFG)
|
||||
status = wlan_misc_ioctl_ind_rst_cfg(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_MC_AGGR_CFG)
|
||||
status = wlan_misc_ioctl_mc_aggr_cfg(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_CH_LOAD)
|
||||
status = wlan_misc_ioctl_ch_load(pmadapter, pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_GET_TSF)
|
||||
status = wlan_misc_ioctl_get_tsf(pmadapter, pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_GET_CHAN_REGION_CFG)
|
||||
|
@ -2037,6 +2156,9 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_PER_PKT_CFG)
|
||||
status = wlan_misc_per_pkt_cfg(pmadapter, pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_NET_MONITOR)
|
||||
status = wlan_misc_ioctl_net_monitor(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_FW_DUMP_EVENT)
|
||||
status = wlan_misc_ioctl_fw_dump_event(pmadapter,
|
||||
pioctl_req);
|
||||
|
@ -2088,6 +2210,9 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
if (misc->sub_command == MLAN_OID_MISC_RANGE_EXT)
|
||||
status = wlan_misc_ioctl_range_ext(pmadapter,
|
||||
pioctl_req);
|
||||
if (misc->sub_command == MLAN_OID_MISC_WACP_MODE)
|
||||
status = wlan_misc_ioctl_wacp_mode(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
case MLAN_IOCTL_POWER_CFG:
|
||||
power = (mlan_ds_power_cfg *)pioctl_req->pbuf;
|
||||
|
@ -2121,6 +2246,9 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
status = wlan_uap_snmp_mib_11d(pmadapter, pioctl_req);
|
||||
if (snmp->sub_command == MLAN_OID_SNMP_MIB_DOT11H)
|
||||
status = wlan_uap_snmp_mib_11h(pmadapter, pioctl_req);
|
||||
if (snmp->sub_command == MLAN_OID_SNMP_MIB_DOT11H_FAKERADAR)
|
||||
status = wlan_uap_snmp_mib_11h_fakeradar(pmadapter,
|
||||
pioctl_req);
|
||||
break;
|
||||
case MLAN_IOCTL_SEC_CFG:
|
||||
sec = (mlan_ds_sec_cfg *)pioctl_req->pbuf;
|
||||
|
@ -2154,14 +2282,17 @@ mlan_status wlan_ops_uap_ioctl(t_void *adapter, pmlan_ioctl_req pioctl_req)
|
|||
status = wlan_11h_ioctl_dfs_testing(pmadapter,
|
||||
pioctl_req);
|
||||
if (cfg11h->sub_command == MLAN_OID_11H_CHAN_NOP_INFO)
|
||||
status = wlan_11h_ioctl_get_channel_nop_info(
|
||||
pmadapter, pioctl_req);
|
||||
status = wlan_11h_ioctl_channel_nop_info(pmadapter,
|
||||
pioctl_req);
|
||||
if (cfg11h->sub_command == MLAN_OID_11H_CHAN_REPORT_REQUEST)
|
||||
status = wlan_11h_ioctl_dfs_chan_report(pmpriv,
|
||||
pioctl_req);
|
||||
if (cfg11h->sub_command == MLAN_OID_11H_CHAN_SWITCH_COUNT)
|
||||
status = wlan_11h_ioctl_chan_switch_count(pmadapter,
|
||||
pioctl_req);
|
||||
if (cfg11h->sub_command == MLAN_OID_11H_CHAN_DFS_STATE)
|
||||
status = wlan_11h_ioctl_chan_dfs_state(pmadapter,
|
||||
pioctl_req);
|
||||
if (cfg11h->sub_command == MLAN_OID_11H_DFS_W53_CFG)
|
||||
status = wlan_11h_ioctl_dfs_w53_cfg(pmadapter,
|
||||
pioctl_req);
|
||||
|
|
|
@ -5,18 +5,27 @@
|
|||
*
|
||||
* Copyright 2009-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -244,6 +253,7 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_pkt_type = (t_u16)pkt_type;
|
||||
plocal_tx_pd->tx_control = tx_control;
|
||||
}
|
||||
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_TX_CTRL) {
|
||||
if (pmbuf->u.tx_info.data_rate) {
|
||||
memcpy_ext(pmpriv->adapter, dst_mac,
|
||||
|
@ -270,6 +280,37 @@ t_void *wlan_ops_uap_process_txpd(t_void *priv, pmlan_buffer pmbuf)
|
|||
plocal_tx_pd->tx_control |= TXPD_RETRY_ENABLE;
|
||||
}
|
||||
}
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_MC_AGGR_PKT) {
|
||||
tx_ctrl *ctrl = (tx_ctrl *)&plocal_tx_pd->tx_control;
|
||||
mc_tx_ctrl *mc_ctrl =
|
||||
(mc_tx_ctrl *)&plocal_tx_pd->pkt_delay_2ms;
|
||||
plocal_tx_pd->tx_pkt_type = PKT_TYPE_802DOT11_MC_AGGR;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_START_CYCLE)
|
||||
ctrl->mc_cycle_start = MTRUE;
|
||||
else
|
||||
ctrl->mc_cycle_start = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_END_CYCLE)
|
||||
ctrl->mc_cycle_end = MTRUE;
|
||||
else
|
||||
ctrl->mc_cycle_end = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_START_AMPDU)
|
||||
ctrl->mc_ampdu_start = MTRUE;
|
||||
else
|
||||
ctrl->mc_ampdu_start = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_END_AMPDU)
|
||||
ctrl->mc_ampdu_end = MTRUE;
|
||||
else
|
||||
ctrl->mc_ampdu_end = MFALSE;
|
||||
if (pmbuf->u.mc_tx_info.mc_pkt_flags & MC_FLAG_RETRY)
|
||||
ctrl->mc_pkt_retry = MTRUE;
|
||||
else
|
||||
ctrl->mc_pkt_retry = MFALSE;
|
||||
ctrl->bw = pmbuf->u.mc_tx_info.bandwidth & 0x7;
|
||||
ctrl->tx_rate = pmbuf->u.mc_tx_info.mcs_index & 0x1f;
|
||||
mc_ctrl->abs_tsf_expirytime =
|
||||
wlan_cpu_to_le32(pmbuf->u.mc_tx_info.pkt_expiry);
|
||||
mc_ctrl->mc_seq = wlan_cpu_to_le16(pmbuf->u.mc_tx_info.seq_num);
|
||||
}
|
||||
|
||||
endian_convert_TxPD(plocal_tx_pd);
|
||||
|
||||
|
@ -320,6 +361,11 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
/* Endian conversion */
|
||||
endian_convert_RxPD(prx_pd);
|
||||
|
||||
if (prx_pd->flags & RXPD_FLAG_EXTRA_HEADER) {
|
||||
endian_convert_RxPD_extra_header(
|
||||
(rxpd_extra_info *)((t_u8 *)prx_pd + sizeof(*prx_pd)));
|
||||
}
|
||||
|
||||
if (priv->adapter->pcard_info->v14_fw_api) {
|
||||
t_u8 rxpd_rate_info_orig = prx_pd->rate_info;
|
||||
prx_pd->rate_info = wlan_convert_v14_rx_rate_info(
|
||||
|
@ -423,7 +469,7 @@ mlan_status wlan_ops_uap_process_rx_packet(t_void *adapter, pmlan_buffer pmbuf)
|
|||
}
|
||||
#endif
|
||||
|
||||
pmbuf->priority = prx_pd->priority;
|
||||
pmbuf->priority |= prx_pd->priority;
|
||||
memcpy_ext(pmadapter, ta, prx_pkt->eth803_hdr.src_addr,
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
if ((rx_pkt_type != PKT_TYPE_BAR) && (prx_pd->priority < MAX_NUM_TID)) {
|
||||
|
@ -484,8 +530,7 @@ mlan_status wlan_uap_recv_packet(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
MAC2STR(prx_pkt->eth803_hdr.dest_addr));
|
||||
|
||||
/* don't do packet forwarding in disconnected state */
|
||||
if ((priv->media_connected == MFALSE) ||
|
||||
(pmbuf->data_len > MV_ETH_FRAME_LEN))
|
||||
if (priv->media_connected == MFALSE)
|
||||
goto upload;
|
||||
|
||||
if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) {
|
||||
|
@ -634,10 +679,14 @@ mlan_status wlan_process_uap_rx_packet(mlan_private *priv, pmlan_buffer pmbuf)
|
|||
PRINTM(MDATA, "Rx dest " MACSTR "\n",
|
||||
MAC2STR(prx_pkt->eth803_hdr.dest_addr));
|
||||
|
||||
if (pmadapter->enable_net_mon) {
|
||||
pmbuf->flags |= MLAN_BUF_FLAG_NET_MONITOR;
|
||||
goto upload;
|
||||
}
|
||||
|
||||
/* don't do packet forwarding in disconnected state */
|
||||
/* don't do packet forwarding when packet > 1514 */
|
||||
if ((priv->media_connected == MFALSE) ||
|
||||
((pmbuf->data_len - prx_pd->rx_pkt_offset) > MV_ETH_FRAME_LEN))
|
||||
if (priv->media_connected == MFALSE)
|
||||
goto upload;
|
||||
|
||||
if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) {
|
||||
|
@ -806,6 +855,14 @@ upload:
|
|||
PRINTM(MDATA, "%lu.%06lu : Data => kernel seq_num=%d tid=%d\n",
|
||||
pmbuf->out_ts_sec, pmbuf->out_ts_usec, prx_pd->seq_num,
|
||||
prx_pd->priority);
|
||||
if (pmbuf->flags & MLAN_BUF_FLAG_NET_MONITOR) {
|
||||
// Use some rxpd space to save rxpd info for radiotap header
|
||||
// We should insure radiotap_info is not bigger than RxPD
|
||||
wlan_rxpdinfo_to_radiotapinfo(
|
||||
priv, (RxPD *)prx_pd,
|
||||
(radiotap_info *)(pmbuf->pbuf + pmbuf->data_offset -
|
||||
sizeof(radiotap_info)));
|
||||
}
|
||||
|
||||
ret = pmadapter->callbacks.moal_recv_packet(pmadapter->pmoal_handle,
|
||||
pmbuf);
|
||||
|
|
|
@ -5,18 +5,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -93,6 +102,16 @@ static const struct _mlan_card_info mlan_card_info_usb9097 = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef USBNW62X
|
||||
static const struct _mlan_card_info mlan_card_info_usbNW62X = {
|
||||
.max_tx_buf_size = MLAN_TX_DATA_BUF_SIZE_4K,
|
||||
.v16_fw_api = 1,
|
||||
.v17_fw_api = 1,
|
||||
.supp_ps_handshake = 1,
|
||||
.default_11n_tx_bf_cap = DEFAULT_11N_TX_BF_CAP_2X2,
|
||||
};
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
|
@ -245,6 +264,11 @@ static mlan_status wlan_usb_prog_fw_w_helper(pmlan_adapter pmadapter,
|
|||
if (IS_USB9097(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
#if defined(USBNW62X)
|
||||
if (IS_USBNW62X(pmadapter->card_type))
|
||||
check_fw_status = MTRUE;
|
||||
#endif
|
||||
|
||||
do {
|
||||
/* Send pseudo data to check winner status first */
|
||||
if (check_winner) {
|
||||
|
@ -767,6 +791,11 @@ mlan_status wlan_get_usb_device(pmlan_adapter pmadapter)
|
|||
case CARD_TYPE_USB9097:
|
||||
pmadapter->pcard_info = &mlan_card_info_usb9097;
|
||||
break;
|
||||
#endif
|
||||
#ifdef USBNW62X
|
||||
case CARD_TYPE_USBNW62X:
|
||||
pmadapter->pcard_info = &mlan_card_info_usbNW62X;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
PRINTM(MERROR, "can't get right USB card type \n");
|
||||
|
@ -1167,7 +1196,7 @@ static mlan_status wlan_usb_host_to_card(pmlan_private pmpriv, t_u8 type,
|
|||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
if (type == MLAN_TYPE_CMD
|
||||
#if (defined(USB9098) || defined(USB9097))
|
||||
#if (defined(USB9098) || defined(USB9097) || defined(USBNW62X))
|
||||
|| type == MLAN_TYPE_VDLL
|
||||
#endif
|
||||
) {
|
||||
|
|
|
@ -6,18 +6,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,18 +5,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1110,13 +1119,13 @@ static int wlan_dequeue_tx_packet(pmlan_adapter pmadapter)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!ptr->is_11n_enabled ||
|
||||
if (!ptr->is_wmm_enabled ||
|
||||
(ptr->ba_status || ptr->del_ba_count >= DEL_BA_THRESHOLD)
|
||||
#ifdef STA_SUPPORT
|
||||
|| priv->wps.session_enable
|
||||
#endif /* STA_SUPPORT */
|
||||
) {
|
||||
if (ptr->is_11n_enabled && ptr->ba_status &&
|
||||
if (ptr->is_wmm_enabled && ptr->ba_status &&
|
||||
ptr->amsdu_in_ampdu &&
|
||||
wlan_is_amsdu_allowed(priv, ptr, tid) &&
|
||||
(wlan_num_pkts_in_txq(priv, ptr, pmadapter->tx_buf_size) >=
|
||||
|
@ -1668,8 +1677,8 @@ void wlan_ralist_add(mlan_private *priv, t_u8 *ra)
|
|||
ra_list->ba_status = BA_STREAM_NOT_SETUP;
|
||||
ra_list->amsdu_in_ampdu = MFALSE;
|
||||
if (queuing_ra_based(priv)) {
|
||||
ra_list->is_11n_enabled = wlan_is_11n_enabled(priv, ra);
|
||||
if (ra_list->is_11n_enabled)
|
||||
ra_list->is_wmm_enabled = wlan_is_11n_enabled(priv, ra);
|
||||
if (ra_list->is_wmm_enabled)
|
||||
ra_list->max_amsdu =
|
||||
get_station_max_amsdu_size(priv, ra);
|
||||
ra_list->tx_pause = wlan_is_tx_pause(priv, ra);
|
||||
|
@ -1678,25 +1687,25 @@ void wlan_ralist_add(mlan_private *priv, t_u8 *ra)
|
|||
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 =
|
||||
ra_list->is_wmm_enabled =
|
||||
is_station_11n_enabled(priv, ra);
|
||||
if (ra_list->is_11n_enabled)
|
||||
if (ra_list->is_wmm_enabled)
|
||||
ra_list->max_amsdu =
|
||||
get_station_max_amsdu_size(priv,
|
||||
ra);
|
||||
ra_list->is_tdls_link = MTRUE;
|
||||
} else {
|
||||
ra_list->is_11n_enabled = IS_11N_ENABLED(priv);
|
||||
if (ra_list->is_11n_enabled)
|
||||
ra_list->is_wmm_enabled = IS_11N_ENABLED(priv);
|
||||
if (ra_list->is_wmm_enabled)
|
||||
ra_list->max_amsdu = priv->max_amsdu;
|
||||
}
|
||||
}
|
||||
|
||||
PRINTM_NETINTF(MDATA, priv);
|
||||
PRINTM(MDATA, "ralist %p: is_11n_enabled=%d max_amsdu=%d\n",
|
||||
ra_list, ra_list->is_11n_enabled, ra_list->max_amsdu);
|
||||
PRINTM(MDATA, "ralist %p: is_wmm_enabled=%d max_amsdu=%d\n",
|
||||
ra_list, ra_list->is_wmm_enabled, ra_list->max_amsdu);
|
||||
|
||||
if (ra_list->is_11n_enabled) {
|
||||
if (ra_list->is_wmm_enabled) {
|
||||
ra_list->packet_count = 0;
|
||||
ra_list->ba_packet_threshold =
|
||||
wlan_get_random_ba_threshold(pmadapter);
|
||||
|
@ -2008,15 +2017,15 @@ int wlan_ralist_update(mlan_private *priv, t_u8 *old_ra, t_u8 *new_ra)
|
|||
update_count++;
|
||||
|
||||
if (queuing_ra_based(priv)) {
|
||||
ra_list->is_11n_enabled =
|
||||
ra_list->is_wmm_enabled =
|
||||
wlan_is_11n_enabled(priv, new_ra);
|
||||
if (ra_list->is_11n_enabled)
|
||||
if (ra_list->is_wmm_enabled)
|
||||
ra_list->max_amsdu =
|
||||
get_station_max_amsdu_size(
|
||||
priv, new_ra);
|
||||
} else {
|
||||
ra_list->is_11n_enabled = IS_11N_ENABLED(priv);
|
||||
if (ra_list->is_11n_enabled)
|
||||
ra_list->is_wmm_enabled = IS_11N_ENABLED(priv);
|
||||
if (ra_list->is_wmm_enabled)
|
||||
ra_list->max_amsdu = priv->max_amsdu;
|
||||
}
|
||||
|
||||
|
@ -2029,7 +2038,7 @@ int wlan_ralist_update(mlan_private *priv, t_u8 *old_ra, t_u8 *new_ra)
|
|||
PRINTM(MINFO,
|
||||
"ralist_update: %p, %d, " MACSTR "-->" MACSTR
|
||||
"\n",
|
||||
ra_list, ra_list->is_11n_enabled,
|
||||
ra_list, ra_list->is_wmm_enabled,
|
||||
MAC2STR(ra_list->ra), MAC2STR(new_ra));
|
||||
|
||||
memcpy_ext(priv->adapter, ra_list->ra, new_ra,
|
||||
|
|
|
@ -6,18 +6,27 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* It also defines the data structures used for APIs between MLAN and MOAL.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,20 +3,29 @@
|
|||
* @brief This file declares the generic data structures and APIs.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -24,7 +33,7 @@
|
|||
#define _MLAN_DECL_H_
|
||||
|
||||
/** MLAN release version */
|
||||
#define MLAN_RELEASE_VERSION "266"
|
||||
#define MLAN_RELEASE_VERSION "322.p3"
|
||||
|
||||
/** Re-define generic data types for MLAN/MOAL */
|
||||
/** Signed char (1-byte) */
|
||||
|
@ -98,6 +107,8 @@ typedef t_s32 t_sval;
|
|||
/** MLAN FALSE */
|
||||
#define MFALSE (0)
|
||||
|
||||
#define CHANNEL_SPEC_SNIFFER_MODE 1
|
||||
|
||||
#ifndef MACSTR
|
||||
/** MAC address security format */
|
||||
#define MACSTR "%02x:XX:XX:XX:%02x:%02x"
|
||||
|
@ -138,6 +149,9 @@ typedef t_s32 t_sval;
|
|||
/** NET IP alignment */
|
||||
#define MLAN_NET_IP_ALIGN 2
|
||||
|
||||
/** US country code */
|
||||
#define COUNTRY_CODE_US 0x10
|
||||
|
||||
/** DMA alignment */
|
||||
/* SDIO3.0 Inrevium Adapter require 32 bit DMA alignment */
|
||||
#define DMA_ALIGNMENT 32
|
||||
|
@ -372,6 +386,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_9177 0x09
|
||||
/** 8801 card type */
|
||||
#define CARD_TYPE_8801 0x0a
|
||||
/** OWL card type */
|
||||
#define CARD_TYPE_NW62X 0x0b
|
||||
|
||||
/** 9098 A0 reverion num */
|
||||
#define CHIP_9098_REV_A0 1
|
||||
|
@ -403,6 +419,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_SD9177 (CARD_TYPE_9177 | (INTF_SD << 8))
|
||||
/** SD8801 card type */
|
||||
#define CARD_TYPE_SD8801 (CARD_TYPE_8801 | (INTF_SD << 8))
|
||||
/** SD_NW62X card type */
|
||||
#define CARD_TYPE_SDNW62X (CARD_TYPE_NW62X | (INTF_SD << 8))
|
||||
|
||||
#define IS_SD8887(ct) (CARD_TYPE_SD8887 == (ct))
|
||||
#define IS_SD8897(ct) (CARD_TYPE_SD8897 == (ct))
|
||||
|
@ -414,6 +432,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_SD9098(ct) (CARD_TYPE_SD9098 == (ct))
|
||||
#define IS_SD9177(ct) (CARD_TYPE_SD9177 == (ct))
|
||||
#define IS_SD8801(ct) (CARD_TYPE_SD8801 == (ct))
|
||||
#define IS_SDNW62X(ct) (CARD_TYPE_SDNW62X == (ct))
|
||||
|
||||
/** SD8887 Card */
|
||||
#define CARD_SD8887 "SD8887"
|
||||
|
@ -428,15 +447,15 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
/** SD8987 Card */
|
||||
#define CARD_SD8987 "SD8987"
|
||||
/** SD9097 Card */
|
||||
#define CARD_SD9097 "SD9097"
|
||||
/** SDIW620 Card */
|
||||
#define CARD_SDIW620 "SDIW620"
|
||||
#define CARD_SD9097 "SDIW620"
|
||||
/** SD9098 Card */
|
||||
#define CARD_SD9098 "SD9098"
|
||||
/** SD9177 Card */
|
||||
#define CARD_SD9177 "SD9177"
|
||||
/** SD9177 Card */
|
||||
#define CARD_SD8801 "SD9177"
|
||||
/** SD8801 Card */
|
||||
#define CARD_SD8801 "SD8801"
|
||||
/** SDNW62X Card */
|
||||
#define CARD_SDNW62X "SDNW62X"
|
||||
#endif
|
||||
|
||||
#ifdef PCIE
|
||||
|
@ -448,26 +467,29 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_PCIE9097 (CARD_TYPE_9097 | (INTF_PCIE << 8))
|
||||
/** PCIE9098 card type */
|
||||
#define CARD_TYPE_PCIE9098 (CARD_TYPE_9098 | (INTF_PCIE << 8))
|
||||
/** PCIENW62X card type */
|
||||
#define CARD_TYPE_PCIENW62X (CARD_TYPE_NW62X | (INTF_PCIE << 8))
|
||||
|
||||
#define IS_PCIE8897(ct) (CARD_TYPE_PCIE8897 == (ct))
|
||||
#define IS_PCIE8997(ct) (CARD_TYPE_PCIE8997 == (ct))
|
||||
#define IS_PCIE9097(ct) (CARD_TYPE_PCIE9097 == (ct))
|
||||
#define IS_PCIE9098(ct) (CARD_TYPE_PCIE9098 == (ct))
|
||||
#define IS_PCIENW62X(ct) (CARD_TYPE_PCIENW62X == (ct))
|
||||
|
||||
/** PCIE8897 Card */
|
||||
#define CARD_PCIE8897 "PCIE8897"
|
||||
/** PCIE8997 Card */
|
||||
#define CARD_PCIE8997 "PCIE8997"
|
||||
/** PCIE9097 Card */
|
||||
#define CARD_PCIE9097 "PCIE9097"
|
||||
/** PCIEIW620 Card */
|
||||
#define CARD_PCIEIW620 "PCIEIW620"
|
||||
#define CARD_PCIE9097 "PCIEIW620"
|
||||
/** PCIE9000S Card */
|
||||
#define CARD_PCIE9000S "PCIE9000S"
|
||||
/** PCIE9098 Card */
|
||||
#define CARD_PCIE9098 "PCIE9098"
|
||||
/** PCIEAW690 Card */
|
||||
#define CARD_PCIEAW690 "PCIEAW690"
|
||||
/** PCIENW62X Card */
|
||||
#define CARD_PCIENW62X "PCIENW62X"
|
||||
#endif
|
||||
|
||||
#ifdef USB
|
||||
|
@ -483,6 +505,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define CARD_TYPE_USB9098 (CARD_TYPE_9098 | (INTF_USB << 8))
|
||||
/** USB9097 card type */
|
||||
#define CARD_TYPE_USB9097 (CARD_TYPE_9097 | (INTF_USB << 8))
|
||||
/** USBNW62X card type */
|
||||
#define CARD_TYPE_USBNW62X (CARD_TYPE_NW62X | (INTF_USB << 8))
|
||||
|
||||
#define IS_USB8801(ct) (CARD_TYPE_USB8801 == (ct))
|
||||
#define IS_USB8897(ct) (CARD_TYPE_USB8897 == (ct))
|
||||
|
@ -490,6 +514,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_USB8978(ct) (CARD_TYPE_USB8978 == (ct))
|
||||
#define IS_USB9098(ct) (CARD_TYPE_USB9098 == (ct))
|
||||
#define IS_USB9097(ct) (CARD_TYPE_USB9097 == (ct))
|
||||
#define IS_USBNW62X(ct) (CARD_TYPE_USBNW62X == (ct))
|
||||
|
||||
/** USB8801 Card */
|
||||
#define CARD_USB8801 "USB8801"
|
||||
|
@ -502,9 +527,9 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
/** USB9098 Card */
|
||||
#define CARD_USB9098 "USB9098"
|
||||
/** USB9097 Card */
|
||||
#define CARD_USB9097 "USB9097"
|
||||
/** USBIW620 Card */
|
||||
#define CARD_USBIW620 "USBIW620"
|
||||
#define CARD_USB9097 "USBIW620"
|
||||
/** USBNW62X Card */
|
||||
#define CARD_USBNW62X "USBNW62X"
|
||||
#endif
|
||||
|
||||
#define IS_CARD8801(ct) (CARD_TYPE_8801 == ((ct)&0xf))
|
||||
|
@ -516,6 +541,7 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH];
|
|||
#define IS_CARD9098(ct) (CARD_TYPE_9098 == ((ct)&0xf))
|
||||
#define IS_CARD9097(ct) (CARD_TYPE_9097 == ((ct)&0xf))
|
||||
#define IS_CARD9177(ct) (CARD_TYPE_9177 == ((ct)&0xf))
|
||||
#define IS_CARDNW62X(ct) (CARD_TYPE_NW62X == ((ct)&0xf))
|
||||
|
||||
typedef struct _card_type_entry {
|
||||
t_u16 card_type;
|
||||
|
@ -575,6 +601,9 @@ typedef enum {
|
|||
/** Buffer flag for TX_STATUS */
|
||||
#define MLAN_BUF_FLAG_TX_STATUS MBIT(10)
|
||||
|
||||
/** Buffer flag for NET_MONITOR */
|
||||
#define MLAN_BUF_FLAG_NET_MONITOR MBIT(11)
|
||||
|
||||
/** Buffer flag for NULL data packet */
|
||||
#define MLAN_BUF_FLAG_NULL_PKT MBIT(12)
|
||||
/** Buffer flag for Diag pkt */
|
||||
|
@ -582,6 +611,8 @@ typedef enum {
|
|||
|
||||
#define MLAN_BUF_FLAG_TX_CTRL MBIT(14)
|
||||
|
||||
#define MLAN_BUF_FLAG_MC_AGGR_PKT MBIT(17)
|
||||
|
||||
#ifdef DEBUG_LEVEL1
|
||||
/** Debug level bit definition */
|
||||
#define MMSG MBIT(0)
|
||||
|
@ -691,6 +722,7 @@ typedef enum _mlan_bss_type {
|
|||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
MLAN_BSS_TYPE_WIFIDIRECT = 2,
|
||||
#endif
|
||||
MLAN_BSS_TYPE_DFS = 8,
|
||||
MLAN_BSS_TYPE_ANY = 0xff,
|
||||
} mlan_bss_type;
|
||||
|
||||
|
@ -764,6 +796,7 @@ typedef enum _mlan_event_id {
|
|||
#if defined(PCIE)
|
||||
MLAN_EVENT_ID_SSU_DUMP_FILE = 0x00000039,
|
||||
#endif /* SSU_SUPPORT */
|
||||
MLAN_EVENT_ID_CSI = 0x00000040,
|
||||
/* Event generated by MLAN driver (MSB=1) */
|
||||
MLAN_EVENT_ID_DRV_CONNECTED = 0x80000001,
|
||||
MLAN_EVENT_ID_DRV_DEFER_HANDLING = 0x80000002,
|
||||
|
@ -786,6 +819,7 @@ typedef enum _mlan_event_id {
|
|||
#ifdef UAP_SUPPORT
|
||||
MLAN_EVENT_ID_DRV_UAP_CHAN_INFO = 0x80000020,
|
||||
#endif
|
||||
MLAN_EVENT_ID_FW_ROAM_OFFLOAD_RESULT = 0x80000023,
|
||||
MLAN_EVENT_ID_DRV_ASSOC_FAILURE_LOGGER = 0x80000026,
|
||||
MLAN_EVENT_ID_DRV_ASSOC_SUCC_LOGGER = 0x80000027,
|
||||
MLAN_EVENT_ID_DRV_DISCONNECT_LOGGER = 0x80000028,
|
||||
|
@ -872,6 +906,7 @@ enum mlan_channel_type {
|
|||
enum { BAND_2GHZ = 0,
|
||||
BAND_5GHZ = 1,
|
||||
BAND_4GHZ = 2,
|
||||
BAND_6GHZ = 3,
|
||||
};
|
||||
|
||||
/** channel offset */
|
||||
|
@ -922,16 +957,6 @@ typedef enum _dfs_w53_cfg_t {
|
|||
|
||||
/** Band_Config_t */
|
||||
typedef MLAN_PACK_START struct _Band_Config_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=user*/
|
||||
t_u8 scanMode : 2;
|
||||
/** Secondary Channel Offset - (00)=None, (01)=Above, (11)=Below */
|
||||
t_u8 chan2Offset : 2;
|
||||
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
|
||||
t_u8 chanWidth : 2;
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz */
|
||||
t_u8 chanBand : 2;
|
||||
#else
|
||||
/** Band Info - (00)=2.4GHz, (01)=5GHz */
|
||||
t_u8 chanBand : 2;
|
||||
/** Channel Width - (00)=20MHz, (10)=40MHz, (11)=80MHz */
|
||||
|
@ -940,7 +965,6 @@ typedef MLAN_PACK_START struct _Band_Config_t {
|
|||
t_u8 chan2Offset : 2;
|
||||
/** Channel Selection Mode - (00)=manual, (01)=ACS, (02)=Adoption mode*/
|
||||
t_u8 scanMode : 2;
|
||||
#endif
|
||||
} MLAN_PACK_END Band_Config_t;
|
||||
|
||||
/** channel_band_t */
|
||||
|
@ -1030,6 +1054,45 @@ typedef struct _mlan_cmdresp_event {
|
|||
} mlan_cmdresp_event, *pmlan_cmdresp_event;
|
||||
|
||||
/** csi event data structure */
|
||||
typedef MLAN_PACK_START struct _csi_record_ds {
|
||||
/** Length in DWORDS, including header */
|
||||
t_u16 Len;
|
||||
/** CSI signature. 0xABCD fixed */
|
||||
t_u16 CSI_Sign;
|
||||
/** User defined HeaderID */
|
||||
t_u32 CSI_HeaderID;
|
||||
/** Packet info field */
|
||||
t_u16 PKT_info;
|
||||
/** Frame control field for the received packet*/
|
||||
t_u16 FCF;
|
||||
/** Timestamp when packet received */
|
||||
t_u64 TSF;
|
||||
/** Received Packet Destination MAC Address */
|
||||
t_u8 Dst_MAC[6];
|
||||
/** Received Packet Source MAC Address */
|
||||
t_u8 Src_MAC[6];
|
||||
/** RSSI for antenna A */
|
||||
t_u8 Rx_RSSI_A;
|
||||
/** RSSI for antenna B */
|
||||
t_u8 Rx_RSSI_B;
|
||||
/** Noise floor for antenna A */
|
||||
t_u8 Rx_NF_A;
|
||||
/** Noise floor for antenna A */
|
||||
t_u8 Rx_NF_B;
|
||||
/** Rx signal strength above noise floor */
|
||||
t_u8 Rx_SINR;
|
||||
/** Channel */
|
||||
t_u8 channel;
|
||||
/** user defined Chip ID */
|
||||
t_u16 chip_id;
|
||||
/** Reserved */
|
||||
t_u32 rsvd;
|
||||
/** CSI data length in DWORDs */
|
||||
t_u32 CSI_Data_Length;
|
||||
/** Start of CSI data */
|
||||
t_u8 CSI_Data[0];
|
||||
/** At the end of CSI raw data, user defined TailID of 4 bytes*/
|
||||
} MLAN_PACK_END csi_record_ds, *pcsi_record_ds;
|
||||
|
||||
/** mlan_ioctl_req data structure */
|
||||
typedef struct _mlan_ioctl_req {
|
||||
|
@ -1057,18 +1120,52 @@ typedef struct _mlan_ioctl_req {
|
|||
t_ptr reserved_1;
|
||||
} mlan_ioctl_req, *pmlan_ioctl_req;
|
||||
|
||||
typedef MLAN_PACK_START struct _mix_rate_info {
|
||||
/** bit0: LGI: gi=0, SGI: gi= 1 */
|
||||
/** bit1-2: 20M: bw=0, 40M: bw=1, 80M: bw=2, 160M: bw=3 */
|
||||
/** bit3-4: LG: format=0, HT: format=1, VHT: format=2 */
|
||||
/** bit5: LDPC: 0-not support, 1-support */
|
||||
/** bit6-7:reserved */
|
||||
t_u8 rate_info;
|
||||
/** MCS index */
|
||||
t_u8 mcs_index;
|
||||
/** bitrate, in 500Kbps */
|
||||
t_u16 bitrate;
|
||||
} MLAN_PACK_END mix_rate_info, *pmix_rate_info;
|
||||
|
||||
typedef MLAN_PACK_START struct _rxpd_extra_info {
|
||||
/** flags */
|
||||
t_u8 flags;
|
||||
/** channel.flags */
|
||||
t_u16 channel_flags;
|
||||
/** mcs.known */
|
||||
t_u8 mcs_known;
|
||||
/** mcs.flags */
|
||||
t_u8 mcs_flags;
|
||||
/** vht sig1 */
|
||||
t_u32 vht_sig1;
|
||||
/** vht sig2 */
|
||||
t_u32 vht_sig2;
|
||||
} MLAN_PACK_END rxpd_extra_info, *prxpd_extra_info;
|
||||
|
||||
typedef MLAN_PACK_START struct _radiotap_info {
|
||||
/** Rate Info */
|
||||
mix_rate_info rate_info;
|
||||
/** SNR */
|
||||
t_s8 snr;
|
||||
/** Noise Floor */
|
||||
t_s8 nf;
|
||||
/** band config */
|
||||
t_u8 band_config;
|
||||
/** chan number */
|
||||
t_u8 chan_num;
|
||||
t_u8 antenna;
|
||||
/** extra rxpd info from FW */
|
||||
rxpd_extra_info extra_info;
|
||||
} MLAN_PACK_END radiotap_info, *pradiotap_info;
|
||||
|
||||
/** txpower structure */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Host tx power ctrl:
|
||||
0x0: use fw setting for TX power
|
||||
0x1: value specified in bit[6] and bit[5:0] are valid */
|
||||
t_u8 hostctl : 1;
|
||||
/** Sign of the power specified in bit[5:0] */
|
||||
t_u8 sign : 1;
|
||||
/** Power to be used for transmission(in dBm) */
|
||||
t_u8 abs_val : 6;
|
||||
#else
|
||||
/** Power to be used for transmission(in dBm) */
|
||||
t_u8 abs_val : 6;
|
||||
/** Sign of the power specified in bit[5:0] */
|
||||
|
@ -1077,7 +1174,6 @@ typedef MLAN_PACK_START struct {
|
|||
0x0: use fw setting for TX power
|
||||
0x1: value specified in bit[6] and bit[5:0] are valid */
|
||||
t_u8 hostctl : 1;
|
||||
#endif
|
||||
} MLAN_PACK_END tx_power_t;
|
||||
/* pkt_txctrl */
|
||||
typedef MLAN_PACK_START struct _pkt_txctrl {
|
||||
|
@ -1108,6 +1204,25 @@ typedef MLAN_PACK_START struct _pkt_rxinfo {
|
|||
t_u8 rssi;
|
||||
} MLAN_PACK_END pkt_rxinfo, *ppkt_rxinfo;
|
||||
|
||||
#define MC_FLAG_RETRY MBIT(0)
|
||||
#define MC_FLAG_START_CYCLE MBIT(1)
|
||||
#define MC_FLAG_END_CYCLE MBIT(2)
|
||||
#define MC_FLAG_START_AMPDU MBIT(3)
|
||||
#define MC_FLAG_END_AMPDU MBIT(4)
|
||||
/* mc pkt txcontrol */
|
||||
typedef MLAN_PACK_START struct _mc_txcontrol {
|
||||
/** Data rate in mcs index, 0-7 */
|
||||
t_u8 mcs_index;
|
||||
/** band width 0-20Mhz, 1-40Mhz */
|
||||
t_u8 bandwidth;
|
||||
/** seq_num */
|
||||
t_u16 seq_num;
|
||||
/** packet expiry time */
|
||||
t_u32 pkt_expiry;
|
||||
/** mc_pkt_flags */
|
||||
t_u8 mc_pkt_flags;
|
||||
} MLAN_PACK_END mc_txcontrol, *pmc_txcontrol;
|
||||
|
||||
/** mlan_buffer data structure */
|
||||
typedef struct _mlan_buffer {
|
||||
/** Pointer to previous mlan_buffer */
|
||||
|
@ -1159,6 +1274,7 @@ typedef struct _mlan_buffer {
|
|||
/** Use count for this buffer */
|
||||
t_u32 use_count;
|
||||
union {
|
||||
mc_txcontrol mc_tx_info;
|
||||
pkt_txctrl tx_info;
|
||||
pkt_rxinfo rx_info;
|
||||
} u;
|
||||
|
@ -1916,6 +2032,9 @@ typedef struct _mlan_callbacks {
|
|||
t_u32 port, mlan_status status);
|
||||
/** moal_recv_packet */
|
||||
mlan_status (*moal_recv_packet)(t_void *pmoal, pmlan_buffer pmbuf);
|
||||
/** moal_recv_amsdu_packet */
|
||||
mlan_status (*moal_recv_amsdu_packet)(t_void *pmoal,
|
||||
pmlan_buffer pmbuf);
|
||||
/** moal_recv_event */
|
||||
mlan_status (*moal_recv_event)(t_void *pmoal, pmlan_event pmevent);
|
||||
/** moal_ioctl_complete */
|
||||
|
@ -2039,7 +2158,8 @@ typedef struct _mlan_callbacks {
|
|||
t_u32 drop_point);
|
||||
void (*moal_tp_accounting_rx_param)(t_void *pmoal, unsigned int type,
|
||||
unsigned int rsvd1);
|
||||
|
||||
void (*moal_amsdu_tp_accounting)(t_void *pmoal, t_s32 delay,
|
||||
t_s32 copy_delay);
|
||||
} mlan_callbacks, *pmlan_callbacks;
|
||||
|
||||
/** Parameter unchanged, use MLAN default setting */
|
||||
|
@ -2180,6 +2300,8 @@ typedef struct _mlan_device {
|
|||
t_u32 drv_mode;
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
/** extend enhance scan */
|
||||
t_u8 ext_scan;
|
||||
} mlan_device, *pmlan_device;
|
||||
|
||||
/** MLAN API function prototype */
|
||||
|
@ -2231,6 +2353,9 @@ MLAN_API mlan_status mlan_recv_packet_complete(t_void *padapter,
|
|||
pmlan_buffer pmbuf,
|
||||
mlan_status status);
|
||||
|
||||
/** handle amsdu deaggregated packet */
|
||||
void mlan_process_deaggr_pkt(t_void *padapter, pmlan_buffer pmbuf, t_u8 *drop);
|
||||
|
||||
#if defined(SDIO) || defined(PCIE)
|
||||
/** interrupt handler */
|
||||
MLAN_API mlan_status mlan_interrupt(t_u16 msg_id, t_void *padapter);
|
||||
|
@ -2253,4 +2378,11 @@ MLAN_API mlan_status mlan_ioctl(t_void *padapter, pmlan_ioctl_req pioctl_req);
|
|||
/** mlan select wmm queue */
|
||||
MLAN_API t_u8 mlan_select_wmm_queue(t_void *padapter, t_u8 bss_num, t_u8 tid);
|
||||
|
||||
/** mlan mask host interrupt */
|
||||
MLAN_API mlan_status mlan_disable_host_int(t_void *padapter);
|
||||
/** mlan unmask host interrupt */
|
||||
MLAN_API mlan_status mlan_enable_host_int(t_void *padapter);
|
||||
|
||||
#define CSI_SIGNATURE 0xABCD
|
||||
|
||||
#endif /* !_MLAN_DECL_H_ */
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
* definitions used in MLAN and MOAL module.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -46,17 +55,10 @@ typedef enum _WLAN_802_11_NETWORK_TYPE {
|
|||
Wlan802_11NetworkTypeMax
|
||||
} WLAN_802_11_NETWORK_TYPE;
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Frame control: Type Mgmt frame */
|
||||
#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x3000
|
||||
/** Frame control: SubType Mgmt frame */
|
||||
#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc)&0xF000) >> 12)
|
||||
#else
|
||||
/** Frame control: Type Mgmt frame */
|
||||
#define IEEE80211_FC_MGMT_FRAME_TYPE_MASK 0x000C
|
||||
/** Frame control: SubType Mgmt frame */
|
||||
#define IEEE80211_GET_FC_MGMT_FRAME_SUBTYPE(fc) (((fc)&0x00F0) >> 4)
|
||||
#endif
|
||||
|
||||
#ifdef PRAGMA_PACK
|
||||
#pragma pack(push, 1)
|
||||
|
@ -67,7 +69,8 @@ typedef enum _WLAN_802_11_NETWORK_TYPE {
|
|||
|
||||
typedef enum _IEEEtypes_Ext_ElementId_e {
|
||||
HE_CAPABILITY = 35,
|
||||
HE_OPERATION = 36
|
||||
HE_OPERATION = 36,
|
||||
HE_6G_CAPABILITY = 59
|
||||
} IEEEtypes_Ext_ElementId_e;
|
||||
|
||||
/** IEEE Type definitions */
|
||||
|
@ -178,21 +181,12 @@ typedef MLAN_PACK_START struct _IEEEtypes_Generic_t {
|
|||
|
||||
/**ft capability policy*/
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_FtCapPolicy_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Reserved */
|
||||
t_u8 reserved : 6;
|
||||
/** RIC support */
|
||||
t_u8 ric : 1;
|
||||
/** FT over the DS capable */
|
||||
t_u8 ft_over_ds : 1;
|
||||
#else
|
||||
/** FT over the DS capable */
|
||||
t_u8 ft_over_ds : 1;
|
||||
/** RIC support */
|
||||
t_u8 ric : 1;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 6;
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_FtCapPolicy_t;
|
||||
|
||||
/** Mobility domain IE */
|
||||
|
@ -325,25 +319,6 @@ typedef MLAN_PACK_START struct _TLV_Generic_t {
|
|||
#define CAPINFO_MASK (~(MBIT(15) | MBIT(14) | MBIT(11) | MBIT(9)))
|
||||
|
||||
/** Capability Bit Map*/
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
|
||||
t_u8 rsrvd1 : 2;
|
||||
t_u8 dsss_ofdm : 1;
|
||||
t_u8 radio_measurement : 1;
|
||||
t_u8 rsvrd2 : 1;
|
||||
t_u8 short_slot_time : 1;
|
||||
t_u8 rsrvd3 : 1;
|
||||
t_u8 spectrum_mgmt : 1;
|
||||
t_u8 chan_agility : 1;
|
||||
t_u8 pbcc : 1;
|
||||
t_u8 short_preamble : 1;
|
||||
t_u8 privacy : 1;
|
||||
t_u8 cf_poll_rqst : 1;
|
||||
t_u8 cf_pollable : 1;
|
||||
t_u8 ibss : 1;
|
||||
t_u8 ess : 1;
|
||||
} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
|
||||
#else
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
|
||||
/** Capability Bit Map : ESS */
|
||||
t_u8 ess : 1;
|
||||
|
@ -376,7 +351,6 @@ typedef MLAN_PACK_START struct _IEEEtypes_CapInfo_t {
|
|||
/** Capability Bit Map : Reserved */
|
||||
t_u8 rsrvd1 : 2;
|
||||
} MLAN_PACK_END IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
|
||||
/** IEEEtypes_Ssid_t */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_Ssid_t {
|
||||
|
@ -591,35 +565,16 @@ typedef MLAN_PACK_START struct _IEEEtypes_Wpa_t {
|
|||
|
||||
/** Data structure of WMM QoS information */
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_WmmQosInfo_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** QoS UAPSD */
|
||||
t_u8 qos_uapsd : 1;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 3;
|
||||
/** Parameter set count */
|
||||
t_u8 para_set_count : 4;
|
||||
#else
|
||||
/** Parameter set count */
|
||||
t_u8 para_set_count : 4;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 3;
|
||||
/** QoS UAPSD */
|
||||
t_u8 qos_uapsd : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} MLAN_PACK_END IEEEtypes_WmmQosInfo_t, *pIEEEtypes_WmmQosInfo_t;
|
||||
|
||||
/** Data structure of WMM Aci/Aifsn */
|
||||
typedef MLAN_PACK_START 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 */
|
||||
|
@ -628,22 +583,14 @@ typedef MLAN_PACK_START struct _IEEEtypes_WmmAciAifsn_t {
|
|||
t_u8 aci : 2;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} MLAN_PACK_END IEEEtypes_WmmAciAifsn_t, *pIEEEtypes_WmmAciAifsn_t;
|
||||
|
||||
/** Data structure of WMM ECW */
|
||||
typedef MLAN_PACK_START 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 /* BIG_ENDIAN_SUPPORT */
|
||||
} MLAN_PACK_END IEEEtypes_WmmEcw_t, *pIEEEtypes_WmmEcw_t;
|
||||
|
||||
/** Data structure of WMM AC parameters */
|
||||
|
@ -731,22 +678,6 @@ typedef MLAN_PACK_START enum _IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e {
|
|||
|
||||
/** Data structure of WMM TSPEC information */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u8 Reserved17_23 : 7; /* ! Reserved */
|
||||
t_u8 Schedule : 1;
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||
t_u8 UserPri : 3; /* ! 802.1d User Priority */
|
||||
// IEEEtypes_WMM_TSPEC_TS_Info_PSB_e PowerSaveBehavior : 1; /*
|
||||
// !Legacy/Trigg*/
|
||||
t_u8 PowerSaveBehavior : 1;
|
||||
t_u8 Aggregation : 1; /* ! Reserved */
|
||||
t_u8 AccessPolicy2 : 1; /* ! */
|
||||
t_u8 AccessPolicy1 : 1; /* ! */
|
||||
IEEEtypes_WMM_TSPEC_TS_Info_Direction_e Direction : 2;
|
||||
t_u8 TID : 4; /* ! Unique identifier */
|
||||
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
||||
t_u8 TrafficType : 1;
|
||||
#else
|
||||
// IEEEtypes_WMM_TSPEC_TS_TRAFFIC_TYPE_e TrafficType : 1;
|
||||
t_u8 TrafficType : 1;
|
||||
t_u8 TID : 4; /* ! Unique identifier */
|
||||
|
@ -761,31 +692,19 @@ typedef MLAN_PACK_START struct {
|
|||
IEEEtypes_WMM_TSPEC_TS_Info_AckPolicy_e AckPolicy : 2;
|
||||
t_u8 Schedule : 1;
|
||||
t_u8 Reserved17_23 : 7; /* ! Reserved */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_TS_Info_t;
|
||||
|
||||
/** Data structure of WMM TSPEC Nominal Size */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
|
||||
nominal */
|
||||
t_u16 Size : 15; /* ! Nominal size in octets */
|
||||
#else
|
||||
t_u16 Size : 15; /* ! Nominal size in octets */
|
||||
t_u16 Fixed : 1; /* ! 1: Fixed size given in Size, 0: Var, size is
|
||||
nominal */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_NomMSDUSize_t;
|
||||
|
||||
/** Data structure of WMM TSPEC SBWA */
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u16 Whole : 3; /* ! Whole portion */
|
||||
t_u16 Fractional : 13; /* ! Fractional portion */
|
||||
#else
|
||||
t_u16 Fractional : 13; /* ! Fractional portion */
|
||||
t_u16 Whole : 3; /* ! Whole portion */
|
||||
#endif
|
||||
} MLAN_PACK_END IEEEtypes_WMM_TSPEC_SBWA;
|
||||
|
||||
/** Data structure of WMM TSPEC Body */
|
||||
|
@ -1126,26 +1045,6 @@ typedef MLAN_PACK_START struct _VHT_MCS_set {
|
|||
/** VHT Capabilities info field, reference 802.11ac D1.4 p89 */
|
||||
typedef MLAN_PACK_START struct _VHT_capa {
|
||||
#if 0
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
t_u8 mpdu_max_len:2;
|
||||
t_u8 chan_width:2;
|
||||
t_u8 rx_LDPC:1;
|
||||
t_u8 sgi_80:1;
|
||||
t_u8 sgi_160:1;
|
||||
t_u8 tx_STBC:1;
|
||||
t_u8 rx_STBC:3;
|
||||
t_u8 SU_beamformer_capa:1;
|
||||
t_u8 SU_beamformee_capa:1;
|
||||
t_u8 beamformer_ante_num:3;
|
||||
t_u8 sounding_dim_num:3;
|
||||
t_u8 MU_beamformer_capa:1;
|
||||
t_u8 MU_beamformee_capa:1;
|
||||
t_u8 VHT_TXOP_ps:1;
|
||||
t_u8 HTC_VHT_capa:1;
|
||||
t_u8 max_ampdu_len:3;
|
||||
t_u8 link_apapt_capa:2;
|
||||
t_u8 reserved_1:4;
|
||||
#else
|
||||
t_u8 reserved_1:4;
|
||||
t_u8 link_apapt_capa:2;
|
||||
t_u8 max_ampdu_len:3;
|
||||
|
@ -1164,7 +1063,6 @@ typedef MLAN_PACK_START struct _VHT_capa {
|
|||
t_u8 rx_LDPC:1;
|
||||
t_u8 chan_width:2;
|
||||
t_u8 mpdu_max_len:2;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
#endif
|
||||
t_u32 vht_cap_info;
|
||||
VHT_MCS_set_t mcs_sets;
|
||||
|
@ -1272,6 +1170,32 @@ typedef MLAN_PACK_START struct _IEEEtypes_Extension_t {
|
|||
t_u8 data[];
|
||||
} MLAN_PACK_END IEEEtypes_Extension_t, *pIEEEtypes_Extension_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsMap_t {
|
||||
/** Max HE-MAC for 1 SS */
|
||||
t_u8 max_mcs_1ss : 2;
|
||||
/** Max HE-MAC for 2 SS */
|
||||
t_u8 max_mcs_2ss : 2;
|
||||
/** Max HE-MAC for 3 SS */
|
||||
t_u8 max_mcs_3ss : 2;
|
||||
/** Max HE-MAC for 4 SS */
|
||||
t_u8 max_mcs_4ss : 2;
|
||||
/** Max HE-MAC for 5 SS */
|
||||
t_u8 max_mcs_5ss : 2;
|
||||
/** Max HE-MAC for 6 SS */
|
||||
t_u8 max_mcs_6ss : 2;
|
||||
/** Max HE-MAC for 7 SS */
|
||||
t_u8 max_mcs_7ss : 2;
|
||||
/** Max HE-MAC for 8 SS */
|
||||
t_u8 max_mcs_8ss : 2;
|
||||
} MLAN_PACK_END IEEEtypes_HeMcsMap_t, *pIEEEtypes_HeMcsMap_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeMcsNss_t {
|
||||
/** HE Rx MCS and NSS Set */
|
||||
t_u16 rx_mcs;
|
||||
/** HE Tx MCS and NSS Set*/
|
||||
t_u16 tx_mcs;
|
||||
} MLAN_PACK_END IEEEtypes_HeMcsNss_t, *pIEEEtypes_HeMcsNss_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
|
@ -1281,11 +1205,55 @@ typedef MLAN_PACK_START struct _IEEEtypes_HECap_t {
|
|||
t_u8 he_mac_cap[6];
|
||||
/** he phy capability info */
|
||||
t_u8 he_phy_cap[11];
|
||||
/** he txrx mcs support , size would be 4 or 8 or 12 */
|
||||
/** he txrx mcs support (for 80 MHz) */
|
||||
t_u8 he_txrx_mcs_support[4];
|
||||
/** PPE Thresholds (optional) */
|
||||
/** Optional Field, including he_txrx_mcs_support for 160 and 80+80 MHz,
|
||||
* and PPE Thresholds */
|
||||
t_u8 option[28];
|
||||
} MLAN_PACK_END IEEEtypes_HECap_t, *pIEEEtypes_HECap_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeOpParam_t {
|
||||
/** Default PE Duration */
|
||||
t_u16 default_pe_dur : 3; /* bit 0-2 */
|
||||
/** TWT Required */
|
||||
t_u16 twt_req : 1; /* bit 3 */
|
||||
/** TXOP Duration RTS Threshold */
|
||||
t_u16 txop_dur_rts_threshold : 10; /* bit 4-13 */
|
||||
/** VHT Operation Info Present */
|
||||
t_u16 vht_op_info_present : 1; /* bit 14 */
|
||||
/** Co-Hosted BSS */
|
||||
t_u16 co_located_bss : 1; /* bit 15 */
|
||||
/** ER SU Disable */
|
||||
t_u8 er_su_disable : 1; /* bit 16 */
|
||||
/** Reserved, including 6G Operation Info Pressent (bit17) */
|
||||
t_u8 reserved : 7; /* bit 17-23 */
|
||||
} MLAN_PACK_END IEEEtypes_HeOpParam_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeBssColorInfo_t {
|
||||
/** BSS Color */
|
||||
t_u8 bss_color : 6; /* bit 0-5 */
|
||||
/** Partial BSS Color */
|
||||
t_u8 partial_bss_color : 1; /* bit 6 */
|
||||
/** BSS Color Disabled */
|
||||
t_u8 bss_color_disabled : 1; /* bit 7 */
|
||||
} MLAN_PACK_END IEEEtypes_HeBssColorInfo_t;
|
||||
|
||||
typedef MLAN_PACK_START struct _IEEEtypes_HeOp_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** Element id extension */
|
||||
t_u8 ext_id;
|
||||
/** HE Operation Parameters */
|
||||
IEEEtypes_HeOpParam_t he_op_param;
|
||||
/** BSS Color Info */
|
||||
IEEEtypes_HeBssColorInfo_t bss_color_info;
|
||||
/** Basic HE-MCS and NSS Set */
|
||||
IEEEtypes_HeMcsMap_t basic_he_mcs_nss;
|
||||
/** Optional Field, including VHT Operation Info Max Co-Hosted BSSID
|
||||
* Indicator, and 6Ghz Operation Info */
|
||||
t_u8 option[9];
|
||||
} MLAN_PACK_END IEEEtypes_HeOp_t;
|
||||
|
||||
/** default channel switch count */
|
||||
#define DEF_CHAN_SWITCH_COUNT 5
|
||||
|
||||
|
@ -1321,8 +1289,7 @@ typedef MLAN_PACK_START struct {
|
|||
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
|
||||
|
||||
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
|
||||
#define WLAN_11H_MAX_SUBBANDS 5
|
||||
|
||||
#define WLAN_11H_MAX_SUBBANDS 6
|
||||
/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */
|
||||
#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25
|
||||
|
||||
|
@ -1403,6 +1370,8 @@ typedef MLAN_PACK_START struct {
|
|||
t_u8 local_max_tp_20mhz; /**< Local Maximum Transmit Power for 20 MHZ>*/
|
||||
t_u8 local_max_tp_40mhz; /**< Local Maximum Transmit Power for 40 MHZ>*/
|
||||
t_u8 local_max_tp_80mhz; /**< Local Maximum Transmit Power for 80 MHZ>*/
|
||||
t_u8 local_max_tp_160mhz_80_80mhz; /**< Local Maximum Transmit Power for
|
||||
160/80+80 MHZ>*/
|
||||
} MLAN_PACK_END IEEEtypes_VhtTpcEnvelope_t;
|
||||
|
||||
/* IEEE Quiet Period Element (7.3.2.23) */
|
||||
|
@ -1428,20 +1397,6 @@ typedef MLAN_PACK_START struct {
|
|||
*** @brief Map octet of the basic measurement report (7.3.2.22.1)
|
||||
**/
|
||||
typedef MLAN_PACK_START struct {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/**< Reserved */
|
||||
t_u8 rsvd5_7 : 3;
|
||||
/**< Channel is unmeasured */
|
||||
t_u8 unmeasured : 1;
|
||||
/**< Radar detected on channel */
|
||||
t_u8 radar : 1;
|
||||
/**< Unidentified signal found on channel */
|
||||
t_u8 unidentified_sig : 1;
|
||||
/**< OFDM preamble detected on channel */
|
||||
t_u8 ofdm_preamble : 1;
|
||||
/**< At least one valid MPDU received on channel */
|
||||
t_u8 bss : 1;
|
||||
#else
|
||||
/**< At least one valid MPDU received on channel */
|
||||
t_u8 bss : 1;
|
||||
/**< OFDM preamble detected on channel */
|
||||
|
@ -1454,7 +1409,6 @@ typedef MLAN_PACK_START struct {
|
|||
t_u8 unmeasured : 1;
|
||||
/**< Reserved */
|
||||
t_u8 rsvd5_7 : 3;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
|
||||
} MLAN_PACK_END MeasRptBasicMap_t;
|
||||
|
||||
|
@ -1974,6 +1928,10 @@ typedef struct _BSSDescriptor_t {
|
|||
IEEEtypes_Generic_t *prsn_ie;
|
||||
/** RSN IE offset in the beacon buffer */
|
||||
t_u16 rsn_offset;
|
||||
/** RSNX IE */
|
||||
IEEEtypes_Generic_t *prsnx_ie;
|
||||
/** RSNX IE offset in the beacon buffer */
|
||||
t_u16 rsnx_offset;
|
||||
#ifdef STA_SUPPORT
|
||||
/** WAPI IE */
|
||||
IEEEtypes_Generic_t *pwapi_ie;
|
||||
|
|
|
@ -3,20 +3,29 @@
|
|||
* @brief This file declares the IOCTL data structures and APIs.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's
|
||||
* prior express written permission.
|
||||
*
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -86,6 +95,9 @@ enum _mlan_ioctl_req_id {
|
|||
#endif
|
||||
|
||||
MLAN_OID_BSS_FIND_BSSID = 0x0002001D,
|
||||
#ifdef UAP_SUPPORT
|
||||
MLAN_OID_ACTION_CHAN_SWITCH = 0x0002001E,
|
||||
#endif
|
||||
|
||||
/* Radio Configuration Group */
|
||||
MLAN_IOCTL_RADIO_CFG = 0x00030000,
|
||||
|
@ -107,6 +119,8 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_SNMP_MIB_DTIM_PERIOD = 0x00040006,
|
||||
MLAN_OID_SNMP_MIB_SIGNALEXT_ENABLE = 0x00040007,
|
||||
MLAN_OID_SNMP_MIB_CTRL_DEAUTH = 0x00040008,
|
||||
MLAN_OID_SNMP_MIB_DOT11H_FAKERADAR = 0x00040009,
|
||||
MLAN_OID_SNMP_MIB_CHAN_TRACK = 0x0004000A,
|
||||
|
||||
/* Status Information Group */
|
||||
MLAN_IOCTL_GET_INFO = 0x00050000,
|
||||
|
@ -229,6 +243,7 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_11H_CHAN_REPORT_REQUEST = 0x00110004,
|
||||
MLAN_OID_11H_CHAN_SWITCH_COUNT = 0x00110005,
|
||||
MLAN_OID_11H_CHAN_NOP_INFO = 0x00110006,
|
||||
MLAN_OID_11H_CHAN_DFS_STATE = 0x00110007,
|
||||
MLAN_OID_11H_DFS_W53_CFG = 0x00110008,
|
||||
|
||||
/* 802.11n Configuration Group RANDYTODO for value assign */
|
||||
|
@ -259,6 +274,7 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D,
|
||||
MLAN_OID_MISC_CUSTOM_IE = 0x0020000F,
|
||||
MLAN_OID_MISC_TDLS_CONFIG = 0x00200010,
|
||||
MLAN_OID_MISC_NET_MONITOR = 0x00200011,
|
||||
MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012,
|
||||
MLAN_OID_MISC_IP_ADDR = 0x00200013,
|
||||
MLAN_OID_MISC_MAC_CONTROL = 0x00200014,
|
||||
|
@ -298,10 +314,13 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_COALESCE_CFG = 0x0020002E,
|
||||
MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F,
|
||||
MLAN_OID_MISC_GET_SENSOR_TEMP = 0x00200030,
|
||||
MLAN_OID_MISC_IPV6_RA_OFFLOAD = 0x00200036,
|
||||
MLAN_OID_MISC_GTK_REKEY_OFFLOAD = 0x00200037,
|
||||
MLAN_OID_MISC_OPER_CLASS = 0x00200038,
|
||||
MLAN_OID_MISC_PMIC_CFG = 0x00200039,
|
||||
MLAN_OID_MISC_IND_RST_CFG = 0x00200040,
|
||||
MLAN_OID_MISC_ROAM_OFFLOAD = 0x00200042,
|
||||
MLAN_OID_MISC_ROAM_OFFLOAD_APLIST = 0x00200043,
|
||||
MLAN_OID_MISC_GET_TSF = 0x00200045,
|
||||
MLAN_OID_MISC_GET_CHAN_REGION_CFG = 0x00200046,
|
||||
MLAN_OID_MISC_CLOUD_KEEP_ALIVE = 0x00200048,
|
||||
|
@ -320,6 +339,7 @@ enum _mlan_ioctl_req_id {
|
|||
#if defined(PCIE)
|
||||
MLAN_OID_MISC_SSU = 0x00200062,
|
||||
#endif
|
||||
MLAN_OID_MISC_CSI = 0x00200064,
|
||||
MLAN_OID_MISC_DMCS_CONFIG = 0x00200065,
|
||||
MLAN_OID_MISC_RX_ABORT_CFG = 0x00200066,
|
||||
MLAN_OID_MISC_RX_ABORT_CFG_EXT = 0x00200067,
|
||||
|
@ -340,6 +360,15 @@ enum _mlan_ioctl_req_id {
|
|||
MLAN_OID_MISC_TP_STATE = 0x0020007D,
|
||||
MLAN_OID_MISC_HAL_PHY_CFG = 0x0020007E,
|
||||
MLAN_OID_MISC_RF_TEST_HE_POWER = 0X0020007F,
|
||||
#ifdef UAP_SUPPORT
|
||||
MLAN_OID_MISC_WACP_MODE = 0x00200081,
|
||||
#endif
|
||||
MLAN_OID_MISC_GPIO_TSF_LATCH = 0x00200082,
|
||||
MLAN_OID_MISC_GET_TSF_INFO = 0x00200083,
|
||||
MLAN_OID_MISC_ASSOC_REQ = 0x00200084,
|
||||
MLAN_OID_MISC_IPS_CFG = 0x00200085,
|
||||
MLAN_OID_MISC_MC_AGGR_CFG = 0x00200086,
|
||||
MLAN_OID_MISC_CH_LOAD = 0x00200087,
|
||||
};
|
||||
|
||||
/** Sub command size */
|
||||
|
@ -589,6 +618,8 @@ enum _mlan_bss_mode {
|
|||
|
||||
/** Maximum key length */
|
||||
#define MLAN_MAX_KEY_LENGTH 32
|
||||
/** Maximum PMK R0 NAME key length */
|
||||
#define MLAN_MAX_PMKR0_NAME_LENGTH 16
|
||||
|
||||
/** Maximum atim window in milliseconds */
|
||||
#define MLAN_MAX_ATIM_WINDOW 50
|
||||
|
@ -621,7 +652,7 @@ typedef struct _mlan_multicast_list {
|
|||
} mlan_multicast_list, *pmlan_multicast_list;
|
||||
|
||||
/** Max channel */
|
||||
#define MLAN_MAX_CHANNEL 165
|
||||
#define MLAN_MAX_CHANNEL 177
|
||||
/** Maximum number of channels in table */
|
||||
#define MLAN_MAX_CHANNEL_NUM 128
|
||||
|
||||
|
@ -683,6 +714,26 @@ typedef struct _mlan_ds_misc_assoc_rsp {
|
|||
t_u32 assoc_resp_len;
|
||||
} mlan_ds_misc_assoc_rsp, *pmlan_ds_misc_assoc_rsp;
|
||||
|
||||
/** Type definition of mlan_ds_misc_assoc_req for MLAN_OID_MISC_ASSOC_REQ */
|
||||
typedef struct _mlan_ds_misc_assoc_req {
|
||||
/** Associate req buffer */
|
||||
t_u8 assoc_req_buf[ASSOC_RSP_BUF_SIZE];
|
||||
/** Response buffer length */
|
||||
t_u32 assoc_req_len;
|
||||
} mlan_ds_misc_assoc_req, *pmlan_ds_misc_assoc_req;
|
||||
|
||||
/** mlan_ds_assoc_info */
|
||||
typedef struct _mlan_ds_assoc_info {
|
||||
/** Associate req buffer */
|
||||
t_u8 assoc_resp_buf[ASSOC_RSP_BUF_SIZE];
|
||||
/** Response buffer length */
|
||||
t_u32 assoc_resp_len;
|
||||
/** Associate req buffer */
|
||||
t_u8 assoc_req_buf[ASSOC_RSP_BUF_SIZE];
|
||||
/** Response buffer length */
|
||||
t_u32 assoc_req_len;
|
||||
} mlan_ds_assoc_info, *pmlan_ds_assoc_info;
|
||||
|
||||
/** mlan_ssid_bssid data structure for
|
||||
* MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS
|
||||
*/
|
||||
|
@ -715,31 +766,14 @@ typedef struct _mlan_ssid_bssid {
|
|||
|
||||
/** Data structure of WMM ECW */
|
||||
typedef struct _wmm_ecw_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 /* BIG_ENDIAN_SUPPORT */
|
||||
} wmm_ecw_t, *pwmm_ecw_t;
|
||||
|
||||
/** Data structure of WMM Aci/Aifsn */
|
||||
typedef struct _wmm_aci_aifsn_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 */
|
||||
|
@ -748,7 +782,6 @@ typedef struct _wmm_aci_aifsn_t {
|
|||
t_u8 aci : 2;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} wmm_aci_aifsn_t, *pwmm_aci_aifsn_t;
|
||||
|
||||
/** Data structure of WMM AC parameters */
|
||||
|
@ -955,21 +988,12 @@ typedef struct _wep_param {
|
|||
|
||||
/** Data structure of WMM QoS information */
|
||||
typedef struct _wmm_qos_info_t {
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** QoS UAPSD */
|
||||
t_u8 qos_uapsd : 1;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 3;
|
||||
/** Parameter set count */
|
||||
t_u8 para_set_count : 4;
|
||||
#else
|
||||
/** Parameter set count */
|
||||
t_u8 para_set_count : 4;
|
||||
/** Reserved */
|
||||
t_u8 reserved : 3;
|
||||
/** QoS UAPSD */
|
||||
t_u8 qos_uapsd : 1;
|
||||
#endif /* BIG_ENDIAN_SUPPORT */
|
||||
} wmm_qos_info_t, *pwmm_qos_info_t;
|
||||
|
||||
/** Data structure of WMM parameter IE */
|
||||
|
@ -1055,6 +1079,10 @@ typedef struct _mlan_uap_bss_param {
|
|||
t_u8 channel;
|
||||
/** auth mode */
|
||||
t_u16 auth_mode;
|
||||
/** PWE derivation */
|
||||
t_u8 pwe_derivation;
|
||||
/** transition disable */
|
||||
t_u8 transition_disable;
|
||||
/** encryption protocol */
|
||||
t_u16 protocol;
|
||||
/** key managment type */
|
||||
|
@ -1113,6 +1141,22 @@ typedef struct _mlan_uap_scan_channels {
|
|||
scan_chan_list chan_list[MLAN_MAX_CHANNEL];
|
||||
} mlan_uap_scan_channels;
|
||||
|
||||
#define MAX_NUM_PKTS 9
|
||||
#define DEF_NUM_PKTS 3
|
||||
/** mlan_chan_switch_param */
|
||||
typedef struct _mlan_action_chan_switch {
|
||||
/** mode*/
|
||||
t_u8 mode;
|
||||
/** switch mode*/
|
||||
t_u8 chan_switch_mode;
|
||||
/** oper class*/
|
||||
t_u8 new_oper_class;
|
||||
/** new channel */
|
||||
t_u8 new_channel_num;
|
||||
/** chan_switch_count */
|
||||
t_u8 chan_switch_count;
|
||||
} mlan_action_chan_switch;
|
||||
|
||||
/** mlan_uap_oper_ctrl */
|
||||
typedef struct _mlan_uap_oper_ctrl {
|
||||
/** control value
|
||||
|
@ -1226,6 +1270,8 @@ typedef struct _mlan_ds_bss {
|
|||
wmm_parameter_t ap_wmm_para;
|
||||
/** ap scan channels for MLAN_OID_UAP_SCAN_CHANNELS*/
|
||||
mlan_uap_scan_channels ap_scan_channels;
|
||||
/** channel switch for MLAN_OID_UAP_CHAN_SWITCH */
|
||||
mlan_action_chan_switch chanswitch;
|
||||
/** ap channel for MLAN_OID_UAP_CHANNEL*/
|
||||
chan_band_info ap_channel;
|
||||
/** ap operation control for MLAN_OID_UAP_OPER_CTRL*/
|
||||
|
@ -1288,7 +1334,6 @@ enum _mlan_band_def {
|
|||
BAND_AAC = 64,
|
||||
BAND_GAX = 256,
|
||||
BAND_AAX = 512,
|
||||
|
||||
};
|
||||
|
||||
/** Channel bandwidth */
|
||||
|
@ -1435,6 +1480,7 @@ typedef struct _mlan_ds_snmp_mib {
|
|||
t_u8 signalext_enable;
|
||||
/** Control deauth when uap switch channel */
|
||||
t_u8 deauthctrl;
|
||||
t_u8 chan_track;
|
||||
} param;
|
||||
} mlan_ds_snmp_mib, *pmlan_ds_snmp_mib;
|
||||
|
||||
|
@ -1646,6 +1692,14 @@ typedef struct _mlan_ds_get_stats {
|
|||
t_u32 dwMgtErrCnt;
|
||||
/*Control Ownership error count*/
|
||||
t_u32 dwDatErrCnt;
|
||||
/*BIGTK MME good count*/
|
||||
t_u32 bigtk_mmeGoodCnt;
|
||||
/*BIGTK Replay error count*/
|
||||
t_u32 bigtk_replayErrCnt;
|
||||
/*BIGTK MIC error count*/
|
||||
t_u32 bigtk_micErrCnt;
|
||||
/*BIGTK MME not included count*/
|
||||
t_u32 bigtk_mmeNotFoundCnt;
|
||||
} mlan_ds_get_stats, *pmlan_ds_get_stats;
|
||||
|
||||
/** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */
|
||||
|
@ -1783,6 +1837,8 @@ typedef struct _mlan_fw_info {
|
|||
t_u32 fw_ver;
|
||||
/** Firmware Hotfix version */
|
||||
t_u8 hotfix_version;
|
||||
/** tx buf size */
|
||||
t_u16 tx_buf_size;
|
||||
/** MAC address */
|
||||
mlan_802_11_mac_addr mac_addr;
|
||||
/** 802.11n device capabilities */
|
||||
|
@ -1825,8 +1881,12 @@ typedef struct _mlan_fw_info {
|
|||
t_u8 antinfo;
|
||||
/** max AP associated sta count supported by fw */
|
||||
t_u8 max_ap_assoc_sta;
|
||||
/** FW support roaming offload */
|
||||
t_u8 fw_roaming_support;
|
||||
/** Bandwidth not support 80Mhz */
|
||||
t_u8 prohibit_80mhz;
|
||||
/** FW support beacon protection */
|
||||
t_u8 fw_beacon_prot;
|
||||
} mlan_fw_info, *pmlan_fw_info;
|
||||
|
||||
/** Version string buffer length */
|
||||
|
@ -1840,92 +1900,6 @@ typedef struct _mlan_ver_ext {
|
|||
char version_str[MLAN_MAX_VER_STR_LEN];
|
||||
} mlan_ver_ext, *pmlan_ver_ext;
|
||||
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** Extended Capabilities Data */
|
||||
typedef struct MLAN_PACK_START _ExtCap_t {
|
||||
/** Extended Capabilities value */
|
||||
t_u8 rsvdBit79 : 1; /* bit 79 */
|
||||
t_u8 TWTResp : 1; /* bit 78 */
|
||||
t_u8 TWTReq : 1; /* bit 77 */
|
||||
t_u8 rsvdBit76 : 1; /* bit 76 */
|
||||
t_u8 rsvdBit75 : 1; /* bit 75 */
|
||||
t_u8 rsvdBit74 : 1; /* bit 74 */
|
||||
t_u8 rsvdBit73 : 1; /* bit 73 */
|
||||
t_u8 FILS : 1; /* bit 72 */
|
||||
t_u8 FTMI : 1; /* bit 71 */
|
||||
t_u8 FTMR : 1; /* bit 70 */
|
||||
t_u8 CAQ : 1; /* bit 69 */
|
||||
t_u8 rsvdBit68 : 1; /* bit 68 */
|
||||
t_u8 NCC : 1; /* bit 67 */
|
||||
t_u8 rsvdBit66 : 1; /* bit 66 */
|
||||
t_u8 chanSchedMgnt : 1; /* bit 65 */
|
||||
t_u8 MaxAMSDU1 : 1; /* bit 64 */
|
||||
t_u8 MaxAMSDU0 : 1; /* bit 63 */
|
||||
t_u8 OperModeNtf : 1; /* bit 62 */
|
||||
t_u8 TDLSWildBandwidth : 1; /* bit 61 */
|
||||
t_u8 rsvdBit60 : 1; /* bit 60 */
|
||||
t_u8 rsvdBit59 : 1; /* bit 59 */
|
||||
t_u8 rsvdBit58 : 1; /* bit 58 */
|
||||
t_u8 rsvdBit57 : 1; /* bit 57 */
|
||||
t_u8 rsvdBit56 : 1; /* bit 56 */
|
||||
t_u8 rsvdBit55 : 1; /* bit 55 */
|
||||
t_u8 rsvdBit54 : 1; /* bit 54 */
|
||||
t_u8 rsvdBit53 : 1; /* bit 53 */
|
||||
t_u8 rsvdBit52 : 1; /* bit 52 */
|
||||
t_u8 rsvdBit51 : 1; /* bit 51 */
|
||||
t_u8 rsvdBit50 : 1; /* bit 50 */
|
||||
t_u8 rsvdBit49 : 1; /* bit 49 */
|
||||
t_u8 rsvdBit48 : 1; /* bit 48 */
|
||||
t_u8 rsvdBit47 : 1; /* bit 47 */
|
||||
t_u8 rsvdBit46 : 1; /* bit 46 */
|
||||
t_u8 rsvdBit45 : 1; /* bit 45 */
|
||||
t_u8 rsvdBit44 : 1; /* bit 44 */
|
||||
t_u8 rsvdBit43 : 1; /* bit 43 */
|
||||
t_u8 rsvdBit42 : 1; /* bit 42 */
|
||||
t_u8 rsvdBit41 : 1; /* bit 41 */
|
||||
t_u8 rsvdBit40 : 1; /* bit 40 */
|
||||
t_u8 TDLSChlSwitchProhib : 1; /* bit 39 */
|
||||
t_u8 TDLSProhibited : 1; /* bit 38 */
|
||||
t_u8 TDLSSupport : 1; /* bit 37 */
|
||||
t_u8 MSGCF_Capa : 1; /* bit 36 */
|
||||
t_u8 Reserved35 : 1; /* bit 35 */
|
||||
t_u8 SSPN_Interface : 1; /* bit 34 */
|
||||
t_u8 EBR : 1; /* bit 33 */
|
||||
t_u8 Qos_Map : 1; /* bit 32 */
|
||||
t_u8 Interworking : 1; /* bit 31 */
|
||||
t_u8 TDLSChannelSwitching : 1; /* bit 30 */
|
||||
t_u8 TDLSPeerPSMSupport : 1; /* bit 29 */
|
||||
t_u8 TDLSPeerUAPSDSupport : 1; /* bit 28 */
|
||||
t_u8 UTC : 1; /* bit 27 */
|
||||
t_u8 DMS : 1; /* bit 26 */
|
||||
t_u8 SSID_List : 1; /* bit 25 */
|
||||
t_u8 ChannelUsage : 1; /* bit 24 */
|
||||
t_u8 TimingMeasurement : 1; /* bit 23 */
|
||||
t_u8 MultipleBSSID : 1; /* bit 22 */
|
||||
t_u8 AC_StationCount : 1; /* bit 21 */
|
||||
t_u8 QoSTrafficCap : 1; /* bit 20 */
|
||||
t_u8 BSS_Transition : 1; /* bit 19 */
|
||||
t_u8 TIM_Broadcast : 1; /* bit 18 */
|
||||
t_u8 WNM_Sleep : 1; /* bit 17 */
|
||||
t_u8 TFS : 1; /* bit 16 */
|
||||
t_u8 GeospatialLocation : 1; /* bit 15 */
|
||||
t_u8 CivicLocation : 1; /* bit 14 */
|
||||
t_u8 CollocatedIntf : 1; /* bit 13 */
|
||||
t_u8 ProxyARPService : 1; /* bit 12 */
|
||||
t_u8 FMS : 1; /* bit 11 */
|
||||
t_u8 LocationTracking : 1; /* bit 10 */
|
||||
t_u8 MulticastDiagnostics : 1; /* bit 9 */
|
||||
t_u8 Diagnostics : 1; /* bit 8 */
|
||||
t_u8 Event : 1; /* bit 7 */
|
||||
t_u8 SPSMP_Support : 1; /* bit 6 */
|
||||
t_u8 Reserved5 : 1; /* bit 5 */
|
||||
t_u8 PSMP_Capable : 1; /* bit 4 */
|
||||
t_u8 RejectUnadmFrame : 1; /* bit 3 */
|
||||
t_u8 ExtChanSwitching : 1; /* bit 2 */
|
||||
t_u8 Reserved1 : 1; /* bit 1 */
|
||||
t_u8 BSS_CoexistSupport : 1; /* bit 0 */
|
||||
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
|
||||
#else
|
||||
/** Extended Capabilities Data */
|
||||
typedef struct MLAN_PACK_START _ExtCap_t {
|
||||
/** Extended Capabilities value */
|
||||
|
@ -2009,8 +1983,15 @@ typedef struct MLAN_PACK_START _ExtCap_t {
|
|||
t_u8 TWTReq : 1; /* bit 77 */
|
||||
t_u8 TWTResp : 1; /* bit 78 */
|
||||
t_u8 rsvdBit79 : 1; /* bit 79 */
|
||||
t_u8 rsvdBit80 : 1; /* bit 80 */
|
||||
t_u8 rsvdBit81 : 1; /* bit 81 */
|
||||
t_u8 rsvdBit82 : 1; /* bit 82 */
|
||||
t_u8 rsvdBit83 : 1; /* bit 83 */
|
||||
t_u8 beacon_prot : 1; /* bit 84 */
|
||||
t_u8 rsvdBit85 : 1; /* bit 85 */
|
||||
t_u8 rsvdBit86 : 1; /* bit 86 */
|
||||
t_u8 rsvdBit87 : 1; /* bit 87 */
|
||||
} MLAN_PACK_END ExtCap_t, *pExtCap_t;
|
||||
#endif
|
||||
|
||||
/** ExtCap : TDLS prohibited */
|
||||
#define IS_EXTCAP_TDLS_PROHIBITED(ext_cap) (ext_cap.TDLSProhibited)
|
||||
|
@ -2136,6 +2117,8 @@ typedef struct _tdls_peer_info {
|
|||
t_u8 ht_cap[IEEE_MAX_IE_SIZE];
|
||||
/** VHT Capabilities IE */
|
||||
t_u8 vht_cap[IEEE_MAX_IE_SIZE];
|
||||
/** HE Capabilities IE */
|
||||
t_u8 he_cap[IEEE_MAX_IE_SIZE];
|
||||
} tdls_peer_info;
|
||||
|
||||
/** max ralist num */
|
||||
|
@ -2215,7 +2198,7 @@ typedef struct _mlan_debug_info {
|
|||
/** Corresponds to port_open member of mlan_private */
|
||||
t_u8 port_open;
|
||||
/** bypass pkt count */
|
||||
t_u16 bypass_pkt_count;
|
||||
t_u32 bypass_pkt_count;
|
||||
/** Corresponds to scan_processing member of mlan_adapter */
|
||||
t_u32 scan_processing;
|
||||
/** Corresponds to mlan_processing member of mlan_adapter */
|
||||
|
@ -2265,6 +2248,10 @@ typedef struct _mlan_debug_info {
|
|||
t_u32 mpa_sent_no_ports;
|
||||
/** last recv wr_bitmap */
|
||||
t_u32 last_recv_wr_bitmap;
|
||||
/** last recv rd_bitmap */
|
||||
t_u32 last_recv_rd_bitmap;
|
||||
/** mp_data_port_mask */
|
||||
t_u32 mp_data_port_mask;
|
||||
/** last mp_wr_bitmap */
|
||||
t_u32 last_mp_wr_bitmap[SDIO_MP_DBG_NUM];
|
||||
/** last ports for cmd53 write data */
|
||||
|
@ -2413,8 +2400,6 @@ typedef struct _sta_info_data {
|
|||
sta_stats stats;
|
||||
/** ie length */
|
||||
t_u16 ie_len;
|
||||
/** ie buffer */
|
||||
t_u8 ie_buf[1];
|
||||
} sta_info_data;
|
||||
|
||||
/** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */
|
||||
|
@ -2423,6 +2408,7 @@ typedef struct _mlan_ds_sta_list {
|
|||
t_u16 sta_count;
|
||||
/** station list */
|
||||
sta_info_data info[MAX_NUM_CLIENTS];
|
||||
/* ie_buf will be append at the end */
|
||||
} mlan_ds_sta_list, *pmlan_ds_sta_list;
|
||||
#endif
|
||||
|
||||
|
@ -2480,7 +2466,7 @@ typedef enum {
|
|||
AssocAgentAuth_FastBss,
|
||||
AssocAgentAuth_FastBss_Skip,
|
||||
AssocAgentAuth_Network_EAP,
|
||||
AssocAgentAuth_Wpa3Sae,
|
||||
AssocAgentAuth_Wpa3Sae = 6,
|
||||
AssocAgentAuth_Auto,
|
||||
} AssocAgentAuthType_e;
|
||||
|
||||
|
@ -2549,6 +2535,10 @@ enum _mlan_psk_type {
|
|||
#define KEY_FLAG_GCMP_256 0x00000040
|
||||
/** key flag for ccmp 256 */
|
||||
#define KEY_FLAG_CCMP_256 0x00000080
|
||||
/** key flag for GMAC_128 */
|
||||
#define KEY_FLAG_GMAC_128 0x00000100
|
||||
/** key flag for GMAC_256 */
|
||||
#define KEY_FLAG_GMAC_256 0x00000200
|
||||
|
||||
/** Type definition of mlan_ds_encrypt_key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */
|
||||
typedef struct _mlan_ds_encrypt_key {
|
||||
|
@ -2600,6 +2590,8 @@ typedef struct _mlan_sae_password_t {
|
|||
typedef struct _mlan_pmk_t {
|
||||
/** PMK */
|
||||
t_u8 pmk[MLAN_MAX_KEY_LENGTH];
|
||||
t_u8 pmk_r0[MLAN_MAX_KEY_LENGTH];
|
||||
t_u8 pmk_r0_name[MLAN_MAX_PMKR0_NAME_LENGTH];
|
||||
} mlan_pmk_t;
|
||||
|
||||
/** Embedded supplicant RSN type: No RSN */
|
||||
|
@ -2650,10 +2642,20 @@ typedef struct _mlan_ds_ewpa_mode {
|
|||
t_u32 act_groupcipher;
|
||||
} mlan_ds_esupp_mode, *pmlan_ds_esupp_mode;
|
||||
|
||||
/* Security SSID MAX number support by firmware*/
|
||||
#define MAX_SEC_SSID_NUM 6
|
||||
|
||||
/** Type definition of mlan_ds_sec_cfg for MLAN_IOCTL_SEC_CFG */
|
||||
typedef struct _mlan_ds_sec_cfg {
|
||||
/** Sub-command */
|
||||
t_u32 sub_command;
|
||||
/** Flag to extend some structures to support multiple values.
|
||||
** For example, mlan_ds_passphrase can only contain one value,
|
||||
** if need use mlan_ds_passphrase[N], just set this flag and
|
||||
** use mlan_ds_passphrase[] instead to avoid modify
|
||||
** more already exist code.
|
||||
*/
|
||||
t_u8 multi_passphrase;
|
||||
/** Security configuration parameter */
|
||||
union {
|
||||
/** Authentication mode for MLAN_OID_SEC_CFG_AUTH_MODE */
|
||||
|
@ -2679,6 +2681,7 @@ typedef struct _mlan_ds_sec_cfg {
|
|||
#ifdef UAP_SUPPORT
|
||||
t_u8 sta_mac[MLAN_MAC_ADDR_LENGTH];
|
||||
#endif
|
||||
mlan_ds_passphrase roam_passphrase[MAX_SEC_SSID_NUM];
|
||||
} param;
|
||||
} mlan_ds_sec_cfg, *pmlan_ds_sec_cfg;
|
||||
|
||||
|
@ -2993,6 +2996,8 @@ typedef struct _mlan_ds_hs_cfg {
|
|||
t_u8 ext_gap;
|
||||
/** GPIO wave level for extend hscfg*/
|
||||
t_u8 gpio_wave;
|
||||
/** Minimum delay between HsActive and HostWake (in msec) */
|
||||
t_u16 min_wake_holdoff;
|
||||
} mlan_ds_hs_cfg, *pmlan_ds_hs_cfg;
|
||||
|
||||
#define MAX_MGMT_FRAME_FILTER 2
|
||||
|
@ -3840,7 +3845,7 @@ typedef MLAN_PACK_START struct _mlan_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*/
|
||||
/** band, BIT0:2.4G, BIT1:5G BIT2:6G*/
|
||||
t_u8 band;
|
||||
/** mlan_ds_11ax_he_capa */
|
||||
mlan_ds_11ax_he_capa he_cap;
|
||||
|
@ -4035,12 +4040,19 @@ typedef struct _mlan_ds_subband_set_t {
|
|||
t_u8 max_tx_pwr;
|
||||
} mlan_ds_subband_set_t;
|
||||
|
||||
#define NXP_DFS_UNSET 0
|
||||
#define NXP_DFS_FCC 1
|
||||
#define NXP_DFS_ETSI 2
|
||||
#define NXP_DFS_JP 3
|
||||
#define NXP_DFS_UNKNOWN 0xFF
|
||||
/** Domain regulatory information */
|
||||
typedef struct _mlan_ds_11d_domain_info {
|
||||
/** DFS region code */
|
||||
t_u8 dfs_region;
|
||||
/** Country Code */
|
||||
t_u8 country_code[COUNTRY_CODE_LEN];
|
||||
/** Band that channels in sub_band belong to */
|
||||
t_u8 band;
|
||||
t_u16 band;
|
||||
/** No. of subband in below */
|
||||
t_u8 no_of_sub_band;
|
||||
/** Subband data to send/last sent */
|
||||
|
@ -4084,7 +4096,14 @@ enum _mlan_reg_type {
|
|||
MLAN_REG_PSU = 6,
|
||||
MLAN_REG_BCA = 7,
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SD9097)
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDNW62X) || \
|
||||
defined(PCIENW62X) || defined(USBNW62X) || defined(SD9097) || \
|
||||
defined(SD9177)
|
||||
MLAN_REG_CIU = 8,
|
||||
#endif
|
||||
#if defined(PCIE9098) || defined(SD9098) || defined(USB9098) || \
|
||||
defined(PCIE9097) || defined(USB9097) || defined(SDNW62X) || \
|
||||
defined(PCIENW62X) || defined(USBNW62X) || defined(SD9097)
|
||||
MLAN_REG_MAC2 = 0x81,
|
||||
MLAN_REG_BBP2 = 0x82,
|
||||
MLAN_REG_RF2 = 0x83,
|
||||
|
@ -4179,6 +4198,16 @@ typedef struct _mlan_ds_11h_chan_rep_req {
|
|||
t_u8 host_based;
|
||||
} mlan_ds_11h_chan_rep_req;
|
||||
|
||||
/** channel dfs state for MLAN_OID_11H_CHAN_DFS_STATE */
|
||||
typedef struct _mlan_ds_11h_chan_dfs_state {
|
||||
/** channel */
|
||||
t_u8 channel;
|
||||
/** is dfs channel */
|
||||
t_u8 dfs_required;
|
||||
/** dfs state */
|
||||
dfs_state_t dfs_state;
|
||||
} mlan_ds_11h_chan_dfs_state;
|
||||
|
||||
typedef struct _mlan_ds_11h_dfs_w53_cfg {
|
||||
/** dfs w53 cfg */
|
||||
t_u8 dfs53cfg;
|
||||
|
@ -4200,6 +4229,8 @@ typedef struct _mlan_ds_11h_cfg {
|
|||
mlan_ds_11h_chan_rep_req chan_rpt_req;
|
||||
/** channel switch count for MLAN_OID_11H_CHAN_SWITCH_COUNT*/
|
||||
t_s8 cs_count;
|
||||
/** channel dfs state for MLAN_OID_11H_CHAN_DFS_STATE */
|
||||
mlan_ds_11h_chan_dfs_state ch_dfs_state;
|
||||
mlan_ds_11h_dfs_w53_cfg dfs_w53_cfg;
|
||||
} param;
|
||||
} mlan_ds_11h_cfg, *pmlan_ds_11h_cfg;
|
||||
|
@ -4219,6 +4250,9 @@ typedef struct _mlan_ds_11h_cfg {
|
|||
/** Enumeration for IE type */
|
||||
enum _mlan_ie_type {
|
||||
MLAN_IE_TYPE_GEN_IE = 0,
|
||||
#ifdef STA_SUPPORT
|
||||
MLAN_IE_TYPE_ARP_FILTER,
|
||||
#endif /* STA_SUPPORT */
|
||||
};
|
||||
|
||||
/** Type definition of mlan_ds_misc_gen_ie for MLAN_OID_MISC_GEN_IE */
|
||||
|
@ -4285,6 +4319,26 @@ enum _mlan_func_cmd {
|
|||
MLAN_FUNC_SHUTDOWN,
|
||||
};
|
||||
|
||||
/** Net monitor filter: management frame */
|
||||
#define MLAN_NETMON_MANAGEMENT_FRAME MBIT(0)
|
||||
/** Net monitor filter: control frame */
|
||||
#define MLAN_NETMON_CONTROL_FRAME MBIT(1)
|
||||
/** Net monitor filter: data frame */
|
||||
#define MLAN_NETMON_DATA_FRAME MBIT(2)
|
||||
|
||||
typedef struct _mlan_ds_misc_net_monitor {
|
||||
/** Enable/disable network monitor */
|
||||
t_u32 enable_net_mon;
|
||||
/** Set net monitor filer flag */
|
||||
t_u32 filter_flag;
|
||||
/** Radio type */
|
||||
t_u32 band;
|
||||
/** Channel */
|
||||
t_u32 channel;
|
||||
/** Secondary channel bandwidth */
|
||||
t_u32 chan_bandwidth;
|
||||
} mlan_ds_misc_net_monitor;
|
||||
|
||||
/** Type definition of mlan_ds_misc_tx_datapause
|
||||
* for MLAN_OID_MISC_TX_DATAPAUSE
|
||||
*/
|
||||
|
@ -4376,6 +4430,8 @@ typedef struct _mlan_ds_misc_cck_desense_cfg {
|
|||
#define IPADDR_TYPE_IPV4 (1)
|
||||
/** IP operation remove */
|
||||
#define MLAN_IPADDR_OP_IP_REMOVE (0)
|
||||
/** IP operation ARP filter */
|
||||
#define MLAN_IPADDR_OP_ARP_FILTER MBIT(0)
|
||||
/** IP operation ARP response */
|
||||
#define MLAN_IPADDR_OP_AUTO_ARP_RESP MBIT(1)
|
||||
|
||||
|
@ -4391,6 +4447,14 @@ typedef struct _mlan_ds_misc_ipaddr_cfg {
|
|||
t_u8 ip_addr[MAX_IPADDR][IPADDR_LEN];
|
||||
} mlan_ds_misc_ipaddr_cfg;
|
||||
|
||||
/** Type definnition of mlan_ds_misc_ipv6_ra_offload for
|
||||
* MLAN_OID_MISC_IPV6_RA_OFFLOAD*/
|
||||
typedef struct _mlan_ds_misc_ipv6_ra_offload {
|
||||
/** 0: disable; 1: enable*/
|
||||
t_u8 enable;
|
||||
t_u8 ipv6_addr[16];
|
||||
} mlan_ds_misc_ipv6_ra_offload;
|
||||
|
||||
/* MEF configuration disable */
|
||||
#define MEF_CFG_DISABLE 0
|
||||
/* MEF configuration Rx filter enable */
|
||||
|
@ -4647,6 +4711,33 @@ typedef struct _mlan_ds_wifi_direct_config {
|
|||
} mlan_ds_wifi_direct_config;
|
||||
#endif
|
||||
|
||||
/** Type definition of mlan_ds_gpio_tsf_latch */
|
||||
typedef struct _mlan_ds_gpio_tsf_latch {
|
||||
/**clock sync Mode */
|
||||
t_u8 clock_sync_mode;
|
||||
/**clock sync Role */
|
||||
t_u8 clock_sync_Role;
|
||||
/**clock sync GPIO Pin Number */
|
||||
t_u8 clock_sync_gpio_pin_number;
|
||||
/**clock sync GPIO Level or Toggle */
|
||||
t_u8 clock_sync_gpio_level_toggle;
|
||||
/**clock sync GPIO Pulse Width */
|
||||
t_u16 clock_sync_gpio_pulse_width;
|
||||
} mlan_ds_gpio_tsf_latch;
|
||||
|
||||
/** Type definition of mlan_ds_tsf_info */
|
||||
typedef struct _mlan_ds_tsf_info {
|
||||
/**get tsf info format */
|
||||
t_u16 tsf_format;
|
||||
/**tsf info */
|
||||
t_u16 tsf_info;
|
||||
/**tsf */
|
||||
t_u64 tsf;
|
||||
/**Positive or negative offset in microsecond from Beacon TSF to GPIO
|
||||
* toggle TSF */
|
||||
t_s32 tsf_offset;
|
||||
} mlan_ds_tsf_info;
|
||||
|
||||
#if defined(STA_SUPPORT)
|
||||
typedef struct _mlan_ds_misc_pmfcfg {
|
||||
/** Management Frame Protection Capable */
|
||||
|
@ -4658,6 +4749,166 @@ typedef struct _mlan_ds_misc_pmfcfg {
|
|||
|
||||
#define MAX_SSID_NUM 16
|
||||
#define MAX_AP_LIST 8
|
||||
#define RETRY_UNLIMITED_TIME 0xFF
|
||||
|
||||
#define FW_ROAM_ENABLE MBIT(0)
|
||||
#define FW_ROAM_TRIGGER_COND MBIT(1)
|
||||
#define FW_ROAM_BSSID MBIT(2)
|
||||
#define FW_ROAM_SSID MBIT(3)
|
||||
#define FW_ROAM_RETRY_COUNT MBIT(4)
|
||||
#define FW_ROAM_RSSI_PARA MBIT(5)
|
||||
#define FW_ROAM_BAND_RSSI MBIT(6)
|
||||
#define FW_ROAM_BGSCAN_PARAM MBIT(7)
|
||||
#define FW_ROAM_EES_PARAM MBIT(8)
|
||||
#define FW_ROAM_BCN_MISS_THRESHOLD MBIT(9)
|
||||
#define FW_ROAM_PRE_BCN_MISS_THRESHOLD MBIT(10)
|
||||
#define FW_ROAM_BLACKLIST MBIT(11)
|
||||
#define FW_ROAM_REPEAT_CNT MBIT(12)
|
||||
|
||||
/*Roam offload configuration for auto reconnection when suspend and resume*/
|
||||
typedef enum _roam_offload_config_mode {
|
||||
ROAM_OFFLOAD_ENABLE = 1,
|
||||
ROAM_OFFLOAD_SUSPEND_CFG,
|
||||
ROAM_OFFLOAD_RESUME_CFG,
|
||||
ROAM_OFFLOAD_PARAM_CFG,
|
||||
} roam_offload_config_mode;
|
||||
|
||||
typedef enum _roam_offload_set_mode {
|
||||
ROAM_OFFLOAD_DISABLE = 0,
|
||||
ROAM_OFFLOAD_WITH_APLIST,
|
||||
ROAM_OFFLOAD_WITHOUT_APLIST,
|
||||
ROAM_OFFLOAD_WITH_BSSID,
|
||||
ROAM_OFFLOAD_WITH_SSID,
|
||||
AUTO_RECONNECT,
|
||||
} roam_offload_set_mode;
|
||||
|
||||
typedef enum _roam_offload_trigger_mode {
|
||||
NO_TRIGGER = 0x00,
|
||||
RSSI_LOW_TRIGGER = 0x01,
|
||||
PRE_BEACON_LOST_TRIGGER = 0x02,
|
||||
LINK_LOST_TRIGGER = 0x04,
|
||||
DEAUTH_WITH_EXT_AP_TRIGGER = 0x08,
|
||||
} roam_offload_trigger_mode;
|
||||
|
||||
/** mlan_ds_misc_ees_cfg structure */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_ees_cfg {
|
||||
/* EES mode*/
|
||||
t_u16 ees_mode;
|
||||
/* EES report condition*/
|
||||
t_u16 ees_rpt_condition;
|
||||
/* High scan period(milliseconds)*/
|
||||
t_u16 high_scan_period;
|
||||
/* High scan count*/
|
||||
t_u16 high_scan_count;
|
||||
/* Middle scan period(milliseconds)*/
|
||||
t_u16 mid_scan_period;
|
||||
/* Middle scan count*/
|
||||
t_u16 mid_scan_count;
|
||||
/* Low scan period(milliseconds)*/
|
||||
t_u16 low_scan_period;
|
||||
/* Low scan count*/
|
||||
t_u16 low_scan_count;
|
||||
} MLAN_PACK_END mlan_ds_misc_ees_cfg;
|
||||
|
||||
/** mlan_ds_misc_bgscan_cfg structure */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_bgscan_cfg {
|
||||
/* BSS Type 0x1-bss independent, 0x2-bss infrastructure, 0x3-bss any*/
|
||||
t_u8 bss_type;
|
||||
/* Number of channels scanned for each scan*/
|
||||
t_u8 channels_per_scan;
|
||||
/* Interval between consective scans*/
|
||||
t_u32 scan_interval;
|
||||
/* Conditons to trigger report to host*/
|
||||
t_u32 bg_rpt_condition;
|
||||
} MLAN_PACK_END mlan_ds_misc_bgscan_cfg;
|
||||
|
||||
/** mlan_ds_misc_band_rssi structure */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_band_rssi {
|
||||
/* RSSI hysteresis*/
|
||||
t_u8 rssi_hysteresis;
|
||||
/* Preferred channel band for fw roaming
|
||||
* 0:2.4G band; 1: 5G band; 2:4G band; 0xFF:band not set(invalid)
|
||||
*/
|
||||
t_u8 band_preferred;
|
||||
} MLAN_PACK_END mlan_ds_misc_band_rssi;
|
||||
|
||||
/** mlan_ds_misc_ssid_list structure */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_ssid_list {
|
||||
/* SSID number*/
|
||||
t_u8 ssid_num;
|
||||
/* SSID for fw roaming/auto_reconnect*/
|
||||
mlan_802_11_ssid ssids[MAX_SSID_NUM];
|
||||
} MLAN_PACK_END mlan_ds_misc_ssid_list;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload_aplist {
|
||||
/** Number of AP**/
|
||||
t_u8 ap_num;
|
||||
/** AP mac addrs**/
|
||||
t_u8 ap_mac[MAX_AP_LIST][MLAN_MAC_ADDR_LENGTH];
|
||||
} MLAN_PACK_END mlan_ds_misc_roam_offload_aplist;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload_para_rssi {
|
||||
/** Setting flag**/
|
||||
t_u8 set_flag;
|
||||
/** Max value of RSSI threshold**/
|
||||
t_u8 max_rssi;
|
||||
/** Min value of RSSI threshold**/
|
||||
t_u8 min_rssi;
|
||||
/** Adjusting step value of RSSI threshold**/
|
||||
t_u8 step_rssi;
|
||||
} MLAN_PACK_END mlan_ds_misc_roam_offload_para_rssi;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload {
|
||||
/** Enable roam offload**/
|
||||
t_u8 enable;
|
||||
/** User set passphrase**/
|
||||
t_u8 userset_passphrase;
|
||||
/* Condition to trigger roaming
|
||||
* Bit0 : RSSI low trigger
|
||||
* Bit1 : Pre-beacon lost trigger
|
||||
* Bit2 : Link Lost trigger
|
||||
* Bit3 : Deauth by ext-AP trigger
|
||||
* Bit4 ~ Bit15 : Reserved
|
||||
* value 0 : no trigger
|
||||
* value 0xff : invalid
|
||||
*/
|
||||
t_u16 trigger_condition;
|
||||
/** AP list**/
|
||||
mlan_ds_misc_roam_offload_aplist aplist;
|
||||
/*Roam offload configuration mode for auto connection when suspend and
|
||||
* resume*/
|
||||
roam_offload_config_mode config_mode;
|
||||
/** Retry count**/
|
||||
t_u8 retry_count;
|
||||
/** RSSI para**/
|
||||
mlan_ds_misc_roam_offload_para_rssi para_rssi;
|
||||
/** BSSID of reconnection**/
|
||||
mlan_802_11_mac_addr bssid_reconnect;
|
||||
/* SSID List(White list)*/
|
||||
mlan_ds_misc_ssid_list ssid_list;
|
||||
/* Black list(BSSID list)*/
|
||||
mlan_ds_misc_roam_offload_aplist black_list;
|
||||
/* BAND and RSSI_HYSTERESIS set flag*/
|
||||
t_u8 band_rssi_flag;
|
||||
mlan_ds_misc_band_rssi band_rssi;
|
||||
|
||||
/* BGSCAN params set flag*/
|
||||
t_u8 bgscan_set_flag;
|
||||
mlan_ds_misc_bgscan_cfg bgscan_cfg;
|
||||
|
||||
/* EES mode params set flag*/
|
||||
t_u8 ees_param_set_flag;
|
||||
mlan_ds_misc_ees_cfg ees_cfg;
|
||||
|
||||
/* Beacon miss threshold*/
|
||||
t_u8 bcn_miss_threshold;
|
||||
|
||||
/* Beacon miss threshold*/
|
||||
t_u8 pre_bcn_miss_threshold;
|
||||
|
||||
/* Scan repeat count*/
|
||||
t_u16 repeat_count;
|
||||
} MLAN_PACK_END mlan_ds_misc_roam_offload;
|
||||
|
||||
/**Action ID for TDLS disable link*/
|
||||
#define WLAN_TDLS_DISABLE_LINK 0x00
|
||||
|
@ -4711,6 +4962,8 @@ typedef struct _mlan_ds_misc_tdls_oper {
|
|||
#define TDLS_IE_FLAGS_QOS_INFO 0x0080
|
||||
/** flag for TDLS SETUP */
|
||||
#define TDLS_IE_FLAGS_SETUP 0x0100
|
||||
#define TDLS_IE_FLAGS_HECAP 0x0200
|
||||
#define TDLS_IE_FLAGS_HEOP 0x0400
|
||||
|
||||
/** TDLS ie buffer */
|
||||
typedef struct _mlan_ds_misc_tdls_ies {
|
||||
|
@ -4732,6 +4985,10 @@ typedef struct _mlan_ds_misc_tdls_ies {
|
|||
t_u8 vht_oprat[IEEE_MAX_IE_SIZE];
|
||||
/** aid Info */
|
||||
t_u8 aid_info[IEEE_MAX_IE_SIZE];
|
||||
/** HE Capabilities IE */
|
||||
t_u8 he_cap[IEEE_MAX_IE_SIZE];
|
||||
/** HE Operation IE */
|
||||
t_u8 he_op[IEEE_MAX_IE_SIZE];
|
||||
/** supported channels */
|
||||
t_u8 supp_chan[IEEE_MAX_IE_SIZE];
|
||||
/** supported regulatory class */
|
||||
|
@ -4851,6 +5108,8 @@ typedef struct _mef_entry_t {
|
|||
typedef struct _mlan_ds_misc_mef_flt_cfg {
|
||||
/** Type of action*/
|
||||
int mef_act_type;
|
||||
/** Operation code*/
|
||||
t_u32 op_code;
|
||||
/** NV Filter Criteria*/
|
||||
t_u32 criteria;
|
||||
/** NV MEF entry*/
|
||||
|
@ -4988,6 +5247,34 @@ typedef struct _mlan_ds_ssu_params {
|
|||
} mlan_ds_ssu_params;
|
||||
#endif
|
||||
|
||||
#define CSI_FILTER_MAX 16
|
||||
/** Structure of CSI filters */
|
||||
typedef MLAN_PACK_START struct _mlan_csi_filter_t {
|
||||
/** Source address of the packet to receive */
|
||||
t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Pakcet type of the interested CSI */
|
||||
t_u8 pkt_type;
|
||||
/* Packet subtype of the interested CSI */
|
||||
t_u8 subtype;
|
||||
/* Other filter flags */
|
||||
t_u8 flags;
|
||||
} MLAN_PACK_END mlan_csi_filter_t;
|
||||
/** Structure of CSI parameters */
|
||||
typedef MLAN_PACK_START struct _mlan_ds_csi_params {
|
||||
/** CSI enable flag. 1: enable, 0: disable */
|
||||
t_u16 csi_enable;
|
||||
/** Header ID*/
|
||||
t_u32 head_id;
|
||||
/** Tail ID */
|
||||
t_u32 tail_id;
|
||||
/** Number of CSI filters */
|
||||
t_u8 csi_filter_cnt;
|
||||
/** Chip ID */
|
||||
t_u8 chip_id;
|
||||
/** CSI filters */
|
||||
mlan_csi_filter_t csi_filter[CSI_FILTER_MAX];
|
||||
} MLAN_PACK_END mlan_ds_csi_params;
|
||||
|
||||
typedef MLAN_PACK_START struct _mlan_ds_hal_phy_cfg_params {
|
||||
/** 11b pwr spectral density mask enable/disable */
|
||||
t_u8 dot11b_psd_mask_cfg;
|
||||
|
@ -5195,6 +5482,31 @@ typedef struct _mlan_ds_misc_cfp_tbl {
|
|||
chan_freq_power_t cfp_tbl[];
|
||||
} mlan_ds_misc_cfp_tbl;
|
||||
|
||||
/** mlan_ds_mc_aggr_cfg for MLAN_OID_MISC_MC_AGGR_CFG */
|
||||
typedef struct _mlan_ds_mc_aggr_cfg {
|
||||
/** action */
|
||||
t_u8 action;
|
||||
/* 1 enable, 0 disable
|
||||
* bit 0 MC aggregation
|
||||
* bit 1 packet expiry
|
||||
* bit 2 CTS2Self
|
||||
* bit 3 CTS2Self duration offset*/
|
||||
t_u8 enable_bitmap;
|
||||
/* 1 valid, 0 invalid
|
||||
* bit 0 MC aggregation
|
||||
* bit 1 packet expiry
|
||||
* bit 2 CTS2Self
|
||||
* bit 3 CTS2Self duration offset*/
|
||||
t_u8 mask_bitmap;
|
||||
/** CTS2Self duration offset */
|
||||
t_u16 cts2self_offset;
|
||||
} mlan_ds_mc_aggr_cfg;
|
||||
typedef struct _mlan_ds_ch_load {
|
||||
/** action */
|
||||
t_u8 action;
|
||||
t_u16 ch_load_param;
|
||||
} mlan_ds_ch_load;
|
||||
|
||||
/** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */
|
||||
typedef struct _mlan_ds_misc_cfg {
|
||||
/** Sub-command */
|
||||
|
@ -5217,6 +5529,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
t_u32 wws_cfg;
|
||||
/** Get associate response for MLAN_OID_MISC_ASSOC_RSP */
|
||||
mlan_ds_misc_assoc_rsp assoc_resp;
|
||||
/** Get associate request for MLAN_OID_MISC_ASSOC_REQ */
|
||||
mlan_ds_misc_assoc_req assoc_req;
|
||||
/** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */
|
||||
t_u32 func_init_shutdown;
|
||||
/** Custom IE for MLAN_OID_MISC_CUSTOM_IE */
|
||||
|
@ -5232,10 +5546,14 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_misc_tdls_ies tdls_ies;
|
||||
/**tdls cs off channel*/
|
||||
t_u8 tdls_cs_channel;
|
||||
/** Net monitor for MLAN_OID_MISC_NET_MONITOR */
|
||||
mlan_ds_misc_net_monitor net_mon;
|
||||
/** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */
|
||||
mlan_ds_misc_tx_datapause tx_datapause;
|
||||
/** IP address configuration */
|
||||
mlan_ds_misc_ipaddr_cfg ipaddr_cfg;
|
||||
/** IPv6 Router Advertisement offload configuration */
|
||||
mlan_ds_misc_ipv6_ra_offload ipv6_ra_offload;
|
||||
/** MAC control for MLAN_OID_MISC_MAC_CONTROL */
|
||||
t_u32 mac_ctrl;
|
||||
/** MEF configuration for MLAN_OID_MISC_MEF_CFG */
|
||||
|
@ -5274,6 +5592,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
mlan_ds_wifi_direct_config p2p_config;
|
||||
#endif
|
||||
mlan_ds_gpio_tsf_latch gpio_tsf_latch_config;
|
||||
mlan_ds_tsf_info tsf_info;
|
||||
mlan_ds_coalesce_cfg coalesce_cfg;
|
||||
t_u8 low_pwr_mode;
|
||||
/** MEF-FLT-CONFIG for MLAN_OID_MISC_NV_FLT_CFG */
|
||||
|
@ -5289,6 +5609,8 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_misc_gtk_rekey_data gtk_rekey;
|
||||
mlan_ds_bw_chan_oper bw_chan_oper;
|
||||
mlan_ds_ind_rst_cfg ind_rst_cfg;
|
||||
/** Roam offload */
|
||||
mlan_ds_misc_roam_offload roam_offload;
|
||||
t_u64 misc_tsf;
|
||||
mlan_ds_custom_reg_domain custom_reg_domain;
|
||||
mlan_ds_misc_keep_alive keep_alive;
|
||||
|
@ -5300,6 +5622,7 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
#if defined(PCIE)
|
||||
mlan_ds_ssu_params ssu_params;
|
||||
#endif
|
||||
mlan_ds_csi_params csi_params;
|
||||
/** boot sleep enable or disable */
|
||||
t_u16 boot_sleep;
|
||||
/** Mapping Policy */
|
||||
|
@ -5325,6 +5648,12 @@ typedef struct _mlan_ds_misc_cfg {
|
|||
mlan_ds_misc_dot11mc_unassoc_ftm_cfg dot11mc_unassoc_ftm_cfg;
|
||||
mlan_ds_misc_tp_state tp_state;
|
||||
mlan_ds_hal_phy_cfg_params hal_phy_cfg_params;
|
||||
mlan_ds_mc_aggr_cfg mc_aggr_cfg;
|
||||
#ifdef UAP_SUPPORT
|
||||
t_u8 wacp_mode;
|
||||
#endif
|
||||
t_u32 ips_ctrl;
|
||||
mlan_ds_ch_load ch_load;
|
||||
} param;
|
||||
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;
|
||||
|
||||
|
|
|
@ -3,20 +3,28 @@
|
|||
* @brief This file contains the functions for CFG80211.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2021 NXP
|
||||
* Copyright 2011-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -127,6 +135,9 @@ static struct ieee80211_channel cfg80211_channels_5ghz[] = {
|
|||
{.center_freq = 5785, .hw_value = 157, .max_power = 20},
|
||||
{.center_freq = 5805, .hw_value = 161, .max_power = 20},
|
||||
{.center_freq = 5825, .hw_value = 165, .max_power = 20},
|
||||
{.center_freq = 5845, .hw_value = 169, .max_power = 20},
|
||||
{.center_freq = 5865, .hw_value = 173, .max_power = 20},
|
||||
{.center_freq = 5885, .hw_value = 177, .max_power = 20},
|
||||
};
|
||||
|
||||
struct ieee80211_supported_band cfg80211_band_2ghz = {
|
||||
|
@ -145,50 +156,7 @@ struct ieee80211_supported_band cfg80211_band_5ghz = {
|
|||
.n_bitrates = ARRAY_SIZE(cfg80211_rates) - 4,
|
||||
};
|
||||
|
||||
/** Channel definitions for 5 GHz to be advertised to cfg80211 */
|
||||
static struct ieee80211_channel mac1_cfg80211_channels_5ghz[] = {
|
||||
{.center_freq = 5180, .hw_value = 36, .max_power = 20},
|
||||
{.center_freq = 5200, .hw_value = 40, .max_power = 20},
|
||||
{.center_freq = 5220, .hw_value = 44, .max_power = 20},
|
||||
{.center_freq = 5240, .hw_value = 48, .max_power = 20},
|
||||
{.center_freq = 5260, .hw_value = 52, .max_power = 20},
|
||||
{.center_freq = 5280, .hw_value = 56, .max_power = 20},
|
||||
{.center_freq = 5300, .hw_value = 60, .max_power = 20},
|
||||
{.center_freq = 5320, .hw_value = 64, .max_power = 20},
|
||||
{.center_freq = 5500, .hw_value = 100, .max_power = 20},
|
||||
{.center_freq = 5520, .hw_value = 104, .max_power = 20},
|
||||
{.center_freq = 5540, .hw_value = 108, .max_power = 20},
|
||||
{.center_freq = 5560, .hw_value = 112, .max_power = 20},
|
||||
{.center_freq = 5580, .hw_value = 116, .max_power = 20},
|
||||
{.center_freq = 5600, .hw_value = 120, .max_power = 20},
|
||||
{.center_freq = 5620, .hw_value = 124, .max_power = 20},
|
||||
{.center_freq = 5640, .hw_value = 128, .max_power = 20},
|
||||
{.center_freq = 5660, .hw_value = 132, .max_power = 20},
|
||||
{.center_freq = 5680, .hw_value = 136, .max_power = 20},
|
||||
{.center_freq = 5700, .hw_value = 140, .max_power = 20},
|
||||
{.center_freq = 5720, .hw_value = 144, .max_power = 20},
|
||||
{.center_freq = 5745, .hw_value = 149, .max_power = 20},
|
||||
{.center_freq = 5765, .hw_value = 153, .max_power = 20},
|
||||
{.center_freq = 5785, .hw_value = 157, .max_power = 20},
|
||||
{.center_freq = 5805, .hw_value = 161, .max_power = 20},
|
||||
{.center_freq = 5825, .hw_value = 165, .max_power = 20},
|
||||
};
|
||||
|
||||
struct ieee80211_supported_band mac1_cfg80211_band_2ghz = {
|
||||
.channels = cfg80211_channels_2ghz,
|
||||
.band = IEEE80211_BAND_2GHZ,
|
||||
.n_channels = ARRAY_SIZE(cfg80211_channels_2ghz),
|
||||
.bitrates = cfg80211_rates,
|
||||
.n_bitrates = ARRAY_SIZE(cfg80211_rates),
|
||||
};
|
||||
|
||||
struct ieee80211_supported_band mac1_cfg80211_band_5ghz = {
|
||||
.channels = mac1_cfg80211_channels_5ghz,
|
||||
.band = IEEE80211_BAND_5GHZ,
|
||||
.n_channels = ARRAY_SIZE(mac1_cfg80211_channels_5ghz),
|
||||
.bitrates = cfg80211_rates + 4,
|
||||
.n_bitrates = ARRAY_SIZE(cfg80211_rates) - 4,
|
||||
};
|
||||
extern pmoal_handle m_handle[];
|
||||
|
||||
#if KERNEL_VERSION(2, 6, 29) < LINUX_VERSION_CODE
|
||||
#ifdef UAP_SUPPORT
|
||||
|
@ -412,6 +380,7 @@ mlan_status woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep,
|
|||
cipher != WLAN_CIPHER_SUITE_GCMP &&
|
||||
#endif
|
||||
#if KERNEL_VERSION(4, 0, 0) <= CFG80211_VERSION_CODE
|
||||
cipher != WLAN_CIPHER_SUITE_BIP_GMAC_128 &&
|
||||
cipher != WLAN_CIPHER_SUITE_BIP_GMAC_256 &&
|
||||
cipher != WLAN_CIPHER_SUITE_GCMP_256 &&
|
||||
#endif
|
||||
|
@ -480,11 +449,21 @@ mlan_status woal_cfg80211_set_key(moal_private *priv, t_u8 is_enable_wep,
|
|||
|
||||
if (cipher == WLAN_CIPHER_SUITE_AES_CMAC
|
||||
#if KERNEL_VERSION(4, 0, 0) <= CFG80211_VERSION_CODE
|
||||
|| cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256
|
||||
|| cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 ||
|
||||
cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256
|
||||
#endif
|
||||
) {
|
||||
sec->param.encrypt_key.key_flags |=
|
||||
KEY_FLAG_AES_MCAST_IGTK;
|
||||
|
||||
#if KERNEL_VERSION(4, 0, 0) <= CFG80211_VERSION_CODE
|
||||
if (cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128)
|
||||
sec->param.encrypt_key.key_flags |=
|
||||
KEY_FLAG_GMAC_128;
|
||||
else if (cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256)
|
||||
sec->param.encrypt_key.key_flags |=
|
||||
KEY_FLAG_GMAC_256;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
if (key_index == KEY_INDEX_CLEAR_ALL)
|
||||
|
@ -1035,6 +1014,11 @@ int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_MONITOR) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (priv->wdev->iftype == type) {
|
||||
PRINTM(MINFO, "Already set to required type\n");
|
||||
goto done;
|
||||
|
@ -1511,6 +1495,17 @@ int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if KERNEL_VERSION(5, 10, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_default_beacon_key(struct wiphy *wiphy,
|
||||
struct net_device *netdev,
|
||||
t_u8 key_index)
|
||||
{
|
||||
PRINTM(MINFO, "set default beacon key, key index=%d\n", key_index);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if KERNEL_VERSION(3, 1, 0) <= CFG80211_VERSION_CODE
|
||||
/**
|
||||
* @brief Set GTK rekey data to driver
|
||||
|
@ -2436,7 +2431,11 @@ static void woal_cancel_chanrpt_event(moal_private *priv)
|
|||
return;
|
||||
}
|
||||
evt->priv = priv;
|
||||
#ifdef UAP_CFG80211
|
||||
#if KERNEL_VERSION(3, 12, 0) <= CFG80211_VERSION_CODE
|
||||
evt->type = WOAL_EVENT_CANCEL_CHANRPT;
|
||||
#endif
|
||||
#endif
|
||||
INIT_LIST_HEAD(&evt->link);
|
||||
spin_lock_irqsave(&handle->evt_lock, flags);
|
||||
list_add_tail(&evt->link, &handle->evt_queue);
|
||||
|
@ -2639,11 +2638,22 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
|
|||
break;
|
||||
case IEEE80211_STYPE_DEAUTH:
|
||||
case IEEE80211_STYPE_DISASSOC:
|
||||
/* Need cancel the CAC when stop hostapd during
|
||||
* CAC*/
|
||||
#ifdef UAP_CFG80211
|
||||
#if KERNEL_VERSION(3, 12, 0) <= CFG80211_VERSION_CODE
|
||||
if (priv->phandle->is_cac_timer_set)
|
||||
woal_cancel_chanrpt_event(priv);
|
||||
#endif
|
||||
#endif
|
||||
if (!priv->bss_started) {
|
||||
PRINTM(MCMND,
|
||||
"Drop deauth packet before AP started\n");
|
||||
goto done;
|
||||
}
|
||||
PRINTM(MMSG,
|
||||
"wlan: HostMlme %s send deauth/disassoc\n",
|
||||
priv->netdev->name);
|
||||
if (priv->phandle->is_cac_timer_set)
|
||||
woal_cancel_chanrpt_event(priv);
|
||||
|
||||
break;
|
||||
case IEEE80211_STYPE_ASSOC_RESP:
|
||||
|
@ -2714,7 +2724,7 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
|
|||
woal_cancel_scan(priv, MOAL_IOCTL_WAIT);
|
||||
#endif
|
||||
|
||||
if (chan) {
|
||||
if (chan && priv->bss_type != MLAN_BSS_ROLE_UAP) {
|
||||
duration = (wait > MGMT_TX_DEFAULT_WAIT_TIME) ?
|
||||
wait :
|
||||
MGMT_TX_DEFAULT_WAIT_TIME;
|
||||
|
@ -4144,6 +4154,62 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Sets up the ieee80211_supported band
|
||||
* *
|
||||
* @param ht_info A pointer to ieee80211_sta_ht_cap structure
|
||||
* @param dev_cap Device capability information
|
||||
* @param mcs_set Device MCS sets
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
struct ieee80211_supported_band *woal_setup_wiphy_bands(t_u8 ieee_band)
|
||||
{
|
||||
struct ieee80211_supported_band *band = NULL;
|
||||
switch (ieee_band) {
|
||||
case IEEE80211_BAND_5GHZ:
|
||||
band = kmemdup(&cfg80211_band_5ghz,
|
||||
sizeof(struct ieee80211_supported_band),
|
||||
GFP_KERNEL);
|
||||
if (!band) {
|
||||
PRINTM(MERROR, "No memory for band\n");
|
||||
break;
|
||||
}
|
||||
band->channels =
|
||||
kmemdup(&cfg80211_channels_5ghz,
|
||||
sizeof(cfg80211_channels_5ghz), GFP_KERNEL);
|
||||
if (!band->channels) {
|
||||
PRINTM(MERROR, "No memory for band->channel\n");
|
||||
kfree(band);
|
||||
band = NULL;
|
||||
break;
|
||||
}
|
||||
band->n_channels = ARRAY_SIZE(cfg80211_channels_5ghz);
|
||||
break;
|
||||
case IEEE80211_BAND_2GHZ:
|
||||
default:
|
||||
band = kmemdup(&cfg80211_band_2ghz,
|
||||
sizeof(struct ieee80211_supported_band),
|
||||
GFP_KERNEL);
|
||||
if (!band) {
|
||||
PRINTM(MERROR, "No memory for band\n");
|
||||
break;
|
||||
}
|
||||
band->channels =
|
||||
kmemdup(&cfg80211_channels_2ghz,
|
||||
sizeof(cfg80211_channels_2ghz), GFP_KERNEL);
|
||||
if (!band->channels) {
|
||||
PRINTM(MERROR, "No memory for band->channel\n");
|
||||
kfree(band);
|
||||
band = NULL;
|
||||
break;
|
||||
}
|
||||
band->n_channels = ARRAY_SIZE(cfg80211_channels_2ghz);
|
||||
break;
|
||||
}
|
||||
return band;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Sets up the CFG802.11 specific HT capability fields
|
||||
* with default values
|
||||
|
@ -4363,12 +4429,12 @@ Bit75: 0x1 (Rx 1024-QAM Support < 242-tone RU)
|
|||
|
||||
/**
|
||||
* @brief update 11ax ie for AP mode *
|
||||
* @param band band config
|
||||
* @hecap_ie a pointer to mlan_ds_11ax_he_capa
|
||||
* @param band channel band
|
||||
* @hecap_ie a pointer to mlan_ds_11ax_he_capa
|
||||
*
|
||||
* @return 0--success, otherwise failure
|
||||
*/
|
||||
void woal_uap_update_11ax_ie(t_u8 band, mlan_ds_11ax_he_capa *hecap_ie)
|
||||
static void woal_uap_update_11ax_ie(t_u8 band, mlan_ds_11ax_he_capa *hecap_ie)
|
||||
{
|
||||
if (band == BAND_5GHZ) {
|
||||
hecap_ie->he_mac_cap[0] &= UAP_HE_MAC_CAP0_MASK;
|
||||
|
@ -4449,6 +4515,7 @@ void woal_cfg80211_setup_he_cap(moal_private *priv,
|
|||
PRINTM(MERROR, "Fail to allocate iftype data\n");
|
||||
goto done;
|
||||
}
|
||||
memset(iftype_data, 0, sizeof(struct ieee80211_sband_iftype_data));
|
||||
iftype_data->types_mask =
|
||||
MBIT(NL80211_IFTYPE_STATION) | MBIT(NL80211_IFTYPE_AP) |
|
||||
MBIT(NL80211_IFTYPE_P2P_CLIENT) | MBIT(NL80211_IFTYPE_P2P_GO);
|
||||
|
@ -4500,6 +4567,8 @@ done:
|
|||
LEAVE();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief free iftype_data
|
||||
*
|
||||
|
@ -4508,20 +4577,24 @@ done:
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void woal_cfg80211_free_iftype_data(struct wiphy *wiphy)
|
||||
void woal_cfg80211_free_bands(struct wiphy *wiphy)
|
||||
{
|
||||
enum nl80211_band band;
|
||||
|
||||
for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; ++band) {
|
||||
for (band = NL80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; ++band) {
|
||||
if (!wiphy->bands[band])
|
||||
continue;
|
||||
if (!wiphy->bands[band]->iftype_data)
|
||||
continue;
|
||||
kfree(wiphy->bands[band]->iftype_data);
|
||||
wiphy->bands[band]->n_iftype_data = 0;
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||
if (wiphy->bands[band]->iftype_data) {
|
||||
kfree(wiphy->bands[band]->iftype_data);
|
||||
wiphy->bands[band]->n_iftype_data = 0;
|
||||
}
|
||||
#endif
|
||||
kfree(wiphy->bands[band]->channels);
|
||||
kfree(wiphy->bands[band]);
|
||||
wiphy->bands[band] = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @brief prepare and send fake deauth packet to cfg80211 to
|
||||
|
@ -4599,7 +4672,47 @@ void woal_cfg80211_notify_sched_scan_stop(moal_private *priv)
|
|||
#endif
|
||||
);
|
||||
priv->sched_scanning = MFALSE;
|
||||
PRINTM(MEVENT, "Sched_Scan stopped\n");
|
||||
PRINTM(MEVENT, "Notify sched scan stopped\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief sched_scan work handler
|
||||
*
|
||||
* @param work a pointer to work_struct
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
void woal_sched_scan_work_queue(struct work_struct *work)
|
||||
{
|
||||
struct delayed_work *delayed_work =
|
||||
container_of(work, struct delayed_work, work);
|
||||
moal_private *priv =
|
||||
container_of(delayed_work, moal_private, sched_scan_work);
|
||||
ENTER();
|
||||
|
||||
if (priv->sched_scanning)
|
||||
woal_cfg80211_notify_sched_scan_stop(priv);
|
||||
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief report sched_scan result to kernel
|
||||
*
|
||||
* @param priv A pointer moal_private structure
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void woal_report_sched_scan_result(moal_private *priv)
|
||||
{
|
||||
cfg80211_sched_scan_results(priv->wdev->wiphy
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
,
|
||||
priv->bg_scan_reqid
|
||||
#endif
|
||||
);
|
||||
queue_delayed_work(priv->sched_scan_workqueue, &priv->sched_scan_work,
|
||||
msecs_to_jiffies(2000));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -4776,7 +4889,6 @@ void woal_cfg80211_notify_antcfg(moal_private *priv, struct wiphy *wiphy,
|
|||
}
|
||||
#endif
|
||||
}
|
||||
bands->ht_cap.mcs.rx_mask[4] = 0;
|
||||
}
|
||||
|
||||
if (wiphy->bands[IEEE80211_BAND_5GHZ]) {
|
||||
|
@ -4794,6 +4906,10 @@ void woal_cfg80211_notify_antcfg(moal_private *priv, struct wiphy *wiphy,
|
|||
(__force __le16)0xfffe;
|
||||
bands->vht_cap.vht_mcs.tx_mcs_map =
|
||||
(__force __le16)0xfffe;
|
||||
bands->vht_cap.vht_mcs.rx_highest =
|
||||
(__force __le16)0x186;
|
||||
bands->vht_cap.vht_mcs.tx_highest =
|
||||
(__force __le16)0x186;
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||
if (bands->n_iftype_data &&
|
||||
bands->iftype_data &&
|
||||
|
@ -4824,6 +4940,10 @@ void woal_cfg80211_notify_antcfg(moal_private *priv, struct wiphy *wiphy,
|
|||
(__force __le16)0xfffa;
|
||||
bands->vht_cap.vht_mcs.tx_mcs_map =
|
||||
(__force __le16)0xfffa;
|
||||
bands->vht_cap.vht_mcs.rx_highest =
|
||||
(__force __le16)0x30c;
|
||||
bands->vht_cap.vht_mcs.tx_highest =
|
||||
(__force __le16)0x30c;
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||
if (bands->n_iftype_data &&
|
||||
bands->iftype_data &&
|
||||
|
@ -4916,3 +5036,169 @@ done:
|
|||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set given radar channel dfs_state to AVAILABLE
|
||||
*
|
||||
* @param wiphy A pointer to struct wiphy
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void woal_clear_wiphy_dfs_state(struct wiphy *wiphy)
|
||||
{
|
||||
struct ieee80211_supported_band *sband;
|
||||
int i;
|
||||
|
||||
ENTER();
|
||||
if (!wiphy) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
sband = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
|
||||
if (!sband) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & IEEE80211_CHAN_RADAR) {
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(3, 8, 13)
|
||||
if (sband->channels[i].dfs_state ==
|
||||
NL80211_DFS_UNAVAILABLE) {
|
||||
sband->channels[i].dfs_state =
|
||||
NL80211_DFS_USABLE;
|
||||
sband->channels[i].dfs_state_entered = jiffies;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set given radar channel dfs_state to AVAILABLE
|
||||
*
|
||||
* @param wiphy A pointer to struct wiphy
|
||||
* @param ch_dfs_state A pointer to struct mlan_ds_11h_chan_dfs_state
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
int woal_get_wiphy_chan_dfs_state(struct wiphy *wiphy,
|
||||
mlan_ds_11h_chan_dfs_state *ch_dfs_state)
|
||||
{
|
||||
struct ieee80211_supported_band *sband;
|
||||
int i;
|
||||
int ret = -1;
|
||||
t_u8 channel = ch_dfs_state->channel;
|
||||
|
||||
ENTER();
|
||||
if (!wiphy) {
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
sband = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
|
||||
if (!sband) {
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & IEEE80211_CHAN_RADAR) {
|
||||
if (sband->channels[i].hw_value == channel) {
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(3, 8, 13)
|
||||
ch_dfs_state->dfs_state =
|
||||
sband->channels[i].dfs_state;
|
||||
ch_dfs_state->dfs_required = MTRUE;
|
||||
ret = 0;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set given radar channel dfs_state to AVAILABLE
|
||||
*
|
||||
* @param wiphy A pointer to struct wiphy
|
||||
* @param channel given radar channel
|
||||
* @param dfs_state dfs_state
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void woal_update_wiphy_chan_dfs_state(struct wiphy *wiphy, t_u8 channel,
|
||||
t_u8 dfs_state)
|
||||
{
|
||||
struct ieee80211_supported_band *sband;
|
||||
int i;
|
||||
|
||||
ENTER();
|
||||
if (!wiphy) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
sband = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
|
||||
if (!sband) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & IEEE80211_CHAN_RADAR) {
|
||||
if (sband->channels[i].hw_value == channel) {
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(3, 8, 13)
|
||||
sband->channels[i].dfs_state = dfs_state;
|
||||
sband->channels[i].dfs_state_entered = jiffies;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if CFG80211_VERSION_CODE > KERNEL_VERSION(3, 8, 13)
|
||||
if (i < sband->n_channels)
|
||||
PRINTM(MCMND, "ZERODFS: Set channel %d dfs_state: %d\n",
|
||||
channel, sband->channels[i].dfs_state);
|
||||
#endif
|
||||
LEAVE();
|
||||
}
|
||||
/**
|
||||
* @brief Set given radar channel dfs_state
|
||||
*
|
||||
* @param wiphy A pointer to wiphy structure
|
||||
* @param channel given radar channel
|
||||
* @param dfs_state dfs_state
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void woal_update_wiphy_channel_dfs_state(struct wiphy *wiphy,
|
||||
t_u8 channel, t_u8 dfs_state)
|
||||
{
|
||||
if (!wiphy) {
|
||||
LEAVE();
|
||||
return;
|
||||
}
|
||||
woal_update_wiphy_chan_dfs_state(wiphy, channel, dfs_state);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief update channel dfs state to all wiphy
|
||||
*
|
||||
* @param channel given radar channel
|
||||
* @param dfs_state dfs_state
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void woal_update_channel_dfs_state(t_u8 channel, t_u8 dfs_state)
|
||||
{
|
||||
int index;
|
||||
for (index = 0; index < MAX_MLAN_ADAPTER; index++) {
|
||||
if (m_handle[index] && m_handle[index]->wiphy)
|
||||
woal_update_wiphy_channel_dfs_state(
|
||||
m_handle[index]->wiphy, channel, dfs_state);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,20 +3,28 @@
|
|||
* @brief This file contains the CFG80211 specific defines.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2021 NXP
|
||||
* Copyright 2011-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -48,6 +56,9 @@
|
|||
#define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
|
||||
#endif
|
||||
#if KERNEL_VERSION(4, 0, 0) <= CFG80211_VERSION_CODE
|
||||
#ifndef WLAN_CIPHER_SUITE_BIP_GMAC_128
|
||||
#define WLAN_CIPHER_SUITE_BIP_GMAC_128 0x000FAC0B
|
||||
#endif
|
||||
#ifndef WLAN_CIPHER_SUITE_BIP_GMAC_256
|
||||
#define WLAN_CIPHER_SUITE_BIP_GMAC_256 0x000FAC0C
|
||||
#endif
|
||||
|
@ -74,6 +85,8 @@ mlan_status woal_cfg80211_set_wep_keys(moal_private *priv, const t_u8 *key,
|
|||
int key_len, t_u8 index,
|
||||
t_u8 wait_option);
|
||||
|
||||
t_u8 is_cfg80211_special_region_code(t_u8 *region_string);
|
||||
|
||||
/**
|
||||
* If multiple wiphys are registered e.g. a regular netdev with
|
||||
* assigned ieee80211_ptr and you won't know whether it points
|
||||
|
@ -101,10 +114,14 @@ pmoal_private woal_get_scan_interface(pmoal_handle handle);
|
|||
void woal_host_mlme_disconnect(pmoal_private priv, u16 reason_code, u8 *sa);
|
||||
void woal_host_mlme_work_queue(struct work_struct *work);
|
||||
void woal_host_mlme_process_assoc_resp(moal_private *priv,
|
||||
mlan_ds_misc_assoc_rsp *assoc_rsp);
|
||||
mlan_ds_assoc_info *assoc_info);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
void woal_regulatory_work_queue(struct work_struct *work);
|
||||
#endif
|
||||
|
||||
t_u8 woal_band_cfg_to_ieee_band(t_u32 band);
|
||||
|
||||
int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
|
||||
|
@ -206,6 +223,12 @@ int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
|
|||
t_u8 key_index);
|
||||
#endif
|
||||
|
||||
#if KERNEL_VERSION(5, 10, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_default_beacon_key(struct wiphy *wiphy,
|
||||
struct net_device *netdev,
|
||||
t_u8 key_index);
|
||||
#endif
|
||||
|
||||
#if KERNEL_VERSION(3, 1, 0) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_rekey_data(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_gtk_rekey_data *data);
|
||||
|
@ -309,9 +332,7 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
|||
int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev);
|
||||
#endif
|
||||
|
||||
#if defined(WIFI_DIRECT_SUPPORT)
|
||||
void woal_remove_virtual_interface(moal_handle *handle);
|
||||
#endif
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
/* Group Owner Negotiation Req */
|
||||
|
@ -356,7 +377,7 @@ int woal_cfg80211_deinit_p2p(moal_private *priv);
|
|||
#endif /* WIFI_DIRECT_SUPPORT */
|
||||
|
||||
/** Define for remain on channel duration timer */
|
||||
#define MAX_REMAIN_ON_CHANNEL_DURATION (1000)
|
||||
#define MAX_REMAIN_ON_CHANNEL_DURATION (5000)
|
||||
|
||||
int woal_cfg80211_remain_on_channel_cfg(moal_private *priv, t_u8 wait_option,
|
||||
t_u8 remove, t_u8 *status,
|
||||
|
@ -453,6 +474,8 @@ void woal_channel_switch_event(moal_private *priv, chan_band_info *pchan_info);
|
|||
#if KERNEL_VERSION(3, 2, 0) <= CFG80211_VERSION_CODE
|
||||
void woal_bgscan_stop_event(moal_private *priv);
|
||||
void woal_cfg80211_notify_sched_scan_stop(moal_private *priv);
|
||||
void woal_sched_scan_work_queue(struct work_struct *work);
|
||||
void woal_report_sched_scan_result(moal_private *priv);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -473,9 +496,11 @@ mlan_status woal_chandef_create(moal_private *priv,
|
|||
#if KERNEL_VERSION(4, 20, 0) <= CFG80211_VERSION_CODE
|
||||
void woal_cfg80211_setup_he_cap(moal_private *priv,
|
||||
struct ieee80211_supported_band *band);
|
||||
void woal_cfg80211_free_iftype_data(struct wiphy *wiphy);
|
||||
#endif
|
||||
|
||||
void woal_cfg80211_free_bands(struct wiphy *wiphy);
|
||||
struct ieee80211_supported_band *woal_setup_wiphy_bands(t_u8 ieee_band);
|
||||
|
||||
void woal_clear_all_mgmt_ies(moal_private *priv, t_u8 wait_option);
|
||||
int woal_cfg80211_mgmt_frame_ie(
|
||||
moal_private *priv, const t_u8 *beacon_ies, size_t beacon_ies_len,
|
||||
|
@ -495,4 +520,8 @@ void woal_cfg80211_setup_vht_cap(moal_private *priv,
|
|||
int woal_cfg80211_assoc(moal_private *priv, void *sme, t_u8 wait_option,
|
||||
pmlan_ds_misc_assoc_rsp assoc_rsp);
|
||||
|
||||
void woal_clear_wiphy_dfs_state(struct wiphy *wiphy);
|
||||
void woal_update_channel_dfs_state(t_u8 channel, t_u8 dfs_state);
|
||||
int woal_get_wiphy_chan_dfs_state(struct wiphy *wiphy,
|
||||
mlan_ds_11h_chan_dfs_state *ch_dfs_state);
|
||||
#endif /* _MOAL_CFG80211_H_ */
|
||||
|
|
|
@ -3,20 +3,28 @@
|
|||
* @brief This file contains the functions for CFG80211 vendor.
|
||||
*
|
||||
*
|
||||
* Copyright 2015-2021 NXP
|
||||
* Copyright 2015-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -48,10 +56,22 @@ static const struct nl80211_vendor_cmd_info vendor_events[] = {
|
|||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = event_hang,
|
||||
}, /*event_id 0*/
|
||||
{
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = event_fw_dump_done,
|
||||
}, /*event_id 1*/
|
||||
{
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = event_rssi_monitor,
|
||||
}, /*event_id 0x1501*/
|
||||
{
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = event_set_key_mgmt_offload,
|
||||
}, /*event_id 0x10001*/
|
||||
{
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = event_fw_roam_success,
|
||||
}, /*event_id 0x10002*/
|
||||
{
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = event_cloud_keep_alive,
|
||||
|
@ -242,6 +262,20 @@ int woal_cfg80211_vendor_event(moal_private *priv, int event, t_u8 *data,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief send fw dump complete event to vendorhal
|
||||
*
|
||||
* @param priv A pointer to moal_private
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void woal_cfg80211_vendor_event_fw_dump(moal_private *priv)
|
||||
{
|
||||
PRINTM(MEVENT, "wlan: Notify FW dump complete event\n");
|
||||
woal_cfg80211_vendor_event(priv, event_fw_dump_done, CUS_EVT_FW_DUMP,
|
||||
strlen(CUS_EVT_FW_DUMP));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief send dfs vendor event to kernel
|
||||
*
|
||||
|
@ -675,7 +709,6 @@ static int woal_cfg80211_subcmd_get_drv_dump(struct wiphy *wiphy,
|
|||
int ret = MLAN_STATUS_SUCCESS;
|
||||
int length = 0;
|
||||
char driver_dump_file[128];
|
||||
char path_name[64];
|
||||
struct sk_buff *skb = NULL;
|
||||
|
||||
ENTER();
|
||||
|
@ -687,12 +720,12 @@ static int woal_cfg80211_subcmd_get_drv_dump(struct wiphy *wiphy,
|
|||
dev = wdev->netdev;
|
||||
priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
handle = priv->phandle;
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
woal_create_dump_dir(handle, path_name, sizeof(path_name));
|
||||
PRINTM(MMSG, "driver dump path name is %s\n", path_name);
|
||||
woal_dump_drv_info(handle, path_name);
|
||||
memset(driver_dump_file, 0, sizeof(driver_dump_file));
|
||||
sprintf(driver_dump_file, "%s/%s", path_name, "file_drv_info");
|
||||
sprintf(driver_dump_file, "/proc/mwlan/");
|
||||
if (handle->handle_idx)
|
||||
sprintf(driver_dump_file, "drv_dump%d", handle->handle_idx);
|
||||
else
|
||||
sprintf(driver_dump_file, "drv_dump");
|
||||
PRINTM(MMSG, "driver dump file is %s\n", driver_dump_file);
|
||||
length = sizeof(driver_dump_file);
|
||||
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, length);
|
||||
|
@ -731,29 +764,31 @@ static int woal_cfg80211_subcmd_get_supp_feature_set(struct wiphy *wiphy,
|
|||
int data_len)
|
||||
{
|
||||
struct sk_buff *skb = NULL;
|
||||
|
||||
struct net_device *dev = wdev->netdev;
|
||||
moal_private *priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
mlan_fw_info fw_info;
|
||||
|
||||
t_u32 reply_len = 0;
|
||||
int ret = 0;
|
||||
t_u32 supp_feature_set = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
supp_feature_set = WLAN_FEATURE_INFRA
|
||||
#if defined(UAP_SUPPORT) && defined(STA_SUPPORT)
|
||||
| WLAN_FEATURE_AP_STA
|
||||
#endif
|
||||
| WLAN_FEATURE_LINK_LAYER_STATS |
|
||||
WLAN_FEATURE_LOGGER | WLAN_FEATURE_RSSI_MONITOR |
|
||||
WLAN_FEATURE_CONFIG_NDO |
|
||||
WLAN_FEATURE_CONTROL_ROAMING |
|
||||
WLAN_FEATURE_SCAN_RAND | WLAN_FEATURE_MKEEP_ALIVE;
|
||||
WLAN_FEATURE_CONFIG_NDO | WLAN_FEATURE_SCAN_RAND |
|
||||
WLAN_FEATURE_MKEEP_ALIVE;
|
||||
|
||||
memset(&fw_info, 0, sizeof(mlan_fw_info));
|
||||
woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info);
|
||||
if (fw_info.fw_bands & BAND_A)
|
||||
supp_feature_set |= WLAN_FEATURE_INFRA_5G;
|
||||
if (fw_info.fw_roaming_support)
|
||||
supp_feature_set |= WLAN_FEATURE_CONTROL_ROAMING;
|
||||
|
||||
reply_len = sizeof(supp_feature_set);
|
||||
/** Allocate skb for cmd reply*/
|
||||
|
@ -2284,7 +2319,7 @@ static int woal_cfg80211_subcmd_set_packet_filter(struct wiphy *wiphy,
|
|||
MIN(packet_filter_len, nla_len(iter));
|
||||
pkt_filter->state = PACKET_FILTER_STATE_START;
|
||||
spin_unlock_irqrestore(&pkt_filter->lock, flags);
|
||||
DBG_HEXDUMP(MCMD_D, "packet_filter_program",
|
||||
DBG_HEXDUMP(MDAT_D, "packet_filter_program",
|
||||
pkt_filter->packet_filter_program,
|
||||
pkt_filter->packet_filter_len);
|
||||
break;
|
||||
|
@ -2678,10 +2713,10 @@ int woal_filter_packet(moal_private *priv, t_u8 *data, t_u32 len,
|
|||
if (pkt_filter->state != PACKET_FILTER_STATE_START)
|
||||
goto done;
|
||||
|
||||
DBG_HEXDUMP(MCMD_D, "packet_filter_program",
|
||||
DBG_HEXDUMP(MDAT_D, "packet_filter_program",
|
||||
pkt_filter->packet_filter_program,
|
||||
pkt_filter->packet_filter_len);
|
||||
DBG_HEXDUMP(MCMD_D, "packet_filter_data", data, len);
|
||||
DBG_HEXDUMP(MDAT_D, "packet_filter_data", data, len);
|
||||
spin_lock_irqsave(&pkt_filter->lock, flags);
|
||||
ret = process_packet(pkt_filter->packet_filter_program,
|
||||
pkt_filter->packet_filter_len, data, len,
|
||||
|
@ -2756,15 +2791,11 @@ static int woal_cfg80211_subcmd_link_statistic_get(struct wiphy *wiphy,
|
|||
t_u32 num_radio = 0, iface_stat_len = 0, radio_stat_len = 0;
|
||||
int err = -1, length = 0, i;
|
||||
char *ioctl_link_stats_buf = NULL;
|
||||
mlan_ds_get_stats stats;
|
||||
t_u64 cur_time = 0;
|
||||
t_u64 inter_msec = 0;
|
||||
t_u64 max_msec = (t_u64)24 * (t_u64)24 * (t_u64)3600 * (t_u64)1000;
|
||||
moal_handle *handle = priv->phandle;
|
||||
|
||||
if (priv->media_connected == MFALSE)
|
||||
return -EFAULT;
|
||||
|
||||
/* Allocate an IOCTL request buffer */
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) + BUF_MAXLEN);
|
||||
if (req == NULL) {
|
||||
|
@ -2785,14 +2816,6 @@ static int woal_cfg80211_subcmd_link_statistic_get(struct wiphy *wiphy,
|
|||
goto done;
|
||||
}
|
||||
|
||||
/* Get Log from the firmware */
|
||||
memset(&stats, 0, sizeof(mlan_ds_get_stats));
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_get_stats_info(priv, MOAL_IOCTL_WAIT, &stats)) {
|
||||
PRINTM(MERROR, "Error getting stats information\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
ioctl_link_stats_buf = info->param.link_statistic;
|
||||
num_radio = *((t_u32 *)info->param.link_statistic);
|
||||
|
||||
|
@ -2836,8 +2859,6 @@ static int woal_cfg80211_subcmd_link_statistic_get(struct wiphy *wiphy,
|
|||
iface_stat = (wifi_iface_stat *)(info->param.link_statistic +
|
||||
sizeof(num_radio) + radio_stat_len);
|
||||
iface_stat_len = sizeof(wifi_iface_stat);
|
||||
/* Fill some fileds */
|
||||
iface_stat->beacon_rx = stats.bcn_rcv_cnt;
|
||||
|
||||
/* could get peer info with separate cmd */
|
||||
for (i = 0; i < iface_stat->num_peers; i++) {
|
||||
|
@ -2866,38 +2887,38 @@ static int woal_cfg80211_subcmd_link_statistic_get(struct wiphy *wiphy,
|
|||
goto done;
|
||||
}
|
||||
|
||||
PRINTM(MCMD_D, "%s: <<< Start DUMP\n", __func__);
|
||||
PRINTM(MCMD_D, "sizeof(wifi_radio_stat)=%zu\n",
|
||||
PRINTM(MDAT_D, "%s: <<< Start DUMP\n", __func__);
|
||||
PRINTM(MDAT_D, "sizeof(wifi_radio_stat)=%zu\n",
|
||||
sizeof(wifi_radio_stat));
|
||||
DBG_HEXDUMP(MCMD_D, "radio_stat", (t_u8 *)radio_stat, radio_stat_len);
|
||||
PRINTM(MCMD_D, "sizeof(wifi_channel_stat)=%zu\n",
|
||||
DBG_HEXDUMP(MDAT_D, "radio_stat", (t_u8 *)radio_stat, radio_stat_len);
|
||||
PRINTM(MDAT_D, "sizeof(wifi_channel_stat)=%zu\n",
|
||||
sizeof(wifi_channel_stat));
|
||||
DBG_HEXDUMP(MCMD_D, "iface_stat", (t_u8 *)iface_stat, iface_stat_len);
|
||||
PRINTM(MCMD_D, "num_radio=%d\n", num_radio);
|
||||
DBG_HEXDUMP(MDAT_D, "iface_stat", (t_u8 *)iface_stat, iface_stat_len);
|
||||
PRINTM(MDAT_D, "num_radio=%d\n", num_radio);
|
||||
radio_stat_tmp = radio_stat;
|
||||
for (i = 0; i < num_radio; i++) {
|
||||
PRINTM(MCMD_D, "--radio_stat[%d]--\n", i);
|
||||
PRINTM(MCMD_D, "radio=%d\n", radio_stat_tmp->radio);
|
||||
PRINTM(MCMD_D, "on_time=%d\n", radio_stat_tmp->on_time);
|
||||
PRINTM(MCMD_D, "tx_time=%d\n", radio_stat_tmp->tx_time);
|
||||
PRINTM(MCMD_D, "reserved0=%d\n", radio_stat_tmp->reserved0);
|
||||
PRINTM(MCMD_D, "rx_time=%d\n", radio_stat_tmp->rx_time);
|
||||
PRINTM(MCMD_D, "on_time_scan=%d\n",
|
||||
PRINTM(MDAT_D, "--radio_stat[%d]--\n", i);
|
||||
PRINTM(MDAT_D, "radio=%d\n", radio_stat_tmp->radio);
|
||||
PRINTM(MDAT_D, "on_time=%d\n", radio_stat_tmp->on_time);
|
||||
PRINTM(MDAT_D, "tx_time=%d\n", radio_stat_tmp->tx_time);
|
||||
PRINTM(MDAT_D, "reserved0=%d\n", radio_stat_tmp->reserved0);
|
||||
PRINTM(MDAT_D, "rx_time=%d\n", radio_stat_tmp->rx_time);
|
||||
PRINTM(MDAT_D, "on_time_scan=%d\n",
|
||||
radio_stat_tmp->on_time_scan);
|
||||
PRINTM(MCMD_D, "on_time_nbd=%d\n", radio_stat_tmp->on_time_nbd);
|
||||
PRINTM(MCMD_D, "on_time_gscan=%d\n",
|
||||
PRINTM(MDAT_D, "on_time_nbd=%d\n", radio_stat_tmp->on_time_nbd);
|
||||
PRINTM(MDAT_D, "on_time_gscan=%d\n",
|
||||
radio_stat_tmp->on_time_gscan);
|
||||
PRINTM(MCMD_D, "on_time_roam_scan=%d\n",
|
||||
PRINTM(MDAT_D, "on_time_roam_scan=%d\n",
|
||||
radio_stat_tmp->on_time_roam_scan);
|
||||
PRINTM(MCMD_D, "on_time_pno_scan=%d\n",
|
||||
PRINTM(MDAT_D, "on_time_pno_scan=%d\n",
|
||||
radio_stat_tmp->on_time_pno_scan);
|
||||
PRINTM(MCMD_D, "on_time_hs20=%d\n",
|
||||
PRINTM(MDAT_D, "on_time_hs20=%d\n",
|
||||
radio_stat_tmp->on_time_hs20);
|
||||
PRINTM(MCMD_D, "num_channels=%d\n",
|
||||
PRINTM(MDAT_D, "num_channels=%d\n",
|
||||
radio_stat_tmp->num_channels);
|
||||
radio_stat_tmp++;
|
||||
}
|
||||
PRINTM(MCMD_D, "%s: >>> End DUMP\n", __func__);
|
||||
PRINTM(MDAT_D, "%s: >>> End DUMP\n", __func__);
|
||||
|
||||
err = cfg80211_vendor_cmd_reply(skb);
|
||||
if (unlikely(err))
|
||||
|
@ -3053,7 +3074,7 @@ static int woal_cfg80211_subcmd_link_statistic_clr(struct wiphy *wiphy,
|
|||
/* Send IOCTL request to MLAN */
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status == MLAN_STATUS_SUCCESS)
|
||||
PRINTM(MMSG, "enable link layer statistic successfully\n");
|
||||
PRINTM(MMSG, "disable link layer statistic successfully\n");
|
||||
|
||||
length = NLA_HDRLEN + sizeof(stats_clear_rsp_mask) + sizeof(stop_rsp);
|
||||
/* Alloc the SKB for vendor_event */
|
||||
|
@ -3231,6 +3252,170 @@ done:
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief vendor command to key_mgmt_set_key
|
||||
*
|
||||
* @param wiphy A pointer to wiphy struct
|
||||
* @param wdev A pointer to wireless_dev struct
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
*
|
||||
* @return 0: success fail otherwise
|
||||
*/
|
||||
static int
|
||||
woal_cfg80211_subcmd_set_roaming_offload_key(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int data_len)
|
||||
{
|
||||
moal_private *priv;
|
||||
struct net_device *dev;
|
||||
struct sk_buff *skb = NULL;
|
||||
t_u8 *pos = (t_u8 *)data;
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (data)
|
||||
DBG_HEXDUMP(MCMD_D, "Vendor pmk", (t_u8 *)data, data_len);
|
||||
|
||||
if (!wdev || !wdev->netdev) {
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
dev = wdev->netdev;
|
||||
priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
if (!priv || !pos) {
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (data_len > MLAN_MAX_KEY_LENGTH) {
|
||||
moal_memcpy_ext(priv->phandle, &priv->pmk.pmk_r0, pos,
|
||||
MLAN_MAX_KEY_LENGTH, MLAN_MAX_KEY_LENGTH);
|
||||
pos += MLAN_MAX_KEY_LENGTH;
|
||||
moal_memcpy_ext(priv->phandle, &priv->pmk.pmk_r0_name, pos,
|
||||
data_len - MLAN_MAX_KEY_LENGTH,
|
||||
MLAN_MAX_PMKR0_NAME_LENGTH);
|
||||
} else {
|
||||
moal_memcpy_ext(priv->phandle, &priv->pmk.pmk, data, data_len,
|
||||
MLAN_MAX_KEY_LENGTH);
|
||||
}
|
||||
priv->pmk_saved = MTRUE;
|
||||
|
||||
/** Allocate skb for cmd reply*/
|
||||
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, data_len);
|
||||
if (!skb) {
|
||||
PRINTM(MERROR, "allocate memory fail for vendor cmd\n");
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
pos = skb_put(skb, data_len);
|
||||
moal_memcpy_ext(priv->phandle, pos, data, data_len, data_len);
|
||||
ret = cfg80211_vendor_cmd_reply(skb);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to supplicant to update AP info
|
||||
*
|
||||
* @param priv A pointer to moal_private
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
*
|
||||
* @return 0: success 1: fail
|
||||
*/
|
||||
int woal_roam_ap_info(moal_private *priv, t_u8 *data, int len)
|
||||
{
|
||||
struct wiphy *wiphy = priv->wdev->wiphy;
|
||||
struct sk_buff *skb = NULL;
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
key_info *pkey = NULL;
|
||||
apinfo *pinfo = NULL;
|
||||
apinfo *req_tlv = NULL;
|
||||
MrvlIEtypesHeader_t *tlv = NULL;
|
||||
t_u16 tlv_type = 0, tlv_len = 0, tlv_buf_left = 0;
|
||||
int event_id = 0;
|
||||
t_u8 authorized = 1;
|
||||
|
||||
ENTER();
|
||||
|
||||
event_id = woal_get_event_id(event_fw_roam_success);
|
||||
if (event_max == event_id) {
|
||||
PRINTM(MERROR, "Not find this event %d\n", event_id);
|
||||
ret = 1;
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
/**allocate skb*/
|
||||
#if KERNEL_VERSION(4, 1, 0) <= CFG80211_VERSION_CODE
|
||||
skb = cfg80211_vendor_event_alloc(wiphy, priv->wdev, len + 50,
|
||||
#else
|
||||
skb = cfg80211_vendor_event_alloc(wiphy, len + 50,
|
||||
#endif
|
||||
event_id, GFP_ATOMIC);
|
||||
|
||||
if (!skb) {
|
||||
PRINTM(MERROR, "allocate memory fail for vendor event\n");
|
||||
ret = 1;
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
nla_put(skb, MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_BSSID,
|
||||
MLAN_MAC_ADDR_LENGTH, (t_u8 *)data);
|
||||
nla_put(skb, MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_AUTHORIZED,
|
||||
sizeof(authorized), &authorized);
|
||||
tlv = (MrvlIEtypesHeader_t *)(data + MLAN_MAC_ADDR_LENGTH);
|
||||
tlv_buf_left = len - MLAN_MAC_ADDR_LENGTH;
|
||||
while (tlv_buf_left >= sizeof(MrvlIEtypesHeader_t)) {
|
||||
tlv_type = woal_le16_to_cpu(tlv->type);
|
||||
tlv_len = woal_le16_to_cpu(tlv->len);
|
||||
|
||||
if (tlv_buf_left < (tlv_len + sizeof(MrvlIEtypesHeader_t))) {
|
||||
PRINTM(MERROR,
|
||||
"Error processing firmware roam success TLVs, bytes left < TLV length\n");
|
||||
break;
|
||||
}
|
||||
|
||||
switch (tlv_type) {
|
||||
case TLV_TYPE_APINFO:
|
||||
pinfo = (apinfo *)tlv;
|
||||
nla_put(skb, MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_RESP_IE,
|
||||
pinfo->header.len, pinfo->rsp_ie);
|
||||
break;
|
||||
case TLV_TYPE_ASSOC_REQ_IE:
|
||||
req_tlv = (apinfo *)tlv;
|
||||
nla_put(skb, MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_REQ_IE,
|
||||
req_tlv->header.len, req_tlv->rsp_ie);
|
||||
break;
|
||||
case TLV_TYPE_KEYINFO:
|
||||
pkey = (key_info *)tlv;
|
||||
nla_put(skb,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR,
|
||||
MLAN_REPLAY_CTR_LEN, pkey->key.replay_ctr);
|
||||
nla_put(skb, MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KCK,
|
||||
MLAN_KCK_LEN, pkey->key.kck);
|
||||
nla_put(skb, MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KEK,
|
||||
MLAN_KEK_LEN, pkey->key.kek);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tlv_buf_left -= tlv_len + sizeof(MrvlIEtypesHeader_t);
|
||||
tlv = (MrvlIEtypesHeader_t *)((t_u8 *)tlv + tlv_len +
|
||||
sizeof(MrvlIEtypesHeader_t));
|
||||
}
|
||||
|
||||
/**send event*/
|
||||
cfg80211_vendor_event(skb, GFP_ATOMIC);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to get fw roaming capability
|
||||
*
|
||||
|
@ -3303,6 +3488,11 @@ static int woal_cfg80211_subcmd_fw_roaming_enable(struct wiphy *wiphy,
|
|||
const struct nlattr *iter;
|
||||
int type, rem, err;
|
||||
t_u32 fw_roaming_enable = 0;
|
||||
#ifdef STA_CFG80211
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
t_u8 enable = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -3333,12 +3523,7 @@ static int woal_cfg80211_subcmd_fw_roaming_enable(struct wiphy *wiphy,
|
|||
|
||||
PRINTM(MMSG, "FW roaming set enable=%d from wifi hal.\n",
|
||||
fw_roaming_enable);
|
||||
#if defined(STA_CFG80211)
|
||||
if (fw_roaming_enable)
|
||||
priv->roaming_enabled = MTRUE;
|
||||
else
|
||||
priv->roaming_enabled = MFALSE;
|
||||
#endif
|
||||
ret = woal_enable_fw_roaming(priv, fw_roaming_enable);
|
||||
/* Alloc the SKB for vendor_event */
|
||||
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(t_u32) + 50);
|
||||
if (unlikely(!skb)) {
|
||||
|
@ -3352,6 +3537,14 @@ static int woal_cfg80211_subcmd_fw_roaming_enable(struct wiphy *wiphy,
|
|||
if (unlikely(err))
|
||||
PRINTM(MERROR, "Vendor Command reply failed ret:%d\n", err);
|
||||
|
||||
#ifdef STA_CFG80211
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
if (!fw_roaming_enable)
|
||||
woal_cfg80211_vendor_event(priv, event_set_key_mgmt_offload,
|
||||
&enable, sizeof(enable));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
|
@ -3376,6 +3569,7 @@ static int woal_cfg80211_subcmd_fw_roaming_config(struct wiphy *wiphy,
|
|||
int ret = MLAN_STATUS_SUCCESS;
|
||||
const struct nlattr *iter;
|
||||
int type, rem;
|
||||
woal_roam_offload_cfg *roam_offload_cfg = NULL;
|
||||
wifi_bssid_params blacklist;
|
||||
wifi_ssid_params whitelist;
|
||||
|
||||
|
@ -3415,7 +3609,60 @@ static int woal_cfg80211_subcmd_fw_roaming_config(struct wiphy *wiphy,
|
|||
}
|
||||
}
|
||||
|
||||
if (moal_extflg_isset(priv->phandle, EXT_ROAMOFFLOAD_IN_HS)) {
|
||||
/*save blacklist and whitelist in driver*/
|
||||
priv->phandle->fw_roam_params.black_list.ap_num =
|
||||
blacklist.num_bssid;
|
||||
moal_memcpy_ext(
|
||||
priv->phandle,
|
||||
(t_u8 *)priv->phandle->fw_roam_params.black_list.ap_mac,
|
||||
(t_u8 *)blacklist.mac_addr,
|
||||
sizeof(wifi_bssid_params) - sizeof(blacklist.num_bssid),
|
||||
sizeof(mlan_ds_misc_roam_offload_aplist) -
|
||||
sizeof(priv->phandle->fw_roam_params.black_list
|
||||
.ap_num));
|
||||
priv->phandle->fw_roam_params.ssid_list.ssid_num =
|
||||
whitelist.num_ssid;
|
||||
moal_memcpy_ext(
|
||||
priv->phandle,
|
||||
(t_u8 *)priv->phandle->fw_roam_params.ssid_list.ssids,
|
||||
(t_u8 *)whitelist.whitelist_ssid,
|
||||
sizeof(wifi_ssid_params) - sizeof(whitelist.num_ssid),
|
||||
MAX_SSID_NUM * sizeof(mlan_802_11_ssid));
|
||||
} else {
|
||||
roam_offload_cfg = (woal_roam_offload_cfg *)kmalloc(
|
||||
sizeof(woal_roam_offload_cfg), GFP_KERNEL);
|
||||
if (!roam_offload_cfg) {
|
||||
PRINTM(MERROR, "kmalloc failed!\n");
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
/*download parameters directly to fw*/
|
||||
memset((char *)roam_offload_cfg, 0,
|
||||
sizeof(woal_roam_offload_cfg));
|
||||
roam_offload_cfg->black_list.ap_num = blacklist.num_bssid;
|
||||
moal_memcpy_ext(priv->phandle,
|
||||
(t_u8 *)&roam_offload_cfg->black_list.ap_mac,
|
||||
(t_u8 *)blacklist.mac_addr,
|
||||
sizeof(wifi_bssid_params) -
|
||||
sizeof(blacklist.num_bssid),
|
||||
sizeof(mlan_ds_misc_roam_offload_aplist) -
|
||||
sizeof(priv->phandle->fw_roam_params
|
||||
.black_list.ap_num));
|
||||
roam_offload_cfg->ssid_list.ssid_num = whitelist.num_ssid;
|
||||
moal_memcpy_ext(priv->phandle,
|
||||
(t_u8 *)&roam_offload_cfg->ssid_list.ssids,
|
||||
(t_u8 *)whitelist.whitelist_ssid,
|
||||
sizeof(wifi_ssid_params) -
|
||||
sizeof(whitelist.num_ssid),
|
||||
MAX_SSID_NUM * sizeof(mlan_802_11_ssid));
|
||||
woal_config_fw_roaming(priv, ROAM_OFFLOAD_PARAM_CFG,
|
||||
roam_offload_cfg);
|
||||
}
|
||||
|
||||
done:
|
||||
if (roam_offload_cfg)
|
||||
kfree(roam_offload_cfg);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
@ -3787,6 +4034,348 @@ static int woal_cfg80211_subcmd_set_dfs_offload(struct wiphy *wiphy,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#define CSI_DUMP_FILE_MAX 1200000
|
||||
|
||||
/**
|
||||
* @brief vendor command to set CSI params
|
||||
*
|
||||
* @param wiphy A pointer to wiphy struct
|
||||
* @param wdev A pointer to wireless_dev struct
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
* @param csi_enable enable/disable CSI
|
||||
*
|
||||
* @return 0: success -1: fail
|
||||
*/
|
||||
static int woal_cfg80211_subcmd_set_csi(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int len,
|
||||
int csi_enable)
|
||||
{
|
||||
struct net_device *dev = NULL;
|
||||
moal_private *priv = NULL;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_misc_cfg *cfg = NULL;
|
||||
struct nlattr *tb_vendor[ATTR_CSI_MAX + 1];
|
||||
int ret = 0;
|
||||
int status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!wdev || !wdev->netdev) {
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
dev = wdev->netdev;
|
||||
priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
PRINTM(MERROR, "Could not allocate mlan ioctl request!\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
cfg = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
cfg->sub_command = MLAN_OID_MISC_CSI;
|
||||
|
||||
priv->csi_enable = csi_enable;
|
||||
if (csi_enable == 1) {
|
||||
nla_parse(tb_vendor, ATTR_CSI_MAX, (struct nlattr *)data, len,
|
||||
NULL
|
||||
#if KERNEL_VERSION(4, 12, 0) <= CFG80211_VERSION_CODE
|
||||
,
|
||||
NULL
|
||||
#endif
|
||||
);
|
||||
if (!tb_vendor[ATTR_CSI_CONFIG]) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
moal_memcpy_ext(priv->phandle, &cfg->param.csi_params,
|
||||
(mlan_ds_csi_params *)nla_data(
|
||||
tb_vendor[ATTR_CSI_CONFIG]),
|
||||
sizeof(mlan_ds_csi_params),
|
||||
sizeof(mlan_ds_csi_params));
|
||||
moal_memcpy_ext(priv->phandle, &priv->csi_config,
|
||||
&cfg->param.csi_params,
|
||||
sizeof(mlan_ds_csi_params),
|
||||
sizeof(mlan_ds_csi_params));
|
||||
if (tb_vendor[ATTR_CSI_DUMP_FORMAT])
|
||||
priv->csi_dump_format =
|
||||
nla_get_u8(tb_vendor[ATTR_CSI_DUMP_FORMAT]);
|
||||
} else if (csi_enable == 0) {
|
||||
nla_parse(tb_vendor, ATTR_CSI_MAX, (struct nlattr *)data, len,
|
||||
NULL
|
||||
#if KERNEL_VERSION(4, 12, 0) <= CFG80211_VERSION_CODE
|
||||
,
|
||||
NULL
|
||||
#endif
|
||||
);
|
||||
if (!tb_vendor[ATTR_PEER_MAC_ADDR]) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
memset(&cfg->param.csi_params, 0, sizeof(mlan_ds_csi_params));
|
||||
moal_memcpy_ext(priv->phandle,
|
||||
cfg->param.csi_params.csi_filter[0].mac_addr,
|
||||
(t_u8 *)nla_data(tb_vendor[ATTR_PEER_MAC_ADDR]),
|
||||
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH);
|
||||
}
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to enable CSI
|
||||
*
|
||||
* @param wiphy A pointer to wiphy struct
|
||||
* @param wdev A pointer to wireless_dev struct
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
*
|
||||
* @return 0: success -1: fail
|
||||
*/
|
||||
static int woal_cfg80211_subcmd_csi_enable(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int len)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = woal_cfg80211_subcmd_set_csi(wiphy, wdev, data, len, 1);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to disable CSI
|
||||
*
|
||||
* @param wiphy A pointer to wiphy struct
|
||||
* @param wdev A pointer to wireless_dev struct
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
*
|
||||
* @return 0: success -1: fail
|
||||
*/
|
||||
static int woal_cfg80211_subcmd_csi_disable(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int len)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
ret = woal_cfg80211_subcmd_set_csi(wiphy, wdev, data, len, 0);
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to get CSI dump path
|
||||
*
|
||||
* @param wiphy A pointer to wiphy struct
|
||||
* @param wdev A pointer to wireless_dev struct
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
*
|
||||
* @return 0: success -1: fail
|
||||
*/
|
||||
static int woal_cfg80211_subcmd_get_csi_dump_path(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int len)
|
||||
{
|
||||
int ret = 0;
|
||||
struct net_device *dev = NULL;
|
||||
moal_private *priv = NULL;
|
||||
struct sk_buff *skb = NULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!wdev || !wdev->netdev) {
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
dev = wdev->netdev;
|
||||
priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
|
||||
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
|
||||
sizeof(priv->csi_dump_path));
|
||||
if (unlikely(!skb)) {
|
||||
PRINTM(MERROR, "skb alloc failed\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Push the data to the skb */
|
||||
nla_put(skb, ATTR_CSI_DUMP_PATH, sizeof(priv->csi_dump_path),
|
||||
(t_u8 *)priv->csi_dump_path);
|
||||
|
||||
ret = cfg80211_vendor_cmd_reply(skb);
|
||||
if (unlikely(ret)) {
|
||||
PRINTM(MERROR, "Vendor Command reply failed ret:%d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to get CSI config
|
||||
*
|
||||
* @param wiphy A pointer to wiphy struct
|
||||
* @param wdev A pointer to wireless_dev struct
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
*
|
||||
* @return 0: success -1: fail
|
||||
*/
|
||||
static int woal_cfg80211_subcmd_get_csi_config(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int len)
|
||||
{
|
||||
int ret = 0;
|
||||
struct net_device *dev = NULL;
|
||||
moal_private *priv = NULL;
|
||||
struct sk_buff *skb = NULL;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (!wdev || !wdev->netdev) {
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
dev = wdev->netdev;
|
||||
priv = (moal_private *)woal_get_netdev_priv(dev);
|
||||
|
||||
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
|
||||
sizeof(priv->csi_config));
|
||||
if (unlikely(!skb)) {
|
||||
PRINTM(MERROR, "skb alloc failed\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
/* Push the data to the skb */
|
||||
nla_put(skb, ATTR_CSI_CONFIG, sizeof(mlan_ds_csi_params),
|
||||
(t_u8 *)&priv->csi_config);
|
||||
|
||||
ret = cfg80211_vendor_cmd_reply(skb);
|
||||
if (unlikely(ret)) {
|
||||
PRINTM(MERROR, "Vendor Command reply failed ret:%d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor command to get CSI capability
|
||||
*
|
||||
* @param wiphy A pointer to wiphy struct
|
||||
* @param wdev A pointer to wireless_dev struct
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
*
|
||||
* @return 0: success -1: fail
|
||||
*/
|
||||
static int woal_cfg80211_subcmd_get_csi_capa(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int len)
|
||||
{
|
||||
ENTER();
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Save CSI dump to file
|
||||
*
|
||||
* @param dir_name Directory name
|
||||
* @param file_name File name
|
||||
* @param buf Pointer to dump buffer
|
||||
* @param buf_len Length of buf
|
||||
* @param name Full path name of CSI dump
|
||||
*
|
||||
* @return 0: success -1: fail
|
||||
*/
|
||||
static mlan_status woal_save_csi_dump_to_file(char *dir_name, char *file_name,
|
||||
t_u8 *buf, int buf_len,
|
||||
t_u8 format, char *name)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
ENTER();
|
||||
|
||||
if (!dir_name || !file_name || !buf) {
|
||||
PRINTM(MERROR, "Can't save dump info to file\n");
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief vendor event to upload csi dump
|
||||
*
|
||||
* @param priv A pointer to moal_private
|
||||
* @param data a pointer to data
|
||||
* @param len data length
|
||||
*
|
||||
* @return mlan_status
|
||||
*/
|
||||
mlan_status woal_cfg80211_event_csi_dump(moal_private *priv, t_u8 *data,
|
||||
int len)
|
||||
{
|
||||
mlan_status ret = MLAN_STATUS_SUCCESS;
|
||||
char path_name[20];
|
||||
char file_name[20];
|
||||
|
||||
ENTER();
|
||||
|
||||
DBG_HEXDUMP(MCMD_D, "CSI dump data", data, len);
|
||||
sprintf(path_name, "/data");
|
||||
if (priv->csi_dump_format == 1)
|
||||
sprintf(file_name, "csi_dump.bin");
|
||||
else
|
||||
sprintf(file_name, "csi_dump.txt");
|
||||
priv->csi_dump_len += len;
|
||||
if (priv->csi_dump_len > CSI_DUMP_FILE_MAX) {
|
||||
PRINTM(MERROR,
|
||||
"Reached file maximum size. Not saving CSI records.\n");
|
||||
goto done;
|
||||
}
|
||||
/* Save CSI dump to file */
|
||||
ret = woal_save_csi_dump_to_file(path_name, file_name, data, len,
|
||||
priv->csi_dump_format,
|
||||
priv->csi_dump_path);
|
||||
if (ret != MLAN_STATUS_SUCCESS) {
|
||||
PRINTM(MERROR, "Failed to save CSI dump to file\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const struct wiphy_vendor_command vendor_commands[] = {
|
||||
{
|
||||
|
@ -3880,6 +4469,18 @@ static const struct wiphy_vendor_command vendor_commands[] = {
|
|||
#endif
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.info = {
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = sub_cmd_set_roaming_offload_key,
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
.doit = woal_cfg80211_subcmd_set_roaming_offload_key,
|
||||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.info = {
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
|
@ -4138,6 +4739,66 @@ static const struct wiphy_vendor_command vendor_commands[] = {
|
|||
.doit = woal_cfg80211_subcmd_get_packet_filter_capability,
|
||||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.info = {
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = subcmd_cfr_request,
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
.doit = woal_cfg80211_subcmd_csi_enable,
|
||||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.info = {
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = subcmd_cfr_cancel,
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
.doit = woal_cfg80211_subcmd_csi_disable,
|
||||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.info = {
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = subcmd_get_csi_dump_path,
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
.doit = woal_cfg80211_subcmd_get_csi_dump_path,
|
||||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.info = {
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = subcmd_get_csi_config,
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
.doit = woal_cfg80211_subcmd_get_csi_config,
|
||||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.info = {
|
||||
.vendor_id = MRVL_VENDOR_ID,
|
||||
.subcmd = subcmd_get_csi_capa,
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
.doit = woal_cfg80211_subcmd_get_csi_capa,
|
||||
#if KERNEL_VERSION(5, 3, 0) <= CFG80211_VERSION_CODE
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
|
|
@ -3,20 +3,28 @@
|
|||
* @brief This file contains the CFG80211 vendor specific defines.
|
||||
*
|
||||
*
|
||||
* Copyright 2015-2020 NXP
|
||||
* Copyright 2015-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -25,6 +33,26 @@
|
|||
|
||||
#include "moal_main.h"
|
||||
|
||||
#define TLV_TYPE_APINFO (PROPRIETARY_TLV_BASE_ID + 249)
|
||||
#define TLV_TYPE_KEYINFO (PROPRIETARY_TLV_BASE_ID + 250)
|
||||
#define TLV_TYPE_ASSOC_REQ_IE (PROPRIETARY_TLV_BASE_ID + 292)
|
||||
|
||||
/** Key Info structure */
|
||||
typedef struct _key_info_tlv {
|
||||
/** Header */
|
||||
MrvlIEtypesHeader_t header;
|
||||
/** kck, kek, key_replay*/
|
||||
mlan_ds_misc_gtk_rekey_data key;
|
||||
} key_info;
|
||||
|
||||
/** APinfo TLV structure */
|
||||
typedef struct _apinfo_tlv {
|
||||
/** Header */
|
||||
MrvlIEtypesHeader_t header;
|
||||
/** Assoc response buffer */
|
||||
t_u8 rsp_ie[1];
|
||||
} apinfo;
|
||||
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
#define RING_NAME_MAX 32
|
||||
typedef int wifi_ring_buffer_id;
|
||||
|
@ -603,7 +631,10 @@ enum mrvl_wlan_vendor_attr_wifi_logger {
|
|||
/**vendor event*/
|
||||
enum vendor_event {
|
||||
event_hang = 0,
|
||||
event_fw_dump_done = 1,
|
||||
event_rssi_monitor = 0x1501,
|
||||
event_set_key_mgmt_offload = 0x10001,
|
||||
event_fw_roam_success = 0x10002,
|
||||
event_cloud_keep_alive = 0x10003,
|
||||
event_dfs_radar_detected = 0x10004,
|
||||
event_dfs_cac_started = 0x10005,
|
||||
|
@ -666,6 +697,7 @@ void woal_cfg80211_rssi_monitor_event(moal_private *priv, t_s16 rssi);
|
|||
/**vendor sub command*/
|
||||
enum vendor_sub_command {
|
||||
sub_cmd_set_drvdbg = 0,
|
||||
sub_cmd_set_roaming_offload_key = 0x0002,
|
||||
sub_cmd_start_keep_alive = 0x0003,
|
||||
sub_cmd_stop_keep_alive = 0x0004,
|
||||
sub_cmd_dfs_capability = 0x0005,
|
||||
|
@ -693,6 +725,11 @@ enum vendor_sub_command {
|
|||
sub_cmd_get_roaming_capability = 0x1700,
|
||||
sub_cmd_fw_roaming_enable = 0x1701,
|
||||
sub_cmd_fw_roaming_config = 0x1702,
|
||||
subcmd_cfr_request = 0x1900,
|
||||
subcmd_cfr_cancel,
|
||||
subcmd_get_csi_dump_path,
|
||||
subcmd_get_csi_config,
|
||||
subcmd_get_csi_capa,
|
||||
sub_cmd_max,
|
||||
};
|
||||
|
||||
|
@ -732,6 +769,25 @@ enum mkeep_alive_attributes {
|
|||
MKEEP_ALIVE_ATTRIBUTE_MAX = MKEEP_ALIVE_ATTRIBUTE_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
int woal_roam_ap_info(moal_private *priv, t_u8 *data, int len);
|
||||
|
||||
/*Attribute for wpa_supplicant*/
|
||||
enum mrvl_wlan_vendor_attr_roam_auth {
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_INVALID = 0,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_BSSID,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_REQ_IE,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_RESP_IE,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_AUTHORIZED,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KCK,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KEK,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_SUBNET_STATUS,
|
||||
/* keep last */
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST,
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_MAX =
|
||||
MRVL_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/** WiFi roaming capabilities structure */
|
||||
typedef struct {
|
||||
/** max blacklist size */
|
||||
|
@ -777,5 +833,28 @@ enum mrvl_wlan_vendor_attr_fw_roaming {
|
|||
MRVL_WLAN_VENDOR_ATTR_FW_ROAMING_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
enum attr_csi {
|
||||
ATTR_CSI_INVALID = 0,
|
||||
ATTR_CSI_CONFIG,
|
||||
ATTR_PEER_MAC_ADDR,
|
||||
ATTR_CSI_DUMP_PATH,
|
||||
ATTR_CSI_CAPA,
|
||||
ATTR_CSI_DUMP_FORMAT,
|
||||
ATTR_CSI_AFTER_LAST,
|
||||
ATTR_CSI_MAX = ATTR_CSI_AFTER_LAST - 1,
|
||||
};
|
||||
|
||||
/** CSI capability structure */
|
||||
typedef struct {
|
||||
/**Bit mask indicates what BW is supported */
|
||||
t_u8 bw_support;
|
||||
/** Bit mask indicates what capturing method is supported */
|
||||
t_u8 method_support;
|
||||
/** Max number of capture peers supported */
|
||||
t_u8 max_peer;
|
||||
} wifi_csi_capabilities;
|
||||
|
||||
mlan_status woal_cfg80211_event_csi_dump(moal_private *priv, t_u8 *data,
|
||||
int len);
|
||||
#endif
|
||||
#endif /* _MOAL_CFGVENDOR_H_ */
|
||||
|
|
|
@ -3,20 +3,28 @@
|
|||
* @brief This file contains functions for debug proc file.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -743,7 +751,9 @@ static int woal_histogram_read(struct seq_file *sfp, void *data)
|
|||
|
||||
static int woal_histogram_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_histogram_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_histogram_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_histogram_read, PDE(inode)->data);
|
||||
|
@ -942,7 +952,9 @@ static int woal_log_read(struct seq_file *sfp, void *data)
|
|||
*/
|
||||
static int woal_log_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_log_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_log_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_log_read, PDE(inode)->data);
|
||||
|
@ -1032,6 +1044,9 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
|||
mp_aggr_pkt_limit = info->mp_aggr_pkt_limit;
|
||||
seq_printf(sfp, "last_recv_wr_bitmap=0x%x last_mp_index=%d\n",
|
||||
info->last_recv_wr_bitmap, info->last_mp_index);
|
||||
seq_printf(sfp,
|
||||
"last_recv_rd_bitmap=0x%x mp_data_port_mask=0x%x\n",
|
||||
info->last_recv_rd_bitmap, info->mp_data_port_mask);
|
||||
for (i = 0; i < SDIO_MP_DBG_NUM; i++) {
|
||||
seq_printf(
|
||||
sfp,
|
||||
|
@ -1076,6 +1091,7 @@ static int woal_debug_read(struct seq_file *sfp, void *data)
|
|||
#endif
|
||||
seq_printf(sfp, "tcp_ack_drop_cnt=%d\n", priv->tcp_ack_drop_cnt);
|
||||
seq_printf(sfp, "tcp_ack_cnt=%d\n", priv->tcp_ack_cnt);
|
||||
seq_printf(sfp, "tcp_ack_payload=%d\n", priv->tcp_ack_payload);
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||
for (i = 0; i < 4; i++)
|
||||
seq_printf(sfp, "wmm_tx_pending[%d]:%d\n", i,
|
||||
|
@ -1262,7 +1278,9 @@ static ssize_t woal_debug_write(struct file *f, const char __user *buf,
|
|||
|
||||
static int woal_debug_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_debug_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_debug_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_debug_read, PDE(inode)->data);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,23 +1,30 @@
|
|||
|
||||
/** @file moal_eth_ioctl.h
|
||||
*
|
||||
* @brief This file contains definition for private IOCTL call.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -148,6 +155,7 @@ typedef struct _chan_stats {
|
|||
#ifdef SDIO
|
||||
#define PRIV_CMD_SDCMD52RW "sdcmd52rw"
|
||||
#endif
|
||||
#define PRIV_CMD_ARPFILTER "arpfilter"
|
||||
#define PRIV_CMD_HOTSPOTCFG "hotspotcfg"
|
||||
#define PRIV_CMD_MGMT_FRAME_CTRL "mgmtframectrl"
|
||||
#define PRIV_CMD_QCONFIG "qconfig"
|
||||
|
@ -212,8 +220,16 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_MPA_CTRL "mpactrl"
|
||||
#endif
|
||||
#define PRIV_CMD_SLEEP_PARAMS "sleepparams"
|
||||
#define PRIV_CMD_NET_MON "netmon"
|
||||
#if defined(STA_CFG80211) && defined(UAP_CFG80211)
|
||||
#define PRIV_CMD_MONITOR_MODE "monitormode"
|
||||
#endif
|
||||
#define PRIV_CMD_DFS_TESTING "dfstesting"
|
||||
#define PRIV_CMD_CLEAR_NOP "clear_nop"
|
||||
#define PRIV_CMD_FAKE_RADAR "fake_radar"
|
||||
#define PRIV_CMD_DFS53_CFG "dfs53cfg"
|
||||
#define PRIV_CMD_DFS_CAC "dfs_cac"
|
||||
#define PRIV_CMD_AUTODFS "autodfs"
|
||||
#define PRIV_CMD_CFP_CODE "cfpcode"
|
||||
#define PRIV_CMD_CWMODE "cwmode"
|
||||
#define PRIV_CMD_ANT_CFG "antcfg"
|
||||
|
@ -235,6 +251,11 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_CFG_OPP_PS "cfg_opp_ps"
|
||||
#endif
|
||||
#endif
|
||||
#define PRIV_CMD_CFG_CLOCK_SYNC "clocksync"
|
||||
#define PRIV_CMD_CFG_GET_TSF_INFO "gettsfinfo"
|
||||
#define PRIV_CMD_TARGET_CHANNEL "targetchan"
|
||||
#define PRIV_CMD_BACKUP_CHANNEL "backupchan"
|
||||
|
||||
#define PRIV_CMD_DFS_REPEATER_CFG "dfs_repeater"
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
|
@ -278,6 +299,10 @@ typedef struct _chan_stats {
|
|||
/**Private command ID to set/get independent reset*/
|
||||
#define PRIV_CMD_IND_RST_CFG "indrstcfg"
|
||||
|
||||
#define PRIV_CMD_MCAST_AGGR_GROUP "mcast_aggr_group"
|
||||
#define PRIV_CMD_MC_AGGR_CFG "mc_aggr_cfg"
|
||||
#define PRIV_CMD_CH_LOAD "getchload"
|
||||
|
||||
#define PRIV_CMD_ARB_CFG "arb"
|
||||
|
||||
/**Private command to configure static rx abort config */
|
||||
|
@ -299,6 +324,7 @@ typedef struct _chan_stats {
|
|||
#define PRIV_CMD_CCK_DESENSE_CFG "cck_desense_cfg"
|
||||
#define PRIV_CMD_DOT11MC_UNASSOC_FTM_CFG "dot11mc_unassoc_ftm_cfg"
|
||||
#define PRIV_CMD_HAL_PHY_CFG "hal_phy_cfg"
|
||||
#define PRIV_CMD_IPS_CFG "ips_cfg"
|
||||
|
||||
/** Private command ID for Android default commands */
|
||||
#define WOAL_ANDROID_DEF_CMD (SIOCDEVPRIVATE + 1)
|
||||
|
@ -349,6 +375,8 @@ typedef struct _ssu_params_cfg {
|
|||
} __attribute__((packed)) ssu_params_cfg;
|
||||
#endif
|
||||
|
||||
#define PRIV_CMD_CSI "csi"
|
||||
|
||||
#define PRIV_CMD_BOOTSLEEP "bootsleep"
|
||||
|
||||
/** Private command: 11AX Cfg */
|
||||
|
@ -364,8 +392,12 @@ typedef struct _ssu_params_cfg {
|
|||
|
||||
#define PRIV_CMD_LPM "lpm"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, void __user *data,
|
||||
int cmd);
|
||||
#else
|
||||
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
|
||||
|
||||
#endif
|
||||
/*
|
||||
* For android private commands, fixed value of ioctl is used.
|
||||
* Internally commands are differentiated using strings.
|
||||
|
@ -499,6 +531,27 @@ typedef struct woal_priv_addba {
|
|||
t_u32 rx_amsdu;
|
||||
} woal_addba;
|
||||
|
||||
/** Action field value : get */
|
||||
#define ACTION_GET 0
|
||||
/** Action field value : set */
|
||||
#define ACTION_SET 1
|
||||
/** Action field value: add */
|
||||
#define ACTION_ADD 2
|
||||
/** Action field value: remove */
|
||||
#define ACTION_REMOVE 3
|
||||
#define MC_AGGR_CTRL MBIT(0)
|
||||
/* mcast_aggr_group */
|
||||
typedef struct _mcast_aggr_group {
|
||||
/** action */
|
||||
t_u32 action;
|
||||
/** mcast addr */
|
||||
t_u8 mcast_addr[ETH_ALEN];
|
||||
/** Number of multicast addresses in the list */
|
||||
t_u32 num_mcast_addr;
|
||||
/** Multicast address list */
|
||||
mlan_802_11_mac_addr mac_list[MLAN_MAX_MULTICAST_LIST_SIZE];
|
||||
} mcast_aggr_group, *pmcast_aggr_group;
|
||||
|
||||
typedef struct _txrate_setting {
|
||||
t_u16 preamble : 2; /*BIT1-BIT0:
|
||||
* For legacy 11b: preamble type
|
||||
|
|
|
@ -4,20 +4,28 @@
|
|||
* driver.
|
||||
*
|
||||
*
|
||||
* Copyright 2018-2021 NXP
|
||||
* Copyright 2018-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
#include "moal_main.h"
|
||||
|
@ -30,6 +38,8 @@ static char *fw_name;
|
|||
static int req_fw_nowait;
|
||||
int fw_reload;
|
||||
|
||||
static char *hw_name;
|
||||
|
||||
/** MAC address */
|
||||
static char *mac_addr;
|
||||
/** Module param cfg file */
|
||||
|
@ -63,15 +73,26 @@ static int host_mlme;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
static int roamoffload_in_hs;
|
||||
|
||||
/** Auto deep sleep */
|
||||
static int auto_ds;
|
||||
|
||||
/** net_rx mode*/
|
||||
static int net_rx;
|
||||
/** amsdu deaggr mode */
|
||||
static int amsdu_deaggr;
|
||||
|
||||
static int ext_scan;
|
||||
|
||||
/** IEEE PS mode */
|
||||
static int ps_mode;
|
||||
/** passive to active scan */
|
||||
static int p2a_scan;
|
||||
/** scan chan gap */
|
||||
static int scan_chan_gap;
|
||||
/** sched scan */
|
||||
static int sched_scan = 1;
|
||||
/** Max Tx buffer size */
|
||||
int max_tx_buf;
|
||||
|
||||
|
@ -89,6 +110,8 @@ static int max_uap_bss = DEF_UAP_BSS;
|
|||
static char *uap_name;
|
||||
/** Max uAP station number */
|
||||
static int uap_max_sta;
|
||||
/** WACP mode */
|
||||
static int wacp_mode = WACP_MODE_DEFAULT;
|
||||
#endif
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
@ -115,6 +138,14 @@ static int slew_rate = 3;
|
|||
#endif
|
||||
int tx_work = 0;
|
||||
static int rps = 0;
|
||||
static int tx_skb_clone = 0;
|
||||
#ifdef IMX_SUPPORT
|
||||
static int pmqos = 1;
|
||||
#else
|
||||
static int pmqos = 0;
|
||||
#endif
|
||||
|
||||
static int chan_track = 0;
|
||||
|
||||
#if defined(STA_SUPPORT)
|
||||
/** 802.11d configuration */
|
||||
|
@ -146,7 +177,8 @@ static char *band_steer_cfg;
|
|||
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
/** CFG80211 and WEXT mode */
|
||||
static int cfg80211_wext = STA_WEXT_MASK | UAP_WEXT_MASK;
|
||||
static int cfg80211_wext =
|
||||
STA_WEXT_MASK | UAP_WEXT_MASK | STA_CFG80211_MASK | UAP_CFG80211_MASK;
|
||||
#else
|
||||
/** CFG80211 mode */
|
||||
static int cfg80211_wext = STA_CFG80211_MASK | UAP_CFG80211_MASK;
|
||||
|
@ -189,7 +221,9 @@ int dts_enable = 1;
|
|||
static int dfs_offload;
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID_KERNEL
|
||||
int wakelock_timeout = WAKE_LOCK_TIMEOUT;
|
||||
#endif
|
||||
|
||||
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
@ -249,6 +283,9 @@ t_u32 drvdbg = DEFAULT_DEBUG_MASK;
|
|||
#endif /* DEBUG_LEVEL1 */
|
||||
|
||||
static card_type_entry card_type_map_tbl[] = {
|
||||
#ifdef SD8801
|
||||
{CARD_TYPE_SD8801, 0, CARD_SD8801},
|
||||
#endif
|
||||
#ifdef SD8887
|
||||
{CARD_TYPE_SD8887, 0, CARD_SD8887},
|
||||
#endif
|
||||
|
@ -276,6 +313,9 @@ static card_type_entry card_type_map_tbl[] = {
|
|||
#ifdef SD9177
|
||||
{CARD_TYPE_SD9177, 0, CARD_SD9177},
|
||||
#endif
|
||||
#ifdef SDNW62X
|
||||
{CARD_TYPE_SDNW62X, 0, CARD_SDNW62X},
|
||||
#endif
|
||||
#ifdef PCIE8897
|
||||
{CARD_TYPE_PCIE8897, 0, CARD_PCIE8897},
|
||||
#endif
|
||||
|
@ -288,6 +328,13 @@ static card_type_entry card_type_map_tbl[] = {
|
|||
#ifdef PCIE9098
|
||||
{CARD_TYPE_PCIE9098, 0, CARD_PCIE9098},
|
||||
#endif
|
||||
#ifdef PCIENW62X
|
||||
{CARD_TYPE_PCIENW62X, 0, CARD_PCIENW62X},
|
||||
#endif
|
||||
#ifdef USB8801
|
||||
{CARD_TYPE_USB8801, 0, CARD_USB8801},
|
||||
#endif
|
||||
|
||||
#ifdef USB8897
|
||||
{CARD_TYPE_USB8897, 0, CARD_USB8897},
|
||||
#endif
|
||||
|
@ -303,6 +350,10 @@ static card_type_entry card_type_map_tbl[] = {
|
|||
#ifdef USB9097
|
||||
{CARD_TYPE_USB9097, 0, CARD_USB9097},
|
||||
#endif
|
||||
#ifdef USBNW62X
|
||||
{CARD_TYPE_USBNW62X, 0, CARD_USBNW62X},
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
static int dfs53cfg = DFS_W53_DEFAULT_FW;
|
||||
|
@ -570,6 +621,12 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
moal_extflg_isset(handle, EXT_FW_SERIAL) ?
|
||||
"on" :
|
||||
"off");
|
||||
} else if (strncmp(line, "hw_name", strlen("hw_name")) == 0) {
|
||||
if (parse_line_read_string(line, &out_str) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
woal_dup_string(¶ms->hw_name, out_str);
|
||||
PRINTM(MMSG, "hw_name=%s\n", params->hw_name);
|
||||
} else if (strncmp(line, "mac_addr", strlen("mac_addr")) == 0) {
|
||||
if (parse_line_read_string(line, &out_str) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
|
@ -593,6 +650,15 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
params->drv_mode = out_data;
|
||||
PRINTM(MMSG, "drv_mode = %d\n", params->drv_mode);
|
||||
}
|
||||
#ifdef DEBUG_LEVEL1
|
||||
else if (strncmp(line, "drvdbg", strlen("drvdbg")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
params->drvdbg = out_data;
|
||||
PRINTM(MMSG, "drvdbg = %d\n", params->drvdbg);
|
||||
}
|
||||
#endif
|
||||
#ifdef STA_SUPPORT
|
||||
else if (strncmp(line, "max_sta_bss", strlen("max_sta_bss")) ==
|
||||
0) {
|
||||
|
@ -650,6 +716,26 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
goto err;
|
||||
params->auto_ds = out_data;
|
||||
PRINTM(MMSG, "auto_ds = %d\n", params->auto_ds);
|
||||
} else if (strncmp(line, "net_rx", strlen("net_rx")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
params->net_rx = out_data;
|
||||
PRINTM(MMSG, "net_rx = %d\n", params->net_rx);
|
||||
} else if (strncmp(line, "amsdu_deaggr",
|
||||
strlen("amsdu_deaggr")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
params->amsdu_deaggr = out_data;
|
||||
PRINTM(MMSG, "amsdu_deaggr = %d\n",
|
||||
params->amsdu_deaggr);
|
||||
} else if (strncmp(line, "ext_scan", strlen("ext_scan")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
params->ext_scan = out_data;
|
||||
PRINTM(MMSG, "ext_scan = %d\n", params->ext_scan);
|
||||
} else if (strncmp(line, "ps_mode", strlen("ps_mode")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
|
@ -670,6 +756,13 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
params->scan_chan_gap = out_data;
|
||||
PRINTM(MMSG, "scan_chan_gap = %d\n",
|
||||
params->scan_chan_gap);
|
||||
} else if (strncmp(line, "sched_scan", strlen("sched_scan")) ==
|
||||
0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
params->sched_scan = out_data;
|
||||
PRINTM(MMSG, "sched_scan = %d\n", params->sched_scan);
|
||||
} else if (strncmp(line, "max_tx_buf", strlen("max_tx_buf")) ==
|
||||
0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
|
@ -901,16 +994,20 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
moal_extflg_isset(handle, EXT_LOW_PW_MODE) ?
|
||||
"on" :
|
||||
"off");
|
||||
} else if (strncmp(line, "wakelock_timeout",
|
||||
strlen("wakelock_timeout")) == 0) {
|
||||
}
|
||||
#ifdef ANDROID_KERNEL
|
||||
else if (strncmp(line, "wakelock_timeout",
|
||||
strlen("wakelock_timeout")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
params->wakelock_timeout = out_data;
|
||||
PRINTM(MMSG, "wakelock_timeout=%d\n",
|
||||
params->wakelock_timeout);
|
||||
} else if (strncmp(line, "dev_cap_mask",
|
||||
strlen("dev_cap_mask")) == 0) {
|
||||
}
|
||||
#endif
|
||||
else if (strncmp(line, "dev_cap_mask",
|
||||
strlen("dev_cap_mask")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
|
@ -933,11 +1030,6 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
"off");
|
||||
}
|
||||
#endif
|
||||
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
||||
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
||||
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
||||
defined(USB9097) || defined(PCIE9097) || defined(SD8978) || \
|
||||
defined(SD9177)
|
||||
else if (strncmp(line, "pmic", strlen("pmic")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
|
@ -949,9 +1041,7 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
PRINTM(MMSG, "pmic %s\n",
|
||||
moal_extflg_isset(handle, EXT_PMIC) ? "on" :
|
||||
"off");
|
||||
}
|
||||
#endif
|
||||
else if (strncmp(line, "antcfg", strlen("antcfg")) == 0) {
|
||||
} else if (strncmp(line, "antcfg", strlen("antcfg")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
|
@ -1096,6 +1186,30 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
PRINTM(MMSG, "rps %s\n",
|
||||
moal_extflg_isset(handle, EXT_RPS) ? "on" :
|
||||
"off");
|
||||
} else if (strncmp(line, "tx_skb_clone",
|
||||
strlen("tx_skb_clone")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
if (out_data)
|
||||
moal_extflg_set(handle, EXT_TX_SKB_CLONE);
|
||||
else
|
||||
moal_extflg_clear(handle, EXT_TX_SKB_CLONE);
|
||||
PRINTM(MMSG, "tx_skb_clone %s\n",
|
||||
moal_extflg_isset(handle, EXT_TX_SKB_CLONE) ?
|
||||
"on" :
|
||||
"off");
|
||||
} else if (strncmp(line, "pmqos", strlen("pmqos")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
if (out_data)
|
||||
moal_extflg_set(handle, EXT_PMQOS);
|
||||
else
|
||||
moal_extflg_clear(handle, EXT_PMQOS);
|
||||
PRINTM(MMSG, "pmqos %s\n",
|
||||
moal_extflg_isset(handle, EXT_PMQOS) ? "on" :
|
||||
"off");
|
||||
}
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
else if (strncmp(line, "dfs_offload", strlen("dfs_offload")) ==
|
||||
|
@ -1113,6 +1227,22 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
"off");
|
||||
}
|
||||
#endif
|
||||
else if (strncmp(line, "roamoffload_in_hs",
|
||||
strlen("roamoffload_in_hs")) == 0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
if (out_data)
|
||||
moal_extflg_set(handle, EXT_ROAMOFFLOAD_IN_HS);
|
||||
else
|
||||
moal_extflg_clear(handle,
|
||||
EXT_ROAMOFFLOAD_IN_HS);
|
||||
PRINTM(MMSG, "roamoffload_in_hs %s\n",
|
||||
moal_extflg_isset(handle,
|
||||
EXT_ROAMOFFLOAD_IN_HS) ?
|
||||
"on" :
|
||||
"off");
|
||||
}
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
else if (strncmp(line, "disable_regd_by_driver",
|
||||
strlen("disable_regd_by_driver")) == 0) {
|
||||
|
@ -1178,6 +1308,13 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
goto err;
|
||||
params->uap_max_sta = out_data;
|
||||
PRINTM(MMSG, "uap_max_sta=%d\n", params->uap_max_sta);
|
||||
} else if (strncmp(line, "wacp_mode", strlen("wacp_mode")) ==
|
||||
0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
params->wacp_mode = out_data;
|
||||
PRINTM(MMSG, "wacp_moe=%d\n", params->wacp_mode);
|
||||
}
|
||||
#endif
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
|
@ -1203,6 +1340,17 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size,
|
|||
goto err;
|
||||
params->dfs53cfg = out_data;
|
||||
PRINTM(MMSG, "dfs53cfg= %d\n", params->dfs53cfg);
|
||||
} else if (strncmp(line, "chan_track", strlen("chan_track")) ==
|
||||
0) {
|
||||
if (parse_line_read_int(line, &out_data) !=
|
||||
MLAN_STATUS_SUCCESS)
|
||||
goto err;
|
||||
if (out_data)
|
||||
moal_extflg_set(handle, EXT_CHAN_TRACK);
|
||||
|
||||
PRINTM(MMSG, "chan_track= %s\n",
|
||||
moal_extflg_isset(handle, EXT_PMQOS) ? "on" :
|
||||
"off");
|
||||
}
|
||||
}
|
||||
if (end)
|
||||
|
@ -1245,6 +1393,10 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
handle->params.fw_reload = params->fw_reload;
|
||||
if (fw_serial)
|
||||
moal_extflg_set(handle, EXT_FW_SERIAL);
|
||||
woal_dup_string(&handle->params.hw_name, hw_name);
|
||||
if (params && params->hw_name)
|
||||
woal_dup_string(&handle->params.hw_name, params->hw_name);
|
||||
|
||||
woal_dup_string(&handle->params.mac_addr, mac_addr);
|
||||
if (params && params->mac_addr)
|
||||
woal_dup_string(&handle->params.mac_addr, params->mac_addr);
|
||||
|
@ -1256,6 +1408,12 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
handle->params.drv_mode = drv_mode;
|
||||
if (params)
|
||||
handle->params.drv_mode = params->drv_mode;
|
||||
#ifdef DEBUG_LEVEL1
|
||||
handle->params.drvdbg = drvdbg;
|
||||
if (params)
|
||||
handle->params.drvdbg = params->drvdbg;
|
||||
#endif
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
handle->params.max_sta_bss = max_sta_bss;
|
||||
woal_dup_string(&handle->params.sta_name, sta_name);
|
||||
|
@ -1268,10 +1426,12 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
handle->params.max_uap_bss = max_uap_bss;
|
||||
woal_dup_string(&handle->params.uap_name, uap_name);
|
||||
handle->params.uap_max_sta = uap_max_sta;
|
||||
handle->params.wacp_mode = wacp_mode;
|
||||
if (params) {
|
||||
handle->params.max_uap_bss = params->max_uap_bss;
|
||||
woal_dup_string(&handle->params.uap_name, params->uap_name);
|
||||
handle->params.uap_max_sta = params->uap_max_sta;
|
||||
handle->params.wacp_mode = params->wacp_mode;
|
||||
}
|
||||
#endif /* UAP_SUPPORT */
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
@ -1290,15 +1450,29 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
handle->params.auto_ds = auto_ds;
|
||||
if (params)
|
||||
handle->params.auto_ds = params->auto_ds;
|
||||
handle->params.net_rx = net_rx;
|
||||
if (params)
|
||||
handle->params.net_rx = params->net_rx;
|
||||
|
||||
handle->params.amsdu_deaggr = amsdu_deaggr;
|
||||
if (params)
|
||||
handle->params.amsdu_deaggr = params->amsdu_deaggr;
|
||||
|
||||
handle->params.ext_scan = ext_scan;
|
||||
if (params)
|
||||
handle->params.ext_scan = params->ext_scan;
|
||||
|
||||
handle->params.ps_mode = ps_mode;
|
||||
handle->params.p2a_scan = p2a_scan;
|
||||
handle->params.scan_chan_gap = scan_chan_gap;
|
||||
handle->params.sched_scan = sched_scan;
|
||||
handle->params.max_tx_buf = max_tx_buf;
|
||||
if (params) {
|
||||
handle->params.ps_mode = params->ps_mode;
|
||||
handle->params.max_tx_buf = params->max_tx_buf;
|
||||
handle->params.p2a_scan = params->p2a_scan;
|
||||
handle->params.scan_chan_gap = params->scan_chan_gap;
|
||||
handle->params.sched_scan = params->sched_scan;
|
||||
}
|
||||
#if defined(SDIO)
|
||||
if (intmode)
|
||||
|
@ -1383,9 +1557,11 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
if (low_power_mode_enable)
|
||||
moal_extflg_set(handle, EXT_LOW_PW_MODE);
|
||||
|
||||
#ifdef ANDROID_KERNEL
|
||||
handle->params.wakelock_timeout = wakelock_timeout;
|
||||
if (params)
|
||||
handle->params.wakelock_timeout = params->wakelock_timeout;
|
||||
#endif
|
||||
handle->params.dev_cap_mask = dev_cap_mask;
|
||||
if (params)
|
||||
handle->params.dev_cap_mask = params->dev_cap_mask;
|
||||
|
@ -1393,14 +1569,8 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
if (sdio_rx_aggr)
|
||||
moal_extflg_set(handle, EXT_SDIO_RX_AGGR);
|
||||
#endif
|
||||
#if defined(SD8997) || defined(PCIE8997) || defined(USB8997) || \
|
||||
defined(SD8977) || defined(SD8987) || defined(SD9098) || \
|
||||
defined(USB9098) || defined(PCIE9098) || defined(SD9097) || \
|
||||
defined(USB9097) || defined(PCIE9097) || defined(SD8978) || \
|
||||
defined(SD9177)
|
||||
if (pmic)
|
||||
moal_extflg_set(handle, EXT_PMIC);
|
||||
#endif
|
||||
handle->params.antcfg = antcfg;
|
||||
if (params)
|
||||
handle->params.antcfg = params->antcfg;
|
||||
|
@ -1442,11 +1612,20 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params)
|
|||
moal_extflg_set(handle, EXT_TX_WORK);
|
||||
if (rps)
|
||||
moal_extflg_set(handle, EXT_RPS);
|
||||
if (tx_skb_clone)
|
||||
moal_extflg_set(handle, EXT_TX_SKB_CLONE);
|
||||
if (pmqos)
|
||||
moal_extflg_set(handle, EXT_PMQOS);
|
||||
|
||||
if (chan_track)
|
||||
moal_extflg_set(handle, EXT_CHAN_TRACK);
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
if (dfs_offload)
|
||||
moal_extflg_set(handle, EXT_DFS_OFFLOAD);
|
||||
#endif
|
||||
if (roamoffload_in_hs)
|
||||
moal_extflg_set(handle, EXT_ROAMOFFLOAD_IN_HS);
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
if (host_mlme)
|
||||
|
@ -1508,6 +1687,11 @@ void woal_free_module_param(moal_handle *handle)
|
|||
kfree(params->fw_name);
|
||||
params->fw_name = NULL;
|
||||
}
|
||||
if (params->hw_name) {
|
||||
kfree(params->hw_name);
|
||||
params->hw_name = NULL;
|
||||
}
|
||||
|
||||
if (params->mac_addr) {
|
||||
kfree(params->mac_addr);
|
||||
params->mac_addr = NULL;
|
||||
|
@ -1660,6 +1844,17 @@ void woal_init_from_dev_tree(void)
|
|||
PRINTM(MIOCTL, "rps=0x%x\n", data);
|
||||
rps = data;
|
||||
}
|
||||
} else if (!strncmp(prop->name, "tx_skb_clone",
|
||||
strlen("tx_skb_clone"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
PRINTM(MIOCTL, "tx_skb_clone=0x%x\n", data);
|
||||
tx_skb_clone = data;
|
||||
}
|
||||
} else if (!strncmp(prop->name, "pmqos", strlen("pmqos"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
PRINTM(MIOCTL, "pmqos=0x%x\n", data);
|
||||
pmqos = data;
|
||||
}
|
||||
}
|
||||
#ifdef MFG_CMD_SUPPORT
|
||||
else if (!strncmp(prop->name, "mfg_mode", strlen("mfg_mode"))) {
|
||||
|
@ -1681,6 +1876,12 @@ void woal_init_from_dev_tree(void)
|
|||
fw_name = (char *)string_data;
|
||||
PRINTM(MIOCTL, "fw_name=%s\n", fw_name);
|
||||
}
|
||||
} else if (!strncmp(prop->name, "hw_name", strlen("hw_name"))) {
|
||||
if (!of_property_read_string(dt_node, prop->name,
|
||||
&string_data)) {
|
||||
hw_name = (char *)string_data;
|
||||
PRINTM(MIOCTL, "hw_name=%s\n", hw_name);
|
||||
}
|
||||
}
|
||||
#if defined(STA_WEXT) || defined(UAP_WEXT)
|
||||
else if (!strncmp(prop->name, "cfg80211_wext",
|
||||
|
@ -1883,8 +2084,15 @@ void woal_init_from_dev_tree(void)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
else if (!strncmp(prop->name, "gtk_rekey_offload",
|
||||
strlen("gtk_rekey_offload"))) {
|
||||
else if (!strncmp(prop->name, "roamoffload_in_hs",
|
||||
strlen("roamoffload_in_hs"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
roamoffload_in_hs = data;
|
||||
PRINTM(MIOCTL, "roamoffload_in_hs=%d\n",
|
||||
roamoffload_in_hs);
|
||||
}
|
||||
} else if (!strncmp(prop->name, "gtk_rekey_offload",
|
||||
strlen("gtk_rekey_offload"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
gtk_rekey_offload = data;
|
||||
PRINTM(MIOCTL, "gtk_rekey_offload=%d\n",
|
||||
|
@ -1909,8 +2117,27 @@ void woal_init_from_dev_tree(void)
|
|||
PRINTM(MERROR, "uap_max_sta=0x%x\n", data);
|
||||
uap_max_sta = data;
|
||||
}
|
||||
} else if (!strncmp(prop->name, "wacp_mode",
|
||||
strlen("wacp_mode"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
PRINTM(MERROR, "wacp_mode=0x%x\n", data);
|
||||
wacp_mode = data;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if (!strncmp(prop->name, "sched_scan",
|
||||
strlen("sched_scan"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
PRINTM(MIOCTL, "sched_scan=%d\n", data);
|
||||
sched_scan = data;
|
||||
}
|
||||
} else if (!strncmp(prop->name, "chan_track",
|
||||
strlen("chan_track"))) {
|
||||
if (!of_property_read_u32(dt_node, prop->name, &data)) {
|
||||
chan_track = data;
|
||||
PRINTM(MIOCTL, "chan_track=%d\n", chan_track);
|
||||
}
|
||||
}
|
||||
}
|
||||
LEAVE();
|
||||
return;
|
||||
|
@ -2104,6 +2331,9 @@ MODULE_PARM_DESC(hw_test, "0: Disable hardware test; 1: Enable hardware test");
|
|||
module_param(dts_enable, int, 0);
|
||||
MODULE_PARM_DESC(dts_enable, "0: Disable DTS; 1: Enable DTS");
|
||||
#endif
|
||||
module_param(hw_name, charp, 0660);
|
||||
MODULE_PARM_DESC(hw_name, "hardware name");
|
||||
|
||||
module_param(fw_name, charp, 0660);
|
||||
MODULE_PARM_DESC(fw_name, "Firmware name");
|
||||
module_param(req_fw_nowait, int, 0);
|
||||
|
@ -2125,7 +2355,8 @@ MODULE_PARM_DESC(mfg_mode,
|
|||
"0: Download normal firmware; 1: Download MFG firmware");
|
||||
#endif /* MFG_CMD_SUPPORT */
|
||||
module_param(drv_mode, int, 0660);
|
||||
MODULE_PARM_DESC(drv_mode, "Bit 0: STA; Bit 1: uAP; Bit 2: WIFIDIRECT");
|
||||
MODULE_PARM_DESC(drv_mode,
|
||||
"Bit 0: STA; Bit 1: uAP; Bit 2: WIFIDIRECT; Bit 7: ZERO_DFS");
|
||||
|
||||
#ifdef STA_SUPPORT
|
||||
module_param(max_sta_bss, int, 0);
|
||||
|
@ -2157,6 +2388,10 @@ module_param(auto_ds, int, 0660);
|
|||
MODULE_PARM_DESC(
|
||||
auto_ds,
|
||||
"0: MLAN default; 1: Enable auto deep sleep; 2: Disable auto deep sleep");
|
||||
module_param(ext_scan, int, 0660);
|
||||
MODULE_PARM_DESC(
|
||||
ext_scan,
|
||||
"0: MLAN default; 1: Enable Extended Scan; 2: Enable Enhanced Extended Scan");
|
||||
module_param(ps_mode, int, 0660);
|
||||
MODULE_PARM_DESC(
|
||||
ps_mode,
|
||||
|
@ -2169,6 +2404,9 @@ module_param(scan_chan_gap, int, 0660);
|
|||
MODULE_PARM_DESC(
|
||||
scan_chan_gap,
|
||||
"Time gap between two scans in milliseconds when connected to AP(max value 500ms)");
|
||||
module_param(sched_scan, int, 0);
|
||||
MODULE_PARM_DESC(sched_scan,
|
||||
"0: disable sched_scan; 1: enable sched_scan default");
|
||||
module_param(max_tx_buf, int, 0);
|
||||
MODULE_PARM_DESC(max_tx_buf, "Maximum Tx buffer size (2048/4096/8192)");
|
||||
|
||||
|
@ -2201,6 +2439,12 @@ module_param(tx_work, uint, 0660);
|
|||
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(tx_skb_clone, uint, 0660);
|
||||
MODULE_PARM_DESC(tx_skb_clone,
|
||||
"1: Enable tx_skb_clone; 0: Disable tx_skb_clone");
|
||||
module_param(pmqos, uint, 0660);
|
||||
MODULE_PARM_DESC(pmqos, "1: Enable pmqos; 0: Disable pmqos");
|
||||
|
||||
module_param(dpd_data_cfg, charp, 0);
|
||||
MODULE_PARM_DESC(dpd_data_cfg, "DPD data file name");
|
||||
module_param(init_cfg, charp, 0);
|
||||
|
@ -2258,11 +2502,19 @@ 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_PARM_DESC(low_power_mode_enable, "0/1: Disable/Enable Low Power Mode");
|
||||
|
||||
#ifdef ANDROID_KERNEL
|
||||
module_param(wakelock_timeout, int, 0);
|
||||
MODULE_PARM_DESC(wakelock_timeout, "set wakelock_timeout value (ms)");
|
||||
#endif
|
||||
|
||||
module_param(dev_cap_mask, uint, 0);
|
||||
MODULE_PARM_DESC(dev_cap_mask, "Device capability mask");
|
||||
module_param(net_rx, int, 0);
|
||||
MODULE_PARM_DESC(net_rx,
|
||||
"0: use netif_rx_ni in rx; 1: use netif_receive_skb in rx");
|
||||
module_param(amsdu_deaggr, int, 0);
|
||||
MODULE_PARM_DESC(amsdu_deaggr,
|
||||
"0: default; 1: Try to avoid buf copy in amsud deaggregation");
|
||||
|
||||
#ifdef SDIO
|
||||
module_param(sdio_rx_aggr, int, 0);
|
||||
|
@ -2335,9 +2587,18 @@ module_param(dfs_offload, int, 0);
|
|||
MODULE_PARM_DESC(dfs_offload, "1: enable dfs offload; 0: disable dfs offload.");
|
||||
#endif
|
||||
|
||||
module_param(roamoffload_in_hs, int, 0);
|
||||
MODULE_PARM_DESC(
|
||||
roamoffload_in_hs,
|
||||
"1: enable fw roaming only when host suspend; 0: always enable fw roaming.");
|
||||
|
||||
#ifdef UAP_SUPPORT
|
||||
module_param(uap_max_sta, int, 0);
|
||||
MODULE_PARM_DESC(uap_max_sta, "Maximum station number for UAP/GO.");
|
||||
module_param(wacp_mode, int, 0);
|
||||
MODULE_PARM_DESC(
|
||||
wacp_mode,
|
||||
"WACP mode for UAP/GO 0: WACP_MODE_DEFAULT; 1: WACP_MODE_1; 2: WACP_MODE_2");
|
||||
#endif
|
||||
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
|
@ -2367,3 +2628,8 @@ MODULE_PARM_DESC(beacon_hints,
|
|||
|
||||
module_param(dfs53cfg, int, 0);
|
||||
MODULE_PARM_DESC(dfs53cfg, "0: fw default; 1: new w53 dfs; 2: old w53 dfs");
|
||||
|
||||
module_param(chan_track, int, 0);
|
||||
MODULE_PARM_DESC(
|
||||
chan_track,
|
||||
"1: Set channel tracking; 0: Restore channel tracking for 9098 only");
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -4,20 +4,28 @@
|
|||
* related functions.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -36,6 +44,10 @@ Change log:
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
#include <net/addrconf.h>
|
||||
#endif
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
********************************************************/
|
||||
|
@ -52,8 +64,8 @@ static mlan_status woal_pcie_init(pcie_service_card *card);
|
|||
static const struct pci_device_id wlan_ids[] = {
|
||||
#ifdef PCIE8897
|
||||
{
|
||||
PCIE_VENDOR_ID_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W8897P,
|
||||
PCIE_VENDOR_ID_MRVL,
|
||||
PCIE_DEVICE_ID_88W8897P,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
|
@ -62,16 +74,16 @@ static const struct pci_device_id wlan_ids[] = {
|
|||
#endif
|
||||
#ifdef PCIE8997
|
||||
{
|
||||
PCIE_VENDOR_ID_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W8997P,
|
||||
PCIE_VENDOR_ID_MRVL,
|
||||
PCIE_DEVICE_ID_88W8997P,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
{
|
||||
PCIE_VENDOR_ID_V2_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W8997P,
|
||||
PCIE_VENDOR_ID_V2_MRVL,
|
||||
PCIE_DEVICE_ID_88W8997P,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
|
@ -80,8 +92,8 @@ static const struct pci_device_id wlan_ids[] = {
|
|||
#endif
|
||||
#ifdef PCIE9097
|
||||
{
|
||||
PCIE_VENDOR_ID_V2_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W9097,
|
||||
PCIE_VENDOR_ID_V2_MRVL,
|
||||
PCIE_DEVICE_ID_88W9097,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
|
@ -90,22 +102,33 @@ static const struct pci_device_id wlan_ids[] = {
|
|||
#endif
|
||||
#ifdef PCIE9098
|
||||
{
|
||||
PCIE_VENDOR_ID_V2_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W9098P_FN0,
|
||||
PCIE_VENDOR_ID_V2_MRVL,
|
||||
PCIE_DEVICE_ID_88W9098P_FN0,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
{
|
||||
PCIE_VENDOR_ID_V2_NXP,
|
||||
PCIE_DEVICE_ID_NXP_88W9098P_FN1,
|
||||
PCIE_VENDOR_ID_V2_MRVL,
|
||||
PCIE_DEVICE_ID_88W9098P_FN1,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
#endif
|
||||
#ifdef PCIENW62X
|
||||
{
|
||||
PCIE_VENDOR_ID_NXP,
|
||||
PCIE_DEVICE_ID_88WNW62X,
|
||||
PCI_ANY_ID,
|
||||
PCI_ANY_ID,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
#endif
|
||||
|
||||
{},
|
||||
};
|
||||
/* moal interface ops */
|
||||
|
@ -135,7 +158,7 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
|
||||
/* Update card type */
|
||||
#ifdef PCIE8897
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_NXP_88W8897P) {
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_88W8897P) {
|
||||
card_type = CARD_TYPE_PCIE8897;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIE8897,
|
||||
strlen(CARD_PCIE8897), strlen(driver_version));
|
||||
|
@ -148,7 +171,7 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
}
|
||||
#endif
|
||||
#ifdef PCIE8997
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_NXP_88W8997P) {
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_88W8997P) {
|
||||
card_type = CARD_TYPE_PCIE8997;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIE8997,
|
||||
strlen(CARD_PCIE8997), strlen(driver_version));
|
||||
|
@ -161,10 +184,10 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
}
|
||||
#endif
|
||||
#ifdef PCIE9097
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_NXP_88W9097) {
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_88W9097) {
|
||||
card_type = CARD_TYPE_PCIE9097;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIEIW620,
|
||||
strlen(CARD_PCIEIW620), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIE9097,
|
||||
strlen(CARD_PCIE9097), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
|
@ -174,8 +197,8 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
}
|
||||
#endif
|
||||
#ifdef PCIE9098
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_NXP_88W9098P_FN0 ||
|
||||
cardp_pcie->dev->device == PCIE_DEVICE_ID_NXP_88W9098P_FN1) {
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_88W9098P_FN0 ||
|
||||
cardp_pcie->dev->device == PCIE_DEVICE_ID_88W9098P_FN1) {
|
||||
card_type = CARD_TYPE_PCIE9098;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIE9098,
|
||||
strlen(CARD_PCIE9098), strlen(driver_version));
|
||||
|
@ -187,6 +210,20 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
strlen(KERN_VERSION));
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIENW62X
|
||||
if (cardp_pcie->dev->device == PCIE_DEVICE_ID_88WNW62X) {
|
||||
card_type = CARD_TYPE_PCIENW62X;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_PCIENW62X,
|
||||
strlen(CARD_PCIENW62X), strlen(driver_version));
|
||||
moal_memcpy_ext(NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strlen(driver_version) - strlen(INTF_CARDTYPE) -
|
||||
strlen(KERN_VERSION));
|
||||
}
|
||||
#endif
|
||||
|
||||
return card_type;
|
||||
}
|
||||
|
||||
|
@ -233,6 +270,7 @@ static mlan_status woal_do_flr(moal_handle *handle, bool prepare, bool flr_flag)
|
|||
|
||||
if (!IS_PCIE8997(handle->card_type) &&
|
||||
!IS_PCIE9097(handle->card_type) &&
|
||||
!IS_PCIENW62X(handle->card_type) &&
|
||||
!IS_PCIE9098(handle->card_type)) {
|
||||
LEAVE();
|
||||
return status;
|
||||
|
@ -266,6 +304,11 @@ static mlan_status woal_do_flr(moal_handle *handle, bool prepare, bool flr_flag)
|
|||
atomic_read(&handle->ioctl_pending));
|
||||
}
|
||||
|
||||
unregister_inetaddr_notifier(&handle->woal_notifier);
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
unregister_inet6addr_notifier(&handle->woal_inet6_notifier);
|
||||
#endif
|
||||
|
||||
/* Remove interface */
|
||||
for (i = 0; i < handle->priv_num; i++)
|
||||
woal_remove_interface(handle, i);
|
||||
|
@ -303,7 +346,7 @@ perform_init:
|
|||
}
|
||||
|
||||
#ifdef PCIE9098
|
||||
if (card->dev->device == PCIE_DEVICE_ID_NXP_88W9098P_FN1)
|
||||
if (card->dev->device == PCIE_DEVICE_ID_88W9098P_FN1)
|
||||
mlan_set_int_mode(handle->pmlan_adapter, pcie_int_mode, 1);
|
||||
else
|
||||
#endif
|
||||
|
@ -346,11 +389,13 @@ err_init_fw:
|
|||
wait_event_interruptible(handle->init_wait_q,
|
||||
handle->init_wait_q_woken);
|
||||
}
|
||||
#ifdef ANDROID_KERNEL
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||
wakeup_source_trash(&handle->ws);
|
||||
#else
|
||||
wake_lock_destroy(&handle->wake_lock);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_FS
|
||||
woal_proc_exit(handle);
|
||||
#endif
|
||||
|
@ -582,14 +627,11 @@ static int woal_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
goto done;
|
||||
}
|
||||
}
|
||||
flush_workqueue(handle->workqueue);
|
||||
flush_workqueue(handle->evt_workqueue);
|
||||
if (handle->rx_workqueue)
|
||||
flush_workqueue(handle->rx_workqueue);
|
||||
if (handle->tx_workqueue)
|
||||
flush_workqueue(handle->tx_workqueue);
|
||||
woal_flush_workqueue(handle);
|
||||
if (!keep_power) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
|
||||
woal_do_flr(handle, true, false);
|
||||
#endif
|
||||
handle->surprise_removed = MTRUE;
|
||||
handle->is_suspended = MTRUE;
|
||||
}
|
||||
|
@ -655,7 +697,9 @@ static int woal_pcie_resume(struct pci_dev *pdev)
|
|||
pci_enable_wake(pdev, PCI_D0, 0);
|
||||
if (!keep_power) {
|
||||
handle->surprise_removed = MFALSE;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
|
||||
woal_do_flr(handle, false, false);
|
||||
#endif
|
||||
} else {
|
||||
if (woal_check_driver_status(handle)) {
|
||||
PRINTM(MERROR, "Resuem, device is in hang state\n");
|
||||
|
@ -1300,7 +1344,7 @@ static mlan_status woal_pcie_register_dev(moal_handle *handle)
|
|||
}
|
||||
|
||||
#ifdef PCIE9098
|
||||
if (card->dev->device == PCIE_DEVICE_ID_NXP_88W9098P_FN1)
|
||||
if (card->dev->device == PCIE_DEVICE_ID_88W9098P_FN1)
|
||||
mlan_set_int_mode(handle->pmlan_adapter, pcie_int_mode, 1);
|
||||
else
|
||||
#endif
|
||||
|
@ -1426,7 +1470,7 @@ void woal_pcie_bus_unregister(void)
|
|||
LEAVE();
|
||||
}
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
#define PCIE9098_DUMP_CTRL_REG 0x1C94
|
||||
#define PCIE9098_DUMP_START_REG 0x1C98
|
||||
#define PCIE9098_DUMP_END_REG 0x1C9F
|
||||
|
@ -1437,7 +1481,7 @@ void woal_pcie_bus_unregister(void)
|
|||
#define DEBUG_DUMP_END_REG 0xCFF
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
#define PCIE9098_SCRATCH_12_REG 0x1C90
|
||||
#define PCIE9098_SCRATCH_14_REG 0x1C98
|
||||
#define PCIE9098_SCRATCH_15_REG 0x1C9C
|
||||
|
@ -1473,7 +1517,7 @@ static int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
t_u32 dump_end_reg = 0;
|
||||
t_u32 scratch_14_reg = 0;
|
||||
t_u32 scratch_15_reg = 0;
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
/* Tx/Rx/Event AMDA start address */
|
||||
t_u32 adma_reg_table[] = {0x10000, 0x10800, 0x10880, 0x11000, 0x11080};
|
||||
t_u8 j;
|
||||
|
@ -1501,8 +1545,9 @@ static int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
reg = PCIE9098_SCRATCH_12_REG;
|
||||
dump_start_reg = PCIE9098_DUMP_REG_START;
|
||||
|
@ -1544,8 +1589,9 @@ static int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
}
|
||||
i++;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
drv_ptr += sprintf(
|
||||
drv_ptr,
|
||||
|
@ -1566,6 +1612,7 @@ static int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
|
|||
drv_ptr += sprintf(drv_ptr, "%s\n", buf);
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
drv_ptr += sprintf(drv_ptr,
|
||||
"ADMA Tx/Rx/Event/Cmd/CmdResp registers:\n");
|
||||
|
@ -1619,7 +1666,7 @@ static void woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
t_u32 dump_end_reg = 0;
|
||||
t_u32 scratch_14_reg = 0;
|
||||
t_u32 scratch_15_reg = 0;
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
/* Tx/Rx/Event AMDA start address */
|
||||
t_u32 adma_reg_table[] = {0x10000, 0x10800, 0x10880, 0x11000, 0x11080};
|
||||
t_u8 j;
|
||||
|
@ -1643,8 +1690,9 @@ static void woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
reg = PCIE9098_SCRATCH_12_REG;
|
||||
dump_start_reg = PCIE9098_DUMP_START_REG;
|
||||
|
@ -1681,8 +1729,9 @@ static void woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
}
|
||||
i++;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
PRINTM(MMSG, "PCIE registers from offset 0x1c20 to 0x1c9c:\n");
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
@ -1701,6 +1750,7 @@ static void woal_pcie_reg_dbg(moal_handle *phandle)
|
|||
PRINTM(MMSG, "%s\n", buf);
|
||||
}
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
PRINTM(MMSG, "ADMA Tx/Rx/Event/Cmd/CmdResp registers:\n");
|
||||
for (j = 0; j < ARRAY_SIZE(adma_reg_table); j++) {
|
||||
|
@ -1767,7 +1817,8 @@ static memory_type_mapping mem_type_mapping_tbl_8897[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097) || \
|
||||
defined(PCIENW62X)
|
||||
#define DEBUG_HOST_READY_8997 0xCC
|
||||
#define DEBUG_HOST_EVENT_READY 0xAA
|
||||
static memory_type_mapping mem_type_mapping_tbl_8997 = {"DUMP", NULL, NULL,
|
||||
|
@ -1776,7 +1827,7 @@ static memory_type_mapping mem_type_mapping_tbl_8997 = {"DUMP", NULL, NULL,
|
|||
#endif
|
||||
|
||||
#if defined(PCIE8897) || defined(PCIE8997) || defined(PCIE9098) || \
|
||||
defined(PCIE9097)
|
||||
defined(PCIE9097) || defined(PCIENW62X)
|
||||
/**
|
||||
* @brief This function reads data by 8 bit from card register
|
||||
*
|
||||
|
@ -1824,8 +1875,9 @@ static rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump)
|
||||
debug_host_ready = DEBUG_HOST_EVENT_READY;
|
||||
|
@ -1840,8 +1892,9 @@ static rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
|||
PRINTM(MERROR, "PCIE Write ERR\n");
|
||||
return RDWR_STATUS_FAILURE;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump)
|
||||
return RDWR_STATUS_SUCCESS;
|
||||
|
@ -1906,8 +1959,8 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
rdwr_status stat;
|
||||
t_u8 i = 0;
|
||||
t_u8 read_reg = 0;
|
||||
t_u32 memory_size = 0, DEBUG_MEMDUMP_FINISH;
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
t_u32 memory_size = 0;
|
||||
t_u32 memdump_finsh = 0;
|
||||
t_u8 *end_ptr = NULL;
|
||||
memory_type_mapping *mem_type_mapping_tbl = mem_type_mapping_tbl_8897;
|
||||
|
||||
|
@ -1915,16 +1968,17 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
DEBUG_MEMDUMP_FINISH = DEBUG_MEMDUMP_FINISH_8897;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directory*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strcpy(path_name, "/data");
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
if (!phandle->fw_dump_buf) {
|
||||
ret = moal_vmalloc(phandle, FW_DUMP_INFO_LEN,
|
||||
&(phandle->fw_dump_buf));
|
||||
if (ret != MLAN_STATUS_SUCCESS || !phandle->fw_dump_buf) {
|
||||
PRINTM(MERROR, "Failed to vmalloc fw dump bufffer\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
memset(phandle->fw_dump_buf, 0x00, FW_DUMP_INFO_LEN);
|
||||
}
|
||||
phandle->fw_dump_len = 0;
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "====PCIE DEBUG MODE OUTPUT START: %u.%06u ====\n", sec,
|
||||
|
@ -1960,7 +2014,7 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
if (memory_size == 0) {
|
||||
PRINTM(MMSG, "Firmware Dump Finished!\n");
|
||||
ret = woal_pcie_write_reg(phandle, DEBUG_DUMP_CTRL_REG,
|
||||
DEBUG_MEMDUMP_FINISH);
|
||||
memdump_finsh);
|
||||
if (ret) {
|
||||
PRINTM(MERROR,
|
||||
"PCIE Write MEMDUMP_FINISH ERR\n");
|
||||
|
@ -2013,17 +2067,11 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
(unsigned int)(dbg_ptr -
|
||||
mem_type_mapping_tbl[idx]
|
||||
.mem_Ptr));
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s%s", "file_pcie_",
|
||||
mem_type_mapping_tbl[idx].mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size))
|
||||
PRINTM(MMSG,
|
||||
"Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
woal_save_dump_info_to_buf(
|
||||
phandle,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size,
|
||||
mem_type_mapping_tbl[idx].type);
|
||||
moal_vfree(phandle,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr);
|
||||
mem_type_mapping_tbl[idx].mem_Ptr = NULL;
|
||||
|
@ -2031,15 +2079,11 @@ static void woal_pcie_dump_fw_info_v1(moal_handle *phandle)
|
|||
}
|
||||
} while (1);
|
||||
}
|
||||
woal_append_end_block(phandle);
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "====PCIE DEBUG MODE OUTPUT END: %u.%06u ====\n", sec,
|
||||
usec);
|
||||
/* end dump fw memory */
|
||||
memset(firmware_dump_file, 0, sizeof(firmware_dump_file));
|
||||
sprintf(firmware_dump_file, "%s/%s", path_name, file_name);
|
||||
moal_memcpy_ext(phandle, phandle->firmware_dump_file,
|
||||
firmware_dump_file, sizeof(firmware_dump_file),
|
||||
sizeof(phandle->firmware_dump_file));
|
||||
done:
|
||||
for (idx = 0;
|
||||
idx < dump_num && idx < ARRAY_SIZE(mem_type_mapping_tbl_8897);
|
||||
|
@ -2054,7 +2098,8 @@ done:
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097) || \
|
||||
defined(PCIENW62X)
|
||||
/**
|
||||
* @brief This function dump firmware memory to file
|
||||
*
|
||||
|
@ -2073,8 +2118,6 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
t_u8 doneflag = 0;
|
||||
rdwr_status stat;
|
||||
t_u32 memory_size = 0;
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
moal_handle *ref_handle;
|
||||
t_u8 *end_ptr = NULL;
|
||||
memory_type_mapping *mem_type_mapping_tbl = &mem_type_mapping_tbl_8997;
|
||||
t_u32 dump_start_reg = 0;
|
||||
|
@ -2084,8 +2127,9 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
if (phandle->event_fw_dump) {
|
||||
if (RDWR_STATUS_FAILURE !=
|
||||
|
@ -2097,18 +2141,6 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directory*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strcpy(path_name, "/data");
|
||||
#endif
|
||||
PRINTM(MMSG, "Create DUMP directory success:dir_name=%s\n", path_name);
|
||||
ref_handle = (moal_handle *)phandle->pref_mac;
|
||||
if (ref_handle)
|
||||
woal_dump_drv_info(ref_handle, path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -2117,8 +2149,9 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
/* read the number of the memories which will dump */
|
||||
if (RDWR_STATUS_FAILURE == woal_pcie_rdwr_firmware(phandle, doneflag))
|
||||
goto done;
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
if (IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
dump_start_reg = PCIE9098_DUMP_START_REG;
|
||||
dump_end_reg = PCIE9098_DUMP_END_REG;
|
||||
|
@ -2206,17 +2239,14 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
mem_type_mapping_tbl->mem_name,
|
||||
dbg_ptr - mem_type_mapping_tbl->mem_Ptr);
|
||||
#endif
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s%s", "file_pcie_",
|
||||
mem_type_mapping_tbl->mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl->mem_Ptr,
|
||||
dbg_ptr - mem_type_mapping_tbl->mem_Ptr))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
moal_vfree(phandle, mem_type_mapping_tbl->mem_Ptr);
|
||||
if (phandle->fw_dump_buf) {
|
||||
moal_vfree(phandle, phandle->fw_dump_buf);
|
||||
phandle->fw_dump_buf = NULL;
|
||||
phandle->fw_dump_len = 0;
|
||||
}
|
||||
phandle->fw_dump_buf = mem_type_mapping_tbl->mem_Ptr;
|
||||
phandle->fw_dump_len =
|
||||
dbg_ptr - mem_type_mapping_tbl->mem_Ptr;
|
||||
mem_type_mapping_tbl->mem_Ptr = NULL;
|
||||
break;
|
||||
}
|
||||
|
@ -2225,11 +2255,6 @@ static void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
|
|||
PRINTM(MMSG, "====PCIE DEBUG MODE OUTPUT END: %u.%06u ====\n", sec,
|
||||
usec);
|
||||
/* end dump fw memory */
|
||||
memset(firmware_dump_file, 0, sizeof(firmware_dump_file));
|
||||
sprintf(firmware_dump_file, "%s/%s", path_name, file_name);
|
||||
moal_memcpy_ext(phandle, phandle->firmware_dump_file,
|
||||
firmware_dump_file, sizeof(firmware_dump_file),
|
||||
sizeof(phandle->firmware_dump_file));
|
||||
done:
|
||||
if (mem_type_mapping_tbl->mem_Ptr) {
|
||||
moal_vfree(phandle, mem_type_mapping_tbl->mem_Ptr);
|
||||
|
@ -2251,7 +2276,7 @@ static t_u8 woal_pcie_is_second_mac(moal_handle *handle)
|
|||
{
|
||||
#ifdef PCIE9098
|
||||
pcie_service_card *card = (pcie_service_card *)handle->card;
|
||||
if (card->dev->device == PCIE_DEVICE_ID_NXP_88W9098P_FN1)
|
||||
if (card->dev->device == PCIE_DEVICE_ID_88W9098P_FN1)
|
||||
return MTRUE;
|
||||
#endif
|
||||
return MFALSE;
|
||||
|
@ -2265,21 +2290,28 @@ static void woal_pcie_dump_fw_info(moal_handle *phandle)
|
|||
if (IS_PCIE8897(phandle->card_type))
|
||||
woal_pcie_dump_fw_info_v1(phandle);
|
||||
#endif
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097) || \
|
||||
defined(PCIENW62X)
|
||||
if (IS_PCIE8997(phandle->card_type) ||
|
||||
IS_PCIENW62X(phandle->card_type) ||
|
||||
IS_PCIE9098(phandle->card_type) ||
|
||||
IS_PCIE9097(phandle->card_type)) {
|
||||
woal_pcie_dump_fw_info_v2(phandle);
|
||||
if (phandle->event_fw_dump) {
|
||||
phandle->event_fw_dump = MFALSE;
|
||||
queue_work(phandle->workqueue, &phandle->main_work);
|
||||
phandle->is_fw_dump_timer_set = MTRUE;
|
||||
woal_mod_timer(&phandle->fw_dump_timer, MOAL_TIMER_5S);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
woal_send_fw_dump_complete_event(
|
||||
woal_get_priv(phandle, MLAN_BSS_ROLE_ANY));
|
||||
phandle->fw_dump = MFALSE;
|
||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MFALSE);
|
||||
queue_work(phandle->workqueue, &phandle->main_work);
|
||||
woal_process_hang(phandle);
|
||||
}
|
||||
|
||||
static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
||||
|
@ -2290,12 +2322,14 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
moal_handle *ref_handle = NULL;
|
||||
#endif
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097) || \
|
||||
defined(PCIENW62X)
|
||||
t_u32 rev_id_reg = handle->card_info->rev_id_reg;
|
||||
t_u32 revision_id = 0;
|
||||
#endif
|
||||
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097)
|
||||
#if defined(PCIE8997) || defined(PCIE9098) || defined(PCIE9097) || \
|
||||
defined(PCIENW62X)
|
||||
t_u32 host_strap_reg = handle->card_info->host_strap_reg;
|
||||
t_u32 magic_reg = handle->card_info->magic_reg;
|
||||
t_u32 strap = 0;
|
||||
|
@ -2348,7 +2382,7 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
#endif
|
||||
#ifdef PCIE9098
|
||||
if (IS_PCIE9098(handle->card_type)) {
|
||||
if (card->dev->device == PCIE_DEVICE_ID_NXP_88W9098P_FN0) {
|
||||
if (card->dev->device == PCIE_DEVICE_ID_88W9098P_FN0) {
|
||||
woal_pcie_read_reg(handle, rev_id_reg, &revision_id);
|
||||
woal_pcie_read_reg(handle, host_strap_reg, &strap);
|
||||
woal_pcie_read_reg(handle, magic_reg, &magic);
|
||||
|
@ -2453,6 +2487,26 @@ static mlan_status woal_pcie_get_fw_name(moal_handle *handle)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef PCIENW62X
|
||||
if (IS_PCIENW62X(handle->card_type)) {
|
||||
woal_pcie_read_reg(handle, rev_id_reg, &revision_id);
|
||||
woal_pcie_read_reg(handle, host_strap_reg, &strap);
|
||||
woal_pcie_read_reg(handle, magic_reg, &magic);
|
||||
revision_id &= 0xff;
|
||||
strap &= 0x7;
|
||||
magic &= 0xff;
|
||||
PRINTM(MCMND, "magic=0x%x, strap=0x%x, revision_id=0x%x\n",
|
||||
magic, strap, revision_id);
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_PCIE_UART)
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEUARTNW62X_DEFAULT_COMBO_FW_NAME);
|
||||
else
|
||||
strcpy(handle->card_info->fw_name,
|
||||
PCIEUSBNW62X_DEFAULT_COMBO_FW_NAME);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
done:
|
||||
PRINTM(MCMND, "combo fw:%s wlan fw:%s \n", handle->card_info->fw_name,
|
||||
handle->card_info->fw_name_wlan);
|
||||
|
|
|
@ -4,20 +4,28 @@
|
|||
* driver.
|
||||
*
|
||||
*
|
||||
* Copyright 2014-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -29,27 +37,34 @@ Change log:
|
|||
#ifndef _MOAL_PCIE_H_
|
||||
#define _MOAL_PCIE_H_
|
||||
|
||||
#define PCIE_VENDOR_ID_NXP (0x11ab)
|
||||
#define PCIE_VENDOR_ID_V2_NXP (0x1b4b)
|
||||
#define PCIE_VENDOR_ID_MRVL (0x11ab)
|
||||
#define PCIE_VENDOR_ID_V2_MRVL (0x1b4b)
|
||||
#define PCIE_VENDOR_ID_NXP (0x1131)
|
||||
|
||||
#ifdef PCIE8997
|
||||
/** PCIE device ID for 8997 card */
|
||||
#define PCIE_DEVICE_ID_NXP_88W8997P (0x2b42)
|
||||
#define PCIE_DEVICE_ID_88W8997P (0x2b42)
|
||||
#endif
|
||||
#ifdef PCIE8897
|
||||
/** PCIE device ID for 8897 card */
|
||||
#define PCIE_DEVICE_ID_NXP_88W8897P (0x2b38)
|
||||
#define PCIE_DEVICE_ID_88W8897P (0x2b38)
|
||||
#endif
|
||||
|
||||
#ifdef PCIE9097
|
||||
/** PCIE device ID for 9097 card */
|
||||
#define PCIE_DEVICE_ID_NXP_88W9097 (0x2b56)
|
||||
#define PCIE_DEVICE_ID_88W9097 (0x2b56)
|
||||
#endif
|
||||
|
||||
#ifdef PCIE9098
|
||||
/** PCIE device ID for 9098 card FN0 */
|
||||
#define PCIE_DEVICE_ID_NXP_88W9098P_FN0 (0x2b43)
|
||||
#define PCIE_DEVICE_ID_88W9098P_FN0 (0x2b43)
|
||||
/** PCIE device ID for 9098 card FN1 */
|
||||
#define PCIE_DEVICE_ID_NXP_88W9098P_FN1 (0x2b44)
|
||||
#define PCIE_DEVICE_ID_88W9098P_FN1 (0x2b44)
|
||||
#endif
|
||||
|
||||
#ifdef PCIENW62X
|
||||
/** PCIE device ID for NW62X card FN0 */
|
||||
#define PCIE_DEVICE_ID_88WNW62X (0x3000)
|
||||
#endif
|
||||
|
||||
#include <linux/version.h>
|
||||
|
@ -106,7 +121,14 @@ Change log:
|
|||
#define PCIE9097_WLAN_V1_FW_NAME "nxp/pcieiw620_wlan_v1.bin"
|
||||
#endif /* PCIE9097 */
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097)
|
||||
#ifdef PCIENW62X
|
||||
#define PCIENW62X_DEFAULT_COMBO_FW_NAME "nxp/pcieusbnw62x_combo.bin"
|
||||
#define PCIEUARTNW62X_DEFAULT_COMBO_FW_NAME "nxp/pcieuartnw62x_combo.bin"
|
||||
#define PCIEUSBNW62X_DEFAULT_COMBO_FW_NAME "nxp/pcieusbnw62x_combo.bin"
|
||||
#define PCIENW62X_DEFAULT_WLAN_FW_NAME "nxp/pcienw62x_wlan.bin"
|
||||
#endif /* PCIE8997 */
|
||||
|
||||
#if defined(PCIE9098) || defined(PCIE9097) || defined(PCIENW62X)
|
||||
#define PCIE_NUM_MSIX_VECTORS 32
|
||||
#else
|
||||
#define PCIE_NUM_MSIX_VECTORS 4
|
||||
|
|
|
@ -5,18 +5,26 @@
|
|||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -803,7 +811,7 @@ static int woal_11n_prio_tbl(moal_private *priv, struct iwreq *wrq)
|
|||
|
||||
ENTER();
|
||||
|
||||
if ((wrq->u.data.pointer == NULL)) {
|
||||
if (wrq->u.data.pointer == NULL) {
|
||||
LEAVE();
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1792,6 +1800,145 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get network monitor configurations
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param wrq A pointer to iwreq structure
|
||||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int woal_net_monitor_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||
{
|
||||
int user_data_len = wrq->u.data.length;
|
||||
int data[5] = {0}, copy_len;
|
||||
int ret = 0;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_misc_cfg *misc = NULL;
|
||||
mlan_ds_misc_net_monitor *net_mon = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
copy_len = MIN(sizeof(data), sizeof(int) * user_data_len);
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
LEAVE();
|
||||
return -ENOMEM;
|
||||
}
|
||||
misc = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
net_mon = (mlan_ds_misc_net_monitor *)&misc->param.net_mon;
|
||||
misc->sub_command = MLAN_OID_MISC_NET_MONITOR;
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
|
||||
if (!user_data_len) {
|
||||
req->action = MLAN_ACT_GET;
|
||||
} else if (user_data_len == 1 || user_data_len == 4 ||
|
||||
user_data_len == 5) {
|
||||
if (copy_from_user(data, wrq->u.data.pointer, copy_len)) {
|
||||
PRINTM(MERROR, "Copy from user failed\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
if (data[0] != MTRUE && data[0] != MFALSE) {
|
||||
PRINTM(MERROR,
|
||||
"NET_MON: Activity should be enable(=1)/disable(=0)\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
net_mon->enable_net_mon = data[0];
|
||||
if (data[0] == MTRUE) {
|
||||
int i;
|
||||
if (user_data_len != 4 && user_data_len != 5) {
|
||||
PRINTM(MERROR,
|
||||
"NET_MON: Invalid number of args!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
/* Supported filter flags */
|
||||
if (!data[1] ||
|
||||
data[1] & ~(MLAN_NETMON_DATA_FRAME |
|
||||
MLAN_NETMON_MANAGEMENT_FRAME |
|
||||
MLAN_NETMON_CONTROL_FRAME)) {
|
||||
PRINTM(MERROR,
|
||||
"NET_MON: Invalid filter flag\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
/* Supported bands */
|
||||
for (i = 0; i < (int)sizeof(SupportedInfraBand); i++)
|
||||
if (data[2] == SupportedInfraBand[i])
|
||||
break;
|
||||
if (i == sizeof(SupportedInfraBand)) {
|
||||
PRINTM(MERROR, "NET_MON: Invalid band\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
/* Supported channel */
|
||||
if (data[3] < 1 || data[3] > MLAN_MAX_CHANNEL) {
|
||||
PRINTM(MERROR,
|
||||
"NET_MON: Invalid channel number\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
if (user_data_len == 5) {
|
||||
/* Secondary channel offset */
|
||||
if (!(data[2] & (BAND_GN | BAND_AN))) {
|
||||
PRINTM(MERROR,
|
||||
"No 11n in band, can not set "
|
||||
"secondary channel offset\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
if ((data[4] != CHANNEL_BW_20MHZ) &&
|
||||
(data[4] != CHANNEL_BW_40MHZ_ABOVE) &&
|
||||
(data[4] != CHANNEL_BW_40MHZ_BELOW) &&
|
||||
(data[4] != CHANNEL_BW_80MHZ)) {
|
||||
PRINTM(MERROR,
|
||||
"Invalid secondary channel bandwidth, "
|
||||
"only allowed 0, 1, 3 or 4\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
net_mon->chan_bandwidth = data[4];
|
||||
}
|
||||
net_mon->filter_flag = data[1];
|
||||
net_mon->band = data[2];
|
||||
net_mon->channel = data[3];
|
||||
}
|
||||
req->action = MLAN_ACT_SET;
|
||||
} else {
|
||||
PRINTM(MERROR, "NET_MON: Invalid number of args!\n");
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
data[0] = net_mon->enable_net_mon;
|
||||
data[1] = net_mon->filter_flag;
|
||||
data[2] = net_mon->band;
|
||||
data[3] = net_mon->channel;
|
||||
data[4] = net_mon->chan_bandwidth;
|
||||
wrq->u.data.length = 5;
|
||||
if (copy_to_user(wrq->u.data.pointer, data,
|
||||
sizeof(int) * wrq->u.data.length)) {
|
||||
PRINTM(MERROR, "Copy to user failed\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get LOG
|
||||
*
|
||||
|
@ -3898,6 +4045,57 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief arpfilter ioctl function
|
||||
*
|
||||
* @param priv A pointer to moal_private structure
|
||||
* @param wrq A pointer to iwreq structure
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
static int woal_arp_filter(moal_private *priv, struct iwreq *wrq)
|
||||
{
|
||||
int ret = 0;
|
||||
mlan_ds_misc_cfg *misc = NULL;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
int data_length = wrq->u.data.length, copy_len;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
|
||||
ENTER();
|
||||
|
||||
copy_len = MIN(sizeof(misc->param.gen_ie.ie_data),
|
||||
sizeof(int) * data_length);
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
misc = (mlan_ds_misc_cfg *)req->pbuf;
|
||||
misc->sub_command = MLAN_OID_MISC_GEN_IE;
|
||||
req->req_id = MLAN_IOCTL_MISC_CFG;
|
||||
req->action = MLAN_ACT_SET;
|
||||
misc->param.gen_ie.type = MLAN_IE_TYPE_ARP_FILTER;
|
||||
misc->param.gen_ie.len = data_length;
|
||||
|
||||
/* get the whole command from user */
|
||||
if (copy_from_user(misc->param.gen_ie.ie_data, wrq->u.data.pointer,
|
||||
copy_len)) {
|
||||
PRINTM(MERROR, "copy from user failed\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set/get IP address
|
||||
*
|
||||
|
@ -4536,17 +4734,26 @@ done:
|
|||
static int woal_set_user_scan_ext_ioctl(moal_private *priv, struct iwreq *wrq)
|
||||
{
|
||||
int ret = 0;
|
||||
wlan_user_scan_cfg scan_req;
|
||||
wlan_user_scan_cfg *scan_req;
|
||||
ENTER();
|
||||
memset(&scan_req, 0x00, sizeof(scan_req));
|
||||
if (copy_from_user(&scan_req, wrq->u.data.pointer,
|
||||
MIN(wrq->u.data.length, sizeof(scan_req)))) {
|
||||
scan_req = (wlan_user_scan_cfg *)kmalloc(sizeof(wlan_user_scan_cfg),
|
||||
GFP_KERNEL);
|
||||
if (!scan_req) {
|
||||
PRINTM(MERROR, "Malloc buffer failed\n");
|
||||
LEAVE();
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(scan_req, 0x00, sizeof(wlan_user_scan_cfg));
|
||||
if (copy_from_user(scan_req, wrq->u.data.pointer,
|
||||
MIN(wrq->u.data.length,
|
||||
sizeof(wlan_user_scan_cfg)))) {
|
||||
PRINTM(MINFO, "Copy from user failed\n");
|
||||
LEAVE();
|
||||
return -EFAULT;
|
||||
}
|
||||
if (MLAN_STATUS_FAILURE == woal_do_scan(priv, &scan_req))
|
||||
if (MLAN_STATUS_FAILURE == woal_do_scan(priv, scan_req))
|
||||
ret = -EFAULT;
|
||||
kfree(scan_req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
@ -6527,6 +6734,9 @@ int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
case WOAL_SLEEP_PARAMS:
|
||||
ret = woal_sleep_params_ioctl(priv, wrq);
|
||||
break;
|
||||
case WOAL_NET_MONITOR:
|
||||
ret = woal_net_monitor_ioctl(priv, wrq);
|
||||
break;
|
||||
case WOAL_DFS_TESTING:
|
||||
ret = woal_dfs_testing(priv, wrq);
|
||||
break;
|
||||
|
@ -6634,6 +6844,9 @@ int woal_wext_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
|||
case WOAL_HOST_CMD:
|
||||
ret = woal_host_command(priv, wrq);
|
||||
break;
|
||||
case WOAL_ARP_FILTER:
|
||||
ret = woal_arp_filter(priv, wrq);
|
||||
break;
|
||||
case WOAL_SET_INTS_GET_CHARS:
|
||||
switch ((int)wrq->u.data.flags) {
|
||||
case WOAL_READ_EEPROM:
|
||||
|
|
|
@ -1,23 +1,30 @@
|
|||
|
||||
/** @file moal_priv.h
|
||||
*
|
||||
* @brief This file contains definition for extended private IOCTL call.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -130,6 +137,8 @@ Change log:
|
|||
#define WOAL_ADDBA_REJECT 27
|
||||
/** Private command ID to set/get sleep parameters */
|
||||
#define WOAL_SLEEP_PARAMS 28
|
||||
/** Private command ID to set/get network monitor */
|
||||
#define WOAL_NET_MONITOR 30
|
||||
/** Private command ID to set/get TX BF capabilities */
|
||||
#define WOAL_TX_BF_CAP 31
|
||||
/** Private command ID to set/get dfs testing settings */
|
||||
|
@ -235,6 +244,9 @@ Change log:
|
|||
/** Private command ID for hostcmd */
|
||||
#define WOAL_HOST_CMD (WOAL_IOCTL + 17)
|
||||
|
||||
/** Private command ID for arpfilter */
|
||||
#define WOAL_ARP_FILTER (WOAL_IOCTL + 19)
|
||||
|
||||
/** Private command ID to set ints and get chars */
|
||||
#define WOAL_SET_INTS_GET_CHARS (WOAL_IOCTL + 21)
|
||||
/** Private command ID to read EEPROM data */
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
/** @file moal_proc.c
|
||||
/** @file moal_proc.c
|
||||
*
|
||||
* @brief This file contains functions for proc file.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -358,7 +366,9 @@ exit:
|
|||
|
||||
static int woal_info_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_info_proc_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_info_proc_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_info_proc_read, PDE(inode)->data);
|
||||
|
@ -513,7 +523,10 @@ static ssize_t woal_config_write(struct file *f, const char __user *buf,
|
|||
#endif /* SD */
|
||||
if (!strncmp(databuf, "debug_dump", strlen("debug_dump"))) {
|
||||
PRINTM(MERROR, "Recevie debug_dump command\n");
|
||||
handle->driver_status = MTRUE;
|
||||
#ifdef USB
|
||||
if (!IS_USB(handle->card_type))
|
||||
#endif
|
||||
handle->driver_status = MTRUE;
|
||||
ref_handle = (moal_handle *)handle->pref_mac;
|
||||
if (ref_handle) {
|
||||
priv = woal_get_priv(ref_handle, MLAN_BSS_ROLE_ANY);
|
||||
|
@ -773,7 +786,9 @@ static int woal_config_read(struct seq_file *sfp, void *data)
|
|||
|
||||
static int woal_config_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_config_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_config_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_config_read, PDE(inode)->data);
|
||||
|
@ -799,6 +814,160 @@ static const struct file_operations config_proc_fops = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static int woal_drv_dump_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
moal_handle *handle = (moal_handle *)sfp->private;
|
||||
int ret = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (MODULE_GET == 0) {
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!handle) {
|
||||
PRINTM(MERROR, "handle is NULL!\n");
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
if (!handle->drv_dump_buf || !handle->drv_dump_len)
|
||||
handle->drv_dump_buf =
|
||||
woal_dump_drv_info(handle, &handle->drv_dump_len);
|
||||
if (!handle->drv_dump_buf || !handle->drv_dump_len) {
|
||||
PRINTM(MERROR,
|
||||
"driver dump buffer is NULL or total length is zero\n");
|
||||
goto done;
|
||||
}
|
||||
if (sfp->size < handle->drv_dump_len) {
|
||||
PRINTM(MERROR,
|
||||
"drv dump size too big, size=%d, drv_dump_len=%d\n",
|
||||
(int)sfp->size, handle->drv_dump_len);
|
||||
sfp->count = sfp->size;
|
||||
ret = 0;
|
||||
MODULE_PUT;
|
||||
return ret;
|
||||
}
|
||||
memset(sfp->buf, 0x00, sfp->size);
|
||||
sfp->count = handle->drv_dump_len;
|
||||
moal_memcpy_ext(handle, sfp->buf, handle->drv_dump_buf,
|
||||
handle->drv_dump_len, sfp->size);
|
||||
done:
|
||||
moal_vfree(handle, handle->drv_dump_buf);
|
||||
handle->drv_dump_len = 0;
|
||||
handle->drv_dump_buf = NULL;
|
||||
MODULE_PUT;
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int woal_drv_dump_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_drv_dump_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_drv_dump_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_drv_dump_read, PDE(inode)->data);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
||||
static const struct proc_ops drv_dump_fops = {
|
||||
.proc_open = woal_drv_dump_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations drv_dump_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = woal_drv_dump_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
static int woal_fw_dump_read(struct seq_file *sfp, void *data)
|
||||
{
|
||||
moal_handle *handle = (moal_handle *)sfp->private;
|
||||
int ret = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (MODULE_GET == 0) {
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!handle) {
|
||||
PRINTM(MERROR, "handle is null!\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (handle->fw_dump == MTRUE) {
|
||||
PRINTM(MERROR, "fw dump is in progress\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!handle->fw_dump_buf || !handle->fw_dump_len) {
|
||||
PRINTM(MERROR,
|
||||
"fw dump buffer is NULL or total length is zero\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (sfp->size < handle->fw_dump_len) {
|
||||
PRINTM(MERROR,
|
||||
"fw dump size too big, size=%d, fw_dump_len=%ld\n",
|
||||
(int)sfp->size, (long int)handle->fw_dump_len);
|
||||
sfp->count = sfp->size;
|
||||
ret = 0;
|
||||
MODULE_PUT;
|
||||
return ret;
|
||||
}
|
||||
|
||||
sfp->count = handle->fw_dump_len;
|
||||
moal_memcpy_ext(handle, sfp->buf, handle->fw_dump_buf,
|
||||
handle->fw_dump_len, sfp->size);
|
||||
moal_vfree(handle, handle->fw_dump_buf);
|
||||
handle->fw_dump_buf = NULL;
|
||||
handle->fw_dump_len = 0;
|
||||
|
||||
done:
|
||||
MODULE_PUT;
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int woal_fw_dump_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_fw_dump_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_fw_dump_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_fw_dump_read, PDE(inode)->data);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
||||
static const struct proc_ops fw_dump_fops = {
|
||||
.proc_open = woal_fw_dump_proc_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = single_release,
|
||||
};
|
||||
#else
|
||||
static const struct file_operations fw_dump_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = woal_fw_dump_proc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief wifi status proc read function
|
||||
*
|
||||
|
@ -825,7 +994,9 @@ static int woal_wifi_status_read(struct seq_file *sfp, void *data)
|
|||
|
||||
static int woal_wifi_status_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
return single_open(file, woal_wifi_status_read, pde_data(inode));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
return single_open(file, woal_wifi_status_read, PDE_DATA(inode));
|
||||
#else
|
||||
return single_open(file, woal_wifi_status_read, PDE(inode)->data);
|
||||
|
@ -875,7 +1046,7 @@ int woal_string_to_number(char *s)
|
|||
} else
|
||||
base = 10;
|
||||
|
||||
for (s = s; *s; s++) {
|
||||
for (; *s; s++) {
|
||||
if ((*s >= '0') && (*s <= '9'))
|
||||
r = (r * base) + (*s - '0');
|
||||
else if ((*s >= 'A') && (*s <= 'F'))
|
||||
|
@ -910,7 +1081,7 @@ mlan_status woal_root_proc_init(void)
|
|||
}
|
||||
|
||||
/* create /proc/mwlan/wifi_status */
|
||||
proc_create_data(STATUS_PROC, 0644, proc_mwlan, &wifi_status_proc_fops,
|
||||
proc_create_data(STATUS_PROC, 0666, proc_mwlan, &wifi_status_proc_fops,
|
||||
NULL);
|
||||
|
||||
LEAVE();
|
||||
|
@ -949,6 +1120,8 @@ void woal_proc_init(moal_handle *handle)
|
|||
struct proc_dir_entry *pde = proc_mwlan;
|
||||
#endif
|
||||
char config_proc_dir[20];
|
||||
char drv_dump_dir[20];
|
||||
char fw_dump_dir[20];
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -992,7 +1165,7 @@ void woal_proc_init(moal_handle *handle)
|
|||
|
||||
strcpy(config_proc_dir, "config");
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
|
||||
r = proc_create_data(config_proc_dir, 0644, handle->proc_wlan,
|
||||
r = proc_create_data(config_proc_dir, 0666, handle->proc_wlan,
|
||||
&config_proc_fops, handle);
|
||||
#else
|
||||
r = create_proc_entry(config_proc_dir, 0644, handle->proc_wlan);
|
||||
|
@ -1004,6 +1177,34 @@ void woal_proc_init(moal_handle *handle)
|
|||
if (!r)
|
||||
PRINTM(MERROR, "Fail to create proc config\n");
|
||||
|
||||
strcpy(drv_dump_dir, "drv_dump");
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
|
||||
r = proc_create_data(drv_dump_dir, 0644, handle->proc_wlan,
|
||||
&drv_dump_fops, handle);
|
||||
#else
|
||||
r = create_proc_entry(drv_dump_dir, 0644, handle->proc_wlan);
|
||||
if (r) {
|
||||
r->data = handle;
|
||||
r->proc_fops = &drv_dump_fops;
|
||||
}
|
||||
#endif
|
||||
if (!r)
|
||||
PRINTM(MERROR, "Failed to create proc drv dump\n");
|
||||
|
||||
strcpy(fw_dump_dir, "fw_dump");
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
|
||||
r = proc_create_data(fw_dump_dir, 0644, handle->proc_wlan,
|
||||
&fw_dump_fops, handle);
|
||||
#else
|
||||
r = create_proc_entry(fw_dump_dir, 0644, handle->proc_wlan);
|
||||
if (r) {
|
||||
r->data = handle;
|
||||
r->proc_fops = &fw_dump_fops;
|
||||
}
|
||||
#endif
|
||||
if (!r)
|
||||
PRINTM(MERROR, "Failed to create proc fw dump\n");
|
||||
|
||||
done:
|
||||
LEAVE();
|
||||
}
|
||||
|
@ -1018,6 +1219,8 @@ done:
|
|||
void woal_proc_exit(moal_handle *handle)
|
||||
{
|
||||
char config_proc_dir[20];
|
||||
char drv_dump_dir[20];
|
||||
char fw_dump_dir[20];
|
||||
|
||||
ENTER();
|
||||
|
||||
|
@ -1025,6 +1228,10 @@ void woal_proc_exit(moal_handle *handle)
|
|||
if (handle->proc_wlan) {
|
||||
strcpy(config_proc_dir, "config");
|
||||
remove_proc_entry(config_proc_dir, handle->proc_wlan);
|
||||
strcpy(drv_dump_dir, "drv_dump");
|
||||
remove_proc_entry(drv_dump_dir, handle->proc_wlan);
|
||||
strcpy(fw_dump_dir, "fw_dump");
|
||||
remove_proc_entry(fw_dump_dir, handle->proc_wlan);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
|
||||
/* Remove only if we are the only instance using this */
|
||||
|
@ -1042,6 +1249,16 @@ void woal_proc_exit(moal_handle *handle)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
if (handle->fw_dump_buf) {
|
||||
moal_vfree(handle, handle->fw_dump_buf);
|
||||
handle->fw_dump_buf = NULL;
|
||||
handle->fw_dump_len = 0;
|
||||
}
|
||||
if (handle->drv_dump_buf) {
|
||||
moal_vfree(handle, handle->drv_dump_buf);
|
||||
handle->drv_dump_len = 0;
|
||||
handle->drv_dump_buf = NULL;
|
||||
}
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,23 +1,30 @@
|
|||
/** @file moal_sdio.h
|
||||
*
|
||||
* @brief This file contains definitions for SDIO interface.
|
||||
* driver.
|
||||
* @brief This file contains definitions for SDIO interface.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
/****************************************************
|
||||
|
@ -139,15 +146,26 @@ Change log:
|
|||
#define SD9097_WLAN_V1_FW_NAME "nxp/sdiw620_wlan_v1.bin"
|
||||
#endif /* SD9097 */
|
||||
|
||||
#ifdef SDNW62X
|
||||
#define SDNW62X_DEFAULT_COMBO_FW_NAME "nxp/sdsd_nw62x.bin"
|
||||
#define SDUARTNW62X_COMBO_FW_NAME "nxp/sduart_nw62x.bin"
|
||||
#define SDSDNW62X_COMBO_FW_NAME "sdsd_nw62x.bin"
|
||||
#define SDNW62X_DEFAULT_WLAN_FW_NAME "nxp/sd_nw62x.bin"
|
||||
#endif /* SDNW62X */
|
||||
|
||||
#ifdef SD9177
|
||||
#define SD9177_A0 0x01
|
||||
#define SD9177_A0 0x00
|
||||
#define SD9177_A1 0x01
|
||||
#define SD9177_DEFAULT_COMBO_FW_NAME "nxp/sdsd_nw61x.bin"
|
||||
#define SD9177_DEFAULT_COMBO_V1_FW_NAME "nxp/sduart_nw61x_v1.bin"
|
||||
#define SDUART9177_DEFAULT_COMBO_FW_NAME "nxp/sduart_nw61x.bin"
|
||||
#define SDSD9177_DEFAULT_COMBO_FW_NAME "sdsd_nw61x.bin"
|
||||
#define SD9177_DEFAULT_WLAN_FW_NAME "nxp/sd_w61x.bin"
|
||||
/** Device ID for SD9177 */
|
||||
#define SD_DEVICE_ID_9177 (0x0205)
|
||||
#define SDUART9177_DEFAULT_COMBO_V1_FW_NAME "nxp/sduart_nw61x_v1.bin"
|
||||
#define SDSD9177_DEFAULT_COMBO_V1_FW_NAME "sdsd_nw61x_v1.bin"
|
||||
#define SD9177_DEFAULT_WLAN_V1_FW_NAME "nxp/sd_w61x_v1.bin"
|
||||
#endif /* SD9177 */
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
/** @file moal_sdio_mmc.c
|
||||
/** @file moal_sdio.c
|
||||
*
|
||||
* @brief This file contains SDIO MMC IF (interface) module
|
||||
* related functions.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
/****************************************************
|
||||
|
@ -31,9 +39,7 @@ Change log:
|
|||
#include "moal_sdio.h"
|
||||
|
||||
/** define nxp vendor id */
|
||||
#ifdef SD9177
|
||||
#define NXP_VENDOR_ID 0x0471
|
||||
#endif
|
||||
#define MRVL_VENDOR_ID 0x02df
|
||||
|
||||
/********************************************************
|
||||
|
@ -83,6 +89,14 @@ static moal_if_ops sdiommc_ops;
|
|||
/** Device ID for SD9097 */
|
||||
#define SD_DEVICE_ID_9097 (0x9155)
|
||||
#endif
|
||||
#ifdef SD9177
|
||||
/** Device ID for SD9177 */
|
||||
#define SD_DEVICE_ID_9177 (0x0205)
|
||||
#endif
|
||||
#ifdef SDNW62X
|
||||
/** Device ID for SDNW62X */
|
||||
#define SD_DEVICE_ID_NW62X (0x020C)
|
||||
#endif
|
||||
|
||||
/** WLAN IDs */
|
||||
static const struct sdio_device_id wlan_ids[] = {
|
||||
|
@ -116,6 +130,9 @@ static const struct sdio_device_id wlan_ids[] = {
|
|||
#endif
|
||||
#ifdef SD9177
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_9177)},
|
||||
#endif
|
||||
#ifdef SDNW62X
|
||||
{SDIO_DEVICE(NXP_VENDOR_ID, SD_DEVICE_ID_NW62X)},
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
|
@ -381,6 +398,20 @@ static t_u16 woal_update_card_type(t_void *card)
|
|||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SDNW62X
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_NW62X) {
|
||||
card_type = CARD_TYPE_SDNW62X;
|
||||
moal_memcpy_ext(NULL, driver_version, CARD_SDNW62X,
|
||||
strlen(CARD_SDNW62X), strlen(driver_version));
|
||||
moal_memcpy_ext(
|
||||
NULL,
|
||||
driver_version + strlen(INTF_CARDTYPE) +
|
||||
strlen(KERN_VERSION),
|
||||
V17, strlen(V17),
|
||||
strlen(driver_version) -
|
||||
(strlen(INTF_CARDTYPE) + strlen(KERN_VERSION)));
|
||||
}
|
||||
#endif
|
||||
#ifdef SD9097
|
||||
if (cardp_sd->func->device == SD_DEVICE_ID_9097) {
|
||||
card_type = CARD_TYPE_SD9097;
|
||||
|
@ -1334,7 +1365,8 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
t_u32 rev_id_reg = handle->card_info->rev_id_reg;
|
||||
|
||||
#if defined(SD8987) || defined(SD8997) || defined(SD9098) || \
|
||||
defined(SD9097) || defined(SD8978) || defined(SD9177)
|
||||
defined(SD9097) || defined(SDNW62X) || defined(SD8978) || \
|
||||
defined(SD9177)
|
||||
t_u32 magic_reg = handle->card_info->magic_reg;
|
||||
t_u32 magic = 0;
|
||||
t_u32 host_strap_reg = handle->card_info->host_strap_reg;
|
||||
|
@ -1354,7 +1386,8 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
PRINTM(MCMND, "revision_id=0x%x\n", revision_id);
|
||||
|
||||
#if defined(SD8987) || defined(SD8997) || defined(SD9098) || \
|
||||
defined(SD9097) || defined(SD8978) || defined(SD9177)
|
||||
defined(SD9097) || defined(SDNW62X) || defined(SD8978) || \
|
||||
defined(SD9177)
|
||||
/** Revision ID register */
|
||||
woal_sdiommc_read_reg(handle, magic_reg, &magic);
|
||||
/** Revision ID register */
|
||||
|
@ -1502,6 +1535,19 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef SDNW62X
|
||||
if (IS_SDNW62X(handle->card_type)) {
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
strcpy(handle->card_info->fw_name,
|
||||
SDUARTNW62X_COMBO_FW_NAME);
|
||||
else
|
||||
strcpy(handle->card_info->fw_name,
|
||||
SDSDNW62X_COMBO_FW_NAME);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SD9177
|
||||
if (IS_SD9177(handle->card_type)) {
|
||||
switch (revision_id) {
|
||||
|
@ -1517,6 +1563,18 @@ static mlan_status woal_sdiommc_get_fw_name(moal_handle *handle)
|
|||
strcpy(handle->card_info->fw_name_wlan,
|
||||
SD9177_DEFAULT_WLAN_FW_NAME);
|
||||
break;
|
||||
case SD9177_A1:
|
||||
if (magic == CHIP_MAGIC_VALUE) {
|
||||
if (strap == CARD_TYPE_SD_UART)
|
||||
strcpy(handle->card_info->fw_name,
|
||||
SDUART9177_DEFAULT_COMBO_V1_FW_NAME);
|
||||
else
|
||||
strcpy(handle->card_info->fw_name,
|
||||
SDSD9177_DEFAULT_COMBO_V1_FW_NAME);
|
||||
}
|
||||
strcpy(handle->card_info->fw_name_wlan,
|
||||
SD9177_DEFAULT_WLAN_V1_FW_NAME);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1635,7 +1693,7 @@ static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
|
|||
}
|
||||
udelay(100);
|
||||
}
|
||||
if (ctrl_data == debug_host_ready) {
|
||||
if (ctrl_data == debug_host_ready || tries == MAX_POLL_TRIES) {
|
||||
PRINTM(MERROR, "Fail to pull ctrl_data\n");
|
||||
return RDWR_STATUS_FAILURE;
|
||||
}
|
||||
|
@ -1670,7 +1728,6 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
{
|
||||
int ret = 0;
|
||||
unsigned int reg, reg_start, reg_end;
|
||||
t_u8 path_name[64], file_name[32];
|
||||
t_u8 *ITCM_Ptr = NULL;
|
||||
t_u8 *DTCM_Ptr = NULL;
|
||||
t_u8 *SQRAM_Ptr = NULL;
|
||||
|
@ -1686,15 +1743,17 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
PRINTM(MERROR, "Could not dump firmwware info\n");
|
||||
return;
|
||||
}
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strcpy(path_name, "/data");
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
if (!phandle->fw_dump_buf) {
|
||||
ret = moal_vmalloc(phandle, FW_DUMP_INFO_LEN,
|
||||
&(phandle->fw_dump_buf));
|
||||
if (ret != MLAN_STATUS_SUCCESS || !phandle->fw_dump_buf) {
|
||||
PRINTM(MERROR, "Failed to vmalloc fw dump bufffer\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
memset(phandle->fw_dump_buf, 0x00, FW_DUMP_INFO_LEN);
|
||||
}
|
||||
phandle->fw_dump_len = 0;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
|
||||
sdio_claim_host(((struct sdio_mmc_card *)phandle->card)->func);
|
||||
|
@ -1792,13 +1851,8 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
PRINTM(MMSG, "ITCM done: size=0x%x\n",
|
||||
dbg_ptr - ITCM_Ptr);
|
||||
#endif
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s", "file_sdio_ITCM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
ITCM_Ptr, ITCM_SIZE))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
woal_save_dump_info_to_buf(phandle, ITCM_Ptr, ITCM_SIZE,
|
||||
FW_DUMP_TYPE_MEM_ITCM);
|
||||
dbg_ptr = DTCM_Ptr;
|
||||
end_ptr = DTCM_Ptr + dtcm_size;
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -1814,13 +1868,8 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
PRINTM(MMSG, "DTCM done: size=0x%x\n",
|
||||
dbg_ptr - DTCM_Ptr);
|
||||
#endif
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s", "file_sdio_DTCM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
DTCM_Ptr, dtcm_size))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
woal_save_dump_info_to_buf(phandle, ITCM_Ptr, dtcm_size,
|
||||
FW_DUMP_TYPE_MEM_DTCM);
|
||||
dbg_ptr = SQRAM_Ptr;
|
||||
end_ptr = SQRAM_Ptr + sqram_size;
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -1836,13 +1885,9 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
PRINTM(MMSG, "SQRAM done: size=0x%x\n",
|
||||
dbg_ptr - SQRAM_Ptr);
|
||||
#endif
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s", "file_sdio_SQRAM");
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(path_name, file_name,
|
||||
SQRAM_Ptr, sqram_size))
|
||||
PRINTM(MMSG, "Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
woal_save_dump_info_to_buf(phandle, SQRAM_Ptr,
|
||||
sqram_size,
|
||||
FW_DUMP_TYPE_MEM_SQRAM);
|
||||
PRINTM(MMSG, "End output!\n");
|
||||
break;
|
||||
default:
|
||||
|
@ -1850,6 +1895,7 @@ void woal_dump_firmware_info(moal_handle *phandle)
|
|||
}
|
||||
} while (ctrl_data != DEBUG_SQRAM_DONE);
|
||||
|
||||
woal_append_end_block(phandle);
|
||||
PRINTM(MMSG,
|
||||
"The output ITCM/DTCM/SQRAM have been saved to files successfully!\n");
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -1890,7 +1936,6 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
t_u8 i = 0;
|
||||
t_u8 read_reg = 0;
|
||||
t_u32 memory_size = 0;
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
t_u8 *end_ptr = NULL;
|
||||
t_u8 dbg_dump_start_reg = 0;
|
||||
t_u8 dbg_dump_end_reg = 0;
|
||||
|
@ -1905,16 +1950,17 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
dbg_dump_ctrl_reg = phandle->card_info->dump_fw_ctrl_reg;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strcpy(path_name, "/data");
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
if (!phandle->fw_dump_buf) {
|
||||
ret = moal_vmalloc(phandle, FW_DUMP_INFO_LEN,
|
||||
&(phandle->fw_dump_buf));
|
||||
if (ret != MLAN_STATUS_SUCCESS || !phandle->fw_dump_buf) {
|
||||
PRINTM(MERROR, "Failed to vmalloc fw dump bufffer\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
memset(phandle->fw_dump_buf, 0x00, FW_DUMP_INFO_LEN);
|
||||
}
|
||||
phandle->fw_dump_len = 0;
|
||||
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
|
@ -2009,17 +2055,11 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
dbg_ptr - mem_type_mapping_tbl[idx]
|
||||
.mem_Ptr);
|
||||
#endif
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s%s", "file_sdio_",
|
||||
mem_type_mapping_tbl[idx].mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size))
|
||||
PRINTM(MERROR,
|
||||
"Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
woal_save_dump_info_to_buf(
|
||||
phandle,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr,
|
||||
memory_size,
|
||||
mem_type_mapping_tbl[idx].type);
|
||||
moal_vfree(phandle,
|
||||
mem_type_mapping_tbl[idx].mem_Ptr);
|
||||
mem_type_mapping_tbl[idx].mem_Ptr = NULL;
|
||||
|
@ -2027,14 +2067,10 @@ void woal_dump_firmware_info_v2(moal_handle *phandle)
|
|||
}
|
||||
} while (1);
|
||||
}
|
||||
woal_append_end_block(phandle);
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec);
|
||||
/* end dump fw memory */
|
||||
memset(firmware_dump_file, 0, sizeof(firmware_dump_file));
|
||||
sprintf(firmware_dump_file, "%s/%s", path_name, file_name);
|
||||
moal_memcpy_ext(phandle, phandle->firmware_dump_file,
|
||||
firmware_dump_file, sizeof(firmware_dump_file),
|
||||
sizeof(phandle->firmware_dump_file));
|
||||
done:
|
||||
for (idx = 0; idx < dump_num; idx++) {
|
||||
if (mem_type_mapping_tbl[idx].mem_Ptr) {
|
||||
|
@ -2065,8 +2101,6 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
t_u8 doneflag = 0;
|
||||
rdwr_status stat;
|
||||
t_u32 memory_size = 0;
|
||||
t_u8 path_name[64], file_name[32], firmware_dump_file[128];
|
||||
moal_handle *ref_handle;
|
||||
t_u8 *end_ptr = NULL;
|
||||
t_u8 dbg_dump_start_reg = 0;
|
||||
t_u8 dbg_dump_end_reg = 0;
|
||||
|
@ -2093,19 +2127,6 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
dbg_dump_start_reg = phandle->card_info->dump_fw_start_reg;
|
||||
dbg_dump_end_reg = phandle->card_info->dump_fw_end_reg;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/** Create dump directort*/
|
||||
woal_create_dump_dir(phandle, path_name, sizeof(path_name));
|
||||
#else
|
||||
memset(path_name, 0, sizeof(path_name));
|
||||
strcpy(path_name, "/data");
|
||||
#endif
|
||||
PRINTM(MMSG, "Directory name is %s\n", path_name);
|
||||
ref_handle = (moal_handle *)phandle->pref_mac;
|
||||
if (ref_handle)
|
||||
woal_dump_drv_info(ref_handle, path_name);
|
||||
woal_dump_drv_info(phandle, path_name);
|
||||
|
||||
/* start dump fw memory */
|
||||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT START: %u.%06u ====\n", sec, usec);
|
||||
|
@ -2201,18 +2222,14 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr);
|
||||
|
||||
#endif
|
||||
memset(file_name, 0, sizeof(file_name));
|
||||
sprintf(file_name, "%s%s", "file_sdio_",
|
||||
pmem_type_mapping_tbl->mem_name);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_save_dump_info_to_file(
|
||||
path_name, file_name,
|
||||
pmem_type_mapping_tbl->mem_Ptr,
|
||||
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr))
|
||||
PRINTM(MERROR,
|
||||
"Can't save dump file %s in %s\n",
|
||||
file_name, path_name);
|
||||
moal_vfree(phandle, pmem_type_mapping_tbl->mem_Ptr);
|
||||
if (phandle->fw_dump_buf) {
|
||||
moal_vfree(phandle, phandle->fw_dump_buf);
|
||||
phandle->fw_dump_buf = NULL;
|
||||
phandle->fw_dump_len = 0;
|
||||
}
|
||||
phandle->fw_dump_buf = pmem_type_mapping_tbl->mem_Ptr;
|
||||
phandle->fw_dump_len =
|
||||
dbg_ptr - pmem_type_mapping_tbl->mem_Ptr;
|
||||
pmem_type_mapping_tbl->mem_Ptr = NULL;
|
||||
break;
|
||||
}
|
||||
|
@ -2220,11 +2237,6 @@ void woal_dump_firmware_info_v3(moal_handle *phandle)
|
|||
moal_get_system_time(phandle, &sec, &usec);
|
||||
PRINTM(MMSG, "==== DEBUG MODE OUTPUT END: %u.%06u ====\n", sec, usec);
|
||||
/* end dump fw memory */
|
||||
memset(firmware_dump_file, 0, sizeof(firmware_dump_file));
|
||||
sprintf(firmware_dump_file, "%s/%s", path_name, file_name);
|
||||
moal_memcpy_ext(phandle, phandle->firmware_dump_file,
|
||||
firmware_dump_file, sizeof(firmware_dump_file),
|
||||
sizeof(phandle->firmware_dump_file));
|
||||
done:
|
||||
if (pmem_type_mapping_tbl->mem_Ptr) {
|
||||
moal_vfree(phandle, pmem_type_mapping_tbl->mem_Ptr);
|
||||
|
@ -2329,6 +2341,8 @@ static void woal_sdiommc_dump_fw_info(moal_handle *phandle)
|
|||
if (phandle->event_fw_dump) {
|
||||
phandle->event_fw_dump = MFALSE;
|
||||
queue_work(phandle->workqueue, &phandle->main_work);
|
||||
phandle->is_fw_dump_timer_set = MTRUE;
|
||||
woal_mod_timer(&phandle->fw_dump_timer, MOAL_TIMER_5S);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -2337,9 +2351,12 @@ static void woal_sdiommc_dump_fw_info(moal_handle *phandle)
|
|||
woal_dump_firmware_info(phandle);
|
||||
}
|
||||
#endif
|
||||
woal_send_fw_dump_complete_event(
|
||||
woal_get_priv(phandle, MLAN_BSS_ROLE_ANY));
|
||||
phandle->fw_dump = MFALSE;
|
||||
mlan_pm_wakeup_card(phandle->pmlan_adapter, MFALSE);
|
||||
queue_work(phandle->workqueue, &phandle->main_work);
|
||||
woal_process_hang(phandle);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,20 +4,28 @@
|
|||
* functions defined in moal module
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2008-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
/*************************************************************
|
||||
|
@ -59,6 +67,7 @@ mlan_status moal_write_data_sync(t_void *pmoal, pmlan_buffer pmbuf, t_u32 port,
|
|||
t_u32 timeout);
|
||||
mlan_status moal_read_data_sync(t_void *pmoal, pmlan_buffer pmbuf, t_u32 port,
|
||||
t_u32 timeout);
|
||||
mlan_status moal_recv_amsdu_packet(t_void *pmoal, pmlan_buffer pmbuf);
|
||||
mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf);
|
||||
mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent);
|
||||
mlan_status moal_malloc(t_void *pmoal, t_u32 size, t_u32 flag, t_u8 **ppbuf);
|
||||
|
@ -118,12 +127,15 @@ mlan_status moal_stop_timer(t_void *pmoal, t_void *ptimer);
|
|||
void moal_tp_accounting(t_void *pmoal, void *buf, t_u32 drop_point);
|
||||
void moal_tp_accounting_rx_param(t_void *pmoal, unsigned int type,
|
||||
unsigned int rsvd1);
|
||||
void moal_amsdu_tp_accounting(t_void *pmoal, t_s32 amsdu_process_delay,
|
||||
t_s32 amsdu_copy_delay);
|
||||
|
||||
void moal_connection_status_check_pmqos(t_void *pmoal);
|
||||
#if defined(PCIE) || defined(SDIO)
|
||||
/* pmqos busfreq add request handler*/
|
||||
void woal_request_busfreq_pmqos_add(t_u16 card_type);
|
||||
void woal_request_busfreq_pmqos_add(t_void *pmhandle);
|
||||
/* pmqos busfreq remove handler*/
|
||||
void woal_release_busfreq_pmqos_remove(t_u16 card_type);
|
||||
void woal_release_busfreq_pmqos_remove(t_void *pmhandle);
|
||||
#endif
|
||||
|
||||
#endif /*_MOAL_H */
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,18 +5,26 @@
|
|||
*
|
||||
* Copyright 2011-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,20 +4,28 @@
|
|||
* driver.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2021 NXP
|
||||
* Copyright 2008-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -738,6 +746,40 @@ done:
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief enable/disable 11h
|
||||
*
|
||||
* @param enable MTRUE/MFALSE
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
int woal_uap_11h_ctrl(moal_private *priv, t_u32 enable)
|
||||
{
|
||||
mlan_ioctl_req *ioctl_req = NULL;
|
||||
mlan_ds_snmp_mib *snmp = NULL;
|
||||
int ret = 0;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
ENTER();
|
||||
ioctl_req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_snmp_mib));
|
||||
if (ioctl_req == NULL) {
|
||||
LEAVE();
|
||||
return -ENOMEM;
|
||||
}
|
||||
snmp = (mlan_ds_snmp_mib *)ioctl_req->pbuf;
|
||||
ioctl_req->req_id = MLAN_IOCTL_SNMP_MIB;
|
||||
snmp->sub_command = MLAN_OID_SNMP_MIB_DOT11H;
|
||||
snmp->param.oid_value = enable;
|
||||
status = woal_request_ioctl(priv, ioctl_req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(ioctl_req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief configure snmp mib
|
||||
*
|
||||
|
@ -2053,7 +2095,75 @@ done:
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Set/Get skip CAC mode
|
||||
* @brief Issue MLAN_OID_11H_CHAN_REPORT_REQUEST ioctl to cancel dozer
|
||||
*
|
||||
* @param priv Pointer to the moal_private driver data struct
|
||||
* @param action MLAN_ACT_SET/MLAN_ACT_GET
|
||||
* @param
|
||||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
int woal_11h_chan_dfs_state(moal_private *priv, t_u8 action,
|
||||
mlan_ds_11h_chan_dfs_state *ch_dfs_state)
|
||||
{
|
||||
int ret = 0;
|
||||
mlan_ioctl_req *req = NULL;
|
||||
mlan_ds_11h_cfg *ds_11hcfg = NULL;
|
||||
mlan_status status = MLAN_STATUS_SUCCESS;
|
||||
#ifdef UAP_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
int cfg80211_wext = priv->phandle->params.cfg80211_wext;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
#ifdef UAP_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
if (action == MLAN_ACT_GET) {
|
||||
if (IS_UAP_CFG80211(cfg80211_wext)) {
|
||||
ret = woal_get_wiphy_chan_dfs_state(priv->wdev->wiphy,
|
||||
ch_dfs_state);
|
||||
if (!ret) {
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg));
|
||||
if (req == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf;
|
||||
|
||||
ds_11hcfg->sub_command = MLAN_OID_11H_CHAN_DFS_STATE;
|
||||
req->req_id = MLAN_IOCTL_11H_CFG;
|
||||
req->action = action;
|
||||
moal_memcpy_ext(priv->phandle, &ds_11hcfg->param.ch_dfs_state,
|
||||
ch_dfs_state, sizeof(mlan_ds_11h_chan_dfs_state),
|
||||
sizeof(ds_11hcfg->param.ch_dfs_state));
|
||||
/* Send Channel Check command and wait until the report is ready */
|
||||
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
|
||||
if (status != MLAN_STATUS_SUCCESS) {
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
moal_memcpy_ext(priv->phandle, ch_dfs_state,
|
||||
&ds_11hcfg->param.ch_dfs_state,
|
||||
sizeof(mlan_ds_11h_chan_dfs_state),
|
||||
sizeof(mlan_ds_11h_chan_dfs_state));
|
||||
done:
|
||||
if (status != MLAN_STATUS_PENDING)
|
||||
kfree(req);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief skip cac on specific channel
|
||||
* @and Wext
|
||||
*
|
||||
* @param dev A pointer to net_device structure
|
||||
* @param req A pointer to ifreq structure
|
||||
|
@ -2062,41 +2172,61 @@ done:
|
|||
*/
|
||||
static int woal_uap_skip_cac(struct net_device *dev, struct ifreq *req)
|
||||
{
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
int ret = 0;
|
||||
skip_cac_para param;
|
||||
|
||||
moal_private *priv = (moal_private *)netdev_priv(dev);
|
||||
#ifdef UAP_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
int cfg80211_wext = priv->phandle->params.cfg80211_wext;
|
||||
#endif
|
||||
#endif
|
||||
dfs_state_t dfs_state;
|
||||
mlan_ds_11h_chan_dfs_state ch_dfs_state;
|
||||
ENTER();
|
||||
|
||||
/* Sanity check */
|
||||
if (req->ifr_data == NULL) {
|
||||
PRINTM(MERROR, "skip_cac() corrupt data\n");
|
||||
PRINTM(MERROR, "skip_dfs_cac() corrupt data\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
memset(¶m, 0, sizeof(skip_cac_para));
|
||||
|
||||
/* Get user data */
|
||||
if (copy_from_user(¶m, req->ifr_data, sizeof(skip_cac_para))) {
|
||||
PRINTM(MERROR, "Copy from user failed\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Currently default action is get */
|
||||
if (param.action == 0) {
|
||||
param.skip_cac = (t_u16)priv->skip_cac;
|
||||
} else {
|
||||
priv->skip_cac = param.skip_cac;
|
||||
}
|
||||
|
||||
if (copy_to_user(req->ifr_data, ¶m, sizeof(skip_cac_para))) {
|
||||
PRINTM(MERROR, "Copy to user failed\n");
|
||||
ret = -EFAULT;
|
||||
if (param.skip_cac)
|
||||
dfs_state = DFS_AVAILABLE;
|
||||
else
|
||||
dfs_state = DFS_USABLE;
|
||||
memset(&ch_dfs_state, 0, sizeof(ch_dfs_state));
|
||||
ch_dfs_state.channel = param.channel;
|
||||
woal_11h_chan_dfs_state(priv, MLAN_ACT_GET, &ch_dfs_state);
|
||||
if (ch_dfs_state.dfs_state == dfs_state)
|
||||
goto done;
|
||||
if (param.skip_cac && ch_dfs_state.dfs_state == DFS_USABLE)
|
||||
PRINTM(MMSG,
|
||||
"ZeroDFS: Requst skip cac on the channel %d which hasn't do CAC before!\n",
|
||||
param.channel);
|
||||
ch_dfs_state.dfs_state = dfs_state;
|
||||
woal_11h_chan_dfs_state(priv, MLAN_ACT_SET, &ch_dfs_state);
|
||||
PRINTM(MCMND, "ZeroDFS: Skip CAC on chan %d %d\n", param.channel,
|
||||
param.skip_cac);
|
||||
#ifdef UAP_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
if (IS_UAP_CFG80211(cfg80211_wext)) {
|
||||
if (param.skip_cac)
|
||||
woal_update_channel_dfs_state(param.channel,
|
||||
DFS_AVAILABLE);
|
||||
else
|
||||
woal_update_channel_dfs_state(param.channel,
|
||||
DFS_USABLE);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
done:
|
||||
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
@ -4223,10 +4353,21 @@ void woal_uap_set_multicast_list(struct net_device *dev)
|
|||
*
|
||||
* @return 0 --success, otherwise fail
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req,
|
||||
void __user *data, int cmd)
|
||||
#else
|
||||
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||
#endif
|
||||
{
|
||||
int ret = 0;
|
||||
ENTER();
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
if (in_compat_syscall()) /* not implemented yet */
|
||||
return -EOPNOTSUPP;
|
||||
#endif
|
||||
|
||||
switch (cmd) {
|
||||
case WOAL_ANDROID_DEF_CMD:
|
||||
/** android default ioctl ID is SIOCDEVPRIVATE + 1 */
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
/** @file moal_uap.h
|
||||
*
|
||||
* @brief This file contains uap driver specific defines etc.
|
||||
* @brief This file contains wlan driver specific defines etc.
|
||||
*
|
||||
*
|
||||
* Copyright 2008-2020 NXP
|
||||
* Copyright 2009-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -201,10 +209,12 @@ typedef struct _cac_timer_status {
|
|||
typedef struct _skip_cac_para {
|
||||
/** subcmd */
|
||||
t_u32 subcmd;
|
||||
/** Set/Get */
|
||||
/** Set */
|
||||
t_u32 action;
|
||||
/** enable/disable deepsleep*/
|
||||
/** enable/disable skip cac*/
|
||||
t_u16 skip_cac;
|
||||
/** channel */
|
||||
t_u8 channel;
|
||||
} skip_cac_para;
|
||||
|
||||
/** radio control command */
|
||||
|
@ -481,6 +491,8 @@ typedef struct _snmp_mib_para {
|
|||
/** Oid for 802.11H enable/disable */
|
||||
#define OID_80211H_ENABLE 0x000a
|
||||
|
||||
int woal_uap_11h_ctrl(moal_private *priv, t_u32 enable);
|
||||
|
||||
/** dfs_testing parameters */
|
||||
typedef struct _dfs_testing_param {
|
||||
/** subcmd */
|
||||
|
@ -528,10 +540,21 @@ typedef struct _domain_info_param {
|
|||
#define MAX_DOMAIN_TLV_LEN \
|
||||
(TLV_HEADER_LEN + COUNTRY_CODE_LEN + (SUB_BAND_LEN * MAX_SUB_BANDS))
|
||||
|
||||
/** Get/Set channel DFS state */
|
||||
int woal_11h_chan_dfs_state(moal_private *priv, t_u8 action,
|
||||
mlan_ds_11h_chan_dfs_state *ch_dfs_state);
|
||||
|
||||
int woal_set_get_uap_power_mode(moal_private *priv, t_u32 action,
|
||||
mlan_ds_ps_mgmt *ps_mgmt);
|
||||
void woal_uap_set_multicast_list(struct net_device *dev);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req,
|
||||
void __user *data, int cmd);
|
||||
#else
|
||||
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
|
||||
#endif
|
||||
|
||||
int woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data);
|
||||
#ifdef UAP_CFG80211
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
|
||||
|
@ -563,6 +586,7 @@ mlan_status woal_set_get_sys_config(moal_private *priv, t_u16 action,
|
|||
mlan_status woal_set_get_ap_wmm_para(moal_private *priv, t_u16 action,
|
||||
wmm_parameter_t *ap_wmm_para);
|
||||
int woal_uap_set_ap_cfg(moal_private *priv, t_u8 *data, int len);
|
||||
|
||||
int woal_uap_set_11ac_status(moal_private *priv, t_u8 action, t_u8 vht20_40,
|
||||
IEEEtypes_VHTCap_t *vhtcap_ie);
|
||||
int woal_11ax_cfg(moal_private *priv, t_u8 action, mlan_ds_11ax_he_cfg *he_cfg);
|
||||
|
|
|
@ -3,20 +3,28 @@
|
|||
* @brief This file contains the functions for uAP CFG80211.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2021 NXP
|
||||
* Copyright 2011-2022 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -654,12 +662,14 @@ static IEEEtypes_VHTOprat_t *woal_get_vht_oprat_ie(const t_u8 *ie, int len)
|
|||
/**
|
||||
* @brief convert cfg80211_chan_def to Band_Config
|
||||
*
|
||||
* @param priv A pointer to moal private structure
|
||||
* @param bandcfg A pointer to (Band_Config_t structure
|
||||
* @param chandef A pointer to cfg80211_chan_def structure
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
static void woal_convert_chan_to_bandconfig(Band_Config_t *bandcfg,
|
||||
static void woal_convert_chan_to_bandconfig(moal_private *priv,
|
||||
Band_Config_t *bandcfg,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
{
|
||||
ENTER();
|
||||
|
@ -681,8 +691,8 @@ static void woal_convert_chan_to_bandconfig(Band_Config_t *bandcfg,
|
|||
bandcfg->chan2Offset = SEC_CHAN_BELOW;
|
||||
break;
|
||||
case NL80211_CHAN_WIDTH_80:
|
||||
bandcfg->chan2Offset =
|
||||
woal_get_second_channel_offset(chandef->chan->hw_value);
|
||||
bandcfg->chan2Offset = woal_get_second_channel_offset(
|
||||
priv, chandef->chan->hw_value);
|
||||
bandcfg->chanWidth = CHAN_BW_80MHZ;
|
||||
break;
|
||||
case NL80211_CHAN_WIDTH_80P80:
|
||||
|
@ -727,7 +737,7 @@ static void woal_enable_dfs_support(moal_private *priv,
|
|||
pchan_rpt_req = &p11h_cfg->param.chan_rpt_req;
|
||||
pchan_rpt_req->startFreq = 5000;
|
||||
pchan_rpt_req->chanNum = (t_u8)chandef->chan->hw_value;
|
||||
woal_convert_chan_to_bandconfig(&pchan_rpt_req->bandcfg, chandef);
|
||||
woal_convert_chan_to_bandconfig(priv, &pchan_rpt_req->bandcfg, chandef);
|
||||
pchan_rpt_req->host_based = MTRUE;
|
||||
pchan_rpt_req->millisec_dwell_time = 0;
|
||||
|
||||
|
@ -949,7 +959,8 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
if (priv->phandle->usr_nop_period_sec) {
|
||||
PRINTM(MCMND, "Checking if AP's channel %d is under NOP\n",
|
||||
priv->channel);
|
||||
woal_convert_chan_to_bandconfig(&bandcfg, ¶ms->chandef);
|
||||
woal_convert_chan_to_bandconfig(priv, &bandcfg,
|
||||
¶ms->chandef);
|
||||
memset(&chan_nop_info, 0, sizeof(chan_nop_info));
|
||||
chan_nop_info.curr_chan = priv->channel;
|
||||
chan_nop_info.chan_width = bandcfg.chanWidth;
|
||||
|
@ -994,8 +1005,8 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
case NL80211_CHAN_WIDTH_80:
|
||||
case NL80211_CHAN_WIDTH_80P80:
|
||||
case NL80211_CHAN_WIDTH_160:
|
||||
chan2Offset =
|
||||
woal_get_second_channel_offset(priv->channel);
|
||||
chan2Offset = woal_get_second_channel_offset(
|
||||
priv, priv->channel);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MWARN, "Unknown channel width: %d\n",
|
||||
|
@ -1041,8 +1052,8 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
} else {
|
||||
sys_config->bandcfg.chanBand = BAND_5GHZ;
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
|
||||
chan2Offset =
|
||||
woal_get_second_channel_offset(priv->channel);
|
||||
chan2Offset = woal_get_second_channel_offset(
|
||||
priv, priv->channel);
|
||||
#endif
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
@ -1050,7 +1061,7 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
/* Force enable 40MHZ on WFD interface */
|
||||
if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT)
|
||||
chan2Offset = woal_get_second_channel_offset(
|
||||
priv->channel);
|
||||
priv, priv->channel);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
|
@ -1377,6 +1388,19 @@ static int woal_cfg80211_beacon_config(moal_private *priv,
|
|||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/** Set wacp_mode for uAP/P2P-GO */
|
||||
if (priv->phandle->params.wacp_mode) {
|
||||
PRINTM(MIOCTL, "wacp_mode: %d\n",
|
||||
priv->phandle->params.wacp_mode);
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_set_wacp_mode(priv, MOAL_IOCTL_WAIT)) {
|
||||
PRINTM(MERROR, "Set wacp_mode failed\n");
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
|
||||
woal_enable_dfs_support(priv, &priv->chan);
|
||||
#endif
|
||||
|
@ -1386,6 +1410,138 @@ done:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||
/**
|
||||
* @brief Request the driver to add a monitor interface
|
||||
*
|
||||
* @param wiphy A pointer to wiphy structure
|
||||
* @param name Virtual interface name
|
||||
* @param name_assign_type Interface name assignment type
|
||||
* @param flags Flags for the virtual interface
|
||||
* @param params A pointer to vif_params structure
|
||||
* @param new_dev Netdevice to be passed out
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
static int woal_cfg80211_add_mon_if(struct wiphy *wiphy, const char *name,
|
||||
unsigned char name_assign_type, u32 *flags,
|
||||
struct vif_params *params,
|
||||
struct net_device **new_dev)
|
||||
#else
|
||||
/**
|
||||
* @brief Request the driver to add a monitor interface
|
||||
*
|
||||
* @param wiphy A pointer to wiphy structure
|
||||
* @param name Virtual interface name
|
||||
* @param flags Flags for the virtual interface
|
||||
* @param params A pointer to vif_params structure
|
||||
* @param new_dev Netdevice to be passed out
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
static int woal_cfg80211_add_mon_if(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
|
||||
const
|
||||
#endif
|
||||
char *name,
|
||||
u32 *flags, struct vif_params *params,
|
||||
struct net_device **new_dev)
|
||||
#endif
|
||||
{
|
||||
int ret = 0;
|
||||
moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy);
|
||||
moal_private *priv =
|
||||
(moal_private *)woal_get_priv(handle, MLAN_BSS_ROLE_STA);
|
||||
monitor_iface *mon_if = NULL;
|
||||
struct net_device *ndev = NULL;
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
chan_band_info chan_info;
|
||||
#endif
|
||||
unsigned char name_assign_type_tmp = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
if (handle->mon_if) {
|
||||
PRINTM(MERROR, "%s: monitor interface exist: %s basedev %s\n",
|
||||
__func__, handle->mon_if->mon_ndev->name,
|
||||
handle->mon_if->base_ndev->name);
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
if (!priv) {
|
||||
PRINTM(MERROR, "add_mon_if: priv is NULL\n");
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||
name_assign_type_tmp = name_assign_type;
|
||||
#endif
|
||||
mon_if = woal_prepare_mon_if(priv, name, name_assign_type_tmp,
|
||||
CHANNEL_SPEC_SNIFFER_MODE);
|
||||
if (!mon_if) {
|
||||
PRINTM(MFATAL, "Prepare mon_if fail.\n");
|
||||
goto fail;
|
||||
}
|
||||
ndev = mon_if->mon_ndev;
|
||||
dev_net_set(ndev, wiphy_net(wiphy));
|
||||
|
||||
moal_memcpy_ext(priv->phandle, ndev->perm_addr, wiphy->perm_addr,
|
||||
ETH_ALEN, sizeof(ndev->perm_addr));
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
eth_hw_addr_set(ndev, ndev->perm_addr);
|
||||
#else
|
||||
moal_memcpy_ext(priv->phandle, ndev->dev_addr, ndev->perm_addr,
|
||||
ETH_ALEN, MAX_ADDR_LEN);
|
||||
#endif
|
||||
SET_NETDEV_DEV(ndev, wiphy_dev(wiphy));
|
||||
ndev->ieee80211_ptr = &mon_if->wdev;
|
||||
mon_if->wdev.iftype = NL80211_IFTYPE_MONITOR;
|
||||
mon_if->wdev.wiphy = wiphy;
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
/* Set default band channel config */
|
||||
mon_if->band_chan_cfg.band = BAND_B | BAND_G;
|
||||
mon_if->band_chan_cfg.band |= BAND_GN;
|
||||
mon_if->band_chan_cfg.channel = 1;
|
||||
mon_if->band_chan_cfg.chan_bandwidth = CHANNEL_BW_20MHZ;
|
||||
memset(&chan_info, 0x00, sizeof(chan_info));
|
||||
chan_info.channel = 1;
|
||||
chan_info.is_11n_enabled = MTRUE;
|
||||
if (MLAN_STATUS_FAILURE ==
|
||||
woal_chandef_create(priv, &mon_if->chandef, &chan_info)) {
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_set_net_monitor(priv, MOAL_IOCTL_WAIT,
|
||||
CHANNEL_SPEC_SNIFFER_MODE, 0x7,
|
||||
&mon_if->band_chan_cfg)) {
|
||||
PRINTM(MERROR, "%s: woal_set_net_monitor fail\n", __func__);
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = register_netdevice(ndev);
|
||||
if (ret) {
|
||||
PRINTM(MFATAL, "register net_device failed, ret=%d\n", ret);
|
||||
free_netdev(ndev);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
handle->mon_if = mon_if;
|
||||
|
||||
if (new_dev)
|
||||
*new_dev = ndev;
|
||||
|
||||
fail:
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if CFG80211_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION
|
||||
/**
|
||||
|
@ -1493,6 +1649,9 @@ moal_private *woal_alloc_virt_interface(moal_handle *handle, t_u8 bss_index,
|
|||
|
||||
INIT_LIST_HEAD(&priv->tx_stat_queue);
|
||||
spin_lock_init(&priv->tx_stat_lock);
|
||||
INIT_LIST_HEAD(&priv->mcast_list);
|
||||
spin_lock_init(&priv->mcast_lock);
|
||||
|
||||
spin_lock_init(&priv->connect_lock);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
|
||||
|
@ -1651,12 +1810,20 @@ int woal_cfg80211_add_virt_if(struct wiphy *wiphy,
|
|||
woal_cfg80211_init_p2p_client(new_priv);
|
||||
else if (type == NL80211_IFTYPE_P2P_GO)
|
||||
woal_cfg80211_init_p2p_go(new_priv);
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
|
||||
ret = cfg80211_register_netdevice(ndev);
|
||||
#else
|
||||
ret = register_netdevice(ndev);
|
||||
#endif
|
||||
if (ret) {
|
||||
handle->priv[new_priv->bss_index] = NULL;
|
||||
handle->priv_num--;
|
||||
if (ndev->reg_state == NETREG_REGISTERED) {
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
|
||||
cfg80211_unregister_netdevice(ndev);
|
||||
#else
|
||||
unregister_netdevice(ndev);
|
||||
#endif
|
||||
free_netdev(ndev);
|
||||
ndev = NULL;
|
||||
}
|
||||
|
@ -1779,6 +1946,7 @@ int woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev)
|
|||
woal_cancel_scan(vir_priv, MOAL_IOCTL_WAIT);
|
||||
|
||||
woal_flush_tx_stat_queue(vir_priv);
|
||||
woal_flush_mcast_list(vir_priv);
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
|
||||
/* cancel previous remain on channel to avoid firmware hang */
|
||||
|
@ -1837,14 +2005,17 @@ int woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev)
|
|||
vir_priv->phandle->priv[vir_priv->bss_index] = NULL;
|
||||
priv->phandle->priv_num--;
|
||||
if (dev->reg_state == NETREG_REGISTERED)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
|
||||
cfg80211_unregister_netdevice(dev);
|
||||
#else
|
||||
unregister_netdevice(dev);
|
||||
#endif
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WIFI_DIRECT_SUPPORT)
|
||||
/**
|
||||
* @brief This function removes an virtual interface.
|
||||
*
|
||||
|
@ -1876,20 +2047,30 @@ void woal_remove_virtual_interface(moal_handle *handle)
|
|||
netif_device_detach(priv->netdev);
|
||||
if (priv->netdev->reg_state ==
|
||||
NETREG_REGISTERED)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
|
||||
cfg80211_unregister_netdevice(
|
||||
priv->netdev);
|
||||
#else
|
||||
unregister_netdevice(priv->netdev);
|
||||
#endif
|
||||
handle->priv[i] = NULL;
|
||||
vir_intf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (handle->mon_if) {
|
||||
netif_device_detach(handle->mon_if->mon_ndev);
|
||||
if (handle->mon_if->mon_ndev->reg_state == NETREG_REGISTERED)
|
||||
unregister_netdevice(handle->mon_if->mon_ndev);
|
||||
handle->mon_if = NULL;
|
||||
}
|
||||
rtnl_unlock();
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
handle->priv_num -= vir_intf;
|
||||
#endif
|
||||
LEAVE();
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This function check if uap interface is ready
|
||||
|
@ -2002,15 +2183,22 @@ woal_cfg80211_add_virtual_intf(struct wiphy *wiphy, const char *name,
|
|||
{
|
||||
struct net_device *ndev = NULL;
|
||||
int ret = 0;
|
||||
#if defined(WIFI_DIRECT_SUPPORT)
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
u32 *flags = ¶ms->flags;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
PRINTM(MIOCTL, "add virtual intf: %d name: %s\n", type, name);
|
||||
switch (type) {
|
||||
case NL80211_IFTYPE_MONITOR:
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
|
||||
ret = woal_cfg80211_add_mon_if(wiphy, name, name_assign_type,
|
||||
flags, params, &ndev);
|
||||
#else
|
||||
ret = woal_cfg80211_add_mon_if(wiphy, name, flags, params,
|
||||
&ndev);
|
||||
#endif
|
||||
break;
|
||||
#ifdef WIFI_DIRECT_SUPPORT
|
||||
#if CFG80211_VERSION_CODE >= WIFI_DIRECT_KERNEL_VERSION
|
||||
case NL80211_IFTYPE_P2P_CLIENT:
|
||||
|
@ -2088,10 +2276,30 @@ int woal_cfg80211_del_virtual_intf(struct wiphy *wiphy,
|
|||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||
struct net_device *dev = wdev->netdev;
|
||||
#endif
|
||||
|
||||
ENTER();
|
||||
|
||||
PRINTM(MIOCTL, "del virtual intf %s\n", dev->name);
|
||||
ASSERT_RTNL();
|
||||
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_MONITOR) {
|
||||
if ((handle->mon_if) && (handle->mon_if->mon_ndev == dev)) {
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
if (MLAN_STATUS_SUCCESS !=
|
||||
woal_set_net_monitor(handle->mon_if->priv,
|
||||
MOAL_IOCTL_WAIT, MFALSE, 0,
|
||||
NULL)) {
|
||||
PRINTM(MERROR,
|
||||
"%s: woal_set_net_monitor fail\n",
|
||||
__func__);
|
||||
ret = -EFAULT;
|
||||
}
|
||||
#endif
|
||||
handle->mon_if = NULL;
|
||||
}
|
||||
unregister_netdevice(dev);
|
||||
LEAVE();
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP) {
|
||||
for (i = 0; i < handle->priv_num; i++) {
|
||||
|
@ -2618,17 +2826,24 @@ int woal_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
woal_cancel_cac_block(priv);
|
||||
#endif
|
||||
|
||||
if (priv->media_connected == MFALSE) {
|
||||
PRINTM(MINFO, "cfg80211: Media not connected!\n");
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
|
||||
if (param) {
|
||||
mac_addr = param->mac;
|
||||
reason_code = param->reason_code;
|
||||
}
|
||||
#endif
|
||||
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
|
||||
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME)) {
|
||||
if (mac_addr)
|
||||
cfg80211_del_sta(dev, mac_addr, GFP_KERNEL);
|
||||
}
|
||||
#endif
|
||||
if (priv->media_connected == MFALSE) {
|
||||
PRINTM(MINFO, "cfg80211: Media not connected!\n");
|
||||
LEAVE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** we will not send deauth to p2p interface, it might cause WPS failure
|
||||
*/
|
||||
if (mac_addr) {
|
||||
|
@ -3053,8 +3268,8 @@ static void woal_switch_uap_channel(moal_private *priv, t_u8 wait_option)
|
|||
case NL80211_CHAN_WIDTH_80P80:
|
||||
case NL80211_CHAN_WIDTH_160:
|
||||
uap_channel.bandcfg.chanWidth = CHAN_BW_80MHZ;
|
||||
chan2Offset =
|
||||
woal_get_second_channel_offset(uap_channel.channel);
|
||||
chan2Offset = woal_get_second_channel_offset(
|
||||
priv, uap_channel.channel);
|
||||
break;
|
||||
default:
|
||||
PRINTM(MWARN, "Unknown channel width: %d\n",
|
||||
|
@ -3211,14 +3426,18 @@ int woal_cfg80211_start_radar_detection(struct wiphy *wiphy,
|
|||
pchan_rpt_req = &p11h_cfg->param.chan_rpt_req;
|
||||
pchan_rpt_req->startFreq = START_FREQ_11A_BAND;
|
||||
pchan_rpt_req->chanNum = (t_u8)chandef->chan->hw_value;
|
||||
woal_convert_chan_to_bandconfig(&pchan_rpt_req->bandcfg, chandef);
|
||||
woal_convert_chan_to_bandconfig(priv, &pchan_rpt_req->bandcfg, chandef);
|
||||
pchan_rpt_req->host_based = MTRUE;
|
||||
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
||||
pchan_rpt_req->millisec_dwell_time = cac_time_ms;
|
||||
#else
|
||||
pchan_rpt_req->millisec_dwell_time = IEEE80211_DFS_MIN_CAC_TIME_MS;
|
||||
|
||||
#endif
|
||||
/* Since kernel doesn't support 600sec cac_timer for channels 120, 124,
|
||||
* and 128 (weather channels) in ETSI region, overwrite kernel's
|
||||
* cac_timer.
|
||||
*/
|
||||
if ((woal_is_etsi_country(priv->phandle->country_code) == MTRUE)) {
|
||||
if (chandef->chan->hw_value == 120 ||
|
||||
chandef->chan->hw_value == 124 ||
|
||||
|
@ -3233,7 +3452,6 @@ int woal_cfg80211_start_radar_detection(struct wiphy *wiphy,
|
|||
IEEE80211_DFS_MIN_CAC_TIME_MS * 10;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (priv->user_cac_period_msec) {
|
||||
pchan_rpt_req->millisec_dwell_time = priv->user_cac_period_msec;
|
||||
PRINTM(MCMD_D,
|
||||
|
|
|
@ -3,20 +3,28 @@
|
|||
* @brief This file contains the uAP CFG80211 specific defines.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2020 NXP
|
||||
* Copyright 2011-2021 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
* NXP CONFIDENTIAL
|
||||
* The source code contained or described herein and all documents related to
|
||||
* the source code (Materials) are owned by NXP, its
|
||||
* suppliers and/or its licensors. Title to the Materials remains with NXP,
|
||||
* its suppliers and/or its licensors. The Materials contain
|
||||
* trade secrets and proprietary and confidential information of NXP, its
|
||||
* suppliers and/or its licensors. The Materials are protected by worldwide
|
||||
* copyright and trade secret laws and treaty provisions. No part of the
|
||||
* Materials may be used, copied, reproduced, modified, published, uploaded,
|
||||
* posted, transmitted, distributed, or disclosed in any way without NXP's prior
|
||||
* express written permission.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
* No license under any patent, copyright, trade secret or other intellectual
|
||||
* property right is granted to or conferred upon you by disclosure or delivery
|
||||
* of the Materials, either expressly, by implication, inducement, estoppel or
|
||||
* otherwise. Any license under such intellectual property rights must be
|
||||
* express and approved by NXP in writing.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of GPL v2.
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue