mxm_wifiex: update to mxm5x17299.p1 release

changes:
    1. WSW-18043: Include txpwrlimit_cfg_iw416 files on MM driver
    2. WSW-18325: Rename ed_mac_ctrl conf files from V3 to V2
    3. WSW-16931: Observing timeout on STAUT with UL OFDMA BSR scenario
    4. WCSWREL-227: Fixed the issue of CtsWifiTestCases case android.net.wifi.cts.WifiManagerTest#testTrafficStateCallback
    5. WSW-17727: Fixed the issue of STA Connection failed with dmcs enable and host_mlme=1
    6. WSW-17450: Fixed the issue of android.net.wifi.cts.WifiManagerTest failure
    7. WSW-17491: Fixed the issue of android.cts.statsdatom.wifi.WifiStatsTests failure
    8. WSW-18006: Set CAC period of 600 sec for weather channel for ETSI region
    9. WSW-17906: Fixed the issue of APUT not advertise the support of MCS32
    10. WSW-17575: Fixed the issue of Host cannot wake-up by ping during Hostsleep
    11. WSW-17904: Fixed the issue of STAUT advertising VHT Tx/Rx MCS as 1SS when associating with 1SS AP
    12. WSW-17427: Fixed the issue of uAPUTL failing to start BSS and returns "Core Dumped" error message
    13. WSW-15856: Hotspot is turning off automatically after few minutes ~10mins with one client connected
    14. WCSWREL-211: System reboot when switch wifi hotspot security mode from WPA2 to none

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Approved-by: Tian Yang <yang.tian@nxp.com>
This commit is contained in:
Sherry Sun 2022-01-23 21:24:49 +08:00
parent 8248dbc2cb
commit 200fc8808c
46 changed files with 1718 additions and 342 deletions

View File

@ -433,6 +433,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
@ -1459,3 +1460,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

View File

@ -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

View File

@ -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

View File

@ -1,11 +1,10 @@
# File : ed_mac_ctrl_V3_8978.conf
# File : ed_mac_ctrl_V2_iw416.conf
#
# ed_mac_ctrl_v3 is used for 88W8997, 88W8987, 88W8977, 88W8978
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_8978.conf ed_mac_ctrl_v3
# ./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_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

View File

@ -0,0 +1,22 @@
# File : ed_mac_ctrl_V2_nw61x.conf
#
# ./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_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=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=0xA # 0 - Default Energy Detect threshold
#offset value range: 0x80 to 0x7F
ed_ctrl_txq_lock:4=0x1e00FF #DO NOT Change this line
}

View 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.
}

View File

@ -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'
}
}

View File

@ -125,6 +125,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},
@ -155,6 +156,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[] = {
@ -192,6 +194,7 @@ static char *usage[] = {
" hssetpara",
" mefcfg",
" cloud_keep_alive",
" min_ba_threshold",
};
/** Socket */
@ -938,18 +941,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};
/* 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;
}
@ -1161,11 +1186,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;
}
@ -5012,6 +5036,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
********************************************************/

View File

@ -158,6 +158,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

View File

@ -1182,7 +1182,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));

View File

