Графік комітів

262 Коміти

Автор SHA1 Повідомлення Дата
Abhishek Singh
3d7143dc0e qcacmn: Add debug log in case BSS is filtered out due to freq list
Add debug log in case BSS freq is not matching the freq list
provided in scan filter.

Change-Id: I00da614f4a5b4fdf58122cf2750afe5c03114536
CRs-Fixed: 3035787
2021-09-15 06:13:11 -07:00
Kiran Kumar Lokere
e2ada05cee qcacmn: Config support to use BSSID in probe request RA
User configuration support to use scan request BSSID value
in Probe Request frame RA during the scan.

Change-Id: I40d07e4c3e4814a9c816b3e426dcbb63df7ddf27
CRs-Fixed: 2945679
2021-08-27 01:06:23 -07:00
Will Huang
64d063094f qcacmn: Change beacon drop log to rate limit log
Although beacon drop info is important, but if continually print with
info level it will flood serial log and lead to low performance.
Security mode check is mandatory in 6Ghz band, so it is by default
enabled, so possible to see many beacon drop log because of this check.

Change beacon drop log to rate limit and fix one potential memory
leak in __scm_handle_bcn_probe().

Change-Id: Ic9032b99504d6ff41256d547e2d8fad101301589
CRs-Fixed: 3014786
2021-08-27 01:06:19 -07:00
abhinav kumar
a368b81e70 qcacmn: From connection manager filter only ESS type of AP
ESS (Extended Service Set) operating mode allows wireless
device to roam anywhere within the area covered by multiple
APs.

IBSS (Independent Basic Service Set) allows wireless device
to connect in peer-to-Peer mode only.

Fix is to allow connection manager module to filter only
those AP(s) which is/are part of ESS network.

Change-Id: I9536557daa624b9e44505efa0e0720e47b645517
CRs-Fixed: 3015220
2021-08-19 11:30:39 -07:00
Mohammed Ahmed
c775b5586a qcacmn: Fix incorrect layering in scan component
Replace ucfg api call with wlan api calls for internal components.

Change-Id: I0289bf44753d3692468a12fbe7109e348c8e8957
CRs-Fixed: 3011167
2021-08-19 02:14:11 -07:00
Deeksha Gupta
7f738b2118 qcacmn: Add min 6G scan dwell time in scan request command
Add min 6g scan dwell time parameter in scan request command.

Change-Id: I34d806399df0fdee9d1b9e3a0a8212d76db062d8
CRs-Fixed: 2984813
2021-08-05 06:18:58 -07:00
nakul kachhwaha
b8f59509d0 qcacmn: Add runtime pm support for PNO
NLO complete events were not received as
host is in runtime pm suspend state and thus
scan results were not sent to supplicant to
trigger re-connection. Add code to prevent
runtime pm suspend on receiving NLO match event
and resume Runtime PM on receiving NLO complete
event from firmware.

Change-Id: Iab91fb88fff3394ce5629be1eb6adc911a673b58
CRs-Fixed: 2954994
2021-06-14 09:12:17 -07:00
Gururaj Pandurangi
5ca913646e qcacmn: Exclude 6GHz APs in VLP from scan list for US
If STA country code is US and 6G AP country IE is other than
US, STA would use VLP mode. Since US VLP is not determined
we don't allow connection to go through. Additionally, don't
include such AP to scan result.

Change-Id: I41b0c7dbea681b2ef1bea7c0a572ee1d7248fa6e
CRs-Fixed: 2953248
2021-06-04 00:28:40 -07:00
Amruta Kulkarni
2ea97ac985 qcacmn: Change file names to cfg_*.h
Change file names from wlan_cfg_*.h to cfg_*.h

Change-Id: Id89dc307c08fc55f1777794453f2168755b5506d
CRs-Fixed: 2856372
2021-05-19 01:25:56 -07:00
Amruta Kulkarni
2b7f792138 qcacmn: Add new assoc and nonassoc ini for 6g scan
Add new ini's for assoc active and passive dwell time
for 6g. These will be applied if STA is connected.

