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 hssetpara condition [GPIO# [gap]] [ind_GPIO# [level]]
mlanutl mlanX mefcfg <mef.conf> mlanutl mlanX mefcfg <mef.conf>
mlanutl mlanX cloud_keep_alive <keep_alive.conf> <start/stop/reset> mlanutl mlanX cloud_keep_alive <keep_alive.conf> <start/stop/reset>
mlanutl mlanX min_ba_threshold <n>
DESCRIPTION DESCRIPTION
Those commands are used to send additional commands to the NXP MLAN Those commands are used to send additional commands to the NXP MLAN
@ -1459,3 +1460,15 @@ cloud_keep_alive
mlanutl mlan0 cloud_keep_alive keep_alive.conf start 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 stop
mlanutl mlan0 cloud_keep_alive keep_alive.conf reset 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_V2_8987.conf ed_mac_ctrl_v2
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_8987.conf ed_mac_ctrl_v3
# #
## Set Energy Detect Threshold for EU Adaptivity test ## 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 CmdCode=0x0130 #Command code, DO NOT change this line
ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band
# 1 - enable 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_V2_8997.conf ed_mac_ctrl_v2
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_8997.conf ed_mac_ctrl_v3
# #
## Set Energy Detect Threshold for EU Adaptivity test ## 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 CmdCode=0x0130 #Command code, DO NOT change this line
ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band
# 1 - enable 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_V2_iw416.conf ed_mac_ctrl_v2
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_8978.conf ed_mac_ctrl_v3
# #
## Set Energy Detect Threshold for EU Adaptivity test ## 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 CmdCode=0x0130 #Command code, DO NOT change this line
ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band
# 1 - enable 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_hssetpara(int argc, char *argv[]);
static int process_mefcfg(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_cloud_keep_alive(int argc, char *argv[]);
static int process_min_ba_threshold_cfg(int argc, char *argv[]);
struct command_node command_list[] = { struct command_node command_list[] = {
{"version", process_version}, {"version", process_version},
@ -155,6 +156,7 @@ struct command_node command_list[] = {
{"hssetpara", process_hssetpara}, {"hssetpara", process_hssetpara},
{"mefcfg", process_mefcfg}, {"mefcfg", process_mefcfg},
{"cloud_keep_alive", process_cloud_keep_alive}, {"cloud_keep_alive", process_cloud_keep_alive},
{"min_ba_threshold", process_min_ba_threshold_cfg},
}; };
static char *usage[] = { static char *usage[] = {
@ -192,6 +194,7 @@ static char *usage[] = {
" hssetpara", " hssetpara",
" mefcfg", " mefcfg",
" cloud_keep_alive", " cloud_keep_alive",
" min_ba_threshold",
}; };
/** Socket */ /** Socket */
@ -938,18 +941,40 @@ static int prepare_host_cmd_buffer(FILE *fp, char *cmd_name, t_u8 *buf)
return MLAN_STATUS_SUCCESS; return MLAN_STATUS_SUCCESS;
} }
#define SUBID_OFFSET 2 #define CMDCODE_OFFSET 0
static t_u16 supported_subcmd[] = {0x104, 0x111, 0x11b, 0x11e, 0x27}; #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++) { /* Check if CmdCode is 0x008b (debug cmd from debug.conf) */
if (!memcmp(buf + SUBID_OFFSET, (supported_subcmd + i), 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))) sizeof(t_u16)))
return MLAN_STATUS_SUCCESS; return MLAN_STATUS_SUCCESS;
} }
return MLAN_STATUS_NOTFOUND; return MLAN_STATUS_NOTFOUND;
} }
@ -1161,11 +1186,10 @@ static int process_hostcmd(int argc, char *argv[])
} }
if (call_ioctl) { if (call_ioctl) {
/* raw_buf points to start of command id */
raw_buf = buffer + strlen(CMD_NXP) + strlen(argv[2]) + raw_buf = buffer + strlen(CMD_NXP) + strlen(argv[2]) +
sizeof(t_u32) + S_DS_GEN; /* raw_buf points to start sizeof(t_u32);
of actual <raw data> */ if (check_if_hostcmd_allowed(raw_buf) != MLAN_STATUS_SUCCESS) {
if (check_if_hostcmd_subcmd_allowed(raw_buf) !=
MLAN_STATUS_SUCCESS) {
printf("ERR:Entered hostcmd not allowed!\n"); printf("ERR:Entered hostcmd not allowed!\n");
goto done; goto done;
} }
@ -5012,6 +5036,83 @@ done:
return ret; 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 Global Functions
********************************************************/ ********************************************************/

View file

@ -158,6 +158,10 @@ enum _mlan_act_ioctl {
#define ACTION_GET 0 #define ACTION_GET 0
/** Action field value : set */ /** Action field value : set */
#define ACTION_SET 1 #define ACTION_SET 1
/** Action field value: add */
#define ACTION_ADD 2
/** Action field value: remove */
#define ACTION_REMOVE 3
/** Maximum number of TID */ /** Maximum number of TID */
#define MAX_NUM_TID 8 #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)); pvht_cap->header.len, sizeof(VHT_capa_t));
bw_80p80 = wlan_is_80_80_support(pmpriv, pbss_desc); bw_80p80 = wlan_is_80_80_support(pmpriv, pbss_desc);
wlan_fill_vht_cap_tlv(pmpriv, pvht_cap, pbss_desc->bss_band, 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, HEXDUMP("VHT_CAPABILITIES IE", (t_u8 *)pvht_cap,
sizeof(MrvlIETypes_VHTCap_t)); 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}}, {153, 5765, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{157, 5785, 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}}, {161, 5805, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{165, 5825, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}, {165, 5825, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}
{169, 5845, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{173, 5865, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}},
{177, 5885, TX_PWR_DEFAULT, MFALSE, {0x10, 0, 0}}
/* {240, 4920, TX_PWR_DEFAULT}, /* {240, 4920, TX_PWR_DEFAULT},
{244, 4940, TX_PWR_DEFAULT}, {244, 4940, TX_PWR_DEFAULT},
{248, 4960, 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 */ /** U-NII sub-band config : Start Channel = 149, NumChans = 5 */
static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_upper_band = {149, static const IEEEtypes_SupportChan_Subband_t wlan_11h_unii_upper_band = {149,
5}; 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 */ /** Internally passed structure used to send a CMD_802_11_TPC_INFO command */
typedef struct { typedef struct {
@ -354,17 +352,6 @@ wlan_11h_set_supp_channels_ie(mlan_private *priv, t_u8 band,
*/ */
switch (cfp_a) { switch (cfp_a) {
case 0x10: /* USA FCC */ 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 0x20: /* Canada IC */
case 0x30: /* Europe ETSI */ case 0x30: /* Europe ETSI */
default: 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 * return MFALSE, 165 is not allowed in bands other than 20MHZ
*/ */
if (start_chn == 165) { if (start_chn == 165) {
if (priv->adapter->region_code == COUNTRY_CODE_US)
return MTRUE;
if (uap_band_cfg.chanWidth != CHAN_BW_20MHZ) if (uap_band_cfg.chanWidth != CHAN_BW_20MHZ)
return MFALSE; 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 If given channel is under NOP, return a new non-dfs
* @brief channel * @brief channel
* *
@ -2956,8 +2941,8 @@ mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter,
* *
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE * @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
*/ */
mlan_status wlan_11h_ioctl_get_channel_nop_info(pmlan_adapter pmadapter, mlan_status wlan_11h_ioctl_channel_nop_info(pmlan_adapter pmadapter,
pmlan_ioctl_req pioctl_req) pmlan_ioctl_req pioctl_req)
{ {
pmlan_private pmpriv = MNULL; pmlan_private pmpriv = MNULL;
mlan_ds_11h_cfg *ds_11hcfg = 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, .channel,
ch_nop_info->chan_width); ch_nop_info->chan_width);
} }
} else if (pioctl_req->action == MLAN_ACT_CLEAR) {
wlan_11h_cleanup(pmadapter);
} }
ret = MLAN_STATUS_SUCCESS; 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 */ /** Handler for DFS_TESTING IOCTL */
extern mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter, extern mlan_status wlan_11h_ioctl_dfs_testing(pmlan_adapter pmadapter,
pmlan_ioctl_req pioctl_req); pmlan_ioctl_req pioctl_req);
extern mlan_status extern mlan_status wlan_11h_ioctl_channel_nop_info(pmlan_adapter pmadapter,
wlan_11h_ioctl_get_channel_nop_info(pmlan_adapter pmadapter, pmlan_ioctl_req pioctl_req);
pmlan_ioctl_req pioctl_req);
extern mlan_status wlan_11h_ioctl_dfs_chan_report(mlan_private *priv, extern mlan_status wlan_11h_ioctl_dfs_chan_report(mlan_private *priv,
pmlan_ioctl_req pioctl_req); 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; t_u8 chan2Offset = SEC_CHAN_NONE;
/* Special Case: 20Mhz-only Channel */ /* Special Case: 20Mhz-only Channel */
if (priv->adapter->region_code != COUNTRY_CODE_US && chan == 165) if (chan == 165)
return chan2Offset; return chan2Offset;
switch (chan) { switch (chan) {
@ -2310,8 +2310,6 @@ t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
case 140: case 140:
case 149: case 149:
case 157: case 157:
case 165:
case 173:
chan2Offset = SEC_CHAN_ABOVE; chan2Offset = SEC_CHAN_ABOVE;
break; break;
case 40: case 40:
@ -2326,8 +2324,6 @@ t_u8 wlan_get_second_channel_offset(mlan_private *priv, int chan)
case 144: case 144:
case 153: case 153:
case 161: case 161:
case 169:
case 177:
chan2Offset = SEC_CHAN_BELOW; chan2Offset = SEC_CHAN_BELOW;
break; 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) static INLINE void wlan_update_del_ba_count(mlan_private *priv, raListTbl *ptr)
{ {
t_s8 rssi; 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) if (ptr->is_tdls_link)
return wlan_update_station_del_ba_count(priv, ptr); return wlan_update_station_del_ba_count(priv, ptr);
rssi = priv->snr - priv->nf; rssi = priv->snr - priv->nf;

View file

@ -92,10 +92,16 @@ static country_code_mapping_t country_code_mapping[] = {
/** Country code for ETSI */ /** Country code for ETSI */
static t_u8 eu_country_code_table[][COUNTRY_CODE_LEN] = { static t_u8 eu_country_code_table[][COUNTRY_CODE_LEN] = {
"AL", "AD", "AT", "AU", "BY", "BE", "BA", "BG", "HR", "CY", "CZ", "DK", "AL", "AD", "AT", "AU", "BE", "BA", "BG", "HR", "CY", "CZ", "DK", "EE",
"EE", "FI", "FR", "MK", "DE", "GR", "HU", "IS", "IE", "IT", "KR", "LV", "FI", "FR", "MK", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT",
"LI", "LT", "LU", "MT", "MD", "MC", "ME", "NL", "NO", "PL", "RO", "RU", "LU", "MT", "MD", "MC", "ME", "NL", "NO", "PL", "RO", "SM", "RS", "SI",
"SM", "RS", "SI", "SK", "ES", "SE", "CH", "TR", "UA", "UK", "GB", "NZ"}; "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 * 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}}, {153, 5765, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
{157, 5785, 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}}, {161, 5805, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
{165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}}, {165, 5825, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}}};
{169, 5845, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
{173, 5865, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}},
{177, 5885, WLAN_TX_PWR_US_DEFAULT, MFALSE, {0x10, 0, 0}}};
/** Band: 'A', Region: Canada IC */ /** Band: 'A', Region: Canada IC */
static chan_freq_power_t channel_freq_power_CAN_A[] = { 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 */ /* Add FW cfp tables and region info */
wlan_add_fw_cfp_tables(pmpriv, tlv_buf, tlv_buf_left); 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) if (!pioctl_buf)
goto done; 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) - left_len = resp->size - sizeof(HostCmd_DS_802_11_LINK_STATISTIC) -
S_DS_GEN; S_DS_GEN;
tlv = (MrvlIEtypesHeader_t *)(plink_stat->value); 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)) { while (left_len > sizeof(MrvlIEtypesHeader_t)) {
tlv_type = wlan_le16_to_cpu(tlv->type); tlv_type = wlan_le16_to_cpu(tlv->type);
tlv_len = wlan_le16_to_cpu(tlv->len); 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] fw_ifaceStat->peer_info[peerIdx]
.rate_stats[rate_idx] .rate_stats[rate_idx]
.retries_long); .retries_long);
PRINTM(MCMND, PRINTM(MDAT_D,
"0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", "0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n",
iface_stat->peer_info[peerIdx] iface_stat->peer_info[peerIdx]
.rate_stats[rate_idx] .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; 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 * @brief This function prepares command of Dot11mc unassoc ftm cfg
* *

View file

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_ #define _MLAN_DECL_H_
/** MLAN release version */ /** MLAN release version */
#define MLAN_RELEASE_VERSION "293" #define MLAN_RELEASE_VERSION "299.p1"
/** Re-define generic data types for MLAN/MOAL */ /** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */ /** 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) #define TLV_TYPE_WIFI_DIRECT_OPP_PS (PROPRIETARY_TLV_BASE_ID + 0x84)
#endif /* WIFI_DIRECT_SUPPORT */ #endif /* WIFI_DIRECT_SUPPORT */
/** TLV type : GPIO TSF LATCH CONFIG */ /** 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*/ /** 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 */ /** TLV : 20/40 coex config */
#define TLV_TYPE_2040_BSS_COEX_CONTROL \ #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_MGMT_IE_LIST 0x00f2
#define HostCmd_CMD_802_11_BAND_STEERING 0x026f #define HostCmd_CMD_802_11_BAND_STEERING 0x026f
/** Host Command ID : TDLS configuration */ /** Host Command ID : TDLS configuration */
#define HostCmd_CMD_TDLS_CONFIG 0x0100 #define HostCmd_CMD_TDLS_CONFIG 0x0100
/** Host Command ID : TDLS operation */ /** Host Command ID : TDLS operation */
@ -1379,6 +1378,10 @@ typedef enum _WLAN_802_11_WEP_STATUS {
#define FW_CAPINFO_EXT_MULTI_BSSID MBIT(9) #define FW_CAPINFO_EXT_MULTI_BSSID MBIT(9)
/** FW cap info bit 10: Beacon Protection Support */ /** FW cap info bit 10: Beacon Protection Support */
#define FW_CAPINFO_EXT_BEACON_PROT MBIT(10) #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 */ /** Check if 5G 1x1 only is supported by firmware */
#define IS_FW_SUPPORT_5G_1X1_ONLY(_adapter) \ #define IS_FW_SUPPORT_5G_1X1_ONLY(_adapter) \
@ -1410,6 +1413,8 @@ typedef enum _WLAN_802_11_WEP_STATUS {
/** Check if Beacon Protection supported by firmware */ /** Check if Beacon Protection supported by firmware */
#define IS_FW_SUPPORT_BEACON_PROT(_adapter) \ #define IS_FW_SUPPORT_BEACON_PROT(_adapter) \
(_adapter->fw_cap_ext & FW_CAPINFO_EXT_BEACON_PROT) (_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 */ /** MrvlIEtypes_PrevBssid_t */
typedef MLAN_PACK_START struct _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_DOT11MC_UNASSOC_FTM_CFG 0x0275
#define HostCmd_CMD_HAL_PHY_CFG 0x0276 #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 */ /** Enhanced PS modes */
typedef enum _ENH_PS_MODES { typedef enum _ENH_PS_MODES {
GET_PS = 0, GET_PS = 0,
@ -1810,6 +1822,7 @@ typedef enum _ENH_PS_MODES {
/** Get BSS type from Host Command (bit 15:12) */ /** Get BSS type from Host Command (bit 15:12) */
#define HostCmd_GET_BSS_TYPE(seq) (((seq)&HostCmd_BSS_TYPE_MASK) >> 12) #define HostCmd_GET_BSS_TYPE(seq) (((seq)&HostCmd_BSS_TYPE_MASK) >> 12)
/* EVENT ID*/
/** Card Event definition : Dummy host wakeup signal */ /** Card Event definition : Dummy host wakeup signal */
#define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001 #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
/** Card Event definition : Link lost */ /** Card Event definition : Link lost */
@ -1888,6 +1901,22 @@ typedef enum _ENH_PS_MODES {
/** Card Event definition : Port release event */ /** Card Event definition : Port release event */
#define EVENT_PORT_RELEASE 0x0000002b #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 */ /** Card Event definition : Pre-Beacon Lost */
#define EVENT_PRE_BEACON_LOST 0x00000031 #define EVENT_PRE_BEACON_LOST 0x00000031
@ -1940,51 +1969,37 @@ typedef enum _ENH_PS_MODES {
/** Enhance ext scan done event */ /** Enhance ext scan done event */
#define EVENT_EXT_SCAN_STATUS_REPORT 0x0000007f #define EVENT_EXT_SCAN_STATUS_REPORT 0x0000007f
/** Event definition : FW debug information */
#define EVENT_FW_DEBUG_INFO 0x00000063
/** Event definition: RXBA_SYNC */ /** Event definition: RXBA_SYNC */
#define EVENT_RXBA_SYNC 0x00000059 #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 */ /** Event ID: TX data pause event */
#define EVENT_TX_DATA_PAUSE 0x00000055 #define EVENT_TX_DATA_PAUSE 0x00000055
/** Event definition : FW debug information */
#define EVENT_FW_DEBUG_INFO 0x00000063
/** Event ID: SAD Report */ /** Event ID: SAD Report */
#define EVENT_SAD_REPORT 0x00000066 #define EVENT_SAD_REPORT 0x00000066
#define EVENT_FW_DUMP_INFO 0x00000073
/** Event ID: Tx status */ /** Event ID: Tx status */
#define EVENT_TX_STATUS_REPORT 0x00000074 #define EVENT_TX_STATUS_REPORT 0x00000074
#define EVENT_BT_COEX_WLAN_PARA_CHANGE 0x00000076 #define EVENT_BT_COEX_WLAN_PARA_CHANGE 0x00000076
#define EVENT_VDLL_IND 0x00000081
#define EVENT_EXCEED_MAX_P2P_CONN 0x00000089
#if defined(PCIE) #if defined(PCIE)
#define EVENT_SSU_DUMP_DMA 0x0000008C #define EVENT_SSU_DUMP_DMA 0x0000008C
#endif #endif
#define EVENT_VDLL_IND 0x00000081 #define EVENT_FW_HANG_REPORT 0x0000008F
#define EVENT_EXCEED_MAX_P2P_CONN 0x00000089
/** Card Event definition : RESET PN */ /** 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 */ /** Event ID mask */
#define EVENT_ID_MASK 0xffff #define EVENT_ID_MASK 0xffff
@ -2159,6 +2174,81 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_TDLS_Idle_Timeout_t {
/** enable retry limit in TxPD */ /** enable retry limit in TxPD */
#define TXPD_RETRY_ENABLE MBIT(12) #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 */ /** TxPD descriptor */
typedef MLAN_PACK_START struct _TxPD { typedef MLAN_PACK_START struct _TxPD {
/** BSS type */ /** BSS type */
@ -2229,7 +2319,6 @@ typedef MLAN_PACK_START struct _RxPD {
/** Reserved */ /** Reserved */
t_u8 reserved3[8]; t_u8 reserved3[8];
} MLAN_PACK_END RxPD, *PRxPD; } MLAN_PACK_END RxPD, *PRxPD;
/** IEEEtypes_FrameCtl_t*/ /** IEEEtypes_FrameCtl_t*/
@ -5914,7 +6003,7 @@ typedef MLAN_PACK_START struct _MrvlIEtypes_WakeupExtend_t {
t_u8 gpio_wave; t_u8 gpio_wave;
} MLAN_PACK_END MrvlIEtypes_WakeupExtend_t; } 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 { typedef MLAN_PACK_START struct _mgmt_frame_filter {
/** action - bitmap /** action - bitmap
** On matching rx'd pkt and filter during NON_HOSTSLEEP mode: ** 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; t_u16 uap_max_sta;
} MLAN_PACK_END MrvlIEtypes_uap_max_sta_cnt_t; } 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 */ /** MrvlIEtypes_uap_chan_switch */
typedef MLAN_PACK_START struct _MrvlIEtypes_action_chan_switch_t { 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; } MLAN_PACK_END HostCmd_DS_AUTO_TX;
#define OID_CLOUD_KEEP_ALIVE 0 #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 */ /** TLV for cloud keep alive control info */
#define TLV_TYPE_CLOUD_KEEP_ALIVE \ #define TLV_TYPE_CLOUD_KEEP_ALIVE \
(PROPRIETARY_TLV_BASE_ID + 0x102) /* 0x0100 + 258 */ (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_ARB_CONFIG arb_cfg;
HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG dot11mc_unassoc_ftm_cfg; HostCmd_DS_CMD_DOT11MC_UNASSOC_FTM_CFG dot11mc_unassoc_ftm_cfg;
HostCmd_DS_HAL_PHY_CFG hal_phy_cfg_params; HostCmd_DS_HAL_PHY_CFG hal_phy_cfg_params;
HostCmd_DS_IPS_CONFIG ips_cfg;
} params; } params;
} MLAN_PACK_END HostCmd_DS_COMMAND, *pHostCmd_DS_COMMAND; } 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; } MLAN_PACK_END IEEEtypes_ExtChanSwitchAnn_t;
/** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */ /** Maximum number of subbands in the IEEEtypes_SupportedChannels_t structure */
#define WLAN_11H_MAX_SUBBANDS 6 #define WLAN_11H_MAX_SUBBANDS 5
/** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */ /** Maximum number of DFS channels configured in IEEEtypes_IBSS_DFS_t */
#define WLAN_11H_MAX_IBSS_DFS_CHANNELS 25 #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; t_u32 buf_size;
BSSDescriptor_t *ptemp_scan_table = MNULL; 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_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, t_u8 chan_5g[] = {12, 16, 34, 38, 42, 46, 36, 40, 44, 48, 52,
48, 52, 56, 60, 64, 100, 104, 108, 112, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128,
116, 120, 124, 128, 132, 136, 140, 144, 149, 132, 136, 140, 144, 149, 153, 157, 161, 165};
153, 157, 161, 165, 169, 173, 177};
#endif #endif
#ifdef SDIO #ifdef SDIO
t_u32 max_mp_regs = 0; t_u32 max_mp_regs = 0;

View file

@ -349,6 +349,8 @@ enum _mlan_ioctl_req_id {
#endif #endif
MLAN_OID_MISC_GPIO_TSF_LATCH = 0x00200082, MLAN_OID_MISC_GPIO_TSF_LATCH = 0x00200082,
MLAN_OID_MISC_GET_TSF_INFO = 0x00200083, MLAN_OID_MISC_GET_TSF_INFO = 0x00200083,
MLAN_OID_MISC_ASSOC_REQ = 0x00200084,
MLAN_OID_MISC_IPS_CFG = 0x00200085,
}; };
/** Sub command size */ /** Sub command size */
@ -630,7 +632,7 @@ typedef struct _mlan_multicast_list {
} mlan_multicast_list, *pmlan_multicast_list; } mlan_multicast_list, *pmlan_multicast_list;
/** Max channel */ /** Max channel */
#define MLAN_MAX_CHANNEL 177 #define MLAN_MAX_CHANNEL 165
/** Maximum number of channels in table */ /** Maximum number of channels in table */
#define MLAN_MAX_CHANNEL_NUM 128 #define MLAN_MAX_CHANNEL_NUM 128
@ -692,6 +694,26 @@ typedef struct _mlan_ds_misc_assoc_rsp {
t_u32 assoc_resp_len; t_u32 assoc_resp_len;
} mlan_ds_misc_assoc_rsp, *pmlan_ds_misc_assoc_rsp; } 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_ssid_bssid data structure for
* MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS * MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS
*/ */
@ -1816,6 +1838,8 @@ typedef struct _mlan_fw_info {
t_u32 fw_ver; t_u32 fw_ver;
/** Firmware Hotfix version */ /** Firmware Hotfix version */
t_u8 hotfix_version; t_u8 hotfix_version;
/** tx buf size */
t_u16 tx_buf_size;
/** MAC address */ /** MAC address */
mlan_802_11_mac_addr mac_addr; mlan_802_11_mac_addr mac_addr;
/** 802.11n device capabilities */ /** 802.11n device capabilities */
@ -5317,6 +5341,8 @@ typedef struct _mlan_ds_misc_cfg {
t_u32 wws_cfg; t_u32 wws_cfg;
/** Get associate response for MLAN_OID_MISC_ASSOC_RSP */ /** Get associate response for MLAN_OID_MISC_ASSOC_RSP */
mlan_ds_misc_assoc_rsp assoc_resp; 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 */ /** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */
t_u32 func_init_shutdown; t_u32 func_init_shutdown;
/** Custom IE for MLAN_OID_MISC_CUSTOM_IE */ /** Custom IE for MLAN_OID_MISC_CUSTOM_IE */
@ -5432,6 +5458,7 @@ typedef struct _mlan_ds_misc_cfg {
#ifdef UAP_SUPPORT #ifdef UAP_SUPPORT
t_u8 wacp_mode; t_u8 wacp_mode;
#endif #endif
t_u32 ips_ctrl;
} param; } param;
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg; } 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; pmpriv->pattempted_bss_desc = pbss_desc;
/* clear assoc_rsp_size */ /* clear assoc_rsp_size */
pmpriv->assoc_rsp_size = 0; pmpriv->assoc_rsp_size = 0;
pmpriv->assoc_req_size = 0;
memcpy_ext(pmadapter, passo->peer_sta_addr, pbss_desc->mac_address, memcpy_ext(pmadapter, passo->peer_sta_addr, pbss_desc->mac_address,
sizeof(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]; t_u8 assoc_rsp_buf[MRVDRV_ASSOC_RSP_BUF_SIZE];
/** Length of the data stored in assoc_rsp_buf */ /** Length of the data stored in assoc_rsp_buf */
t_u32 assoc_rsp_size; 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 /** Generic IEEE IEs passed from the application to be inserted into the
* association request to firmware * 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); t_u16 cmd_action, t_u16 *pdata_buf);
mlan_status wlan_ret_hal_phy_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp, mlan_status wlan_ret_hal_phy_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
mlan_ioctl_req *pioctl_buf); 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, mlan_status wlan_cmd_rate_adapt_cfg(pmlan_private pmpriv,
HostCmd_DS_COMMAND *cmd, t_u16 cmd_action, HostCmd_DS_COMMAND *cmd, t_u16 cmd_action,
t_void *pdata_buf); 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, ret = wlan_cmd_hal_phy_cfg(pmpriv, cmd_ptr, cmd_action,
pdata_buf); pdata_buf);
break; break;
case HostCmd_CMD_IPS_CONFIG:
ret = wlan_cmd_ips_config(pmpriv, cmd_ptr, cmd_action,
pdata_buf);
break;
case HOST_CMD_PMIC_CONFIGURE: case HOST_CMD_PMIC_CONFIGURE:
cmd_ptr->command = wlan_cpu_to_le16(cmd_no); cmd_ptr->command = wlan_cpu_to_le16(cmd_no);
cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN); cmd_ptr->size = wlan_cpu_to_le16(S_DS_GEN);

View file

@ -191,12 +191,12 @@ static mlan_status wlan_process_cmdresp_error(mlan_private *pmpriv,
pmadapter->pscan_ioctl_req = MNULL; pmadapter->pscan_ioctl_req = MNULL;
/* Need to indicate IOCTL complete */ /* Need to indicate IOCTL complete */
if (pscan_ioctl_req) { 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 */ /* Indicate ioctl complete */
pcb->moal_ioctl_complete( pcb->moal_ioctl_complete(
pmadapter->pmoal_handle, pmadapter->pmoal_handle,
(pmlan_ioctl_req)pscan_ioctl_req, (pmlan_ioctl_req)pscan_ioctl_req,
MLAN_STATUS_FAILURE); MLAN_STATUS_SUCCESS);
} }
wlan_release_cmd_lock(pmadapter); wlan_release_cmd_lock(pmadapter);
wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_SCAN_REPORT, MNULL); 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: case HostCmd_CMD_HAL_PHY_CFG:
ret = wlan_ret_hal_phy_cfg(pmpriv, resp, pioctl_buf); ret = wlan_ret_hal_phy_cfg(pmpriv, resp, pioctl_buf);
break; break;
case HostCmd_CMD_IPS_CONFIG:
ret = wlan_ret_ips_cfg(pmpriv, resp, pioctl_buf);
break;
case HostCmd_CMD_RATE_ADAPT_CFG: case HostCmd_CMD_RATE_ADAPT_CFG:
ret = wlan_ret_rate_adapt_cfg(pmpriv, resp, pioctl_buf); ret = wlan_ret_rate_adapt_cfg(pmpriv, resp, pioctl_buf);
break; break;

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, wlan_recv_event(pmpriv, MLAN_EVENT_ID_FW_ADHOC_LINK_LOST,
MNULL); MNULL);
break; 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: case EVENT_FW_DEBUG_INFO:
pevent->bss_index = pmpriv->bss_index; 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.fw_ver = pmadapter->fw_release_number;
pget_info->param.fw_info.hotfix_version = pget_info->param.fw_info.hotfix_version =
pmadapter->fw_hotfix_ver; 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, memcpy_ext(pmadapter, &pget_info->param.fw_info.mac_addr,
pmpriv->curr_addr, MLAN_MAC_ADDR_LENGTH, pmpriv->curr_addr, MLAN_MAC_ADDR_LENGTH,
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; 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 * @brief Send function softreset command to firmware
* *
@ -4832,6 +4864,30 @@ mlan_status wlan_misc_ioctl_tp_state(pmlan_adapter pmadapter,
return ret; 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, static mlan_status wlan_misc_ioctl_get_sensor_temp(pmlan_adapter pmadapter,
pmlan_ioctl_req pioctl_req) 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: case MLAN_OID_MISC_ASSOC_RSP:
status = wlan_misc_ioctl_get_assoc_rsp(pmadapter, pioctl_req); status = wlan_misc_ioctl_get_assoc_rsp(pmadapter, pioctl_req);
break; break;
case MLAN_OID_MISC_ASSOC_REQ:
status = wlan_misc_ioctl_get_assoc_req(pmadapter, pioctl_req);
break;
case MLAN_OID_MISC_INIT_SHUTDOWN: case MLAN_OID_MISC_INIT_SHUTDOWN:
status = wlan_misc_ioctl_init_shutdown(pmadapter, pioctl_req); status = wlan_misc_ioctl_init_shutdown(pmadapter, pioctl_req);
break; break;
@ -5263,6 +5322,9 @@ static mlan_status wlan_misc_cfg_ioctl(pmlan_adapter pmadapter,
case MLAN_OID_MISC_TP_STATE: case MLAN_OID_MISC_TP_STATE:
status = wlan_misc_ioctl_tp_state(pmadapter, pioctl_req); status = wlan_misc_ioctl_tp_state(pmadapter, pioctl_req);
break; break;
case MLAN_OID_MISC_IPS_CFG:
status = wlan_misc_ioctl_ips_cfg(pmadapter, pioctl_req);
break;
default: default:
if (pioctl_req) if (pioctl_req)
pioctl_req->status_code = MLAN_ERROR_IOCTL_INVALID; 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; pmadapter->fw_release_number;
pget_info->param.fw_info.hotfix_version = pget_info->param.fw_info.hotfix_version =
pmadapter->fw_hotfix_ver; 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.fw_bands = pmadapter->fw_bands;
pget_info->param.fw_info.ecsa_enable = pget_info->param.fw_info.ecsa_enable =
pmadapter->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, status = wlan_11h_ioctl_dfs_testing(pmadapter,
pioctl_req); pioctl_req);
if (cfg11h->sub_command == MLAN_OID_11H_CHAN_NOP_INFO) if (cfg11h->sub_command == MLAN_OID_11H_CHAN_NOP_INFO)
status = wlan_11h_ioctl_get_channel_nop_info( status = wlan_11h_ioctl_channel_nop_info(pmadapter,
pmadapter, pioctl_req); pioctl_req);
if (cfg11h->sub_command == MLAN_OID_11H_CHAN_REPORT_REQUEST) if (cfg11h->sub_command == MLAN_OID_11H_CHAN_REPORT_REQUEST)
status = wlan_11h_ioctl_dfs_chan_report(pmpriv, status = wlan_11h_ioctl_dfs_chan_report(pmpriv,
pioctl_req); 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)); MAC2STR(prx_pkt->eth803_hdr.dest_addr));
/* don't do packet forwarding in disconnected state */ /* don't do packet forwarding in disconnected state */
if ((priv->media_connected == MFALSE) || if (priv->media_connected == MFALSE)
(pmbuf->data_len > MV_ETH_FRAME_LEN))
goto upload; goto upload;
if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) { 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 in disconnected state */
/* don't do packet forwarding when packet > 1514 */ /* don't do packet forwarding when packet > 1514 */
if ((priv->media_connected == MFALSE) || if (priv->media_connected == MFALSE)
((pmbuf->data_len - prx_pd->rx_pkt_offset) > MV_ETH_FRAME_LEN))
goto upload; goto upload;
if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) { if (prx_pkt->eth803_hdr.dest_addr[0] & 0x01) {

View file

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

View file

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

View file

@ -349,6 +349,8 @@ enum _mlan_ioctl_req_id {
#endif #endif
MLAN_OID_MISC_GPIO_TSF_LATCH = 0x00200082, MLAN_OID_MISC_GPIO_TSF_LATCH = 0x00200082,
MLAN_OID_MISC_GET_TSF_INFO = 0x00200083, MLAN_OID_MISC_GET_TSF_INFO = 0x00200083,
MLAN_OID_MISC_ASSOC_REQ = 0x00200084,
MLAN_OID_MISC_IPS_CFG = 0x00200085,
}; };
/** Sub command size */ /** Sub command size */
@ -630,7 +632,7 @@ typedef struct _mlan_multicast_list {
} mlan_multicast_list, *pmlan_multicast_list; } mlan_multicast_list, *pmlan_multicast_list;
/** Max channel */ /** Max channel */
#define MLAN_MAX_CHANNEL 177 #define MLAN_MAX_CHANNEL 165
/** Maximum number of channels in table */ /** Maximum number of channels in table */
#define MLAN_MAX_CHANNEL_NUM 128 #define MLAN_MAX_CHANNEL_NUM 128
@ -692,6 +694,26 @@ typedef struct _mlan_ds_misc_assoc_rsp {
t_u32 assoc_resp_len; t_u32 assoc_resp_len;
} mlan_ds_misc_assoc_rsp, *pmlan_ds_misc_assoc_rsp; } 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_ssid_bssid data structure for
* MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS * MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS
*/ */
@ -1816,6 +1838,8 @@ typedef struct _mlan_fw_info {
t_u32 fw_ver; t_u32 fw_ver;
/** Firmware Hotfix version */ /** Firmware Hotfix version */
t_u8 hotfix_version; t_u8 hotfix_version;
/** tx buf size */
t_u16 tx_buf_size;
/** MAC address */ /** MAC address */
mlan_802_11_mac_addr mac_addr; mlan_802_11_mac_addr mac_addr;
/** 802.11n device capabilities */ /** 802.11n device capabilities */
@ -5317,6 +5341,8 @@ typedef struct _mlan_ds_misc_cfg {
t_u32 wws_cfg; t_u32 wws_cfg;
/** Get associate response for MLAN_OID_MISC_ASSOC_RSP */ /** Get associate response for MLAN_OID_MISC_ASSOC_RSP */
mlan_ds_misc_assoc_rsp assoc_resp; 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 */ /** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */
t_u32 func_init_shutdown; t_u32 func_init_shutdown;
/** Custom IE for MLAN_OID_MISC_CUSTOM_IE */ /** Custom IE for MLAN_OID_MISC_CUSTOM_IE */
@ -5432,6 +5458,7 @@ typedef struct _mlan_ds_misc_cfg {
#ifdef UAP_SUPPORT #ifdef UAP_SUPPORT
t_u8 wacp_mode; t_u8 wacp_mode;
#endif #endif
t_u32 ips_ctrl;
} param; } param;
} mlan_ds_misc_cfg, *pmlan_ds_misc_cfg; } 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 = 5785, .hw_value = 157, .max_power = 20},
{.center_freq = 5805, .hw_value = 161, .max_power = 20}, {.center_freq = 5805, .hw_value = 161, .max_power = 20},
{.center_freq = 5825, .hw_value = 165, .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 = { 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, .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 */ /** Channel definitions for 5 GHz to be advertised to cfg80211 */
static struct ieee80211_channel mac1_cfg80211_channels_5ghz[] = { static struct ieee80211_channel mac1_cfg80211_channels_5ghz[] = {
{.center_freq = 5180, .hw_value = 36, .max_power = 20}, {.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 = 5785, .hw_value = 157, .max_power = 20},
{.center_freq = 5805, .hw_value = 161, .max_power = 20}, {.center_freq = 5805, .hw_value = 161, .max_power = 20},
{.center_freq = 5825, .hw_value = 165, .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 = { struct ieee80211_supported_band mac1_cfg80211_band_2ghz = {
.channels = cfg80211_channels_2ghz, .channels = macl_cfg80211_channels_2ghz,
.band = IEEE80211_BAND_2GHZ, .band = IEEE80211_BAND_2GHZ,
.n_channels = ARRAY_SIZE(cfg80211_channels_2ghz), .n_channels = ARRAY_SIZE(macl_cfg80211_channels_2ghz),
.bitrates = cfg80211_rates, .bitrates = cfg80211_rates,
.n_bitrates = ARRAY_SIZE(cfg80211_rates), .n_bitrates = ARRAY_SIZE(cfg80211_rates),
}; };
@ -2667,11 +2679,19 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
break; break;
case IEEE80211_STYPE_DEAUTH: case IEEE80211_STYPE_DEAUTH:
case IEEE80211_STYPE_DISASSOC: 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, PRINTM(MMSG,
"wlan: HostMlme %s send deauth/disassoc\n", "wlan: HostMlme %s send deauth/disassoc\n",
priv->netdev->name); priv->netdev->name);
if (priv->phandle->is_cac_timer_set)
woal_cancel_chanrpt_event(priv);
break; break;
case IEEE80211_STYPE_ASSOC_RESP: case IEEE80211_STYPE_ASSOC_RESP:
@ -2742,7 +2762,7 @@ int woal_cfg80211_mgmt_tx(struct wiphy *wiphy,
woal_cancel_scan(priv, MOAL_IOCTL_WAIT); woal_cancel_scan(priv, MOAL_IOCTL_WAIT);
#endif #endif
if (chan) { if (chan && priv->bss_type != MLAN_BSS_ROLE_UAP) {
duration = (wait > MGMT_TX_DEFAULT_WAIT_TIME) ? duration = (wait > MGMT_TX_DEFAULT_WAIT_TIME) ?
wait : wait :
MGMT_TX_DEFAULT_WAIT_TIME; MGMT_TX_DEFAULT_WAIT_TIME;
@ -4540,7 +4560,7 @@ void woal_cfg80211_free_iftype_data(struct wiphy *wiphy)
{ {
enum nl80211_band band; 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]) if (!wiphy->bands[band])
continue; continue;
if (!wiphy->bands[band]->iftype_data) if (!wiphy->bands[band]->iftype_data)
@ -4844,7 +4864,6 @@ void woal_cfg80211_notify_antcfg(moal_private *priv, struct wiphy *wiphy,
} }
#endif #endif
} }
bands->ht_cap.mcs.rx_mask[4] = 0;
} }
if (wiphy->bands[IEEE80211_BAND_5GHZ]) { 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, int key_len, t_u8 index,
t_u8 wait_option); 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 * If multiple wiphys are registered e.g. a regular netdev with
* assigned ieee80211_ptr and you won't know whether it points * assigned ieee80211_ptr and you won't know whether it points
@ -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_disconnect(pmoal_private priv, u16 reason_code, u8 *sa);
void woal_host_mlme_work_queue(struct work_struct *work); void woal_host_mlme_work_queue(struct work_struct *work);
void woal_host_mlme_process_assoc_resp(moal_private *priv, 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
#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; t_u32 supp_feature_set = 0;
ENTER(); ENTER();
supp_feature_set = WLAN_FEATURE_INFRA supp_feature_set = WLAN_FEATURE_INFRA
#if defined(UAP_SUPPORT) && defined(STA_SUPPORT) #if defined(UAP_SUPPORT) && defined(STA_SUPPORT)
| WLAN_FEATURE_AP_STA | 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)); MIN(packet_filter_len, nla_len(iter));
pkt_filter->state = PACKET_FILTER_STATE_START; pkt_filter->state = PACKET_FILTER_STATE_START;
spin_unlock_irqrestore(&pkt_filter->lock, flags); 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_program,
pkt_filter->packet_filter_len); pkt_filter->packet_filter_len);
break; 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) if (pkt_filter->state != PACKET_FILTER_STATE_START)
goto done; 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_program,
pkt_filter->packet_filter_len); 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); spin_lock_irqsave(&pkt_filter->lock, flags);
ret = process_packet(pkt_filter->packet_filter_program, ret = process_packet(pkt_filter->packet_filter_program,
pkt_filter->packet_filter_len, data, len, 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; t_u32 num_radio = 0, iface_stat_len = 0, radio_stat_len = 0;
int err = -1, length = 0, i; int err = -1, length = 0, i;
char *ioctl_link_stats_buf = NULL; 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 */ /* Allocate an IOCTL request buffer */
req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) + BUF_MAXLEN); 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)); sizeof(num_radio));
radio_stat_len = num_radio * sizeof(wifi_radio_stat); 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 + iface_stat = (wifi_iface_stat *)(info->param.link_statistic +
sizeof(num_radio) + radio_stat_len); sizeof(num_radio) + radio_stat_len);
iface_stat_len = sizeof(wifi_iface_stat); iface_stat_len = sizeof(wifi_iface_stat);
@ -2832,38 +2869,38 @@ static int woal_cfg80211_subcmd_link_statistic_get(struct wiphy *wiphy,
goto done; goto done;
} }
PRINTM(MCMD_D, "%s: <<< Start DUMP\n", __func__); PRINTM(MDAT_D, "%s: <<< Start DUMP\n", __func__);
PRINTM(MCMD_D, "sizeof(wifi_radio_stat)=%zu\n", PRINTM(MDAT_D, "sizeof(wifi_radio_stat)=%zu\n",
sizeof(wifi_radio_stat)); sizeof(wifi_radio_stat));
DBG_HEXDUMP(MCMD_D, "radio_stat", (t_u8 *)radio_stat, radio_stat_len); DBG_HEXDUMP(MDAT_D, "radio_stat", (t_u8 *)radio_stat, radio_stat_len);
PRINTM(MCMD_D, "sizeof(wifi_channel_stat)=%zu\n", PRINTM(MDAT_D, "sizeof(wifi_channel_stat)=%zu\n",
sizeof(wifi_channel_stat)); sizeof(wifi_channel_stat));
DBG_HEXDUMP(MCMD_D, "iface_stat", (t_u8 *)iface_stat, iface_stat_len); DBG_HEXDUMP(MDAT_D, "iface_stat", (t_u8 *)iface_stat, iface_stat_len);
PRINTM(MCMD_D, "num_radio=%d\n", num_radio); PRINTM(MDAT_D, "num_radio=%d\n", num_radio);
radio_stat_tmp = radio_stat; radio_stat_tmp = radio_stat;
for (i = 0; i < num_radio; i++) { for (i = 0; i < num_radio; i++) {
PRINTM(MCMD_D, "--radio_stat[%d]--\n", i); PRINTM(MDAT_D, "--radio_stat[%d]--\n", i);
PRINTM(MCMD_D, "radio=%d\n", radio_stat_tmp->radio); PRINTM(MDAT_D, "radio=%d\n", radio_stat_tmp->radio);
PRINTM(MCMD_D, "on_time=%d\n", radio_stat_tmp->on_time); PRINTM(MDAT_D, "on_time=%d\n", radio_stat_tmp->on_time);
PRINTM(MCMD_D, "tx_time=%d\n", radio_stat_tmp->tx_time); PRINTM(MDAT_D, "tx_time=%d\n", radio_stat_tmp->tx_time);
PRINTM(MCMD_D, "reserved0=%d\n", radio_stat_tmp->reserved0); PRINTM(MDAT_D, "reserved0=%d\n", radio_stat_tmp->reserved0);
PRINTM(MCMD_D, "rx_time=%d\n", radio_stat_tmp->rx_time); PRINTM(MDAT_D, "rx_time=%d\n", radio_stat_tmp->rx_time);
PRINTM(MCMD_D, "on_time_scan=%d\n", PRINTM(MDAT_D, "on_time_scan=%d\n",
radio_stat_tmp->on_time_scan); radio_stat_tmp->on_time_scan);
PRINTM(MCMD_D, "on_time_nbd=%d\n", radio_stat_tmp->on_time_nbd); PRINTM(MDAT_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_gscan=%d\n",
radio_stat_tmp->on_time_gscan); 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); 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); 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); 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->num_channels);
radio_stat_tmp++; 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); err = cfg80211_vendor_cmd_reply(skb);
if (unlikely(err)) if (unlikely(err))
@ -3019,7 +3056,7 @@ static int woal_cfg80211_subcmd_link_statistic_clr(struct wiphy *wiphy,
/* Send IOCTL request to MLAN */ /* Send IOCTL request to MLAN */
status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT); status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
if (status == MLAN_STATUS_SUCCESS) 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); length = NLA_HDRLEN + sizeof(stats_clear_rsp_mask) + sizeof(stop_rsp);
/* Alloc the SKB for vendor_event */ /* 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_802_11_ssid req_ssid;
mlan_ssid_bssid ssid_bssid; mlan_ssid_bssid ssid_bssid;
#ifdef REASSOCIATION
moal_handle *handle = priv->phandle; moal_handle *handle = priv->phandle;
#ifdef REASSOCIATION
mlan_bss_info bss_info; mlan_bss_info bss_info;
#endif #endif
int ret = 0; int ret = 0;
@ -10372,6 +10372,67 @@ done:
return ret; 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 * @brief Set/Get DFS Testing settings
* *
@ -15606,6 +15667,61 @@ done:
return ret; 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 * @brief Set priv command for Android
* @param dev A pointer to net_device structure * @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, len = woal_priv_dfs_testing(priv, buf,
priv_cmd.total_len); priv_cmd.total_len);
goto handled; 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, } else if (strnicmp(buf + strlen(CMD_NXP), PRIV_CMD_DFS53_CFG,
strlen(PRIV_CMD_DFS53_CFG)) == 0) { strlen(PRIV_CMD_DFS53_CFG)) == 0) {
/* Set/Get DFS W53 settings */ /* 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, len = woal_priv_set_tp_state(priv, buf,
priv_cmd.total_len); priv_cmd.total_len);
goto handled; 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 { } else {
PRINTM(MERROR, PRINTM(MERROR,
"Unknown NXP PRIVATE command %s, ignored\n", "Unknown NXP PRIVATE command %s, ignored\n",

View file

@ -214,6 +214,7 @@ typedef struct _chan_stats {
#endif #endif
#define PRIV_CMD_SLEEP_PARAMS "sleepparams" #define PRIV_CMD_SLEEP_PARAMS "sleepparams"
#define PRIV_CMD_DFS_TESTING "dfstesting" #define PRIV_CMD_DFS_TESTING "dfstesting"
#define PRIV_CMD_CLEAR_NOP "clear_nop"
#define PRIV_CMD_DFS53_CFG "dfs53cfg" #define PRIV_CMD_DFS53_CFG "dfs53cfg"
#define PRIV_CMD_CFP_CODE "cfpcode" #define PRIV_CMD_CFP_CODE "cfpcode"
#define PRIV_CMD_CWMODE "cwmode" #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_CCK_DESENSE_CFG "cck_desense_cfg"
#define PRIV_CMD_DOT11MC_UNASSOC_FTM_CFG "dot11mc_unassoc_ftm_cfg" #define PRIV_CMD_DOT11MC_UNASSOC_FTM_CFG "dot11mc_unassoc_ftm_cfg"
#define PRIV_CMD_HAL_PHY_CFG "hal_phy_cfg" #define PRIV_CMD_HAL_PHY_CFG "hal_phy_cfg"
#define PRIV_CMD_IPS_CFG "ips_cfg"
/** Private command ID for Android default commands */ /** Private command ID for Android default commands */
#define WOAL_ANDROID_DEF_CMD (SIOCDEVPRIVATE + 1) #define WOAL_ANDROID_DEF_CMD (SIOCDEVPRIVATE + 1)

