When channel list contains all channels from channel 1 to channel
165 and ch width is 80MHz, the channel to be selected as part of
ACS algorithm should be a 5GHz channel as 2.4GHz channels does not
support 80MHz but 2.4GHz channel gets selected with channel
width as 40MHz. Similarly when ch width is 160Mhz, the 160Mhz bonding
can be made only by 36-64 and 100-128 channels but 2.4Ghz channel or
some other 5Ghz channel gets selected as a result of ACS algorithm.
Assign max weight to all the 2.4GHz channels in 80Mhz and to all 2.4 Ghz
channels and 5Ghz channels not in the range 36-64 and 100-128 in 160 Mhz
so that only a valid channel is selected after the ACS algorithm is
completed.
Change-Id: I00c40e5d000a1cf8b79397fd4e361838a60b363d
CRs-Fixed: 2182011
Current driver is using pld_wlan_set_dfs_nol() and pld_wlan_get_dfs_nol()
directly through eSAP_DFS_NOL_SET and eSAP_DFS_NOL_GET case statements
respectively within HDD module. These methods are obsoleted as per
new driver design.
Use DFS component's utils_dfs_init_nol() and utils_dfs_save_nol() APIs
instead to get and set DFS NOL respectively.
Change-Id: I63e8adac3f99c2052c26e6b01d19071f098e0a4f
CRs-Fixed: 2172024
acs_cfg is not initialized when sap starts
failed. And acs_cfg is accessed during
Random channel selection when sap interface
gets Radar event.
Fix by checking sap ctx state and acs_cfg
During dfs radar event.
Change-Id: I7e04e1a9e357ccd0b39b4edcc4c8a34b54e388ce
CRs-Fixed: 2174532
Currently, when sap starts, it will get the default
country code for the country IE if 80211d enabled.
Using api wlan_reg_read_current_country() instead of
wlan_reg_read_default_country() to get the current
country.
Change-Id: I67e63630c56b17d0d6890704bc1852e40185cf48
CRs-Fixed: 2170425
Currently there is no need to get nol when removing nol from candidate
channel list, because status of nol is set to CHANNEL_STATE_DISABLE in
regulatory.
Remove channels whose status are CHANNEL_STATE_DISABLE when trying to
remove nol from candidate channel list.
Change-Id: I90722116814e837fca456de1b2ef88d8519e9aff
CRs-Fixed: 2180752
When auth failure occures, hostapd will issue BSS stop
command, resulting in BSS peer deleted. After that, auth
frame may still get received, and SAP callback may still
access BSS peer object for remote peer creation, which
results in an assertion.
Add more check points to make sure SAP callback is
handling the peer object addition correctly based on
different status of SAP state machine.
Change-Id: Icdb7ae2db018f16cb60878bda8bab1e791667cba
CRs-Fixed: 2179494
Do not process radar event until receiving vdev start response, because
during channel switch, radar may be detected again in the old channel.
Change-Id: I1a524e38c25f91c684fd2c4962aeaf556d2445eb
CRs-Fixed: 2175891
Use iwpriv command "setRadarDbg" to configure dfs log level because
MCL does not have tools to trigger dfs_control.
Change-Id: I2d7b30b026dfedbf03002463652fead83220fa2a
CRs-Fixed: 2178636
Trim the scan channel list for ACS based on the channel list provided
from user space as part of acs config.
Change-Id: Iaafa6f78098c59782478351e206ae360d50b89bc
CRs-Fixed: 2177457
When radar is found, the current channel is put in NOL list and the state
is set as CHANNEL_STATE_DISABLE.
Currently if channel state is not CHANNEL_STATE_DFS, it will not do channel
change. This is not correct.
Do channel change when radar is found in dfs channel
Change-Id: Iabc8ef5ee92e9d2dc83a95d8fce36a2271ca056c
CRs-Fixed: 2155835
When radar is found, the current channel is put in NOL list and the state
is set as CHANNEL_STATE_DISABLE.
So change the channel state check from wlan_reg_is_dfs_ch to
wlan_reg_is_passive_or_disable_ch
Change-Id: If0595682100746cb12ddb8a1c3ca0106ccd1af21
CRs-Fixed: 2178842
If gDisableDFSChSwitch is configured as 1, channel should not be
switched even radar is found.
Set usenol as 0 when gDisableDFSChSwitch is configured as 1.
Change-Id: I05c4afea3eb9af9c541b2324a2d50ea59c05f7d7
CRs-Fixed: 2178652
Old ch_width is set as invalid after radar detection, and can't be
used anymore. Update sap_ctx->ch_params after channel is selected.
Change-Id: I9e068785312d7072eeaeaa4b1aae4bd82d62d36f
CRs-Fixed: 2178586
For the AP+AP SCC LTE-Coex case, when channel avoidance event
is reported, the channel switch request for SAP will be blocked
by policy manager if the target channel is different with the
operating channel of the existing SAP due to the SCC policy.
Need to update the logic to give higher priority to the channel
avoidance request.
Another change is to move the dfs_radar_found ref counter from
hdd_ctx to hdd_adapter so that the channel switch request of
the 2nd SAP will not be blocked when the 1st one is still in
progress since it might take some time to get VDEV restart
response from FW.
Change-Id: I8594b35b70276f7ed3884697caf69a99ee91b952
CRs-Fixed: 2171958
Currently in SAP cases, logging is huge and hence failure
logs are getting overwritten very fast within 2mins itself.
Fix it to delete the some irrelevant log prints.
Change-Id: I90a77ba9348b84eb7e5c3518391f7c98a04bb39f
CRs-Fixed: 2169101
In the function sap_clear_session_param, sapctx->sessionId can have
value more than max value allowed for the array
mac_ctx->sap.sapCtxList.
Add sanity check for the variable sapctx->sessionId
Change-Id: I846a8a1435de63d0a2e34f23bc407e0a8fa53eb2
CRs-Fixed: 2162255
Configure IEEE80211_CHAN_DFS for DFS channel, otherwise channel changes
does not happen.
Change-Id: I0cfbff43d0fff79ae17f1e96b764d4c213ae2ea1
CRs-Fixed: 2155839
When gApAutoChannelSelection is set to 1 in ini, HOST driver ACS
runs in wlan_hdd_cfg80211_start_bss() with all the channel width,
hw mode and start and end channel parameters overridden with the
values from ini. After scan on all the channels, a weight is
assigned to all the channels based on rssi and no. of BSS present
on that channel. Weights of all the channels not present in the
scan list remains 0 as no scan happened on those channels and so
BSS count is 0 and RSSI is max. As the channel with lowest weight
is selected, channel which is not even present in scan list is getting
selected.
Assign SAP_ACS_WEIGHT_MAX to all the channels not in the scan list so
only one of the channel present in scan list gets selected after ACS
algorithm is completed.
Change-Id: Ic567c412ec7f68e2bb5d12e8e982650e56fd0488
CRs-Fixed: 2164979
When ACS scan fails due to some reason, the default channel will
be configured based on ACS band and channel range config, but
the channel and band configs are not indicated to hostapd in a
proper way.
Add code for fail-safe channel and band config indication to
hostapd when ACS scan fails.
Change-Id: Ibbafbc7b853e753cee5563ab64c12c81c3fe54e2
CRs-Fixed: 2166815
During disconnection process, cache disconnecting STA information
so that the same information is updated to upper-layer on receiving
GET_STATION vendor command, after disconnection.
Change-Id: I2e5a0be42d81b86e6f4490de1bdf9d7e0797506d
CRs-Fixed: 2126182
1) Change some of the parameters for the following two functions
to reflect the right PHY mode definitions at different layers:
wlan_hdd_set_acs_ch_range
sap_select_default_oper_chan
2) Refine the kernel-doc for the above 2 functions due to their
parameter changes.
3) Use eCsrPhyMode instead of uint32_t to define hw_mode in
struct sap_acs_cfg to reflect the right PHY mode definition.
4) Refine the ACS code logic due to the changes introduced above.
Change-Id: I91b7814831a05265cfff456452eef0fe2ef97d1e
CRs-Fixed: 2167355
When ACS is started, acs_cfg.hw_mode in AP context will
be set after mapping from values defined in enum
qca_wlan_vendor_acs_hw_mode to values defined in enum
eCsrPhyMode, but when ACS scan fails due to some reason,
such as scan timeout, the code in function
sap_select_default_oper_chan is still using values
defined in enum qca_wlan_vendor_acs_hw_mode to setup
the default channel.
Change the code in function sap_select_default_oper_chan
to use the values defined in enum eCsrPhyMode when
setting up the default channel.
Change-Id: Ic0d43c43bf9b9a9a36c290d2754c30ebb40bb0e3
CRs-Fixed: 2163658
Add null pointer validation and fix possible buffer overflow issue
in sap module.
Change-Id: I314e07a31368dd3ca854b9aeab4a0bce0402a81b
CRs-Fixed: 2162246
In the api sap_get_channel_list, list is allocated memory to store the
channel list to be sent for scan request. This api is called by
sap_goto_channel_sel which initializes scan_request.ChannelInfo.ChannelList
to channel_list, without any prior NULL check of channel_list.
Also in scan callback wlansap_scan_callback, if the state machine structure
is in disconnected state , the host returns without freeing the memory
allocated to the channel list in sap_ctx .
Fix is to free the memory allocated to the channel list
and make the sap_ctx->channellist, sap_ctx->num_of_channel
as NULL and zero respectively in both the instances.
Change-Id: Ia54287d6e77e206c717bd3c205ebe57510ea801c
CRs-Fixed: 2159489
In function add missing check for regulatory domain before assuming
channel 120-130 to be ETSI weather channel.
Change-Id: Ief9761b5ac06a511a4132f71c0a63c796741149d
CRs-Fixed: 2150264
Reset the sap configuration ie while stopping the adapter in
the sap mode to avoid memory leak.
Change-Id: I5b47afe561430fcb3f508820bc74c28b56d28b3c
CRs-Fixed: 2123524
Remove unused dfs code from qcacld-3.2 project as dfs
code moved to cmn project.
Change-Id: I21a8e5a39df9241544ef53baf42d3aa0ba434636
CRs-Fixed: 2133649
Current open and close session APIs mainly defined in HDD, SME, and SAP
modules are not proper. They require some design changes to maintain the
consistency.
In order to achieve the goal of making symmetrical design for open and
close session logic, refactor existing API in SAP module.
CRs-Fixed: 2147969
Change-Id: Iccc5ddd2b14ec2b27e6746a211edd10ec06ad434
wlansap_open(), wlansap_close(), wlansap_start(), and wlansap_stop()
APIs are not doing what their names' suggest. Rename these APIs such
a way that they reflect the true meaning of it.
Introduce two new APIs to create and destroy the sap context.
CRs-Fixed: 2147974
Change-Id: Ie0475df480d1b19e796ddf3b639de3078a5a61a0
In set default key operation module, under SAP mode, there are
conditional checks on key type information derived from the
Station's context. Also in get/add key operations SAP or STA
context pointers are derived without knowing the device mode
first, which is incorrect.
Derive key type info from SAP context in set default key and
derive station or sap context pointers only after knowing the
device mode.
Change-Id: I09b0e6f8d6315677e7584c7c24f003daa3eca9a3
CRs-Fixed: 2127288
Stop bss request is dropped during the
channel change request and it is causing
IPA disconnect event not to sent to IPA
module.
Process stop bss during channel change
request so that IPA disconnect is sent
to IPA module.
Change-Id: I41bb3c0d5ba9f9e9b3a655b67d126ee34c777f4d
CRs-Fixed: 2134143
Add support changes to fix compilation failure due to change in
scan req structure due to wide band scan changes in scan module.
Change-Id: I9ae1584fa3289fd97c5adf8708db731ae91848ab
CRs-Fixed: 2137835
Change "qcacmn: Rename enum tQDF_ADAPTER_MODE" (qca-wifi-host-cmn
Change-Id I20f1b6d1a0ab4b8fe6a85cefdff96a49e2f4652c) renamed enum
tQDF_ADAPTER_MODE to QDF_OPMODE. Update all references to use the
new name.
Change-Id: Ic6f663dac11a100f168b2626c7c0fbcaccbfca4f
CRs-Fixed: 2141065
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The tCsrRoamInfo typedef does not
meet any of those criteria, and the underlying struct is already being
used in some places, so replace all remaining tCsrRoamInfo references
with a reference to the underlying struct.
Change-Id: I1da4b04ec92e176fe28b33d30ec7823828c35c8d
CRs-Fixed: 2140349
Per the Linux coding style "mixed-case names are frowned upon" so
rename struct tagCsrDelStaParams.
Change-Id: I60d6448f4bae15e604a8ea55e72a6070a6ebdfbe
CRs-Fixed: 2140346
qcacld-2.0 to qcacld-3.0 propagation
Reduce the beacon interval just before the channel switch.
This would help in reducing the downtime on the STA side which
is waiting for beacons from the AP to resume back transmission.
Switch back the beacon_interval to its original value after
the channel switch based on the timeout. This would ensure
there are atleast some beacons sent with increased frequency.
Change-Id: I37db52713d9e2c78abbb97a7cd0274d9da35bfd2
CRs-Fixed: 1094958
qcacld-2.0 to qcacld-3.0 propagation
Send one action frame along with each beacon tx to reduce failure
of channel switching on sta side.
Change-Id: Idbbe1a4bcb4976101680974214fe85d9886ba7d1
CRs-Fixed: 1094958
Cleanup legacy scan request processing
from HDD and SME api to process the same.
Change-Id: Ic160dfafcfa015eb42a226304260b1be3dddc6f0
CRs-Fixed: 2136149
"qcacld-3.0: Remove support for eWNI_SME_GET_WPSPBC_SESSION_REQ"
(Change-Id: Ia95c4911600a45d1004b9e6148b1b04f414e2475) removed the
only function which sends eSAP_GET_WPSPBC_SESSION_EVENT. Since this
event is obsolete, remove it.
Change-Id: I9d83f66bce4ec66bc131747254a45d8b6afb5cbb
CRs-Fixed: 2134951
Current driver is not having wlansap_open() and wlansap_close()
symmetrical and same goes for wlansap_start() and wlansap_stop()
which may create confusion in understanding.
Create a symmetry and clean-up any unnecessary data-structure.
CRs-Fixed: 2135995
Change-Id: I2c3b96e1f2ee44c9f1158108d4b5e48495222080
While selecting P2PGO channel in sap_goto_channel_sel(), force SCC
if there is STA + P2PGO concurrency AND gWlanMccToSccSwitchMode!=0,
This makes behaviour similar to STA + AP concurrency.
Change-Id: Ib80a36c22432791c5466b68b625373c58e4c8206
In AP + STA case allow MCC if the STA's channel
is DFS or passive or part of LTE avaoidance channel list
Change-Id: Iece69bf5d70d5e2ed9f9505a72c7a40f35d11b75
CRs-Fixed: 2127091