Change-Id: I680fbd3038968ecf6ff9920fff982456135bfd77
CRs-Fixed: 2941359
2021-05-11 13:22:26 -07:00
Guisen Yang
3516552a3c qcacmn: Disable obss scan before suspend
When obss scan is enabled, FW will trigger scan periodically by
a timer. If a scan was triggered, FW need to access host memory
for data transfer. Occasionally, suspend may happen during one
scan, then FW is unable to access host memory and fw will crash.
So disable the obss scan before suspend.

Change-Id: Ie507da929a3701473cb57888e96e702e34d4c95a
CRs-Fixed: 2927239
2021-05-10 04:06:03 -07:00
Utkarsh Bhatnagar
46a4d7c734 qcacmn: Configure Default DBS scan for DBS HW
Previously, for high accuracy scan,
configured scan policy SCAN_DBS_POLICY_FORCE_NONDBS
takes  more time to scan.
For DBS HW, to improve scan time, this should be
changed to SCAN_DBS_POLICY_DEFAULT.

Change-Id: I692e2a8b4fd9c97b526197edc57b830fa091a456
CRs-Fixed: 2927022
2021-04-29 04:37:51 -07:00
Kiran Kumar Lokere
eb4b6bf958 qcacmn: Update the security check mask for 6GHz AP
Update the security check mask value for 6GHz AP.

Change-Id: I8d9637a95c6191124372a7bdba119837e6553ed4
CRs-Fixed: 2930941
2021-04-28 16:42:04 -07:00
Kiran Kumar Lokere
10ec6a98fd qcacmn: Fix the issue with OWE AP scan in 6GHz
Check the RSNXE IE presence only for SAP key mgmt type.

Change-Id: I3c9df627589e351a30dc9899ccaa7f24e9516965
CRs-Fixed: 2924842
2021-04-22 19:43:28 -07:00
Srinivas Dasari
f08cb9d934 qcacmn: Don't optimize 6g channels in case of RRM scan request
Currently, scan requests are optimized to trim 6g channels based
on the ini params scan_mode_6ghz and scan_mode_6ghz_duty_cycle.
But RRM scan request comes to host driver with a fixed set of
channels and the expectation is to scan all supported channels
out of these.

Don't consider scan_mode_6ghz_duty_cycle to optimize the
channels in case of RRM scan request. Thereby no 6g channels
would be trimmed.
Ini param "scan_mode_6ghz" is still honored if it's set to
"SCAN_MODE_6G_NO_CHANNEL", which filters out all 6g
channels from the scan request.

Change-Id: I960ac2c68f8d291209acc1c59d2f5b9076f042d7
CRs-Fixed: 2913913
2021-04-08 08:47:33 -07:00
Kiran Kumar Lokere
dfb42ec511 qcacmn: Drop the invalid 6GHz security beacon from scan result
Validate the 6GHz AP beacon in the scan result for valid security
if user enables the 6GHz security checks.
Drop the beacon from scan result if valid security is not found.

Change-Id: I6e02e77cc996b4f4fb7dc7a1678990419a51c79e
CRs-Fixed: 2904741
2021-04-02 15:03:28 -07:00
Gururaj Pandurangi
2c8a3ddd35 qcacmn: Add message to print off-channel timestamp
Add a log to print off-channel timestamp to verify
off-channel time.

Change-Id: I6b105a7114d372a9d8f9d6f78c601455180df775
CRs-Fixed: 2895189
2021-03-11 09:48:41 -08:00
Shiva Krishna Pittala
a577961e92 qcacmn: Optimize scm_age_out_entries()
To check if a scan entry is a non-Tx VAP of our connected BSS, the current
implementation of scm_age_out_entries() searches through all scan entries
to find out our connected BSS. This check takes O(n) time where n = number
of scan entries. Running this check in the main loop of
scm_age_out_entries() results in an overall time complexity of O(square(n))

Time complexity can be improved if we do one iteration over scan entries
to find out our connected BSS, and save it in a local variable, and then
use that local variable in the main loop of scm_age_out_entries().
With this approach, we just do two iterations over scan entries
instead of nested iterations.

CRs-Fixed: 2877884
Change-Id: I51be764f4aa6f65ba9068d46eaa42791ac0f8d97
2021-02-23 10:52:04 -08:00
Ashish Kumar Dhanotiya
4ea435bd55 qcacmn: Add an ini to ignore user configured sched scan params
Currently there is no mechanism in driver to decide whether
to consider the user configured number of sched scan plan or
to configure only 1 schad scan plan.
There is a requirement to configure only one sched scan plan,
add ini support to meet this requiremet.