View file

@ -108,10 +108,16 @@ static region_code_mapping_t hw_region_code_mapping[] = {
/** Country code for ETSI */ /** Country code for ETSI */
static t_u8 eu_country_code_table[][COUNTRY_CODE_LEN] = { static t_u8 eu_country_code_table[][COUNTRY_CODE_LEN] = {
"AL", "AD", "AT", "AU", "BY", "BE", "BA", "BG", "HR", "CY", "CZ", "DK", "AL", "AD", "AT", "AU", "BE", "BA", "BG", "HR", "CY", "CZ", "DK", "EE",
"EE", "FI", "FR", "MK", "DE", "GR", "HU", "IS", "IE", "IT", "KR", "LV", "FI", "FR", "MK", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT",
"LI", "LT", "LU", "MT", "MD", "MC", "ME", "NL", "NO", "PL", "RO", "RU", "LU", "MT", "MD", "MC", "ME", "NL", "NO", "PL", "RO", "SM", "RS", "SI",
"SM", "RS", "SI", "SK", "ES", "SE", "CH", "TR", "UA", "UK", "GB", "NE"}; "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 Global Variables
@ -263,7 +269,7 @@ t_u8 woal_get_second_channel_offset(moal_private *priv, int chan)
/* Special Case: 20Mhz-only Channel */ /* Special Case: 20Mhz-only Channel */
woal_get_bss_info(priv, MOAL_IOCTL_WAIT, &bss_info); 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; return chan2Offset;
switch (chan) { switch (chan) {
@ -279,8 +285,6 @@ t_u8 woal_get_second_channel_offset(moal_private *priv, int chan)
case 140: case 140:
case 149: case 149:
case 157: case 157:
case 165:
case 173:
chan2Offset = SEC_CHAN_ABOVE; chan2Offset = SEC_CHAN_ABOVE;
break; break;
case 40: case 40:
@ -295,8 +299,6 @@ t_u8 woal_get_second_channel_offset(moal_private *priv, int chan)
case 144: case 144:
case 153: case 153:
case 161: case 161:
case 169:
case 177:
chan2Offset = SEC_CHAN_BELOW; chan2Offset = SEC_CHAN_BELOW;
break; break;
} }
@ -1831,6 +1833,53 @@ done:
LEAVE(); LEAVE();
return ret; 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 #endif
/** /**

View file

@ -3598,6 +3598,9 @@ static mlan_status woal_init_fw_dpc(moal_handle *handle)
handle->driver_status = MFALSE; handle->driver_status = MFALSE;
} }
moal_get_boot_ktime(handle, &handle->on_time);
PRINTM(MMSG, "on_time is %llu\n", handle->on_time);
/** data request */ /** data request */
memset(&param, 0, sizeof(mlan_init_param)); 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; wifi_timeval tstamp;
struct ethhdr *eth; struct ethhdr *eth;
t_u8 tid = 0;
dot11_txcontrol *txcontrol; dot11_txcontrol *txcontrol;
t_u8 tx_ctrl_flag = MFALSE; t_u8 tx_ctrl_flag = MFALSE;
int i = 0; int i = 0;
ENTER(); 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) { eth = (struct ethhdr *)skb->data;
case __constant_htons(ETH_P_IP):
tid = priv->dscp_map[SKB_TOS(skb) >> DSCP_OFFSET]; switch (eth->h_proto) {
if (tid == 0xFF) case __constant_htons(ETH_P_IP):
tid = (IPTOS_PREC(SKB_TOS(skb)) >> PRINTM(MINFO, "packet type ETH_P_IP: %04x, prio=%#x\n",
IPTOS_OFFSET); eth->h_proto, skb->priority);
PRINTM(MDAT_D, break;
"packet type ETH_P_IP: dscp[%x], map[%x], tid=%d\n", case __constant_htons(ETH_P_IPV6):
SKB_TOS(skb) >> DSCP_OFFSET, PRINTM(MINFO, "packet type ETH_P_IPV6: %04x, prio=%#x\n",
priv->dscp_map[SKB_TOS(skb) >> DSCP_OFFSET], eth->h_proto, skb->priority);
tid); break;
break; case __constant_htons(ETH_P_ARP):
case __constant_htons(ETH_P_IPV6): skb->priority = 0;
tid = SKB_TIDV6(skb); PRINTM(MINFO, "ARP packet %04x prio=%#x\n", eth->h_proto,
PRINTM(MDAT_D, skb->priority);
"packet type ETH_P_IPV6: %04x, tid=%#x prio=%#x\n", break;
eth->h_proto, tid, skb->priority); default:
break; skb->priority = 0;
case __constant_htons(ETH_P_ARP): if (priv->tx_protocols.protocol_num) {
tid = 0; for (i = 0; i < priv->tx_protocols.protocol_num; i++) {
PRINTM(MDATA, "ARP packet %04x\n", eth->h_proto); if (eth->h_proto ==
break; __constant_htons(
default: priv->tx_protocols.protocols[i]))
tid = 0; tx_ctrl_flag = MTRUE;
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;
} }
PRINTM(MDAT_D, "packet %04x prio=%#x\n", eth->h_proto, skb->priority);
skb->priority = tid;
/* Record the current time the packet was queued; used to determine /* Record the current time the packet was queued; used to determine
* the amount of time the packet was queued in the driver before it * 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 #endif
#define MAX_MTU_SIZE 2000
/** /**
* @brief This function initializes the private structure * @brief This function initializes the private structure
* and dev structure for station mode * 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) 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(); 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 */ /* Setup the OS Interface to our functions */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29)
dev->open = woal_open; 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 woal_init_uap_dev(struct net_device *dev, moal_private *priv)
{ {
mlan_status status = MLAN_STATUS_SUCCESS; mlan_status status = MLAN_STATUS_SUCCESS;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
mlan_fw_info fw_info;
#endif
ENTER(); 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 */ /* Setup the OS Interface to our functions */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29)
dev->open = woal_open; 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); 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 */ /* Initialize priv structure */
woal_init_priv(priv, MOAL_IOCTL_WAIT); 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 #endif
#endif #endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA || if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA ||
GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP)
woal_deinit_wifi_hal(priv); woal_deinit_wifi_hal(priv);
#endif
#endif #endif
/* Clear the priv in handle */ /* 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); moal_private *priv = (moal_private *)netdev_priv(dev);
struct ethhdr *eth = NULL;
t_u8 tid = 0; t_u8 tid = 0;
t_u8 index = 0; t_u8 index = 0;
@ -5568,32 +5575,7 @@ u16 woal_select_queue(struct net_device *dev, struct sk_buff *skb
LEAVE(); LEAVE();
return index; return index;
} }
/* tid = skb->priority = cfg80211_classify8021d(skb, NULL);
* 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;
}
}
index = mlan_select_wmm_queue(priv->phandle->pmlan_adapter, index = mlan_select_wmm_queue(priv->phandle->pmlan_adapter,
priv->bss_index, tid); priv->bss_index, tid);
PRINTM(MDATA, "select queue: tid=%d, index=%d\n", tid, index); 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; tcp_session->pmbuf = NULL;
spin_unlock_irqrestore(&priv->tcp_sess_lock, flags); spin_unlock_irqrestore(&priv->tcp_sess_lock, flags);
if (skb && pmbuf) { 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); status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
switch (status) { switch (status) {
case MLAN_STATUS_PENDING: case MLAN_STATUS_PENDING:
atomic_inc(&priv->phandle->tx_pending); atomic_inc(&priv->phandle->tx_pending);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
atomic_inc(&priv->wmm_tx_pending[index]); atomic_inc(&priv->wmm_tx_pending[index]);
if (atomic_read(&priv->wmm_tx_pending[index]) >= if (atomic_read(&priv->wmm_tx_pending[index]) >=
MAX_TX_PENDING) { 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->ack_skb = NULL;
tcp_session->pmbuf = 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); status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
switch (status) { switch (status) {
case MLAN_STATUS_PENDING: case MLAN_STATUS_PENDING:
atomic_inc(&priv->phandle->tx_pending); atomic_inc(&priv->phandle->tx_pending);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
atomic_inc(&priv->wmm_tx_pending[index]); atomic_inc(&priv->wmm_tx_pending[index]);
if (atomic_read(&priv->wmm_tx_pending[index]) >= if (atomic_read(&priv->wmm_tx_pending[index]) >=
MAX_TX_PENDING) { MAX_TX_PENDING) {
@ -6101,9 +6087,10 @@ static int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
ENTER(); ENTER();
priv->num_tx_timeout = 0; 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, PRINTM(MERROR, "Tx Error: Bad skb length %d : %d\n", skb->len,
ETH_FRAME_LEN); priv->netdev->mtu);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
priv->stats.tx_dropped++; priv->stats.tx_dropped++;
goto done; 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); status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
switch (status) { switch (status) {
case MLAN_STATUS_PENDING: 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); atomic_inc(&priv->phandle->tx_pending);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) #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, memset(&priv->sme_current, 0,
sizeof(struct cfg80211_connect_params)); sizeof(struct cfg80211_connect_params));
#endif #endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_init_wifi_hal(priv); woal_init_wifi_hal(priv);
#endif
#endif #endif
} }
#endif /* STA_SUPPORT */ #endif /* STA_SUPPORT */
@ -6507,9 +6505,11 @@ void woal_init_priv(moal_private *priv, t_u8 wait_option)
memset(&priv->beacon_after, 0, memset(&priv->beacon_after, 0,
sizeof(struct cfg80211_beacon_data)); sizeof(struct cfg80211_beacon_data));
#endif #endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_init_wifi_hal(priv); woal_init_wifi_hal(priv);
#endif #endif
#endif
#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); 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 * @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: case WOAL_EVENT_ASSOC_RESP:
woal_host_mlme_process_assoc_resp( woal_host_mlme_process_assoc_resp(
(moal_private *)evt->priv, &evt->assoc_resp); (moal_private *)evt->priv, &evt->assoc_info);
break; break;
#endif #endif
#endif #endif
@ -8845,15 +8884,33 @@ t_void woal_rx_work_queue(struct work_struct *work)
#endif #endif
#endif #endif
#endif #endif
wifi_timeval start_timeval;
wifi_timeval end_timeval;
ENTER(); ENTER();
if (handle->surprise_removed == MTRUE) { if (handle->surprise_removed == MTRUE) {
LEAVE(); LEAVE();
return; 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); 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(); LEAVE();
} }
@ -9927,6 +9984,10 @@ static void woal_post_reset(moal_handle *handle)
mlan_ioctl_req *req = NULL; mlan_ioctl_req *req = NULL;
mlan_ds_misc_cfg *misc = NULL; mlan_ds_misc_cfg *misc = NULL;
int intf_num; 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 #ifdef WIFI_DIRECT_SUPPORT
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT) #if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
#if defined(STA_WEXT) || defined(UAP_WEXT) #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); 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: done:
if (handle->dpd_data) { if (handle->dpd_data) {
release_firmware(handle->dpd_data); release_firmware(handle->dpd_data);

View file

@ -872,22 +872,6 @@ typedef enum {
/** GAP value is optional */ /** GAP value is optional */
#define GAP_FLAG_OPTIONAL MBIT(15) #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 */ /** max retry count for wait_event_interupptible_xx while loop */
#define MAX_RETRY_CNT 100 #define MAX_RETRY_CNT 100
/** wait_queue structure */ /** wait_queue structure */
@ -1098,7 +1082,7 @@ typedef struct _woal_evt_buf {
/** Event len */ /** Event len */
t_u16 event_len; t_u16 event_len;
/** Event buffer */ /** Event buffer */
t_u8 event_buf[1024]; t_u8 event_buf[1500];
} woal_evt_buf; } woal_evt_buf;
/** woal event */ /** woal event */
@ -1112,7 +1096,7 @@ struct woal_event {
union { union {
chan_band_info chan_info; chan_band_info chan_info;
woal_evt_buf evt; woal_evt_buf evt;
mlan_ds_misc_assoc_rsp assoc_resp; mlan_ds_assoc_info assoc_info;
int reason_code; int reason_code;
}; };
}; };
@ -1294,6 +1278,8 @@ struct _moal_private {
struct workqueue_struct *mclist_workqueue; struct workqueue_struct *mclist_workqueue;
/** mclist work */ /** mclist work */
struct work_struct mclist_work; struct work_struct mclist_work;
/** Scan deferred work*/
struct delayed_work scan_deferred_work;
/** Statistics of tcp ack tx dropped */ /** Statistics of tcp ack tx dropped */
t_u32 tcp_ack_drop_cnt; t_u32 tcp_ack_drop_cnt;
/** Statistics of tcp ack tx in total from kernel */ /** Statistics of tcp ack tx in total from kernel */
@ -2254,6 +2240,22 @@ struct _moal_handle {
mlan_debug_info debug_info; mlan_debug_info debug_info;
/* block id in module param config file */ /* block id in module param config file */
int blk_id; 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 */ /** seecond mac flag */
t_u8 second_mac; t_u8 second_mac;
/** moal handle for another mac */ /** moal handle for another mac */
@ -2276,6 +2278,7 @@ struct _moal_handle {
struct pm_qos_request woal_pm_qos_req; struct pm_qos_request woal_pm_qos_req;
#endif #endif
#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_status woal_get_assoc_rsp(moal_private *priv,
mlan_ds_misc_assoc_rsp *assoc_rsp, mlan_ds_misc_assoc_rsp *assoc_rsp,
t_u8 wait_option); 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 */ /** Get signal information */
mlan_status woal_get_signal_info(moal_private *priv, t_u8 wait_option, mlan_status woal_get_signal_info(moal_private *priv, t_u8 wait_option,
mlan_ds_get_signal *signal); mlan_ds_get_signal *signal);
@ -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_rx_work_queue(struct work_struct *work);
t_void woal_evt_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_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); netdev_tx_t woal_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
#ifdef STA_SUPPORT #ifdef STA_SUPPORT

View file

@ -1635,7 +1635,7 @@ static rdwr_status woal_cmd52_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
} }
udelay(100); 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"); PRINTM(MERROR, "Fail to pull ctrl_data\n");
return RDWR_STATUS_FAILURE; 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) { if (status == MLAN_STATUS_SUCCESS) {
priv->stats.tx_packets++; priv->stats.tx_packets++;
priv->stats.tx_bytes += skb->len; priv->stats.tx_bytes += skb->len;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor( woal_packet_fate_monitor(
priv, PACKET_TYPE_TX, priv, PACKET_TYPE_TX,
TX_PKT_FATE_SENT, TX_PKT_FATE_SENT,
FRAME_TYPE_ETHERNET_II, 0, 0, FRAME_TYPE_ETHERNET_II, 0, 0,
skb->data, skb->data_len); skb->data, skb->data_len);
#endif
#endif #endif
} else { } else {
priv->stats.tx_errors++; priv->stats.tx_errors++;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor( woal_packet_fate_monitor(
priv, PACKET_TYPE_TX, priv, PACKET_TYPE_TX,
TX_PKT_FATE_DRV_DROP_OTHER, TX_PKT_FATE_DRV_DROP_OTHER,
FRAME_TYPE_ETHERNET_II, 0, 0, FRAME_TYPE_ETHERNET_II, 0, 0,
skb->data, skb->data_len); skb->data, skb->data_len);
#endif
#endif #endif
} }
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29) #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: 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(); LEAVE();
return MLAN_STATUS_SUCCESS; return MLAN_STATUS_SUCCESS;
} }
@ -1543,6 +1565,7 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
__func__); __func__);
status = MLAN_STATUS_FAILURE; status = MLAN_STATUS_FAILURE;
priv->stats.rx_dropped++; priv->stats.rx_dropped++;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor( woal_packet_fate_monitor(
priv, PACKET_TYPE_RX, priv, PACKET_TYPE_RX,
@ -1551,6 +1574,7 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
(t_u8 *)(pmbuf->pbuf + (t_u8 *)(pmbuf->pbuf +
pmbuf->data_offset), pmbuf->data_offset),
pmbuf->data_len); pmbuf->data_len);
#endif
#endif #endif
goto done; goto done;
} }
@ -1611,6 +1635,7 @@ mlan_status moal_recv_packet(t_void *pmoal, pmlan_buffer pmbuf)
(skb->len - max_rx_data_size); (skb->len - max_rx_data_size);
} }
#endif #endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
if (!woal_filter_packet(priv, skb->data, skb->len, 0)) { if (!woal_filter_packet(priv, skb->data, skb->len, 0)) {
PRINTM(MEVENT, "drop filtered packet %s\n", 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); dev_kfree_skb(skb);
goto done; goto done;
} }
#endif
#endif #endif
priv->stats.rx_bytes += skb->len; priv->stats.rx_bytes += skb->len;
priv->stats.rx_packets++; priv->stats.rx_packets++;
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor(priv, PACKET_TYPE_RX, woal_packet_fate_monitor(priv, PACKET_TYPE_RX,
RX_PKT_FATE_SUCCESS, RX_PKT_FATE_SUCCESS,
FRAME_TYPE_ETHERNET_II, 0, 0, FRAME_TYPE_ETHERNET_II, 0, 0,
skb->data, skb->len); skb->data, skb->len);
#endif
#endif #endif
if (handle->params.wakelock_timeout) { if (handle->params.wakelock_timeout) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) #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)); 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) { if (priv->phandle->scan_pending_on_block == MTRUE) {
priv->phandle->scan_pending_on_block = MFALSE; priv->phandle->scan_pending_on_block = MFALSE;
priv->phandle->scan_priv = NULL; priv->phandle->scan_priv = NULL;
@ -2492,8 +2542,10 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
msecs_to_jiffies( msecs_to_jiffies(
ROAMING_WAKE_LOCK_TIMEOUT)); ROAMING_WAKE_LOCK_TIMEOUT));
#endif #endif
#ifdef REASSOCIATION
wake_up_interruptible( wake_up_interruptible(
&priv->phandle->reassoc_thread.wait_q); &priv->phandle->reassoc_thread.wait_q);
#endif
} else { } else {
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 35) #if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
if (priv->mrvl_rssi_low) { 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.chanBand,
pchan_info->bandcfg.chanWidth, pchan_info->bandcfg.chanWidth,
pchan_info->bandcfg.chan2Offset); pchan_info->bandcfg.chan2Offset);
if (priv->uap_host_based && if (priv->uap_host_based)
(priv->channel != pchan_info->channel))
woal_channel_switch_event(priv, pchan_info); woal_channel_switch_event(priv, pchan_info);
} }
#endif #endif
@ -3244,6 +3295,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
MLAN_MAC_ADDR_LENGTH, MLAN_MAC_ADDR_LENGTH,
GFP_ATOMIC); GFP_ATOMIC);
#endif #endif
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor( woal_packet_fate_monitor(
priv, PACKET_TYPE_RX, priv, PACKET_TYPE_RX,
@ -3254,6 +3306,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
pmevent->event_len - pmevent->event_len -
sizeof(pmevent->event_id) - sizeof(pmevent->event_id) -
MLAN_MAC_ADDR_LENGTH); MLAN_MAC_ADDR_LENGTH);
#endif
#endif #endif
} }
#endif /* KERNEL_VERSION */ #endif /* KERNEL_VERSION */
@ -3411,6 +3464,7 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent)
#endif #endif
#endif #endif
} }
#if defined(STA_CFG80211) || defined(UAP_CFG80211)
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
woal_packet_fate_monitor(priv, PACKET_TYPE_TX, woal_packet_fate_monitor(priv, PACKET_TYPE_TX,
ack ? TX_PKT_FATE_ACKED : 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, FRAME_TYPE_80211_MGMT, 0, 0,
skb->data, skb->len); skb->data, skb->len);
#endif #endif
#endif
#endif #endif
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
kfree(tx_info); kfree(tx_info);