@ -119,10 +119,7 @@ static chan_freq_power_t channel_freq_power_UN_AJ[] = {
{153, 5765, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{157, 5785, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{161, 5805, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{165, 5825, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{169, 5845, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{173, 5865, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{177, 5885, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}
{165, 5825, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}
/* {240, 4920, TX_PWR_DEFAULT},
{244, 4940, TX_PWR_DEFAULT},
{248, 4960, TX_PWR_DEFAULT},

View File

@ -118,8 +118,6 @@ static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_mid_upper_band_1 = {
/** U-NII sub-band config : Start Channel = 149, NumChans = 5 */
static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_upper_band = {149,
5};
/** U-NII sub-band config : Start Channel = 169, NumChans = 3 */
static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_4_band = {169, 3};
/** Internally passed structure used to send a CMD_802_11_TPC_INFO command */
typedef struct {
@ -354,17 +352,6 @@ 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:
@ -1365,8 +1352,6 @@ static t_bool wlan_11h_is_band_valid(mlan_private *priv, t_u8 start_chn,
* return MFALSE, 165 is not allowed in bands other than 20MHZ
*/
if (start_chn == 165) {
if (priv->adapter->region_code == COUNTRY_CODE_US)
return MTRUE;
if (uap_band_cfg.chanWidth != CHAN_BW_20MHZ)
return MFALSE;
}
@ -2947,7 +2932,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
*
@ -2956,8 +2941,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;
@ -2992,6 +2977,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;
}

View File

@ -146,9 +146,8 @@ 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);

View File

@ -2294,7 +2294,7 @@ t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
t_u8 chan2Offset = SEC_CHAN_NONE;
/* Special Case: 20Mhz-only Channel */
if (priv->adapter->region_code != COUNTRY_CODE_US && chan == 165)
if (chan == 165)
return chan2Offset;
switch (chan) {
@ -2310,8 +2310,6 @@ t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
case 140:
case 149:
case 157:
case 165:
case 173:
chan2Offset = SEC_CHAN_ABOVE;
break;
case 40:
@ -2326,8 +2324,6 @@ t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
case 144:
case 153:
case 161:
case 169:
case 177:
chan2Offset = SEC_CHAN_BELOW;
break;
}

View File

@ -271,12 +271,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;

View File

@ -92,10 +92,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",
"CN", "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,10 +346,7 @@ 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}},
{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}}};
{165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}}};
/** Band: 'A', Region: Canada IC */
static chan_freq_power_t channel_freq_power_CAN_A[] = {

View File

@ -7189,7 +7189,10 @@ mlan_status wlan_ret_chan_region_cfg(pmlan_private pmpriv,
/* Add FW cfp tables and region info */
wlan_add_fw_cfp_tables(pmpriv, tlv_buf, tlv_buf_left);
if (pmadapter->otp_region) {
wlan_set_regiontable(pmpriv, (t_u8)pmadapter->region_code,
pmadapter->fw_bands);
}
if (!pioctl_buf)
goto done;
@ -7485,7 +7488,7 @@ static void wlan_fill_link_statistic(mlan_private *priv,
left_len = resp->size - sizeof(HostCmd_DS_802_11_LINK_STATISTIC) -
S_DS_GEN;
tlv = (MrvlIEtypesHeader_t *)(plink_stat->value);
DBG_HEXDUMP(MCMD_D, "tlv:", (void *)tlv, 1024);
DBG_HEXDUMP(MDAT_D, "tlv:", (void *)tlv, 1024);
while (left_len > sizeof(MrvlIEtypesHeader_t)) {
tlv_type = wlan_le16_to_cpu(tlv->type);
tlv_len = wlan_le16_to_cpu(tlv->len);
@ -7729,7 +7732,7 @@ static void wlan_fill_link_statistic(mlan_private *priv,
fw_ifaceStat->peer_info[peerIdx]
.rate_stats[rate_idx]
.retries_long);
PRINTM(MCMND,
PRINTM(MDAT_D,
"0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n",
iface_stat->peer_info[peerIdx]
.rate_stats[rate_idx]
@ -8351,6 +8354,29 @@ mlan_status wlan_ret_hal_phy_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
return MLAN_STATUS_SUCCESS;
}
mlan_status wlan_cmd_ips_config(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
t_u16 cmd_action, t_void *pdata_buf)
{
HostCmd_DS_IPS_CONFIG *ips_cfg = MNULL;
t_u32 enable = *(t_u32 *)pdata_buf;
ENTER();
cmd->command = wlan_cpu_to_le16(HostCmd_CMD_IPS_CONFIG);
ips_cfg = &cmd->params.ips_cfg;
ips_cfg->enable = wlan_cpu_to_le32(enable);
cmd->size = S_DS_GEN + sizeof(HostCmd_DS_IPS_CONFIG);
LEAVE();
return MLAN_STATUS_SUCCESS;
}
mlan_status wlan_ret_ips_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
mlan_ioctl_req *pioctl_buf)
{
ENTER();
LEAVE();
return MLAN_STATUS_SUCCESS;
}
/**
* @brief This function prepares command of Dot11mc unassoc ftm cfg
*

View File

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_
/** MLAN release version */
#define MLAN_RELEASE_VERSION "293"
#define MLAN_RELEASE_VERSION "299.p1"
/** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */

View File

@ -489,9 +489,9 @@ typedef enum _WLAN_802_11_WEP_STATUS {
#define TLV_TYPE_WIFI_DIRECT_OPP_PS (PROPRIETARY_TLV_BASE_ID + 0x84)
#endif /* WIFI_DIRECT_SUPPORT */
/** TLV type : GPIO TSF LATCH CONFIG */
#define TLV_TYPE_GPIO_TSF_LATCH_CONFIG (PROPRIETARY_TLV_BASE_ID + 0x153)
#define TLV_TYPE_GPIO_TSF_LATCH_CONFIG (PROPRIETARY_TLV_BASE_ID + 0x154)
/** TLV type : GPIO TSF LATCH REPORT*/
#define TLV_TYPE_GPIO_TSF_LATCH_REPORT (PROPRIETARY_TLV_BASE_ID + 0x154)
#define TLV_TYPE_GPIO_TSF_LATCH_REPORT (PROPRIETARY_TLV_BASE_ID + 0x155)
/** TLV : 20/40 coex config */
#define TLV_TYPE_2040_BSS_COEX_CONTROL \
@ -1316,7 +1316,6 @@ typedef enum _WLAN_802_11_WEP_STATUS {
#define HostCmd_CMD_MGMT_IE_LIST 0x00f2
#define HostCmd_CMD_802_11_BAND_STEERING 0x026f
/** Host Command ID : TDLS configuration */
#define HostCmd_CMD_TDLS_CONFIG 0x0100
/** Host Command ID : TDLS operation */
@ -1379,6 +1378,10 @@ typedef enum _WLAN_802_11_WEP_STATUS {
#define FW_CAPINFO_EXT_MULTI_BSSID MBIT(9)
/** FW cap info bit 10: Beacon Protection Support */
#define FW_CAPINFO_EXT_BEACON_PROT MBIT(10)
/** FW cap info bit 11: OTP cal data */
#define FW_CAPINFO_EXT_OTP_CALDATA MBIT(11)
/** FW cap info bit 12: RTT Support */
#define FW_CAPINFO_EXT_RTT MBIT(12)
/** Check if 5G 1x1 only is supported by firmware */
#define IS_FW_SUPPORT_5G_1X1_ONLY(_adapter) \
@ -1410,6 +1413,8 @@ typedef enum _WLAN_802_11_WEP_STATUS {
/** Check if Beacon Protection supported by firmware */
#define IS_FW_SUPPORT_BEACON_PROT(_adapter) \
(_adapter->fw_cap_ext & FW_CAPINFO_EXT_BEACON_PROT)
/** Check if RTT supported by firmware */
#define IS_FW_SUPPORT_RTT(_adapter) (_adapter->fw_cap_ext & FW_CAPINFO_EXT_RTT)
/** MrvlIEtypes_PrevBssid_t */
typedef MLAN_PACK_START struct _MrvlIEtypes_PrevBssid_t {
@ -1682,6 +1687,13 @@ typedef MLAN_PACK_START struct _power_table_attr {
#define HostCmd_CMD_DOT11MC_UNASSOC_FTM_CFG 0x0275
#define HostCmd_CMD_HAL_PHY_CFG 0x0276
/** Host Command ID : IPS Config */
#define HostCmd_CMD_IPS_CONFIG 0x0279
typedef MLAN_PACK_START struct {
t_u32 enable;
} MLAN_PACK_END HostCmd_DS_IPS_CONFIG;
/** Enhanced PS modes */
typedef enum _ENH_PS_MODES {
GET_PS = 0,
@ -1810,6 +1822,7 @@ typedef enum _ENH_PS_MODES {
/** Get BSS type from Host Command (bit 15:12) */
#define HostCmd_GET_BSS_TYPE(seq) (((seq)&HostCmd_BSS_TYPE_MASK) >> 12)
/* EVENT ID*/
/** Card Event definition : Dummy host wakeup signal */
#define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
/** Card Event definition : Link lost */
@ -1888,6 +1901,22 @@ typedef enum _ENH_PS_MODES {
/** Card Event definition : Port release event */
#define EVENT_PORT_RELEASE 0x0000002b
#ifdef UAP_SUPPORT
/** Event ID: STA deauth */
#define EVENT_MICRO_AP_STA_DEAUTH 0x0000002c
/** Event ID: STA assoicated */
#define EVENT_MICRO_AP_STA_ASSOC 0x0000002d
/** Event ID: BSS started */
#define EVENT_MICRO_AP_BSS_START 0x0000002e
/** Event ID: BSS idle event */
#define EVENT_MICRO_AP_BSS_IDLE 0x00000043
/** Event ID: BSS active event */
#define EVENT_MICRO_AP_BSS_ACTIVE 0x00000044
/** Event ID: MIC countermeasures event */
#define EVENT_MICRO_AP_MIC_COUNTERMEASURES 0x0000004c
#endif /* UAP_SUPPORT */
/** Card Event definition : Pre-Beacon Lost */
#define EVENT_PRE_BEACON_LOST 0x00000031
@ -1940,51 +1969,37 @@ typedef enum _ENH_PS_MODES {
/** Enhance ext scan done event */
#define EVENT_EXT_SCAN_STATUS_REPORT 0x0000007f
/** Event definition : FW debug information */
#define EVENT_FW_DEBUG_INFO 0x00000063
/** Event definition: RXBA_SYNC */
#define EVENT_RXBA_SYNC 0x00000059
#ifdef UAP_SUPPORT
/** Event ID: STA deauth */
#define EVENT_MICRO_AP_STA_DEAUTH 0x0000002c
/** Event ID: STA assoicated */
#define EVENT_MICRO_AP_STA_ASSOC 0x0000002d
/** Event ID: BSS started */
#define EVENT_MICRO_AP_BSS_START 0x0000002e
/** Event ID: BSS idle event */
#define EVENT_MICRO_AP_BSS_IDLE 0x00000043
/** Event ID: BSS active event */
#define EVENT_MICRO_AP_BSS_ACTIVE 0x00000044
/** Event ID: MIC countermeasures event */
#define EVENT_MICRO_AP_MIC_COUNTERMEASURES 0x0000004c
#endif /* UAP_SUPPORT */
/** Event ID: TX data pause event */
#define EVENT_TX_DATA_PAUSE 0x00000055
/** Event definition : FW debug information */
#define EVENT_FW_DEBUG_INFO 0x00000063
/** Event ID: SAD Report */
#define EVENT_SAD_REPORT 0x00000066
#define EVENT_FW_DUMP_INFO 0x00000073
/** Event ID: Tx status */
#define EVENT_TX_STATUS_REPORT 0x00000074
#define EVENT_BT_COEX_WLAN_PARA_CHANGE 0x00000076
#define EVENT_VDLL_IND 0x00000081
#define EVENT_EXCEED_MAX_P2P_CONN 0x00000089
#if defined(PCIE)
#define EVENT_SSU_DUMP_DMA 0x0000008C
#endif
#define EVENT_VDLL_IND 0x00000081
#define EVENT_EXCEED_MAX_P2P_CONN 0x00000089
#define EVENT_FW_HANG_REPORT 0x0000008F
/** Card Event definition : RESET PN */
#define EVENT_FW_HANG_REPORT 0x0000008F
#define EVENT_ASSOC_REQ_IE 0x00000095
#define EVENT_FW_DUMP_INFO 0x00000073
/** Event ID mask */
#define EVENT_ID_MASK 0xffff
@ -2159,6 +2174,81 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_TDLS_Idle_Timeout_t {
/** enable retry limit in TxPD */
#define TXPD_RETRY_ENABLE MBIT(12)
/** tx_control*/
#ifdef BIG_ENDIAN_SUPPORT
typedef MLAN_PACK_START struct _tx_ctrl {
/** reserved */
t_u32 reserved : 3;
/** mc retry packet */
t_u32 mc_pkt_retry : 1;
/** end of mc AMPDU */
t_u32 mc_ampdu_end : 1;
/** start of mc AMPDU */
t_u32 mc_ampdu_start : 1;
/** End of mc cycle */
t_u32 mc_cycle_end : 1;
/** start of mc cycle */
t_u32 mc_cycle_start : 1;
/** bw 0-20MHz, 1-40MHz */
t_u32 bw : 3;
/** Rate used for transmission MCS0-7*/
t_u32 tx_rate : 5;
/** Control the use of txRate. 0 - use FW setting, 1 - use the specified
* txRate;*/
t_u32 host_txrate_ctrl : 1;
/** 0/1 - use FW setting, 2 - ACK_IMMD, 3 - NO_ACK.*/
t_u32 ack_policy : 2;
/** Control the use of retryLimit. 0 - use FW setting, 1 - use the
* specified retryLimit.*/
t_u32 host_retry_ctrl : 1;
/** retry limit */
t_u32 retry_limit : 4;
/** Control the use of txPower. 0 - use FW power setting, 1 - use the
* specified txPower.*/
t_u32 host_tx_powerctrl : 1;
/** Sign of the txPower, 0 - positive_sign(+), 1 - negative_sign(-). */
t_u32 tx_power_sign : 1;
/** Power used for transmission(in dBm); */
t_u32 tx_power : 6;
} MLAN_PACK_END tx_ctrl;
#else
typedef MLAN_PACK_START struct _tx_ctrl {
/** Power used for transmission(in dBm); */
t_u32 tx_power : 6;
/** Sign of the txPower, 0 - positive_sign(+), 1 - negative_sign(-). */
t_u32 tx_power_sign : 1;
/** Control the use of txPower. 0 - use FW power setting, 1 - use the
* specified txPower.*/
t_u32 host_tx_powerctrl : 1;
/** retry limit */
t_u32 retry_limit : 4;
/** Control the use of retryLimit. 0 - use FW setting, 1 - use the
* specified retryLimit.*/
t_u32 host_retry_ctrl : 1;
/** 0/1 - use FW setting, 2 - ACK_IMMD, 3 - NO_ACK.*/
t_u32 ack_policy : 2;
/** Control the use of txRate. 0 - use FW setting, 1 - use the specified
* txRate;*/
t_u32 host_txrate_ctrl : 1;
/** Rate used for transmission MCS0-7*/
t_u32 tx_rate : 5;
/** bw 0-20MHz 1-40MHz*/
t_u32 bw : 3;
/** start of mc cycle */
t_u32 mc_cycle_start : 1;
/** End of mc cycle */
t_u32 mc_cycle_end : 1;
/** start of mc AMPDU */
t_u32 mc_ampdu_start : 1;
/** end of mc AMPDU */
t_u32 mc_ampdu_end : 1;
/** mc retry packet */
t_u32 mc_pkt_retry : 1;
/** reserved */
t_u32 reserved : 3;
} MLAN_PACK_END tx_ctrl;
#endif
/** TxPD descriptor */
typedef MLAN_PACK_START struct _TxPD {
/** BSS type */
@ -2229,7 +2319,6 @@ typedef MLAN_PACK_START struct _RxPD {
/** Reserved */
t_u8 reserved3[8];
} MLAN_PACK_END RxPD, *PRxPD;
/** IEEEtypes_FrameCtl_t*/
@ -5914,7 +6003,7 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_WakeupExtend_t {
t_u8 gpio_wave;
} MLAN_PACK_END MrvlIEtypes_WakeupExtend_t;
#define EVENT_MANAGEMENT_FRAME_WAKEUP 136
#define EVENT_MANAGEMENT_FRAME_WAKEUP 0x00000088
typedef MLAN_PACK_START struct _mgmt_frame_filter {
/** action - bitmap
** On matching rx'd pkt and filter during NON_HOSTSLEEP mode:
@ -6217,7 +6306,7 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_uap_max_sta_cnt_t {
t_u16 uap_max_sta;
} MLAN_PACK_END MrvlIEtypes_uap_max_sta_cnt_t;
#define MRVL_ACTION_CHAN_SWITCH_ANNOUNCE (PROPRIETARY_TLV_BASE_ID + 0x341)
#define MRVL_ACTION_CHAN_SWITCH_ANNOUNCE (PROPRIETARY_TLV_BASE_ID + 342)
/** MrvlIEtypes_uap_chan_switch */
typedef MLAN_PACK_START struct _MrvlIEtypes_action_chan_switch_t {
@ -7215,7 +7304,7 @@ typedef MLAN_PACK_START struct _HostCmd_DS_AUTO_TX {
} MLAN_PACK_END HostCmd_DS_AUTO_TX;
#define OID_CLOUD_KEEP_ALIVE 0
#define EVENT_CLOUD_KEEP_ALIVE_RETRY_FAIL 133
#define EVENT_CLOUD_KEEP_ALIVE_RETRY_FAIL 0x00000085
/** TLV for cloud keep alive control info */
#define TLV_TYPE_CLOUD_KEEP_ALIVE \
(PROPRIETARY_TLV_BASE_ID + 0x102) /* 0x0100 + 258 */
@ -7749,6 +7838,7 @@ typedef struct MLAN_PACK_START _HostCmd_DS_COMMAND {
HostCmd_DS_CMD_ARB_CONFIG arb_cfg;
HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG dot11mc_unassoc_ftm_cfg;
HostCmd_DS_HAL_PHY_CFG hal_phy_cfg_params;
HostCmd_DS_IPS_CONFIG ips_cfg;
} params;
} MLAN_PACK_END HostCmd_DS_COMMAND, *pHostCmd_DS_COMMAND;

View File

@ -1321,8 +1321,7 @@ typedef MLAN_PACK_START struct {
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
#define WLAN_11H_MAX_SUBBANDS 6
#define WLAN_11H_MAX_SUBBANDS 5
/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */
#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25

View File

@ -240,10 +240,9 @@ mlan_status wlan_allocate_adapter(pmlan_adapter pmadapter)
t_u32 buf_size;
BSSDescriptor_t *ptemp_scan_table = MNULL;
t_u8 chan_2g[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
t_u8 chan_5g[] = {12, 16, 34, 38, 42, 46, 36, 40, 44,
48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 120, 124, 128, 132, 136, 140, 144, 149,
153, 157, 161, 165, 169, 173, 177};
t_u8 chan_5g[] = {12, 16, 34, 38, 42, 46, 36, 40, 44, 48, 52,
56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128,
132, 136, 140, 144, 149, 153, 157, 161, 165};
#endif
#ifdef SDIO
t_u32 max_mp_regs = 0;

View File

@ -349,6 +349,8 @@ enum _mlan_ioctl_req_id {
#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,
};
/** Sub command size */
@ -630,7 +632,7 @@ typedef struct _mlan_multicast_list {
} mlan_multicast_list, *pmlan_multicast_list;
/** Max channel */
#define MLAN_MAX_CHANNEL 177
#define MLAN_MAX_CHANNEL 165
/** Maximum number of channels in table */
#define MLAN_MAX_CHANNEL_NUM 128
@ -692,6 +694,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
*/
@ -1816,6 +1838,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 */
@ -5317,6 +5341,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 */
@ -5432,6 +5458,7 @@ typedef struct _mlan_ds_misc_cfg {
#ifdef UAP_SUPPORT
t_u8 wacp_mode;
#endif
t_u32 ips_ctrl;
} param;
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;

View File

@ -898,6 +898,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),

View File

@ -1278,7 +1278,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
*/
@ -3475,7 +3478,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);

View File

@ -3072,6 +3072,10 @@ mlan_status wlan_ops_sta_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_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);

View File

@ -191,12 +191,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);
@ -3307,6 +3307,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;

View File

@ -835,6 +835,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;

View File

@ -412,6 +412,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);
@ -4233,6 +4235,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
*
@ -4832,6 +4864,30 @@ mlan_status wlan_misc_ioctl_tp_state(pmlan_adapter pmadapter,
return ret;
}
static mlan_status wlan_misc_ioctl_ips_cfg(pmlan_adapter pmadapter,
pmlan_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;
cmd_action = HostCmd_ACT_GEN_SET;
/* Send request to firmware */
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;
LEAVE();
return ret;
}
static mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
pmlan_ioctl_req pioctl_req)
{
@ -5047,6 +5103,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;
@ -5263,6 +5322,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;

View File

@ -1936,6 +1936,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;
@ -2192,8 +2195,8 @@ 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);

View File

@ -485,8 +485,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) {
@ -637,8 +636,7 @@ mlan_status wlan_process_uap_rx_packet(mlan_private *priv, pmlan_buffer pmbuf)
/* 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) {

View File

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_
/** MLAN release version */
#define MLAN_RELEASE_VERSION "293"
#define MLAN_RELEASE_VERSION "299.p1"
/** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */

View File

@ -1321,8 +1321,7 @@ typedef MLAN_PACK_START struct {
} MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
#define WLAN_11H_MAX_SUBBANDS 6
#define WLAN_11H_MAX_SUBBANDS 5
/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */
#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25

View File

@ -349,6 +349,8 @@ enum _mlan_ioctl_req_id {
#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,
};
/** Sub command size */
@ -630,7 +632,7 @@ typedef struct _mlan_multicast_list {
} mlan_multicast_list, *pmlan_multicast_list;
/** Max channel */
#define MLAN_MAX_CHANNEL 177
#define MLAN_MAX_CHANNEL 165
/** Maximum number of channels in table */
#define MLAN_MAX_CHANNEL_NUM 128
@ -692,6 +694,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
*/
@ -1816,6 +1838,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 */
@ -5317,6 +5341,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 */
@ -5432,6 +5458,7 @@ typedef struct _mlan_ds_misc_cfg {
#ifdef UAP_SUPPORT
t_u8 wacp_mode;
#endif
t_u32 ips_ctrl;
} param;
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg;

View File

@ -127,9 +127,6 @@ 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 = {
@ -148,6 +145,24 @@ struct ieee80211_supported_band cfg80211_band_5ghz = {
.n_bitrates = ARRAY_SIZE(cfg80211_rates) - 4,
};
/** Channel definitions for 2 GHz to be advertised to cfg80211 */
static struct ieee80211_channel macl_cfg80211_channels_2ghz[] = {
{.center_freq = 2412, .hw_value = 1, .max_power = 20},
{.center_freq = 2417, .hw_value = 2, .max_power = 20},
{.center_freq = 2422, .hw_value = 3, .max_power = 20},
{.center_freq = 2427, .hw_value = 4, .max_power = 20},
{.center_freq = 2432, .hw_value = 5, .max_power = 20},
{.center_freq = 2437, .hw_value = 6, .max_power = 20},
{.center_freq = 2442, .hw_value = 7, .max_power = 20},
{.center_freq = 2447, .hw_value = 8, .max_power = 20},
{.center_freq = 2452, .hw_value = 9, .max_power = 20},
{.center_freq = 2457, .hw_value = 10, .max_power = 20},
{.center_freq = 2462, .hw_value = 11, .max_power = 20},
{.center_freq = 2467, .hw_value = 12, .max_power = 20},
{.center_freq = 2472, .hw_value = 13, .max_power = 20},
{.center_freq = 2484, .hw_value = 14, .max_power = 20},
};
/** 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},
@ -175,15 +190,12 @@ static struct ieee80211_channel mac1_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 mac1_cfg80211_band_2ghz = {
.channels = cfg80211_channels_2ghz,
.channels = macl_cfg80211_channels_2ghz,
.band = IEEE80211_BAND_2GHZ,
.n_channels = ARRAY_SIZE(cfg80211_channels_2ghz),
.n_channels = ARRAY_SIZE(macl_cfg80211_channels_2ghz),
.bitrates = cfg80211_rates,
.n_bitrates = ARRAY_SIZE(cfg80211_rates),
};
@ -2667,11 +2679,19 @@ 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*/
if (priv->phandle->is_cac_timer_set)
woal_cancel_chanrpt_event(priv);
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:
@ -2742,7 +2762,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;
@ -4540,7 +4560,7 @@ void woal_cfg80211_free_iftype_data(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)
@ -4844,7 +4864,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]) {

View File

@ -77,6 +77,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
@ -104,7 +106,7 @@ 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

View File

@ -756,7 +756,6 @@ static int woal_cfg80211_subcmd_get_supp_feature_set(struct wiphy *wiphy,
t_u32 supp_feature_set = 0;
ENTER();
supp_feature_set = WLAN_FEATURE_INFRA
#if defined(UAP_SUPPORT) && defined(STA_SUPPORT)
| WLAN_FEATURE_AP_STA
@ -2301,7 +2300,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;
@ -2695,10 +2694,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,
@ -2773,6 +2772,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;
/* Allocate an IOCTL request buffer */
req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) + BUF_MAXLEN);
@ -2801,6 +2805,39 @@ static int woal_cfg80211_subcmd_link_statistic_get(struct wiphy *wiphy,
sizeof(num_radio));
radio_stat_len = num_radio * sizeof(wifi_radio_stat);
/* Re-write on_time/tx_time/rx_time/on_time_scan from moal handle */
PRINTM(MINFO, "handle->on_time=%llu\n", handle->on_time);
if (handle->on_time) {
moal_get_boot_ktime(handle, &cur_time);
inter_msec = moal_do_div(cur_time - handle->on_time, 1000000);
PRINTM(MINFO, "cur_time=%llu inter_msec=%llu max_msec=%llu\n",
cur_time, inter_msec, max_msec);
/* When we report the time up, u32 is not big enough(represent
* max 49days) and might out of range, make the max value to
* 24days.
*/
if (inter_msec > max_msec) {
PRINTM(MMSG,
"Out of range, set inter_msec=%llu to max_msec=%llu\n",
inter_msec, max_msec);
inter_msec = max_msec;
}
}
PRINTM(MINFO, "handle->tx_time=%llu\n", handle->tx_time);
PRINTM(MINFO, "handle->rx_time=%llu\n", handle->rx_time);
PRINTM(MINFO, "handle->scan_time=%llu\n", handle->scan_time);
radio_stat_tmp = radio_stat;
for (i = 0; i < num_radio; i++) {
radio_stat_tmp->on_time = (t_u32)inter_msec;
radio_stat_tmp->tx_time =
(t_u32)moal_do_div(handle->tx_time, 1000);
radio_stat_tmp->rx_time =
(t_u32)moal_do_div(handle->rx_time, 1000);
radio_stat_tmp->on_time_scan =
(t_u32)moal_do_div(handle->scan_time, 1000);
radio_stat_tmp++;
}
iface_stat = (wifi_iface_stat *)(info->param.link_statistic +
sizeof(num_radio) + radio_stat_len);
iface_stat_len = sizeof(wifi_iface_stat);
@ -2832,38 +2869,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))
@ -3019,7 +3056,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 */

View File

@ -5206,8 +5206,8 @@ static int woal_priv_set_essid(moal_private *priv, t_u8 *respbuf,
{
mlan_802_11_ssid req_ssid;
mlan_ssid_bssid ssid_bssid;
#ifdef REASSOCIATION
moal_handle *handle = priv->phandle;
#ifdef REASSOCIATION
mlan_bss_info bss_info;
#endif
int ret = 0;
@ -10372,6 +10372,67 @@ done:
return ret;
}
/**
* @brief clear NOP list
*
* @param priv A pointer to moal_private structure
* @return 0 --success, otherwise fail
*/
static int woal_uap_clear_nop(moal_private *priv)
{
mlan_ioctl_req *req = NULL;
mlan_ds_11h_cfg *ds_11hcfg = NULL;
int ret = 0;
mlan_status status = MLAN_STATUS_SUCCESS;
ENTER();
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11h_cfg));
if (req == NULL) {
ret = -ENOMEM;
goto done;
}
req->req_id = MLAN_IOCTL_11H_CFG;
req->action = MLAN_ACT_CLEAR;
ds_11hcfg = (mlan_ds_11h_cfg *)req->pbuf;
ds_11hcfg->sub_command = MLAN_OID_11H_CHAN_NOP_INFO;
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
if (status == MLAN_STATUS_FAILURE) {
ret = -EFAULT;
goto done;
}
done:
if (status != MLAN_STATUS_PENDING)
kfree(req);
LEAVE();
return ret;
}
/**
* @brief This function clear nop flags.
*
* @param priv A pointer to moal_private structure
* @param respbuf A pointer to response buffer
* @param respbuflen Available length of response buffer
*
* @return Number of bytes written, negative for failure.
*/
static int woal_priv_clear_nop(moal_private *priv, t_u8 *respbuf,
t_u32 respbuflen)
{
int ret = 0;
ENTER();
PRINTM(MCMND, "clear nop\n");
ret = woal_uap_clear_nop(priv);
ret = sizeof(int);
LEAVE();
return ret;
}
/**
* @brief Set/Get DFS Testing settings
*
@ -15606,6 +15667,61 @@ done:
return ret;
}
static int woal_priv_ips_cfg(moal_private *priv, t_u8 *respbuf,
t_u32 respbuflen)
{
moal_handle *handle = priv->phandle;
mlan_ioctl_req *req = NULL;
mlan_ds_misc_cfg *misc = NULL;
t_u32 data[1];
int ret = 0;
int user_data_len = 0;
mlan_status status = MLAN_STATUS_SUCCESS;
ENTER();
if (strlen(respbuf) == (strlen(CMD_NXP) + strlen(PRIV_CMD_IPS_CFG))) {
/* GET operation */
user_data_len = 0;
} else {
/* SET operation */
memset((char *)data, 0, sizeof(data));
parse_arguments(respbuf + strlen(CMD_NXP) +
strlen(PRIV_CMD_IPS_CFG),
data, ARRAY_SIZE(data), &user_data_len);
}
if (user_data_len) {
/* Allocate an IOCTL request buffer */
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
if (req == NULL) {
ret = -ENOMEM;
goto done;
}
/* Fill request buffer */
misc = (mlan_ds_misc_cfg *)req->pbuf;
misc->sub_command = MLAN_OID_MISC_IPS_CFG;
req->req_id = MLAN_IOCTL_MISC_CFG;
misc->param.ips_ctrl = data[0];
req->action = MLAN_ACT_SET;
/* Send IOCTL request to MLAN */
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
if (status != MLAN_STATUS_SUCCESS) {
ret = -EFAULT;
goto done;
}
handle->ips_ctrl = data[0];
} else {
data[0] = handle->ips_ctrl;
moal_memcpy_ext(priv->phandle, respbuf, (t_u8 *)data,
sizeof(data), respbuflen);
}
ret = sizeof(data);
done:
if (status != MLAN_STATUS_PENDING)
kfree(req);
LEAVE();
return ret;
}
/**
* @brief Set priv command for Android
* @param dev A pointer to net_device structure
@ -16532,6 +16648,12 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
len = woal_priv_dfs_testing(priv, buf,
priv_cmd.total_len);
goto handled;
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_CLEAR_NOP,
strlen(PRIV_CMD_CLEAR_NOP)) == 0) {
/* Set/Get DFS Testing settings */
len = woal_priv_clear_nop(priv, buf,
priv_cmd.total_len);
goto handled;
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_DFS53_CFG,
strlen(PRIV_CMD_DFS53_CFG)) == 0) {
/* Set/Get DFS W53 settings */
@ -16809,6 +16931,10 @@ int woal_android_priv_cmd(struct net_device *dev, struct ifreq *req)
len = woal_priv_set_tp_state(priv, buf,
priv_cmd.total_len);
goto handled;
} else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_IPS_CFG,
strlen(PRIV_CMD_IPS_CFG)) == 0) {
len = woal_priv_ips_cfg(priv, buf, priv_cmd.total_len);
goto handled;
} else {
PRINTM(MERROR,
"Unknown NXP PRIVATE command %s, ignored\n",

View File

@ -214,6 +214,7 @@ typedef struct _chan_stats {
#endif
#define PRIV_CMD_SLEEP_PARAMS "sleepparams"
#define PRIV_CMD_DFS_TESTING "dfstesting"
#define PRIV_CMD_CLEAR_NOP "clear_nop"
#define PRIV_CMD_DFS53_CFG "dfs53cfg"
#define PRIV_CMD_CFP_CODE "cfpcode"
#define PRIV_CMD_CWMODE "cwmode"
@ -304,6 +305,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)

View File

@ -108,10 +108,16 @@ static region_code_mapping_t hw_region_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", "NE"};
"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", "NE", "NZ", "DZ", "AO",
"AM", "AW", "BH", "BD", "BT", "BO", "BQ", "BW", "VG", "BF", "BI", "KH",
"CL", "CN", "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", "NG", "OM",
"PS", "PT", "QA", "RW", "RE", "BL", "MF", "VC", "SA", "SC", "ZA", "SZ",
"SY", "TZ", "TG", "TN", "AE", "VA", "EH", "YE", "ZM", "ZW"};
/********************************************************
Global Variables
@ -263,7 +269,7 @@ t_u8 woal_get_second_channel_offset(moal_private *priv, int chan)
/* Special Case: 20Mhz-only Channel */
woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info);
if (bss_info.region_code != COUNTRY_CODE_US && chan == 165)
if (chan == 165)
return chan2Offset;
switch (chan) {
@ -279,8 +285,6 @@ t_u8 woal_get_second_channel_offset(moal_private *priv, int chan)
case 140:
case 149:
case 157:
case 165:
case 173:
chan2Offset = SEC_CHAN_ABOVE;
break;
case 40:
@ -295,8 +299,6 @@ t_u8 woal_get_second_channel_offset(moal_private *priv, int chan)
case 144:
case 153:
case 161:
case 169:
case 177:
chan2Offset = SEC_CHAN_BELOW;
break;
}
@ -1831,6 +1833,53 @@ done:
LEAVE();
return ret;
}
/**
* @brief Get assoc_req IEs buffer
*
* @param priv A pointer to moal_private structure
* @param assoc_rsp A pointer to mlan_ds_misc_assoc_rsp structure
* @param wait_option wait option
*
* @return MLAN_STATUS_SUCCESS -- success, otherwise fail
*/
mlan_status woal_get_assoc_req(moal_private *priv,
mlan_ds_misc_assoc_req *assoc_req,
t_u8 wait_option)
{
mlan_status ret = MLAN_STATUS_SUCCESS;
mlan_ds_misc_cfg *misc = NULL;
mlan_ioctl_req *req = NULL;
ENTER();
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
if (req == NULL) {
PRINTM(MERROR,
"Fail to allocate buffer for get assoc request\n");
ret = MLAN_STATUS_FAILURE;
goto done;
}
req->req_id = MLAN_IOCTL_MISC_CFG;
misc = (pmlan_ds_misc_cfg)req->pbuf;
misc->sub_command = MLAN_OID_MISC_ASSOC_REQ;
req->action = MLAN_ACT_GET;
ret = woal_request_ioctl(priv, req, wait_option);
if (ret == MLAN_STATUS_SUCCESS && assoc_req)
moal_memcpy_ext(priv->phandle, assoc_req,
&misc->param.assoc_req,
sizeof(mlan_ds_misc_assoc_req),
sizeof(mlan_ds_misc_assoc_req));
done:
if (ret != MLAN_STATUS_PENDING)
kfree(req);
LEAVE();
return ret;
}
#endif
/**

View File

@ -3598,6 +3598,9 @@ static mlan_status woal_init_fw_dpc(moal_handle *handle)
handle->driver_status = MFALSE;
}
moal_get_boot_ktime(handle, &handle->on_time);
PRINTM(MMSG, "on_time is %llu\n", handle->on_time);
/** data request */
memset(&param, 0, sizeof(mlan_init_param));
@ -3878,79 +3881,54 @@ void woal_fill_mlan_buffer(moal_private *priv, mlan_buffer *pmbuf,
{
wifi_timeval tstamp;
struct ethhdr *eth;
t_u8 tid = 0;
dot11_txcontrol *txcontrol;
t_u8 tx_ctrl_flag = MFALSE;
int i = 0;
ENTER();
/*
* skb->priority values from 256->263 are magic values to
* directly indicate a specific 802.1d priority. This is used
* to allow 802.1d priority to be passed directly in from VLAN
* tags, etc.
*/
if (IS_SKB_MAGIC_VLAN(skb)) {
tid = GET_VLAN_PRIO(skb);
} else {
eth = (struct ethhdr *)skb->data;
switch (eth->h_proto) {
case __constant_htons(ETH_P_IP):
tid = priv->dscp_map[SKB_TOS(skb) >> DSCP_OFFSET];
if (tid == 0xFF)
tid = (IPTOS_PREC(SKB_TOS(skb)) >>
IPTOS_OFFSET);
PRINTM(MDAT_D,
"packet type ETH_P_IP: dscp[%x], map[%x], tid=%d\n",
SKB_TOS(skb) >> DSCP_OFFSET,
priv->dscp_map[SKB_TOS(skb) >> DSCP_OFFSET],
tid);
break;
case __constant_htons(ETH_P_IPV6):
tid = SKB_TIDV6(skb);
PRINTM(MDAT_D,
"packet type ETH_P_IPV6: %04x, tid=%#x prio=%#x\n",
eth->h_proto, tid, skb->priority);
break;
case __constant_htons(ETH_P_ARP):
tid = 0;
PRINTM(MDATA, "ARP packet %04x\n", eth->h_proto);
break;
default:
tid = 0;
if (priv->tx_protocols.protocol_num) {
for (i = 0; i < priv->tx_protocols.protocol_num;
i++) {
if (eth->h_proto ==
__constant_htons(
priv->tx_protocols
.protocols[i]))
tx_ctrl_flag = MTRUE;
}
eth = (struct ethhdr *)skb->data;
switch (eth->h_proto) {
case __constant_htons(ETH_P_IP):
PRINTM(MINFO, "packet type ETH_P_IP: %04x, prio=%#x\n",
eth->h_proto, skb->priority);
break;
case __constant_htons(ETH_P_IPV6):
PRINTM(MINFO, "packet type ETH_P_IPV6: %04x, prio=%#x\n",
eth->h_proto, skb->priority);
break;
case __constant_htons(ETH_P_ARP):
skb->priority = 0;
PRINTM(MINFO, "ARP packet %04x prio=%#x\n", eth->h_proto,
skb->priority);
break;
default:
skb->priority = 0;
if (priv->tx_protocols.protocol_num) {
for (i = 0; i < priv->tx_protocols.protocol_num; i++) {
if (eth->h_proto ==
__constant_htons(
priv->tx_protocols.protocols[i]))
tx_ctrl_flag = MTRUE;
}
if (tx_ctrl_flag) {
txcontrol = (dot11_txcontrol
*)(skb->data +
sizeof(struct ethhdr));
pmbuf->u.tx_info.data_rate =
txcontrol->datarate;
pmbuf->u.tx_info.channel = txcontrol->channel;
pmbuf->u.tx_info.bw = txcontrol->bw;
pmbuf->u.tx_info.tx_power.val =
txcontrol->power;
pmbuf->u.tx_info.retry_limit =
txcontrol->retry_limit;
tid = txcontrol->priority;
memmove(skb->data + sizeof(dot11_txcontrol),
skb->data, sizeof(struct ethhdr));
skb_pull(skb, sizeof(dot11_txcontrol));
pmbuf->flags |= MLAN_BUF_FLAG_TX_CTRL;
}
break;
}
if (tx_ctrl_flag) {
txcontrol = (dot11_txcontrol *)(skb->data +
sizeof(struct ethhdr));
pmbuf->u.tx_info.data_rate = txcontrol->datarate;
pmbuf->u.tx_info.channel = txcontrol->channel;
pmbuf->u.tx_info.bw = txcontrol->bw;
pmbuf->u.tx_info.tx_power.val = txcontrol->power;
pmbuf->u.tx_info.retry_limit = txcontrol->retry_limit;
skb->priority = txcontrol->priority;
memmove(skb->data + sizeof(dot11_txcontrol), skb->data,
sizeof(struct ethhdr));
skb_pull(skb, sizeof(dot11_txcontrol));
pmbuf->flags |= MLAN_BUF_FLAG_TX_CTRL;
}
break;
}
skb->priority = tid;
PRINTM(MDAT_D, "packet %04x prio=%#x\n", eth->h_proto, skb->priority);
/* Record the current time the packet was queued; used to determine
* the amount of time the packet was queued in the driver before it
@ -4010,6 +3988,7 @@ const struct net_device_ops woal_netdev_ops = {
};
#endif
#define MAX_MTU_SIZE 2000
/**
* @brief This function initializes the private structure
* and dev structure for station mode
@ -4021,8 +4000,20 @@ const struct net_device_ops woal_netdev_ops = {
*/
mlan_status woal_init_sta_dev(struct net_device *dev, moal_private *priv)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
mlan_fw_info fw_info;
#endif
ENTER();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
memset(&fw_info, 0, sizeof(mlan_fw_info));
woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info);
if (fw_info.tx_buf_size > (MAX_MTU_SIZE + MLAN_MIN_DATA_HEADER_LEN +
priv->extra_tx_head_len)) {
dev->max_mtu = MAX_MTU_SIZE;
PRINTM(MMSG, "wlan: %s set max_mtu %d\n", dev->name,
dev->max_mtu);
}
#endif
/* Setup the OS Interface to our functions */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29)
dev->open = woal_open;
@ -4101,9 +4092,21 @@ const struct net_device_ops woal_uap_netdev_ops = {
mlan_status woal_init_uap_dev(struct net_device *dev, moal_private *priv)
{
mlan_status status = MLAN_STATUS_SUCCESS;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
mlan_fw_info fw_info;
#endif
ENTER();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
memset(&fw_info, 0, sizeof(mlan_fw_info));
woal_request_get_fw_info(priv, MOAL_IOCTL_WAIT, &fw_info);
if (fw_info.tx_buf_size > (MAX_MTU_SIZE + MLAN_MIN_DATA_HEADER_LEN +
priv->extra_tx_head_len)) {
dev->max_mtu = MAX_MTU_SIZE;
PRINTM(MMSG, "wlan: %s set max_mtu %d\n", dev->name,
dev->max_mtu);
}
#endif
/* Setup the OS Interface to our functions */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29)
dev->open = woal_open;
@ -4409,6 +4412,9 @@ moal_private *woal_add_interface(moal_handle *handle, t_u8 bss_index,
}
MLAN_INIT_WORK(&priv->mclist_work, woal_mclist_work_queue);
INIT_DELAYED_WORK(&priv->scan_deferred_work,
woal_scan_deferred_work_queue);
/* Initialize priv structure */
woal_init_priv(priv, MOAL_IOCTL_WAIT);
@ -4616,10 +4622,12 @@ void woal_remove_interface(moal_handle *handle, t_u8 bss_index)
#endif
#endif
#endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA ||
GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)
woal_deinit_wifi_hal(priv);
#endif
#endif
/* Clear the priv in handle */
@ -5559,7 +5567,6 @@ u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb
)
{
moal_private *priv = (moal_private *)netdev_priv(dev);
struct ethhdr *eth = NULL;
t_u8 tid = 0;
t_u8 index = 0;
@ -5568,32 +5575,7 @@ u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb
LEAVE();
return index;
}
/*
* skb->priority values from 256->263 are magic values to
* directly indicate a specific 802.1d priority. This is used
* to allow 802.1d priority to be passed directly in from VLAN
* tags, etc.
*/
if (IS_SKB_MAGIC_VLAN(skb)) {
tid = GET_VLAN_PRIO(skb);
} else {
eth = (struct ethhdr *)skb->data;
switch (eth->h_proto) {
case __constant_htons(ETH_P_IP):
tid = priv->dscp_map[SKB_TOS(skb) >> DSCP_OFFSET];
if (tid == 0xFF)
tid = (IPTOS_PREC(SKB_TOS(skb)) >>
IPTOS_OFFSET);
break;
case __constant_htons(ETH_P_IPV6):
tid = SKB_TIDV6(skb);
break;
case __constant_htons(ETH_P_ARP):
default:
break;
}
}
tid = skb->priority = cfg80211_classify8021d(skb, NULL);
index = mlan_select_wmm_queue(priv->phandle->pmlan_adapter,
priv->bss_index, tid);
PRINTM(MDATA, "select queue: tid=%d, index=%d\n", tid, index);
@ -5856,12 +5838,14 @@ static void woal_tcp_ack_timer_func(void *context)
tcp_session->pmbuf = NULL;
spin_unlock_irqrestore(&priv->tcp_sess_lock, flags);
if (skb && pmbuf) {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
#endif
status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
switch (status) {
case MLAN_STATUS_PENDING:
atomic_inc(&priv->phandle->tx_pending);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
atomic_inc(&priv->wmm_tx_pending[index]);
if (atomic_read(&priv->wmm_tx_pending[index]) >=
MAX_TX_PENDING) {
@ -5920,12 +5904,14 @@ static void woal_send_tcp_ack(moal_private *priv, struct tcp_sess *tcp_session)
}
tcp_session->ack_skb = NULL;
tcp_session->pmbuf = NULL;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
#endif
status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
switch (status) {
case MLAN_STATUS_PENDING:
atomic_inc(&priv->phandle->tx_pending);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
atomic_inc(&priv->wmm_tx_pending[index]);
if (atomic_read(&priv->wmm_tx_pending[index]) >=
MAX_TX_PENDING) {
@ -6101,9 +6087,10 @@ static int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
ENTER();
priv->num_tx_timeout = 0;
if (!skb->len || (skb->len > ETH_FRAME_LEN)) {
if (!skb->len ||
(skb->len > (priv->netdev->mtu + sizeof(struct ethhdr)))) {
PRINTM(MERROR, "Tx Error: Bad skb length %d : %d\n", skb->len,
ETH_FRAME_LEN);
priv->netdev->mtu);
dev_kfree_skb_any(skb);
priv->stats.tx_dropped++;
goto done;
@ -6159,6 +6146,15 @@ static int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
switch (status) {
case MLAN_STATUS_PENDING:
if (is_zero_timeval(priv->phandle->tx_time_start)) {
priv->phandle->tx_time_start.time_sec =
pmbuf->in_ts_sec;
priv->phandle->tx_time_start.time_usec =
pmbuf->in_ts_usec;
PRINTM(MINFO, "%s : start_timeval=%d:%d \n", __func__,
priv->phandle->tx_time_start.time_sec,
priv->phandle->tx_time_start.time_usec);
}
atomic_inc(&priv->phandle->tx_pending);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
@ -6488,8 +6484,10 @@ void woal_init_priv(moal_private *priv, t_u8 wait_option)
memset(&priv->sme_current, 0,
sizeof(struct cfg80211_connect_params));
#endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_init_wifi_hal(priv);
#endif
#endif
}
#endif /* STA_SUPPORT */
@ -6507,9 +6505,11 @@ void woal_init_priv(moal_private *priv, t_u8 wait_option)
memset(&priv->beacon_after, 0,
sizeof(struct cfg80211_beacon_data));
#endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_init_wifi_hal(priv);
#endif
#endif
#endif
}
#endif
@ -8741,6 +8741,45 @@ t_void woal_mclist_work_queue(struct work_struct *work)
woal_request_set_multicast_list(priv, priv->netdev);
}
/**
* @brief This workqueue function handles woal scan deferred work
*
* @param work A pointer to work_struct
*
* @return N/A
*/
t_void woal_scan_deferred_work_queue(struct work_struct *work)
{
#ifdef STA_CFG80211
struct delayed_work *delayed_work =
container_of(work, struct delayed_work, work);
moal_private *priv =
container_of(delayed_work, moal_private, scan_deferred_work);
unsigned long flags;
#endif
ENTER();
PRINTM(MINFO, "Reporting scan results from scan deferred wq\n");
#ifdef STA_CFG80211
if (IS_STA_CFG80211(priv->phandle->params.cfg80211_wext)) {
if (priv->phandle->scan_request) {
woal_inform_bss_from_scan_result(priv, NULL,
MOAL_NO_WAIT);
spin_lock_irqsave(&priv->phandle->scan_req_lock, flags);
woal_cfg80211_scan_done(priv->phandle->scan_request,
MFALSE);
priv->phandle->scan_request = NULL;
spin_unlock_irqrestore(&priv->phandle->scan_req_lock,
flags);
}
}
#endif
LEAVE();
}
/**
* @brief This workqueue function handles woal event queue
*
@ -8809,7 +8848,7 @@ t_void woal_evt_work_queue(struct work_struct *work)
case WOAL_EVENT_ASSOC_RESP:
woal_host_mlme_process_assoc_resp(
(moal_private *)evt->priv, &evt->assoc_resp);
(moal_private *)evt->priv, &evt->assoc_info);
break;
#endif
#endif
@ -8845,15 +8884,33 @@ t_void woal_rx_work_queue(struct work_struct *work)
#endif
#endif
#endif
wifi_timeval start_timeval;
wifi_timeval end_timeval;
ENTER();
if (handle->surprise_removed == MTRUE) {
LEAVE();
return;
}
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
if (handle->cfg80211_suspend == MTRUE) {
LEAVE();
return;
}
#endif
woal_get_monotonic_time(&start_timeval);
mlan_rx_process(handle->pmlan_adapter, NULL);
woal_get_monotonic_time(&end_timeval);
handle->rx_time += (t_u64)(timeval_to_usec(end_timeval) -
timeval_to_usec(start_timeval));
PRINTM(MINFO,
"%s : start_timeval=%d:%d end_timeval=%d:%d inter=%llu rx_time=%llu\n",
__func__, start_timeval.time_sec, start_timeval.time_usec,
end_timeval.time_sec, end_timeval.time_usec,
(t_u64)(timeval_to_usec(end_timeval) -
timeval_to_usec(start_timeval)),
handle->rx_time);
LEAVE();
}
@ -9927,6 +9984,10 @@ static void woal_post_reset(moal_handle *handle)
mlan_ioctl_req *req = NULL;
mlan_ds_misc_cfg *misc = NULL;
int intf_num;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
moal_private *priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY);
t_u8 country_code[COUNTRY_CODE_LEN];
#endif
#ifdef WIFI_DIRECT_SUPPORT
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
#if defined(STA_WEXT) || defined(UAP_WEXT)
@ -9994,6 +10055,28 @@ static void woal_post_reset(moal_handle *handle)
woal_start_queue(handle->priv[intf_num]->netdev);
}
}
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
if (handle->country_code[0] && handle->country_code[1]) {
memset(country_code, 0, sizeof(country_code));
if (MTRUE ==
is_cfg80211_special_region_code(handle->country_code)) {
country_code[0] = 'W';
country_code[1] = 'W';
} else {
country_code[0] = handle->country_code[0];
country_code[1] = handle->country_code[1];
}
if (handle->params.cntry_txpwr && priv)
woal_request_country_power_table(priv, country_code);
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
if (handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE)
queue_work(handle->evt_workqueue,
&handle->regulatory_work);
#endif
}
#endif
done:
if (handle->dpd_data) {
release_firmware(handle->dpd_data);

View File

@ -872,22 +872,6 @@ typedef enum {
/** GAP value is optional */
#define GAP_FLAG_OPTIONAL MBIT(15)
/** Macro to extract the TOS field from a skb */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
#define SKB_TOS(skb) (ip_hdr(skb)->tos)
#else
#define SKB_TOS(skb) (skb->nh.iph->tos)
#endif
#define SKB_TIDV6(skb) (ipv6_get_dsfield(ipv6_hdr(skb)))
#define IS_SKB_MAGIC_VLAN(skb) (skb->priority >= 256 && skb->priority <= 263)
#define GET_VLAN_PRIO(skb) (skb->priority - 256)
/** Offset for TOS field in the IP header */
#define IPTOS_OFFSET 5
/** Offset for DSCP in the tos field */
#define DSCP_OFFSET 2
/** max retry count for wait_event_interupptible_xx while loop */
#define MAX_RETRY_CNT 100
/** wait_queue structure */
@ -1098,7 +1082,7 @@ typedef struct _woal_evt_buf {
/** Event len */
t_u16 event_len;
/** Event buffer */
t_u8 event_buf[1024];
t_u8 event_buf[1500];
} woal_evt_buf;
/** woal event */
@ -1112,7 +1096,7 @@ struct woal_event {
union {
chan_band_info chan_info;
woal_evt_buf evt;
mlan_ds_misc_assoc_rsp assoc_resp;
mlan_ds_assoc_info assoc_info;
int reason_code;
};
};
@ -1294,6 +1278,8 @@ struct _moal_private {
struct workqueue_struct *mclist_workqueue;
/** mclist work */
struct work_struct mclist_work;
/** Scan deferred work*/
struct delayed_work scan_deferred_work;
/** Statistics of tcp ack tx dropped */
t_u32 tcp_ack_drop_cnt;
/** Statistics of tcp ack tx in total from kernel */
@ -2254,6 +2240,22 @@ struct _moal_handle {
mlan_debug_info debug_info;
/* block id in module param config file */
int blk_id;
/** time when FW is active, time is get from boot time, in Nanosecond */
t_u64 on_time;
/** tx time, in usecs */
t_u64 tx_time;
/** systime when tx start */
wifi_timeval tx_time_start;
/** systime when tx end */
wifi_timeval tx_time_end;
/** rx time, in usecs */
t_u64 rx_time;
/** scan time, in usecs */
t_u64 scan_time;
/** systime when scan cmd response return success */
wifi_timeval scan_time_start;
/** systime when scan event has no more event */
wifi_timeval scan_time_end;
/** seecond mac flag */
t_u8 second_mac;
/** moal handle for another mac */
@ -2276,6 +2278,7 @@ struct _moal_handle {
struct pm_qos_request woal_pm_qos_req;
#endif
#endif
t_u32 ips_ctrl;
};
/**
@ -3060,6 +3063,10 @@ void woal_ioctl_get_info_resp(moal_private *priv, mlan_ds_get_info *info);
mlan_status woal_get_assoc_rsp(moal_private *priv,
mlan_ds_misc_assoc_rsp *assoc_rsp,
t_u8 wait_option);
mlan_status woal_get_assoc_req(moal_private *priv,
mlan_ds_misc_assoc_req *assoc_req,
t_u8 wait_option);
/** Get signal information */
mlan_status woal_get_signal_info(moal_private *priv, t_u8 wait_option,
mlan_ds_get_signal *signal);
@ -3259,6 +3266,7 @@ t_void woal_main_work_queue(struct work_struct *work);
t_void woal_rx_work_queue(struct work_struct *work);
t_void woal_evt_work_queue(struct work_struct *work);
t_void woal_mclist_work_queue(struct work_struct *work);
t_void woal_scan_deferred_work_queue(struct work_struct *work);
netdev_tx_t woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
#ifdef STA_SUPPORT

View File

@ -1635,7 +1635,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;
}

View File

@ -1076,21 +1076,25 @@ mlan_status moal_send_packet_complete(t_void *pmoal, pmlan_buffer pmbuf,
if (status == MLAN_STATUS_SUCCESS) {
priv->stats.tx_packets++;
priv->stats.tx_bytes += skb->len;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor(
priv, PACKET_TYPE_TX,
TX_PKT_FATE_SENT,
FRAME_TYPE_ETHERNET_II, 0, 0,
skb->data, skb->data_len);
#endif
#endif
} else {
priv->stats.tx_errors++;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor(
priv, PACKET_TYPE_TX,
TX_PKT_FATE_DRV_DROP_OTHER,
FRAME_TYPE_ETHERNET_II, 0, 0,
skb->data, skb->data_len);
#endif
#endif
}
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
@ -1147,6 +1151,24 @@ mlan_status moal_send_packet_complete(t_void *pmoal, pmlan_buffer pmbuf,
}
done:
if ((atomic_read(&handle->tx_pending) == 0) &&
!is_zero_timeval(handle->tx_time_start)) {
woal_get_monotonic_time(&handle->tx_time_end);
handle->tx_time +=
(t_u64)(timeval_to_usec(handle->tx_time_end) -
timeval_to_usec(handle->tx_time_start));
PRINTM(MINFO,
"%s : start_timeval=%d:%d end_timeval=%d:%d inter=%llu tx_time=%llu\n",
__func__, handle->tx_time_start.time_sec,
handle->tx_time_start.time_usec,
handle->tx_time_end.time_sec,
handle->tx_time_end.time_usec,
(t_u64)(timeval_to_usec(handle->tx_time_end) -
timeval_to_usec(handle->tx_time_start)),
handle->tx_time);
handle->tx_time_start.time_sec = 0;
handle->tx_time_start.time_usec = 0;
}
LEAVE();
return MLAN_STATUS_SUCCESS;
}
@ -1543,6 +1565,7 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
__func__);
status = MLAN_STATUS_FAILURE;
priv->stats.rx_dropped++;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor(
priv, PACKET_TYPE_RX,
@ -1551,6 +1574,7 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
(t_u8 *)(pmbuf->pbuf +
pmbuf->data_offset),
pmbuf->data_len);
#endif
#endif
goto done;
}
@ -1611,6 +1635,7 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
(skb->len - max_rx_data_size);
}
#endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
if (!woal_filter_packet(priv, skb->data, skb->len, 0)) {
PRINTM(MEVENT, "drop filtered packet %s\n",
@ -1625,14 +1650,17 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
dev_kfree_skb(skb);
goto done;
}
#endif
#endif
priv->stats.rx_bytes += skb->len;
priv->stats.rx_packets++;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor(priv, PACKET_TYPE_RX,
RX_PKT_FATE_SUCCESS,
FRAME_TYPE_ETHERNET_II, 0, 0,
skb->data, skb->len);
#endif
#endif
if (handle->params.wakelock_timeout) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
@ -2067,6 +2095,28 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
sizeof(mlan_event_id));
}
if (!is_zero_timeval(priv->phandle->scan_time_start)) {
woal_get_monotonic_time(&priv->phandle->scan_time_end);
priv->phandle->scan_time += (t_u64)(
timeval_to_usec(priv->phandle->scan_time_end) -
timeval_to_usec(
priv->phandle->scan_time_start));
PRINTM(MINFO,
"%s : start_timeval=%d:%d end_timeval=%d:%d inter=%llu scan_time=%llu\n",
__func__,
priv->phandle->scan_time_start.time_sec,
priv->phandle->scan_time_start.time_usec,
priv->phandle->scan_time_end.time_sec,
priv->phandle->scan_time_end.time_usec,
(t_u64)(timeval_to_usec(
priv->phandle->scan_time_end) -
timeval_to_usec(
priv->phandle->scan_time_start)),
priv->phandle->scan_time);
priv->phandle->scan_time_start.time_sec = 0;
priv->phandle->scan_time_start.time_usec = 0;
}
if (priv->phandle->scan_pending_on_block == MTRUE) {
priv->phandle->scan_pending_on_block = MFALSE;
priv->phandle->scan_priv = NULL;
@ -2492,8 +2542,10 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
msecs_to_jiffies(
ROAMING_WAKE_LOCK_TIMEOUT));
#endif
#ifdef REASSOCIATION
wake_up_interruptible(
&priv->phandle->reassoc_thread.wait_q);
#endif
} else {
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
if (priv->mrvl_rssi_low) {
@ -2846,8 +2898,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
pchan_info->bandcfg.chanBand,
pchan_info->bandcfg.chanWidth,
pchan_info->bandcfg.chan2Offset);
if (priv->uap_host_based &&
(priv->channel != pchan_info->channel))
if (priv->uap_host_based)
woal_channel_switch_event(priv, pchan_info);
}
#endif
@ -3244,6 +3295,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
MLAN_MAC_ADDR_LENGTH,
GFP_ATOMIC);
#endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor(
priv, PACKET_TYPE_RX,
@ -3254,6 +3306,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
pmevent->event_len -
sizeof(pmevent->event_id) -
MLAN_MAC_ADDR_LENGTH);
#endif
#endif
}
#endif /* KERNEL_VERSION */
@ -3411,6 +3464,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
#endif
#endif
}
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor(priv, PACKET_TYPE_TX,
ack ? TX_PKT_FATE_ACKED :
@ -3418,6 +3472,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
FRAME_TYPE_80211_MGMT, 0, 0,
skb->data, skb->len);
#endif
#endif
#endif
dev_kfree_skb_any(skb);
kfree(tx_info);

View File

@ -565,7 +565,7 @@ static const struct wiphy_coalesce_support coalesce_support = {
*
* @return MTRUE/MFALSE
*/
static t_u8 is_cfg80211_special_region_code(t_u8 *region_string)
t_u8 is_cfg80211_special_region_code(t_u8 *region_string)
{
t_u8 i;
region_code_t cfg80211_special_region_code[] = {
@ -2329,15 +2329,16 @@ void woal_host_mlme_work_queue(struct work_struct *work)
* case
*
* @param priv pointer to moal_private
* @param assoc_rsp pointer to mlan_ds_misc_assoc_rsp
* @param assoc_info pointer to mlan_ds_assoc_info
*
* @return N/A
*/
void woal_host_mlme_process_assoc_resp(moal_private *priv,
mlan_ds_misc_assoc_rsp *assoc_rsp)
mlan_ds_assoc_info *assoc_info)
{
struct cfg80211_bss *bss = NULL;
unsigned long flags;
u8 *assoc_req_buf = NULL;
if (priv) {
if (priv->auth_flag & HOST_MLME_ASSOC_DONE) {
@ -2350,27 +2351,27 @@ void woal_host_mlme_process_assoc_resp(moal_private *priv,
return;
}
if (assoc_rsp->assoc_resp_len) {
if (assoc_info->assoc_resp_len) {
PRINTM(MCMND,
"HostMlme: %s assoc_resp_len=%d, frame_control=0x%x\n",
priv->netdev->name,
assoc_rsp->assoc_resp_len,
assoc_info->assoc_resp_len,
((struct ieee80211_mgmt *)
assoc_rsp->assoc_resp_buf)
assoc_info->assoc_resp_buf)
->frame_control);
if (ieee80211_is_assoc_resp(
((struct ieee80211_mgmt *)
assoc_rsp->assoc_resp_buf)
assoc_info->assoc_resp_buf)
->frame_control) ||
ieee80211_is_reassoc_resp(
((struct ieee80211_mgmt *)
assoc_rsp->assoc_resp_buf)
assoc_info->assoc_resp_buf)
->frame_control)) {
spin_lock_irqsave(&priv->connect_lock,
flags);
if (le16_to_cpu(
((struct ieee80211_mgmt
*)assoc_rsp
*)assoc_info
->assoc_resp_buf)
->u.assoc_resp
.status_code) !=
@ -2386,30 +2387,39 @@ void woal_host_mlme_process_assoc_resp(moal_private *priv,
}
spin_unlock_irqrestore(
&priv->connect_lock, flags);
/*Populate Assoc req buf only if len is
* non zero . i.e. we received assoc req
* buffer from fw.*/
if (assoc_info->assoc_req_len)
assoc_req_buf =
assoc_info
->assoc_req_buf;
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
cfg80211_rx_assoc_resp(
priv->netdev, bss,
assoc_rsp->assoc_resp_buf,
assoc_rsp->assoc_resp_len, -1,
NULL, 0);
assoc_info->assoc_resp_buf,
assoc_info->assoc_resp_len, -1,
assoc_req_buf,
assoc_info->assoc_req_len);
#else
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
cfg80211_rx_assoc_resp(
priv->netdev, bss,
assoc_rsp->assoc_resp_buf,
assoc_rsp->assoc_resp_len, -1);
assoc_info->assoc_resp_buf,
assoc_info->assoc_resp_len, -1);
#else
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
cfg80211_rx_assoc_resp(
priv->netdev, bss,
assoc_rsp->assoc_resp_buf,
assoc_rsp->assoc_resp_len);
assoc_info->assoc_resp_buf,
assoc_info->assoc_resp_len);
#else
cfg80211_send_rx_assoc(
priv->netdev, bss,
assoc_rsp->assoc_resp_buf,
assoc_rsp->assoc_resp_len);
assoc_info->assoc_resp_buf,
assoc_info->assoc_resp_len);
#endif
#endif
#endif
@ -2434,14 +2444,25 @@ static void woal_assoc_resp_event(moal_private *priv,
struct woal_event *evt;
unsigned long flags;
moal_handle *handle = priv->phandle;
mlan_ds_misc_assoc_req assoc_req;
memset(&assoc_req, 0, sizeof(mlan_ds_misc_assoc_req));
woal_get_assoc_req(priv, &assoc_req, MOAL_IOCTL_WAIT);
evt = kzalloc(sizeof(struct woal_event), GFP_ATOMIC);
if (evt) {
evt->priv = priv;
evt->type = WOAL_EVENT_ASSOC_RESP;
moal_memcpy_ext(priv->phandle, &evt->assoc_resp, passoc_rsp,
sizeof(mlan_ds_misc_assoc_rsp),
sizeof(mlan_ds_misc_assoc_rsp));
moal_memcpy_ext(priv->phandle, evt->assoc_info.assoc_resp_buf,
passoc_rsp->assoc_resp_buf,
passoc_rsp->assoc_resp_len, ASSOC_RSP_BUF_SIZE);
evt->assoc_info.assoc_resp_len =
MIN(passoc_rsp->assoc_resp_len, ASSOC_RSP_BUF_SIZE);
moal_memcpy_ext(priv->phandle, evt->assoc_info.assoc_req_buf,
assoc_req.assoc_req_buf,
assoc_req.assoc_req_len, ASSOC_RSP_BUF_SIZE);
evt->assoc_info.assoc_req_len =
MIN(assoc_req.assoc_req_len, ASSOC_RSP_BUF_SIZE);
INIT_LIST_HEAD(&evt->link);
spin_lock_irqsave(&handle->evt_lock, flags);
list_add_tail(&evt->link, &handle->evt_queue);
@ -3477,7 +3498,7 @@ woal_reg_apply_beaconing_flags(struct wiphy *wiphy,
int band, i;
t_u32 rule_flags = 0;
for (band = 0; band < NUM_NL80211_BANDS; band++) {
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
sband = wiphy->bands[band];
if (!sband)
continue;
@ -3745,8 +3766,17 @@ void woal_regulatory_work_queue(struct work_struct *work)
moal_handle *handle = container_of(work, moal_handle, regulatory_work);
struct wiphy *wiphy = handle->wiphy;
moal_private *priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY);
if (priv && wiphy)
enum ieee80211_band band;
if (priv && wiphy) {
woal_update_custom_regdomain(priv, wiphy);
band = priv->phandle->band;
priv->phandle->band = IEEE80211_BAND_2GHZ;
woal_send_domain_info_cmd_fw(priv, MOAL_IOCTL_WAIT);
priv->phandle->band = IEEE80211_BAND_5GHZ;
woal_send_domain_info_cmd_fw(priv, MOAL_IOCTL_WAIT);
priv->phandle->band = band;
}
}
#endif
@ -3773,6 +3803,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
int ret = 0;
#endif
t_u8 load_power_table = MFALSE;
mlan_fw_info fw_info;
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
char *reg_alpha2 = NULL;
@ -3841,6 +3872,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
return;
#endif
}
load_power_table = MTRUE;
}
}
if (MTRUE != is_cfg80211_special_region_code(region)) {
@ -3859,8 +3891,8 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
reg_alpha2 = priv->phandle->params.reg_alpha2;
if ((handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE) &&
!handle->params.txpwrlimit_cfg && reg_alpha2 &&
woal_is_valid_alpha2(reg_alpha2))
!handle->params.txpwrlimit_cfg && load_power_table &&
reg_alpha2 && woal_is_valid_alpha2(reg_alpha2))
queue_work(handle->evt_workqueue,
&handle->regulatory_work);
#endif
@ -3869,7 +3901,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
PRINTM(MCMND, "Regulatory domain BY_CORE\n");
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
if (handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE &&
!handle->params.txpwrlimit_cfg)
load_power_table && !handle->params.txpwrlimit_cfg)
queue_work(handle->evt_workqueue,
&handle->regulatory_work);
#endif
@ -3878,7 +3910,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
PRINTM(MCMND, "Regulatory domain BY_USER\n");
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
if (handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE &&
!handle->params.txpwrlimit_cfg)
load_power_table && !handle->params.txpwrlimit_cfg)
queue_work(handle->evt_workqueue,
&handle->regulatory_work);
#endif
@ -4044,8 +4076,8 @@ static mlan_status woal_uap_scan(moal_private *priv,
woal_sched_timeout(5);
#ifdef REASSOCIATION
MOAL_REL_SEMAPHORE(&handle->reassoc_sem);
#endif
done:
#endif
if (role == MLAN_BSS_ROLE_UAP)
woal_role_switch(tmp_priv, MOAL_IOCTL_WAIT, MLAN_BSS_ROLE_UAP);
if (band_change)
@ -4083,6 +4115,39 @@ static int woal_find_wps_ie_in_probereq(const t_u8 *ie, int len)
return MFALSE;
}
/** scan result expired value */
#define SCAN_RESULT_EXPIRTED 1
/**
* @brief check if the scan result expired
*
* @param priv A pointer to moal_private
*
*
* @return MTRUE/MFALSE;
*/
static t_u8 woal_is_uap_scan_result_expired(moal_private *priv)
{
mlan_scan_resp scan_resp;
wifi_timeval t;
ENTER();
if (MLAN_STATUS_SUCCESS !=
woal_get_scan_table(priv, MOAL_IOCTL_WAIT, &scan_resp)) {
LEAVE();
return MTRUE;
}
if (!scan_resp.num_in_scan_table) {
LEAVE();
return MTRUE;
}
woal_get_monotonic_time(&t);
if (t.time_sec > (scan_resp.age_in_secs + SCAN_RESULT_EXPIRTED)) {
LEAVE();
return MTRUE;
}
LEAVE();
return MFALSE;
}
/**
* @brief check if the scan result expired
*
@ -4129,8 +4194,6 @@ static t_u8 woal_is_scan_result_expired(moal_private *priv)
return MTRUE;
}
woal_get_monotonic_time(&t);
/** scan result expired value */
#define SCAN_RESULT_EXPIRTED 1
if (t.time_sec > (scan_resp.age_in_secs + SCAN_RESULT_EXPIRTED)) {
LEAVE();
return MTRUE;
@ -4245,7 +4308,11 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
if (priv->fake_scan_complete || !woal_is_scan_result_expired(priv)) {
PRINTM(MEVENT,
"scan result not expired or fake scan complete flag is on\n");
return -EAGAIN;
priv->phandle->scan_request = request;
queue_delayed_work(priv->phandle->evt_workqueue,
&priv->scan_deferred_work,
msecs_to_jiffies(1000));
return MLAN_STATUS_SUCCESS;
}
memset(&bss_info, 0, sizeof(bss_info));
if (MLAN_STATUS_SUCCESS ==
@ -4267,6 +4334,12 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
spin_lock_irqsave(&priv->phandle->scan_req_lock, flags);
priv->phandle->scan_request = request;
spin_unlock_irqrestore(&priv->phandle->scan_req_lock, flags);
if (is_zero_timeval(priv->phandle->scan_time_start)) {
woal_get_monotonic_time(&priv->phandle->scan_time_start);
PRINTM(MINFO, "%s : start_timeval=%d:%d \n", __func__,
priv->phandle->scan_time_start.time_sec,
priv->phandle->scan_time_start.time_usec);
}
scan_req = kmalloc(sizeof(wlan_user_scan_cfg), GFP_KERNEL);
memset(scan_req, 0x00, sizeof(wlan_user_scan_cfg));
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
@ -4372,9 +4445,15 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
}
#endif
#ifdef UAP_CFG80211
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)
scan_req->chan_list[i].scan_time =
PASSIVE_SCAN_CHAN_TIME;
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) {
if (!woal_is_uap_scan_result_expired(priv))
scan_req->chan_list[i].scan_time =
MIN_SPECIFIC_SCAN_CHAN_TIME;
else
scan_req->chan_list[i].scan_time =
PASSIVE_SCAN_CHAN_TIME;
}
#endif
}
if (priv->phandle->scan_request->ie &&
@ -4872,6 +4951,8 @@ static int woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
unsigned long flags;
mlan_ds_misc_assoc_rsp *assoc_rsp = NULL;
IEEEtypes_AssocRsp_t *passoc_rsp = NULL;
mlan_ds_misc_assoc_req assoc_req;
mlan_ssid_bssid *ssid_bssid = NULL;
moal_handle *handle = priv->phandle;
int i;
@ -5017,6 +5098,8 @@ static int woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
priv->ft_md = 0;
priv->ft_cap = 0;
}
memset(&assoc_req, 0, sizeof(mlan_ds_misc_assoc_req));
woal_get_assoc_req(priv, &assoc_req, MOAL_IOCTL_WAIT);
}
spin_lock_irqsave(&priv->connect_lock, flags);
priv->cfg_connect = MFALSE;
@ -5025,11 +5108,11 @@ static int woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
"wlan: Connected to bssid " MACSTR " successfully\n",
MAC2STR(priv->cfg_bssid));
spin_unlock_irqrestore(&priv->connect_lock, flags);
cfg80211_connect_result(priv->netdev, priv->cfg_bssid, NULL, 0,
passoc_rsp->ie_buffer,
assoc_rsp->assoc_resp_len -
ASSOC_RESP_FIXED_SIZE,
WLAN_STATUS_SUCCESS, GFP_KERNEL);
cfg80211_connect_result(
priv->netdev, priv->cfg_bssid, assoc_req.assoc_req_buf,
assoc_req.assoc_req_len, passoc_rsp->ie_buffer,
assoc_rsp->assoc_resp_len - ASSOC_RESP_FIXED_SIZE,
WLAN_STATUS_SUCCESS, GFP_KERNEL);
} else {
PRINTM(MINFO, "wlan: Failed to connect to bssid " MACSTR "\n",
MAC2STR(priv->cfg_bssid));
@ -6318,8 +6401,10 @@ int woal_cfg80211_resume(struct wiphy *wiphy)
msecs_to_jiffies(
ROAMING_WAKE_LOCK_TIMEOUT));
#endif
#ifdef REASSOCIATION
wake_up_interruptible(
&handle->reassoc_thread.wait_q);
#endif
}
}
}
@ -6383,6 +6468,8 @@ int woal_cfg80211_resume(struct wiphy *wiphy)
done:
handle->cfg80211_suspend = MFALSE;
queue_work(handle->rx_workqueue, &handle->rx_work);
PRINTM(MCMND, "<--- Leave woal_cfg80211_resume --->\n");
return 0;
}
@ -7712,13 +7799,15 @@ static int woal_send_tdls_data_frame(struct wiphy *wiphy,
DBG_HEXDUMP(MDAT_D, "TDLS data:", pmbuf->pbuf + pmbuf->data_offset,
pmbuf->data_len);
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
#endif
status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
switch (status) {
case MLAN_STATUS_PENDING:
atomic_inc(&priv->phandle->tx_pending);
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
atomic_inc(&priv->wmm_tx_pending[index]);
#endif
queue_work(priv->phandle->workqueue, &priv->phandle->main_work);
@ -8984,6 +9073,16 @@ int woal_cfg80211_uap_add_station(struct wiphy *wiphy, struct net_device *dev,
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
if (status != MLAN_STATUS_PENDING)
kfree(req);
#if KERNEL_VERSION(3, 8, 0) <= CFG80211_VERSION_CODE
if (moal_extflg_isset(priv->phandle, EXT_HOST_MLME)) {
struct station_info *sinfo = NULL;
sinfo = kzalloc(sizeof(struct station_info), GFP_KERNEL);
if (sinfo) {
cfg80211_new_sta(dev, mac, sinfo, GFP_KERNEL);
kfree(sinfo);
}
}
#endif
done:
LEAVE();
return ret;
@ -9226,7 +9325,6 @@ static mlan_status woal_cfg80211_init_wiphy(moal_private *priv,
mcs_supp = priv->phandle->params.antcfg & 0xf;
if (mcs_supp != 3 && mcs_supp != 0)
cfg_11n->param.supported_mcs_set[1] = 0;
cfg_11n->param.supported_mcs_set[4] = 0;
}
woal_cfg80211_setup_ht_cap(
&wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap, hw_dev_cap,

View File

@ -1509,6 +1509,7 @@ 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);
spin_lock_init(&priv->connect_lock);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
@ -2652,17 +2653,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) {
@ -3252,7 +3260,11 @@ int woal_cfg80211_start_radar_detection(struct wiphy *wiphy,
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 ||
@ -3267,7 +3279,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,

View File

@ -57,7 +57,7 @@ static const chan_to_freq_t chan_to_freq[] = {
{116, 5580, 1}, {120, 5600, 1}, {124, 5620, 1}, {128, 5640, 1},
{132, 5660, 1}, {136, 5680, 1}, {140, 5700, 1}, {144, 5720, 1},
{149, 5745, 1}, {153, 5765, 1}, {157, 5785, 1}, {161, 5805, 1},
{165, 5825, 1}, {169, 5845, 1}, {173, 5865, 1}, {177, 5885, 1},
{165, 5825, 1},
};
/**