Change-Id: Iea3bc3f18696837150ce6f4bd60416a8a45bd1d3
CRs-Fixed: 2868125
2021-02-10 12:31:49 -08:00
Abhishek Ambure
35135ea9a1 qcacmn: Fix the FILS params set
Host updates proper FILS param set i.e. username, auth_type and
is_fils_connection in the FILS response.

Change-Id: I0c30325bc7d620aa286aae0dd299dec9b26219ff
CRs-Fixed: 2865060
2021-01-29 08:17:50 -08:00
Deeksha Gupta
819a3a5888 qcacmn: Fix out of bound read issue in FILS Indication IE parse
When parsing FILS Indication IE, the data pointer is not
validated while moving the pointer which may cause
out of bound issue.

Validate data pointer before moving pointer.

Change-Id: Ib20f78fe58d7a4c8f9245e6b8d28212499cc6f50
CRs-Fixed: 2842475
2021-01-19 21:16:06 -08:00
Srinivas Dasari
82acedd149 qcacmn: Copy flags also when the 6g channels are sorted
Currently, 6g channels are sorted based on the weightage of each
channel. Frequencies are sorted but the flags associated to each
channel are not updated properly. So, channels carry invalid
flags to firmware and firmware may miss to scan few 6g channels
based on these flags and may scan few 6g channels unnecessarily.
Copy flags also while sorting frequencies to maintain the flags
of each channel as it is.
Also, change the type of phymode to enum scan_phy_mode
from uint32_t.

Change-Id: I0a2330faab1b738f2d7eff3d39ccbfffd51dfde0
CRs-Fixed: 2840029
2020-12-31 10:37:37 -08:00
Srinivas Dasari
865573d455 qcacmn: Possible buffer overflow while copying rnr info
A temporary variable "temp" is declared to use it while sorting
the channels based on the weightage/rnr info. This is declared
as a pointer to hold the reference of struct rnr_chan_weight but
memcpy is done to this without allocating memory.
Declare this as a variable instead of pointer to use it as an
intermediate variable for sorting.

Change-Id: If619f5fa462d5400f0a77e57317ac3c8debb34a5
CRs-Fixed: 2842819
2020-12-31 10:37:32 -08:00
Jyoti Kumari
438c1832b3 qcacmn: Don't optimize 6g channel list in first full scan request
Currently, 6g PSC/non-PSC channels in the scan request are
scanned or optimized to scan only if RNR IE is found based on
the inis scan_mode_6ghz and scan_mode_6ghz_duty_cycle.
As scan_mode_6ghz_duty_cycle is set to 4 by default, first 3
scans are optimized to scan only if RNR IE is found and 4th scan
would be full scan. If there is any standalone AP in 6g channel
that doesn't advertize RNR IE in colocated APs beacons/probe
responses, that's not scanned till the 4th scan.

Reverse the order for scan_mode_6ghz_duty_cycle such that the
first scan of every four scans is a full scan and rest of the
three scans are optimized. So, the standalone 6g APs can be found
in first scan itself based on the ini scan_mode_6ghz.

Change-Id: Ice1614a94f1fd166e283355616ace241a5df2bcb
CRs-Fixed: 2829550
2020-12-21 01:34:35 -08:00
Wu Gao
2f09a8e245 qcacmn: Fix memory access out of bounds when sort 6g channel list
In arch 32 platform, the size of rnr_chan_info is 8 bytes, and it only
allocates 4 bytes for each of them. Which cause memory access out of
bounds.

Change-Id: I4f1798c5354c6a76e32bdfed13ade9667465b789
CRs-Fixed: 2827289
2020-11-30 01:24:06 -08:00
Jyoti Kumari
bd99f03445 qcacmn: Drop remaining IEs if any corrupted IEs are present
Scan entry fails if any coruppted IEs are present

Introduced new ini parameters to enable scan based on ie
corruption. If ini parameter is enable then scan module skips
all IEs following coruppted IEs and adds scan entry without
completely dropping the frame. Otherwise if ini parameter is
disable then scan entry fails on corrupted ie.

