Default scan type is configured as non-dbs
mode because of that scan is taking longer
duration to complete.
Modified default scan type to DBS.
Change-Id: I7f274ea34780b196fa0269968cb8ad76ee239c9f
CRs-Fixed: 2239341
Dereference vdev object only after validation check to
avoid null pointer derefernce in ucfg_scan_get_pno_def_params()
API.
Change-Id: I88e9a206ef0a948c4b2e35b05ffd74aee82e2961
CRs-Fixed: 2232809
In some environments its found that IE's received are not
as expected and console gets flooded with pare failure prints.
Move these prints to debug level.
Change-Id: Ic25bdff65f340f47179a7ac6dd79731b80c805ff
CRs-Fixed: 2232553
Add scheduler message handler function for QDF_MODULE_ID_SCAN queue.
Also post scan beacon/probe frames and scan events to SCAN queue instead
of TARGET_IF queue.
Change-Id: I94e3ea2f0eb5c9592f5cfcd91738778fa65ba815
CRs-Fixed: 2214554
Remove inconsistent API for scan start and stop, where pdev_wmi_handle
is derived from psoc_handle at the WMI layer instead of using
the wmi_handle passed from the above layer i.e target_if
Change-Id: If259260e6f8cf77bf68748a8130db4440b88588a
CRs-Fixed: 2203048
Currently bool is used to check if scan node is active or not, and
if it is active the deletion can happen. Now if two thread tries to
delete the same node at same time, the first one to get the node
will delete the node and set the active bool to false. If the
delete operation leads to node being freed, the 2nd thread when gets
the lock tries to check the bool, if node is active and then return
if node is not active.
Now if before the 2nd thread check the bool, the memory is reallocate
and the byte pointing to the bool is overwritten with non-zero value
the 2nd thread will assume that node is still active and try to delete
and access an already freed node.
To fix this use cookie instead of bool to check if scan node is active.
Change-Id: Id6b9dc9d0ff8f091eef0bd648abc9d3198c3ad4b
CRs-Fixed: 2219667
For 4.9GHz, firmware converts the frequency to old regulatory channel
numbers and sends it to host. But host uses new regulatory channel numbers.
Since the received fw channel and beacon channel number is different,
host drops the received beacon and scan entry doesnot get updated.
As a temporary fix, bypass the beacon mismatch check in host.
Change-Id: Ib3e6b7b39ef2feaa1bcf0e0b16a702caccbf6744
Send correct channel list to Firmware. When cfg80211 is enabled, STA
is scanning in a set of wrong channels. When scan callback happens
from cfg80211 module the cfg80211 module gives us the channel numbers.
There are some channel numbers which are same in both 5GHz and in
2.4Ghz bands. For example, channel number 1 maps to frequency 4942MHz
in 5GHz band, but in 2.4GHz band channel number 1 maps to frequency
2412MHz. So cfg80211 may give us a wrong channel number. Since we have
the exact frequency of the channel we should use that instead of the
one given by cfg80211.
The channel object given to the driver by cfg80211 during scan callback
is the same as the one registered to cfg80211 by the driver. So we can
use the channel frequency inside the channel object for scan which is
not changed by the cfg80211 module.
Use regdb function to convert channel number to frequency while receiving
scan entries from FW. Use pdev band (5/2.4GHz) information to map to
correct 2.4Ghz/5Ghz channel frequency.
Half/Quarter rate flags in the scan_ctrl_flags are not set. Set
Half/Quarter rate flags in scan_ctrl_flags.
Change-Id: I9df8f0e90938f86f6987574f8259a5cf66b672aa
CRs-Fixed: 2180273
Some times we need to scan only some pre configured
channels irrespective of channels requested in scan
start command.
Add support for pre specified list of scan channels
and scan only these channels if configured.
Change-Id: I7fa9ef9d626fd25d7855a7eb458818d8e2314fa5
CRs-Fixed: 2218494
During module stop, scan db is cleared before scheduler thread
stop, new beacon can be handled and scan node still can be added
into scan db after scan db clear in race condition, result in
mem leak.
Fixed by moving scm_db_deinit from ucfg_scan_psoc_disable to
ucfg_scan_psoc_close, which is called after scheduler thread
stop
To be symmetrical, move scm_db_init from ucfg_scan_psoc_enable
to ucfg_scan_psoc_open.
Call stack:
hdd_wlan_stop_modules
->hdd_deconfigure_cds
->cds_disable
->dispatcher_psoc_disable
->ucfg_scan_psoc_disable
->scm_db_deinit
->cds_close
->dispatcher_disable
->scheduler_disable
->dispatcher_psoc_close
->ucfg_scan_psoc_close
scheduler_thread
->scheduler_thread_process_queues
->scheduler_target_if_mq_handler
->target_if_msg_handler
->scm_handle_bcn_probe
->scm_add_update_entry
->scm_add_scan_entry
Change-Id: I911751a247ae3ccb489755c30ffbe078a93ca4db
CRs-Fixed: 2205354
Process scan event for 11d only if event indicates completion. Else in
case of dequeue due to failure or timeout will also cause scan event
handling for 11d which might have undefined effects.
Change-Id: I9d3599a9c60bccebea8ded9922dd3ddf995d8d61
CRs-Fixed: 2210347
Set the range of score index to 1-15 as 0 is used for the AP
which does not advertise the OCE WAN. Also if OCE WAN downlink
capability is 0 return 0 score.
Change-Id: I8c6757458c542050a6a31cb03fad0ce17d60aa16
CRs-Fixed: 2208282
Connected AP scan entry is aged out if beacon
is not recieved within scan age out time.
Update mlme information of the connected AP/BSSID
scan entry so that scan age out hanlder will not
age it out even though the last beacon recieved
time is greater than the configured scan age out value.
Change-Id: I14c68c28459080623ca62c0bad9052e38d7fb348
CRs-Fixed: 2183379
Add ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN option for the ini
gDualMacFeatureDisable. To enable DBS support for the
connection and disable DBS support for the scan.
Change-Id: I05c613467195fffac98e79b7e4a2991471ac1d80
CRs-Fixed: 2207820
Based on the scan request flags from kernel, modify the
adaptive dwell time and DBS scan request policy.
In high accuracy mode, disable DBS scan and adaptive dwell
time scan mode.
In a low power/span mode, enable aggressive adaptive dwell time
and DBS scan to save power and time.
Change-Id: I23498799c05a252cbc9c9f6d50b847130dd0ceac
CRs-Fixed: 2197171
Propagation from qcacld-2.0 to qcacmn
Missing changes from Ibcc628c315201fa3ced7e1ad96753772d91707b2
Currently to get clock boottime, qdf_get_monotonic_boottime_ns
api is getting used which does not include the suspend time.
To include the system suspend time also in clock boottime, use
qdf_get_bootbased_boottime_ns api which uses ktime_get_boot_ns
kernel api.
Change-Id: I4a9a783ce0cc164404d89c23d57b02746154aa46
CRs-Fixed: 2203527
Scan node del API is modified to check refcnt before
deleting node. Mark node delete with scan node del before
releasing ref to avoid get ref
Change-Id: I1cde576cd47eb4effe8af38c2d77f02a21349dfb
CRs-Fixed: 2208987
Detach scan start request object from serialization object
on release memory callback. It's requred as some times
serialization ends up calling callback funtcions even after
calling release memory command due to race conditions.
Change-Id: Id0f74032de40bad679c27fe3e5ab1bf83e6dfcf5
CRs-Fixed: 2208227
Use proper macro to check if channel is 5Ghz while calculating the
band scoring logic for 5Ghz channels.
Change-Id: Ib394f3ed0db6c64286a44b15c38fa3ffdcf8bdfb
CRs-Fixed: 2205658
Add an API for inserting new scan node before duplicate node
and modification in API to flush oldest entry in SCAN database.
Change-Id: I76018c994ad16f7fb1e52bceafacd82f78f756e5
CRs-Fixed: 2168481
In testbed sta mode the RSNE enc type and auth type may not match the
AP's enc type and auth type and thus the scan filter is unable to match
and find the AP.
Introduce auth and enc type as "ANY" in scan filter. With the auth
and enc type set as ANY, all the AP's matching the BSSID and SSID
will be filtered and the negotiated auth and enc type will be
dependent on AP's auth and enc type.
Change-Id: I82f07f68d9ec6c6f2104122a05d06a698c61a50a
CRs-Fixed: 2197222
With IE length sanity check, that involved by Change-Id I9a091486,
11ax AP cant be found due to the addition of +1 byte in HE-operation
IE in latest spec of 11ax (D2.2).
Remove all 11ax extended capability IE length checks for now due to
11ax being under development.
Change-Id: I45d676325c72c8e0020ca52d094fb1652f8fcaf2
CRs-Fixed: 2197252
In scm_handle_bcn_probe, scm_add_update_entry is called before
inform_beacon(wlan_cfg80211_inform_bss_frame).
Once scan entry is added to db, there is race condition that other
threads may remove it from db before wlan_cfg80211_inform_bss_frame
is called. Thus freed memory will be accessed in
wlan_cfg80211_inform_bss_frame.
To fix call inform_beacon(wlan_cfg80211_inform_bss_frame) before
adding the entry to scan DB and after updating required fields
from duplicate older entry.
Change-Id: Ib6dd967da9625ce944bffda5037b689ffd70903a
CRs-Fixed: 2197238
Add support to send the per chain rssi to upper layer
for each beacon and probe responses.
Change-Id: Ife6cb9e8e65591baf485c54a985f84d842400321
CRs-Fixed: 2177638
In testbed STA mode the RSNE may not match with APUT and thus
driver fails to filter AP from scan cache as PMF capability
mismatch.
With this change driver will ignore PMF capability check and
proceed with connection to send auth and assoc to APUT.
Change-Id: I195cda133c8d2b9d38b1d2966261c320185ffeca
CRs-Fixed: 2195352
Add support to drop beacon, probe response frames if frame
receipt channel and channel mentioned in IEs dont match.
Change-Id: Ib545f125dc53ccfb21abf6bdcb94a327ecde5a0a
CRs-Fixed: 2149224
scan entry raw data length is not populated
during the duplicate scan entry generation.
Copy raw data length to new scan entry
while duplicating the scan entry. This api
is triggered as part of the get scan results
handler.
Change-Id: Ie59782fd437415552b7ae29c1b190e86d4b72d48
CRs-Fixed: 2186845
Invoke beacon update callback function before adding new entry
to scan list. It's required as get_scan_result API will end up
returning partially initialized scan entry.
Change-Id: Ia34f9c69b4eef2435b135912e06c39018a8987b8
CRs-Fixed: 2189783
Currently there is no individual length check to each IE, which
could probably result in buffer overead. Minimum length should
be checked for each varibale IE for avoid the same. Also some fixed
IEs should have a length check of not greater than the size of
their respective structures to avoid corrupting other IE data.
Fix is to add a length check to each individual IE to avoid
corrupting other IEs and also to prevent reception of any IE
of invalid length IE.
Change-Id: I9a0914861d7ff2871ac72ad7357ebbb7ef10eeb3
CRs-Fixed: 2183014
1. Enable scan command time out for all commands if not disabled
explicitly.
2. Remove QDF_BUG() for no serialization command buffers
Change-Id: I5357211ef6bc44f8ebd4b8acaa56a12f691fa46d
CRs-Fixed: 2175843
OWE SSID is hidden in OWE transition mode. When supplicant detects
connection to OWE transition mode, it issues connect with required
SSID to driver. But that ssid does not present in driver scan cache
as it is hidden. Instead of this ssid, driver scan cache has NULL
entry. This can result in connection failure due to mismatch in ssid.
In normal hidden ssid cases, supplicant issues scan with specific
ssid which helps to update driver scan cache with required ssid. SSID
is also hidden in OWE transition mode, but supplicant does not issue
scan with specific ssid which results in NULL entry in driver scan
cache for that SSID.
Fix this issue by explicit check for OWE if it is hidden.
Change-Id: I95e6b9af37e62c56b4b890090c33d53f89fed731
CRs-Fixed: 2185576
Move wma_get_buf_start_scan_cmd logic to common code in
ucfg_scan_update_params.
Change-Id: I4c9dcb48b4862ad10f64e260d87938251e270185
CRs-Fixed: 2180960
Support 11d for non-offload platform by maintaining
count of beacons encountered for each country code
and choosing country code with max votes as device's
country code.
Change-Id: I83b66e980854eded17e254386561fa32b1f8c4ac
CRs-Fixed: 2154048
When wide band scan is enabled, host configures all possible
channels with all possible phy modes. In his case if a scan
is invoked with 0 channels, target will end up scanning each
channel with all possible phy modes which increases scan time
exponentially.
If wide band scan is enabled and scan is issues with 0 channels,
configure target to scan all available channels only in 11A/11G mode.
Change-Id: I7c678ccf43c3238aacbfc59cc7e7bd19763453cc
CRs-Fixed: 2165025
Do command complete before invoking scan event handlers.
Its required as few scan event handlers check if scan is
active on underlying pdev which returns true as command
complete is not done yet.
Change-Id: Ia415b55e9c9a1cea71faa160c6b52c88dc8329a9
CRs-Fixed: 2180033
Due to Rx sensitivity issue, sometime beacons are seen on adjacent
channel so workaround in software is needed. If DS params or HT
info are present driver can get proper channel info from these IEs
and set channel_mismatch so that the older RSSI values are used in
new entry.
For the cases where DS params and HT info is not present, driver
needs to check below conditions to get proper channel and set
channel_mismatch so that the older RSSI values are used in
new entry:
-- The old entry channel and new entry channel are not same
-- RSSI is less than -80, this indicate that the signal has
leaked in adjacent channel
Change-Id: Ie9dc26f938b58b0c5d071ce4f2ba02b8e7fd4f60
CRs-Fixed: 2180012
For each scan node in db, real delete should be called only once.
If 2 threads are trying to delete a note, only one thread should
mark it delete and decrement the ref count and the other thread
should return. or use after free happens as some other thread is
still using it.
Change-Id: I8cfaea73f28f31406816c9fb38f6b65f6b50428d
CRs-Fixed: 2169890
Pass back scan start request in scan events so that
handlers can know parameters used to start underlying scan.
Change-Id: I8ca3d55edb266677cc636228919656baa12b43d9
CRs-Fixed: 2159700
With gcc 5+ utilized for driver building, more coding errors are
detected, some of which are valid issues.
Fix all those errors in one shot.
Change-Id: I263c70d4bff9ec0c3076103001cd7f2ccc8e0d1a
CRs-Fixed: 2176076