View file

@ -565,7 +565,7 @@ static const struct wiphy_coalesce_support coalesce_support = {
* *
* @return MTRUE/MFALSE * @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; t_u8 i;
region_code_t cfg80211_special_region_code[] = { region_code_t cfg80211_special_region_code[] = {
@ -2329,15 +2329,16 @@ void woal_host_mlme_work_queue(struct work_struct *work)
* case * case
* *
* @param priv pointer to moal_private * @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 * @return N/A
*/ */
void woal_host_mlme_process_assoc_resp(moal_private *priv, 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; struct cfg80211_bss *bss = NULL;
unsigned long flags; unsigned long flags;
u8 *assoc_req_buf = NULL;
if (priv) { if (priv) {
if (priv->auth_flag & HOST_MLME_ASSOC_DONE) { if (priv->auth_flag & HOST_MLME_ASSOC_DONE) {
@ -2350,27 +2351,27 @@ void woal_host_mlme_process_assoc_resp(moal_private *priv,
return; return;
} }
if (assoc_rsp->assoc_resp_len) { if (assoc_info->assoc_resp_len) {
PRINTM(MCMND, PRINTM(MCMND,
"HostMlme: %s assoc_resp_len=%d, frame_control=0x%x\n", "HostMlme: %s assoc_resp_len=%d, frame_control=0x%x\n",
priv->netdev->name, priv->netdev->name,
assoc_rsp->assoc_resp_len, assoc_info->assoc_resp_len,
((struct ieee80211_mgmt *) ((struct ieee80211_mgmt *)
assoc_rsp->assoc_resp_buf) assoc_info->assoc_resp_buf)
->frame_control); ->frame_control);
if (ieee80211_is_assoc_resp( if (ieee80211_is_assoc_resp(
((struct ieee80211_mgmt *) ((struct ieee80211_mgmt *)
assoc_rsp->assoc_resp_buf) assoc_info->assoc_resp_buf)
->frame_control) || ->frame_control) ||
ieee80211_is_reassoc_resp( ieee80211_is_reassoc_resp(
((struct ieee80211_mgmt *) ((struct ieee80211_mgmt *)
assoc_rsp->assoc_resp_buf) assoc_info->assoc_resp_buf)
->frame_control)) { ->frame_control)) {
spin_lock_irqsave(&priv->connect_lock, spin_lock_irqsave(&priv->connect_lock,
flags); flags);
if (le16_to_cpu( if (le16_to_cpu(
((struct ieee80211_mgmt ((struct ieee80211_mgmt
*)assoc_rsp *)assoc_info
->assoc_resp_buf) ->assoc_resp_buf)
->u.assoc_resp ->u.assoc_resp
.status_code) != .status_code) !=
@ -2386,30 +2387,39 @@ void woal_host_mlme_process_assoc_resp(moal_private *priv,
} }
spin_unlock_irqrestore( spin_unlock_irqrestore(
&priv->connect_lock, flags); &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) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
cfg80211_rx_assoc_resp( cfg80211_rx_assoc_resp(
priv->netdev, bss, priv->netdev, bss,
assoc_rsp->assoc_resp_buf, assoc_info->assoc_resp_buf,
assoc_rsp->assoc_resp_len, -1, assoc_info->assoc_resp_len, -1,
NULL, 0); assoc_req_buf,
assoc_info->assoc_req_len);
#else #else
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
cfg80211_rx_assoc_resp( cfg80211_rx_assoc_resp(
priv->netdev, bss, priv->netdev, bss,
assoc_rsp->assoc_resp_buf, assoc_info->assoc_resp_buf,
assoc_rsp->assoc_resp_len, -1); assoc_info->assoc_resp_len, -1);
#else #else
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
cfg80211_rx_assoc_resp( cfg80211_rx_assoc_resp(
priv->netdev, bss, priv->netdev, bss,
assoc_rsp->assoc_resp_buf, assoc_info->assoc_resp_buf,
assoc_rsp->assoc_resp_len); assoc_info->assoc_resp_len);
#else #else
cfg80211_send_rx_assoc( cfg80211_send_rx_assoc(
priv->netdev, bss, priv->netdev, bss,
assoc_rsp->assoc_resp_buf, assoc_info->assoc_resp_buf,
assoc_rsp->assoc_resp_len); assoc_info->assoc_resp_len);
#endif #endif
#endif #endif
#endif #endif
@ -2434,14 +2444,25 @@ static void woal_assoc_resp_event(moal_private *priv,
struct woal_event *evt; struct woal_event *evt;
unsigned long flags; unsigned long flags;
moal_handle *handle = priv->phandle; 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); evt = kzalloc(sizeof(struct woal_event), GFP_ATOMIC);
if (evt) { if (evt) {
evt->priv = priv; evt->priv = priv;
evt->type = WOAL_EVENT_ASSOC_RESP; evt->type = WOAL_EVENT_ASSOC_RESP;
moal_memcpy_ext(priv->phandle, &evt->assoc_resp, passoc_rsp, moal_memcpy_ext(priv->phandle, evt->assoc_info.assoc_resp_buf,
sizeof(mlan_ds_misc_assoc_rsp), passoc_rsp->assoc_resp_buf,
sizeof(mlan_ds_misc_assoc_rsp)); 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); INIT_LIST_HEAD(&evt->link);
spin_lock_irqsave(&handle->evt_lock, flags); spin_lock_irqsave(&handle->evt_lock, flags);
list_add_tail(&evt->link, &handle->evt_queue); list_add_tail(&evt->link, &handle->evt_queue);
@ -3477,7 +3498,7 @@ woal_reg_apply_beaconing_flags(struct wiphy *wiphy,
int band, i; int band, i;
t_u32 rule_flags = 0; 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]; sband = wiphy->bands[band];
if (!sband) if (!sband)
continue; continue;
@ -3745,8 +3766,17 @@ void woal_regulatory_work_queue(struct work_struct *work)
moal_handle *handle = container_of(work, moal_handle, regulatory_work); moal_handle *handle = container_of(work, moal_handle, regulatory_work);
struct wiphy *wiphy = handle->wiphy; struct wiphy *wiphy = handle->wiphy;
moal_private *priv = woal_get_priv(handle, MLAN_BSS_ROLE_ANY); 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); 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 #endif
@ -3773,6 +3803,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
#if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 9, 0) #if CFG80211_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
int ret = 0; int ret = 0;
#endif #endif
t_u8 load_power_table = MFALSE;
mlan_fw_info fw_info; mlan_fw_info fw_info;
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
char *reg_alpha2 = NULL; char *reg_alpha2 = NULL;
@ -3841,6 +3872,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
return; return;
#endif #endif
} }
load_power_table = MTRUE;
} }
} }
if (MTRUE != is_cfg80211_special_region_code(region)) { 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) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
reg_alpha2 = priv->phandle->params.reg_alpha2; reg_alpha2 = priv->phandle->params.reg_alpha2;
if ((handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE) && if ((handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE) &&
!handle->params.txpwrlimit_cfg && reg_alpha2 && !handle->params.txpwrlimit_cfg && load_power_table &&
woal_is_valid_alpha2(reg_alpha2)) reg_alpha2 && woal_is_valid_alpha2(reg_alpha2))
queue_work(handle->evt_workqueue, queue_work(handle->evt_workqueue,
&handle->regulatory_work); &handle->regulatory_work);
#endif #endif
@ -3869,7 +3901,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
PRINTM(MCMND, "Regulatory domain BY_CORE\n"); PRINTM(MCMND, "Regulatory domain BY_CORE\n");
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
if (handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE && if (handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE &&
!handle->params.txpwrlimit_cfg) load_power_table && !handle->params.txpwrlimit_cfg)
queue_work(handle->evt_workqueue, queue_work(handle->evt_workqueue,
&handle->regulatory_work); &handle->regulatory_work);
#endif #endif
@ -3878,7 +3910,7 @@ woal_cfg80211_reg_notifier(struct wiphy *wiphy,
PRINTM(MCMND, "Regulatory domain BY_USER\n"); PRINTM(MCMND, "Regulatory domain BY_USER\n");
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
if (handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE && if (handle->params.cntry_txpwr == CNTRY_RGPOWER_MODE &&
!handle->params.txpwrlimit_cfg) load_power_table && !handle->params.txpwrlimit_cfg)
queue_work(handle->evt_workqueue, queue_work(handle->evt_workqueue,
&handle->regulatory_work); &handle->regulatory_work);
#endif #endif
@ -4044,8 +4076,8 @@ static mlan_status woal_uap_scan(moal_private *priv,
woal_sched_timeout(5); woal_sched_timeout(5);
#ifdef REASSOCIATION #ifdef REASSOCIATION
MOAL_REL_SEMAPHORE(&handle->reassoc_sem); MOAL_REL_SEMAPHORE(&handle->reassoc_sem);
#endif
done: done:
#endif
if (role == MLAN_BSS_ROLE_UAP) if (role == MLAN_BSS_ROLE_UAP)
woal_role_switch(tmp_priv, MOAL_IOCTL_WAIT, MLAN_BSS_ROLE_UAP); woal_role_switch(tmp_priv, MOAL_IOCTL_WAIT, MLAN_BSS_ROLE_UAP);
if (band_change) if (band_change)
@ -4083,6 +4115,39 @@ static int woal_find_wps_ie_in_probereq(const t_u8 *ie, int len)
return MFALSE; 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 * @brief check if the scan result expired
* *
@ -4129,8 +4194,6 @@ static t_u8 woal_is_scan_result_expired(moal_private *priv)
return MTRUE; return MTRUE;
} }
woal_get_monotonic_time(&t); 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)) { if (t.time_sec > (scan_resp.age_in_secs + SCAN_RESULT_EXPIRTED)) {
LEAVE(); LEAVE();
return MTRUE; 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)) { if (priv->fake_scan_complete || !woal_is_scan_result_expired(priv)) {
PRINTM(MEVENT, PRINTM(MEVENT,
"scan result not expired or fake scan complete flag is on\n"); "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)); memset(&bss_info, 0, sizeof(bss_info));
if (MLAN_STATUS_SUCCESS == 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); spin_lock_irqsave(&priv->phandle->scan_req_lock, flags);
priv->phandle->scan_request = request; priv->phandle->scan_request = request;
spin_unlock_irqrestore(&priv->phandle->scan_req_lock, flags); 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); scan_req = kmalloc(sizeof(wlan_user_scan_cfg), GFP_KERNEL);
memset(scan_req, 0x00, sizeof(wlan_user_scan_cfg)); memset(scan_req, 0x00, sizeof(wlan_user_scan_cfg));
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) #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 #endif
#ifdef UAP_CFG80211 #ifdef UAP_CFG80211
if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) {
scan_req->chan_list[i].scan_time = if (!woal_is_uap_scan_result_expired(priv))
PASSIVE_SCAN_CHAN_TIME; 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 #endif
} }
if (priv->phandle->scan_request->ie && 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; unsigned long flags;
mlan_ds_misc_assoc_rsp *assoc_rsp = NULL; mlan_ds_misc_assoc_rsp *assoc_rsp = NULL;
IEEEtypes_AssocRsp_t *passoc_rsp = NULL; IEEEtypes_AssocRsp_t *passoc_rsp = NULL;
mlan_ds_misc_assoc_req assoc_req;
mlan_ssid_bssid *ssid_bssid = NULL; mlan_ssid_bssid *ssid_bssid = NULL;
moal_handle *handle = priv->phandle; moal_handle *handle = priv->phandle;
int i; int i;
@ -5017,6 +5098,8 @@ static int woal_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
priv->ft_md = 0; priv->ft_md = 0;
priv->ft_cap = 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); spin_lock_irqsave(&priv->connect_lock, flags);
priv->cfg_connect = MFALSE; 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", "wlan: Connected to bssid " MACSTR " successfully\n",
MAC2STR(priv->cfg_bssid)); MAC2STR(priv->cfg_bssid));
spin_unlock_irqrestore(&priv->connect_lock, flags); spin_unlock_irqrestore(&priv->connect_lock, flags);
cfg80211_connect_result(priv->netdev, priv->cfg_bssid, NULL, 0, cfg80211_connect_result(
passoc_rsp->ie_buffer, priv->netdev, priv->cfg_bssid, assoc_req.assoc_req_buf,
assoc_rsp->assoc_resp_len - assoc_req.assoc_req_len, passoc_rsp->ie_buffer,
ASSOC_RESP_FIXED_SIZE, assoc_rsp->assoc_resp_len - ASSOC_RESP_FIXED_SIZE,
WLAN_STATUS_SUCCESS, GFP_KERNEL); WLAN_STATUS_SUCCESS, GFP_KERNEL);
} else { } else {
PRINTM(MINFO, "wlan: Failed to connect to bssid " MACSTR "\n", PRINTM(MINFO, "wlan: Failed to connect to bssid " MACSTR "\n",
MAC2STR(priv->cfg_bssid)); MAC2STR(priv->cfg_bssid));
@ -6318,8 +6401,10 @@ int woal_cfg80211_resume(struct wiphy *wiphy)
msecs_to_jiffies( msecs_to_jiffies(
ROAMING_WAKE_LOCK_TIMEOUT)); ROAMING_WAKE_LOCK_TIMEOUT));
#endif #endif
#ifdef REASSOCIATION
wake_up_interruptible( wake_up_interruptible(
&handle->reassoc_thread.wait_q); &handle->reassoc_thread.wait_q);
#endif
} }
} }
} }
@ -6383,6 +6468,8 @@ int woal_cfg80211_resume(struct wiphy *wiphy)
done: done:
handle->cfg80211_suspend = MFALSE; handle->cfg80211_suspend = MFALSE;
queue_work(handle->rx_workqueue, &handle->rx_work);
PRINTM(MCMND, "<--- Leave woal_cfg80211_resume --->\n"); PRINTM(MCMND, "<--- Leave woal_cfg80211_resume --->\n");
return 0; 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, DBG_HEXDUMP(MDAT_D, "TDLS data:", pmbuf->pbuf + pmbuf->data_offset,
pmbuf->data_len); 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); status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
switch (status) { switch (status) {
case MLAN_STATUS_PENDING: case MLAN_STATUS_PENDING:
atomic_inc(&priv->phandle->tx_pending); atomic_inc(&priv->phandle->tx_pending);
#if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 29) #if CFG80211_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
index = skb_get_queue_mapping(skb);
atomic_inc(&priv->wmm_tx_pending[index]); atomic_inc(&priv->wmm_tx_pending[index]);
#endif #endif
queue_work(priv->phandle->workqueue, &priv->phandle->main_work); 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); status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
if (status != MLAN_STATUS_PENDING) if (status != MLAN_STATUS_PENDING)
kfree(req); 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: done:
LEAVE(); LEAVE();
return ret; return ret;
@ -9226,7 +9325,6 @@ static mlan_status woal_cfg80211_init_wiphy(moal_private *priv,
mcs_supp = priv->phandle->params.antcfg & 0xf; mcs_supp = priv->phandle->params.antcfg & 0xf;
if (mcs_supp != 3 && mcs_supp != 0) if (mcs_supp != 3 && mcs_supp != 0)
cfg_11n->param.supported_mcs_set[1] = 0; cfg_11n->param.supported_mcs_set[1] = 0;
cfg_11n->param.supported_mcs_set[4] = 0;
} }
woal_cfg80211_setup_ht_cap( woal_cfg80211_setup_ht_cap(
&wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap, hw_dev_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); INIT_LIST_HEAD(&priv->tx_stat_queue);
spin_lock_init(&priv->tx_stat_lock); spin_lock_init(&priv->tx_stat_lock);
spin_lock_init(&priv->connect_lock); spin_lock_init(&priv->connect_lock);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) #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); woal_cancel_cac_block(priv);
#endif #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 CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
if (param) { if (param) {
mac_addr = param->mac; mac_addr = param->mac;
reason_code = param->reason_code; reason_code = param->reason_code;
} }
#endif #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 /** we will not send deauth to p2p interface, it might cause WPS failure
*/ */
if (mac_addr) { 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; pchan_rpt_req->millisec_dwell_time = cac_time_ms;
#else #else
pchan_rpt_req->millisec_dwell_time = IEEE80211_DFS_MIN_CAC_TIME_MS; 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 ((woal_is_etsi_country(priv->phandle->country_code) == MTRUE)) {
if (chandef->chan->hw_value == 120 || if (chandef->chan->hw_value == 120 ||
chandef->chan->hw_value == 124 || 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; IEEE80211_DFS_MIN_CAC_TIME_MS * 10;
} }
} }
#endif
if (priv->user_cac_period_msec) { if (priv->user_cac_period_msec) {
pchan_rpt_req->millisec_dwell_time = priv->user_cac_period_msec; pchan_rpt_req->millisec_dwell_time = priv->user_cac_period_msec;
PRINTM(MCMD_D, 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}, {116, 5580, 1}, {120, 5600, 1}, {124, 5620, 1}, {128, 5640, 1},
{132, 5660, 1}, {136, 5680, 1}, {140, 5700, 1}, {144, 5720, 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}, {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},
}; };
/** /**