Change-Id: If17b68448dd3e6ac3e98ed854ed67d7f16d9dff7
CRs-Fixed: 2806932
2020-11-24 10:55:46 -08:00
Abhishek Singh
1853c161d2 qcacmn: Add logic to ignore 6Ghz AP if security is not valid
Add logic to
- Check if connect req freq is 6Ghz and security
  is not allowed for 6Ghz, reject connect.
- Ignore 6Ghz APs if connect req security is invalid
  for 6Ghz

Also added user config key_mgmt_mask_6ghz mask
to allow specific AKMs, by default all are allowed.

Add added user config check_6Ghz_security to enable
security checks as per spec.

Change-Id: I37518731faa4de67a49853e5ac544efa3b3ce1d6
CRs-Fixed: 2813013
2020-11-12 03:28:37 -08:00
Wu Gao
32cab9b00c qcacmn: Fix compilation issue on arch32 by gcc 9.3
This change fixed compilation error about implicit-fallthrough and
pointer to in cast.

Change-Id: Iea2c25d97d8a039ed0f8083078427a8f8de70cd1
CRs-Fixed: 2814658
2020-11-11 10:23:54 -08:00
Yu Ouyang
ee22cac551 qcacmn: Also update passive scan dwell in concurrent mode
In concurrent mode active scan, both active and passive scan dwell
time should be updated. Because FW will use passive scan dwell for
DFS channel scan. If it still is default value 110ms, DFS channel
scan will spend much time. AP KPI will drop much.

So, for active scan, update passive and active scan dwell together
in concurrent mode.

Change-Id: I9ceb4ece6da2a794fff3b87c7be3214a9dbc46ab
CRs-Fixed: 2790910
2020-11-09 09:16:59 -08:00
Srinivas Dasari
5a1b8f00f1 qcacmn: Define dummy APIs for 6g sort APIs
6g sorting APIs scm_sort_6ghz_channel_list and scm_add_rnr_info
are under define FEATURE_6G_SCAN_CHAN_SORT_ALGO. This is not
enabled for WIN platforms, which results in compilation error.

Also, allocate memory to hold tmp_list_count no.of 6g channels
rrm info instead of MAX_6GHZ_CHANNEL.

Also, do duty cycle scan in connected state as well. Full scan
including 6g PSC and non-PSC channels in connected state would
take lot of time. So, it's better to do duty cycle scan in
connected state as well.

Change-Id: I6e2622c49012237929c5e952c32d44c087851928
CRs-Fixed: 2810923
2020-11-05 18:25:24 -08:00
Srinivas Dasari
d7b3042685 qcacmn: 6g scan optimizations based on the ini
Below optimizations can help to improve 6g scan,
1. RNR-only: Consider only 6g RNR(PSC and non-PSC) channels found
   while scanning 2g and 5g bands, as the 6g APs are likely to
   present in RNR channels.
2. Duty cycle: There is a chance to miss the standalone 6g APs as
   they don't advertise RNR IEs. So, instead of optimizing all
   scan requests, we can consider to do a full scan with duty
   cycle(n) where optimization is skipped for every nth full scan.
   The full scan requests 1 to n-1 are going to be optimized as
   per RNR-only policy.
Driver shall maintain a scan count to track the full scans and
decides whether to optimize the scan (scan count 1 to n-1) or
send it as it is(scan count n) to firmware.

Change-Id: I35b31e900b74dbcd7791f4c2fcfe87b3c629758b
CRs-Fixed: 2806409
2020-11-05 16:13:04 -08:00
Srinivas Dasari
bac5be8a23 qcacmn: Support for history based scan request
Userspace/framework tracks last few days(e.g: 10 days) history of
connected APs and maintains best 10 channels out of that list by
considering multiple parameters like scoring, location etc.
It's likely to find an AP in one of these channels when a scan issued.
So, framework issues first scan request with a maximum of 10 channels
in the below cases currently,
1. When the wifi is turned on
2. When the wifi is in disconnected state and user turns on the screen.

Host driver shouldn't add any more channels to this scan request as
it's expected to complete the scan as soon as possible to connect
quickly to the known APs. Don't add 6g RNR channels also in the
scan request.
Further scans from framework would be full scans or with list a
of channels(more than 10) and RNR channels can be added to them.

