Refactor the prints for rx management frames. Do not print beacon,
probe resp and probe req frames in txrx module.
Also remove the beacon print from wlan_cfg80211_inform_bss_frame.
Change-Id: I1dbfcec1614b9465d97c010fa4c386f3a1612f5f
CRs-Fixed: 2381796
In wlan_cfg80211_scan the number of ssid, ssid length and number of
channels are not checked for max size of array and thus can lead to
Out of bound access of memories.
Fix is to add bound check before copying the params.
Change-Id: Ie6d4e546fb9c884d5988493b611ef7b217f0a95c
CRs-Fixed: 2375217
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.
Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
If Vdev id is not present driver tries to get vdev with vdev id 0
from pdev. Vdev with vdev_id 0 might not be present on pdev so use
objmgr API wlan_objmgr_pdev_get_first_vdev to get the first vdev.
Change-Id: I2ae0d6056709339a8167582ec327269aa84c93f4
CRs-Fixed: 2349699
For the case that there is leakage of vdev due to incorrect reference
count usage, and another vdev for the adapter is created, get ref of
vdev by mac address might get the incorrect vdev object since both vdevs
will have the same mac address and the leak one will be first matched
since it is created first.
To address this issue, use vdev pointer in adapter instead of pdev as
input parameter of related functions.
Change-Id: I855497358b5dabf3fc5c0f71a859dd7cae1b450a
CRs-Fixed: 2312155
In a scenario wherein after the sched_scan_start there is a system
recovery and previous pending sched_scan request is lost and during
the sched_scan_stop driver is returning error.
Because of which __cfg80211_stop_sched_scan will not
clear “rdev->sched_scan_req” blocking further sched_scan requests.
Return success in the event that the driver does not have any pending
sched scan to flush.
Change-Id: I6aba88ce033c59ebae54ca792e241a17b649ad73
CRs-Fixed: 2340653
In success scenarios wlan_cfg80211_scan return the qdf status without
converting it to os return status.
Convert the qdf status to os return status before returning in
wlan_cfg80211_scan.
Change-Id: Iee0503191aca371634c9dae9daf15f5aadfe7e2e
CRs-Fixed: 2334591
We are transitioning to new logging infrastructure
by using existing mtrace functionality.
Add new logging for complete scan request and response path.
Change-Id: Iac644a78ef521721d33ce7568be56b47c55fed6b
CRs-Fixed: 2308272
Normally probe request is sent in a passive channel if the
beacon received from the AP. With the strict passive scan
feature, STA doesnot send the probe request even if it
receives beacon from AP.
This can be enabled by using below command.
iwpriv /cfg80211 wifix pas_scanen 1/0
Added a support to send strict passive scan flag to FW in
cfg80211 framework during scan start command.
Change-Id: Ia2c069872541dba64c3d11fc0b533c2d202ee898
CRs-Fixed: 2280181
Add support for Short Range Devices 25 mW max power
channels in ETSI regulatory domain.
Add Short Range Devices 25 mW max power channels only
if DSRC feature is disabled.
Provide service apis to check SRD and DSRC channels.
Change-Id: Ib2a1d7cf191d07319cb29038ad60130f5cbe7f16
CRs-Fixed: 2264790
Vendor abort scan request is cancelling all
the pdev scans instead of a specific scan command.
Modified vendor abort scan API to cancel specific
scan request.
Change-Id: I087637e44b8ee7f6cc12e9e47db04eec3f9ff93e
CRs-Fixed: 2270030
In low memory environments using GFP_KERNEL flag may cause
scheduler thread to sleep. Scheduler thread callback handlers
are expected to be atomic in nature to ensure timely execution
of different commands. Move all allocations done by scan module
in scheduler thread context to atomic allocation.
Change-Id: Iee3eafbc00a3afea0687ba67b3041ec0816094cc
CRs-Fixed: 2232553
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
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
cfg80211_inform_bss_frame_data() takes an extra reference of
bss and it shall be freed by caller.
Change-Id: I6e2a37327fc369d01d237e7ff57221333709b53f
CRs-Fixed: 2205608
In existing code scan queue cleanup is done during radio detach,
leading to access of freed vdev netdev.
Extend cfg80211 scan cleanup API to support netdev level cleanup.
Change-Id: Ice6b6d262788e71c6d229ed7de6ab0e17f270b6c
CRs-Fixed: 2185302
Add support to send the per chain rssi to upper layer
for each beacon and probe responses.
Change-Id: Ife6cb9e8e65591baf485c54a985f84d842400321
CRs-Fixed: 2177638
Move wma_get_buf_start_scan_cmd logic to common code in
ucfg_scan_update_params.
Change-Id: I4c9dcb48b4862ad10f64e260d87938251e270185
CRs-Fixed: 2180960
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
When invoked wlan_cfg80211_cleanup_scan_queue, it will try to clean
up pending scan requests in queue from kernel. However, when the
netdevice is down, this request could be already freed by kernel.
To fix this issue, also add the pointer to netdevice in scan_req
so what we can check the status of netdevice in scan_req instead
of cfg80211_scan_request which might already be freed for this case.
Change-Id: I6189c52b638bc4f408e4d4c694c178c7d2f3de52
CRs-Fixed: 2164404
cfg80211 scan list is not empty during the
scan priv deinit/list destroy because of that
qdf mem module triggered an assert.
Clear the cfg80211 scan list before
destroying the list.
Change-Id: I391d3b91869d085ec6ff405b7ddca37d7002e5ca
CRs-Fixed: 2136702
qcacld-2.0 to qca-wifi-host-cmn propagation
If no SSID are passed to NL80211_CMD_START_SCHED_SCAN cmd,
interface spec requires that an active scan is not needed.
Therefore a passive scan is now requested by cfg80211_sched_scan_request
for this case.
Change-Id: I1b1b9232ffb9d8d5c0bc9a1d75145d39c9fe9e6b
CRs-Fixed: 902092
Commit fb9d5acfed and 645749571d introduce an API to deinit scan
runtime suspend lock in order to fix a memory leak issue. However,
it breaks SSR because scan lock init and deinit are not matching
during SSR which results double free happens in the rmmod after
SSR. Add the API to init scan runtime suspend lock so that it can
be added in the correct place during SSR.
Change-Id: Ied85b16b199fdbf43fef4c966bed56c9f7bb0e86
CRs-fixed: 2120661
On framework initiated scan, ies are not sent in
scan request from upper layer and default scan ies are
not sent as part of scan request sent to firmware. This
results in not including oce ie in probe requests for
framework initated scans
Fix is to copy default ies to ie field in scan request
sent to firmware.
Change-Id: I895563bafc2a2b6e483d08cb28ee44ad34f5af70
CRs-Fixed: 2087124
Versions 4.11+ of the Linux kernel removed '__' from the beginning of
ieee80211_get_channel(). Migrate all calls from __ieee80211_get_channel
to ieee80211_get_channel instead.
Change-Id: I0548259beb59f0a3cb27fe6fee1dd9626cc624cc
CRs-Fixed: 2098795
The 4.12 Linux kernel adds a request id parameter to
cfg80211_sched_scan_results(). Add conditional compilation to provide
the correct parameters based on the kernel version.
Change-Id: I2008895e390af88af0b22df6bfd7ef753d25b419
CRs-Fixed: 2092073
The Linux kernel version 4.12 introduced an API change to nla_parse().
Add conditional compilation to call nla_parse with the correct
parameters based on the version of the linux kernel being compiled
against.
Change-Id: Ie904d217a42a2396f8245251a9c90a15dac2c0c9
CRs-Fixed: 2093354
qcacld-2.0 to qcacmn propagation
Add changes to support PNO scan in connected state to find better Ap's
based on rssi threshold, band and rssi preference.
Change-Id: I0744297cc5269f0fe37613247c911102e293d8e9
CRs-Fixed: 2000342
qcacld-2.0 to qcacmn propagation
Add support to include only selective IEs in probe requests in
order to improve user's privacy.
Change-Id: I59cf4181f60f5b4cd87a32fbcf29160d87ca59c8
CRs-Fixed: 1105495
Runtime PM lock init API right now returns pointer to a context
but this would cause confusion to the caller if feature is not
defined and dummy function return NULL as caller can't find real
failure versus dummy function returning because feature not being
enabled.
Fix declaring a data structure in QDF layer that caller can use
but it hides the internal details of HIF implementation for
Runtime PM locks.
CRs-fixed: 1116509
Change-Id: I4dcba604e803faa0e14fac6403610391895e382e
qcacld-2.0 to qcacmn propagation
Randomize probe request's source address and sequence number to
improve user's privacy.
Change-Id: I265f15476f1a23a268f159a44b6a3e4243fb9068
CRs-Fixed: 1105081
Remove vdev/peer locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.
Change-Id: I9972d51dfd1a42bdedbfd0fd4e67af03d030a1f5
CRs-Fixed: 2060880
Remove psoc/pdev locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.
Change-Id: Ib5769c2234c8d57f485c0eef5a4e3c61fa170508
CRs-Fixed: 2060880
In wlan_vendor_abort_scan(), nla_parse() is invoked without specifying
a policy. This can result in a buffer overread when processing the
QCA_WLAN_VENDOR_ATTR_SCAN_COOKIE attribute. To avoid this issue
introduce a "scan_policy" (replicated from qcacld-3.0) and use this
policy when invoking nla_parse().
Change-Id: Ia3e5cb7535bf0f700399e4a49c9c5da362a3ccf6
CRs-Fixed: 2059857
Filter channels passed to firmware for scheduled/offloaded scans,
when Do_Not_Break_Stream is set.
Change-Id: I36d434b9f7c25ff7de5ccb4d20a2ae41b2712662
CRs-Fixed: 2064380
Add API to deint scan runtime suspend lock, which can be called
before HIF is closed, to avoid crash while acessing HIF pointer.
Change-Id: Ida9269cdaea33a387e2acd1e3d9670d152b6016f
CRs-Fixed: 2065228
Scan event is updated to NL on a closed
wireless dev.
Add validation check at scan event callback
before updating the scan events to NL.
Change-Id: I979b53ecb481007f663feb927b6e3e96cf73616b
CRs-Fixed: 2057127
scan request queue is accessed in multiple
process contexts so added mutex to scan request
queue. Scan request mutex needs to be acquired
before accessing the scan request queue.
Change-Id: I3f0fe0513d5846f4eaf313848f00f86d29a66e35
CRs-Fixed: 2057127
For Network Listen Offload and Perfered Network Offload, the fast scan
period is multiplied by scan_backoff_multiplier after max cycles have
occurred. Expose scan_backoff_multiplier to consumers of the WMI API,
so this parameter can be configured.
Change-Id: I478fb61cd096d3496205f4ff556e180dabf99b77
CRs-Fixed: 2035201
Out of the list of scan channels passed by the application,
if the driver skips some channels, then the frequency list sent to
firmware was not correctly filled.
For example if supplicant passes channels 1, 6, 11 and we want to skip
1 and 6, then "req->scan_req.chan_list[0] = 0,
req->scan_req.chan_list[1] = 0 and req->scan_req.chan_list[2] = 11".
It should have been "req->scan_req.chan_list[0] = 11"
Fixes the same.
Change-Id: Idcef090169b8848c2576e620aa0fbe93918c219c
CRs-fixed: 2053866
Scan results are flushed as part of sched scan start
which could result in subsequent connect to fail as
bss is removed from scan list.
Fix is to not flush scan results as part of sched
scan start.
Change-Id: I0cbc0fb707db0be4890b840b72c8126a7c5ff54b
CRs-Fixed: 2045834