Also, don't add all 6g channels if userspace hasn't given any as
the current framework/kernels are matured enough decide whether to
issue scan with 6g channels or not. RNR channels can be added as
mentioned. Remove SCAN_MODE_6G_NO_OPERATION as it's not needed
anymore with this.

Also, 6ghz scan functionality gets enahanced depending on various
requirements. This can be moved to a separate file so that core
scan_manager.c file won't be bloated with new code.

Change-Id: I1800a3e95e438720f94d8eec3544023cab16b081
CRs-Fixed: 2805900
2020-11-05 16:12:46 -08:00
Aditya Sathish
8491861767 qcacmn: Release spinlock after getting reference for scan node
Release the spinlock which was taken to get a reference to the
oldest node in the scan database.

CRs-Fixed: 2811548
Change-Id: I7d274e80575774bb1b41732b20f170c3f1f2dc60
2020-11-04 05:02:56 -08:00
Aditya Sathish
309120eac2 qcacmn: Acquire spinlock before taking ref for scan_db entry
Locks must be taken before accessing scan_db nodes to ensure
reference counts are not changed while changing entries within
the node or while freeing the node.

Ensure that a spinlock is used before increasing the reference
count to make sure that there is no other execution context
accessing the scan_db.

CRs-Fixed: 2791279
Change-Id: I4402ff15de7c8d4fc31009f7307ba262b4df6702
2020-11-02 03:54:25 -08:00
gaurank kathpalia
72bd1e30c9 qcacmn: Fix typo REAM_HASH_LEN and rename it to REALM_HASH_LEN
Fix typo REAM_HASH_LEN and rename it to REALM_HASH_LEN.

Change-Id: I788897dc0ee0b5f42ef1b00f6c1868b356df6273
CRs-Fixed: 2800792
2020-10-20 04:50:54 -07:00
hqu
ba45fe7e2c qcacmn: Fix implicit-fallthrough compile error casued by gcc 9.3
Compiling with gcc 9.3 will cause many implicit-fallthrough
compile errors.

Fix is to add keyword fallthrough to resolve such compile error.

Change-Id: I2e7dd1525861d951e3be44f6665e149499f0f5d6
CRs-Fixed: 2785178
2020-10-08 12:24:02 -07:00
Amruta Kulkarni
3213f64df6 qcacmn: Limit addition of 6ghz channels to scan request
Currently for STA mode, depending on the scan_mode_6g ini value
driver will remove or add 6g channels to scan req, due to which
in some cases, scan is taking more time to complete.
Fix is to add new value to enum scan_mode_6g, when scan_mode_6g
ini value set to SCAN_MODE_6G_NO_OPERATION driver will not
modify the channel list.

Change-Id: I5b6891f142b54f4fa2fe6e9a75bf5fbd2e5f3adc
CRs-Fixed: 2783911
2020-10-02 06:47:26 -07:00
gaurank kathpalia
95e8d99b6b qcacmn: Add rsn_caps info in scan entry
Adds rsn cap info in scan entry security info, to get the
rsn caps directly from scan entry without need of parsing
RSN IE again.

Change-Id: Ideeb0780841a70fda94d8580dbb025d162716d06
CRs-Fixed: 2786586
2020-10-01 08:27:31 -07:00
Deeksha Gupta
1f01cd3590 qcacmn: Disable 6Ghz RNR channel update for P2P scan
Currently P2P doesn't support 6Ghz, disable adding RNR channels
list to reduce P2P scan time duration.

Change-Id: I14e2c1a8d122e99bfd29acb59af5a6f5877f9a35
CRs-Fixed: 2783592
2020-09-24 18:11:41 -07:00
Liangwei Dong
12cef43327 qcacmn: Disable 6Ghz channel update for P2P scan
Currently P2P doesn't support 6Ghz, disable P2P interfaces
6Ghz channel list updating to reduce P2P scan time duration.

Change-Id: Idd851dfb52e123215c5a2bd968f896e88a0dfb0e
CRs-Fixed: 2774756
2020-09-15 02:46:03 -07:00
gaurank kathpalia
59460333ce qcacmn: Add support to filter Aps based on dot11mode
Add support to filter APs based on dot11mode such
as connect only 11N/11AC/11AX capable APs.

Change-Id: I0046c726d944dd08453c19086282e32d0599ddac
CRs-Fixed: 2769979
2020-09-08 06:58:14 -07:00
wadesong
173c0315d8 qcacmn: Fix some whunt build errors
In function __scm_handle_bcn_probe the two macros
QDF_MAC_ADDR_FMT and QDF_MAC_ADDR_REF should appear or
disappear together.

Change-Id: I8510de0b14903f788ec3183d6cc014d061715fcf
CRs-Fixed: 2767031
2020-09-02 06:52:49 -07:00
Deeksha Gupta
eaf0cf59d0 qcacmn: Remove redundant print from scm_update_rnr_info()
Whenever there is a scm_update_rnr_info() function call,
print is flooded in each scan.
It is not giving any additional information.

Remove the print "scm_debug("Failed to get meta, freq %d", freq)"

Change-Id: Id6adda855e1d181704d8c69c10e4d041af758e43
CRs-Fixed: 2761408
2020-08-28 06:35:48 -07:00
Srinivas Girigowda
6ad9002f62 qcacmn: umac: Replace %pM/QDF_MAC_ADR_STR/ARRAY with proper macros
For kernel and driver logs, replace %pM and QDF_MAC_ADDR_STR/ARRAY
with QDF_MAC_ADDR_FMT.
For tx/rx mask, use QDF_FULL_MAC_FMT.

CRs-Fixed: 2763028
Change-Id: I6c56c2040967b279dd31100c4f376f2452146742
2020-08-28 02:01:02 -07:00
Utkarsh Bhatnagar
10ea93ec1d qcacmn: update SAP and P2P Go dwell time seperately
For SAP, the dwell time cannot exceed 32 ms as it can't go
offchannel more than 32 ms. For Go, since it advertise NOA
to annouce the absense period, it can have regular dwell
time which is 40 ms.
This was done increased scan latency was seen across
different targets.

Change-Id: I59a827380dbd76780eaebd8fff25a2eff2ef5107
CRs-Fixed: 2730638
2020-08-25 03:33:28 -07:00
Srinivas Girigowda
a4bf024bf1 qcacmn: umac: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: I78b072b5cc623477135823512f9b8e7ef7ef4309
2020-08-23 23:09:36 -07:00
Santosh Anbu
a729bdd857 qcacmn: Add custom filter function to scan filter
Add change to support custom filter function to the scan filter.

Change-Id: If312d7627d11e8938a4f8444e1f930a8fcc25aa8
CRs-Fixed: 2746158
2020-08-21 04:46:50 -07:00
Gururaj Pandurangi
c0989c2a3d qcacmn: Change burst_duration and min_rest_time value
Enable burst scan for GO+STA case and set the burst
duration as 1 active dwell time.
Burst scan provides higher priority and can ensure
the scan request granted, since P2P GO requests larger
duration for its high priority channel request.
But this value will limit the off-channel time to give
more bandwidth for P2P home channel.
Also, change minimum rest time from 50 to max rest time
i.e. 100 for MCC case for all concurrency combinations.
50ms min reset time only grants 1 home channel in MCC,
when there is only 1 home channel and has heavy traffic,
it can be scheduled firstly as scan BSS channel, and if
activity check found not much traffic for the 1st 50ms,
it decides to go foreign channel directly, the 2nd home
channel with heavy traffic will not get chance to schedule.

Change-Id: I2cd73750709a964bd23896fe10f754caa28c2789
CRs-Fixed: 2716111
2020-08-06 01:50:27 -07:00
Santosh Anbu
3faf147264 qcacmn: Add NOL channel list filter support for scan filter
Implement the filter to reject the candidate with the channel in
the NOL list(i.e FS hit channel).

Change-Id: I8e39cd9e13a17816f7f96354c9880b11af9c06c8
CRs-Fixed: 2746157
2020-08-04 12:58:06 -07:00
Kiran Kumar Lokere
639e3bc96b qcacmn: Set RRM scan type indication in scan control flags
Send RRM scan type indication in scan control flags to FW to scan
the channel for given duration after the FILS is detected.

Change-Id: I2057ef9794e3b05b7296679bb0220425ff64e6ae
CRs-Fixed: 2743155
2020-07-29 11:38:49 -07:00