Commit Graph

467 Commits

Author SHA1 Message Date
Sridhar Selvaraj
bfb04859c6 qcacmn: Reset skip_bssid_copy flag in split profile parsing
While parsing MBSS IE split profiles, bssid copy flag
is not reset in between sub element parsing resulting
in skipping the bssid copy for next non tx profile.

Reset skip_bssid_copy flag for each sub element parsing
so that correct bssid is copied for next non tx profile

CRs-Fixed: 3019298
Change-Id: I429190b21a3ddafdc75a73e8b063f6b6f629492a
2021-09-01 09:03:13 -07:00
Ashish Kumar Dhanotiya
8082901907 qcacmn: Set default value of mawc_nlo_enabled ini as 0
Set value of mawc_nlo_enabled ini as 0 by default.

Change-Id: I7779072deecc9390f3df929355788ee8d73cb48f
CRs-Fixed: 3024972
2021-08-31 07:54:49 -07:00
Shashikala Prabhu
d4c52fb8ef qcacmn: Remove the 'multi_link is null' error print
"scan_entry->ie_list.multi_link is null" print is
flooding the scan component. Hence, remove this print.

Change-Id: I921eea8afc2dba5637c7c02717e2d1fb544ba103
CRs-Fixed: 3023813
2021-08-27 08:08:43 -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
Lincoln Tran
ce48d77998 qcacmn: Add debug MLO changes
-Add debug logs to MLO manager code.
-Add ml_dev validation checks for ML peer operations.
-Add pointer checks to avoid NULL pointer dereference

Change-Id: I8e9ddf177a999a43e8612f8c6acedd08ffce63d5
CRs-fixed: 2998964
2021-08-25 19:45:02 -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
Jyoti Kumari
c9f9272c69 qcacmn: Fix OOB read issue in SSID ie
During beacon or probe response, if channel is dfs && frame type
is MGMT_SUBTYPE_BEACON, it would call "util_scan_add_hidden_ssid"
to deal with the packet. If the ie id matches with SSID then OOB
read may occur in ie_len as it is validated with upper bound of
ie_ssid.

Validate the ie length first. If it is more than 0 then copy
memory to SSID which are equivalent to ie length.

Change-Id: Ib5e2ab7f6f3337d4c3e5c240e3133d8f276be50a
CRs-Fixed: 3007473
2021-08-17 13:17:56 -07:00
Himanshu Batra
9406f72b3d qcacmn: Update the correct bit index for ML IE
Update the correct bit index for ML IE control field

Change-Id: I8b2dcf70fd2ee83ae24eeba8359798499c0b7c74
2021-08-12 10:45:26 -07:00
Ashish Kumar Dhanotiya
518f0daeb1 qcacmn: Add aliasing for INI names
Currently driver has only one name for an INI, with
this change add second name as well for few INIs based on
new requirement.

Change-Id: I67bd50652c3be7912c516b81d40f6a1ea7a7b90a
CRs-Fixed: 3007172
2021-08-10 15:39:24 -07:00
Mohammed Ahmed
897285c1bd qcacmn: Fix incorrect layering in scan component
Replace ucfg api call with wlan api calls for internal components.

Change-Id: I3cb9524dbda4b2b172f7252750bf95fbd0f14491
CRs-Fixed: 2995047
2021-08-09 20:03:51 -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
Nandha Kishore Easwaran
b82dd5554f qcacmn: Add 4.9 ghz frequency for scan command
Add 4.9 ghz frequency check also in scan command. This change
is needed so that scan entry is formed and association happens in 4.9ghz.

Change-Id: I2fbf719ea6a5e747e07a5973a2da3d2ca2d11b7b
2021-07-23 20:17:29 -07:00
Venkateswara Swamy Bandaru
e52a974af4 qcacmn: Remove util_scan_scm_chan_to_band API
Remove util_scan_scm_chan_to_band API is this wont work for
6G band.

Change-Id: I52fe841653aa9c139f97772adfced1f4e280ab2f
CRs-Fixed: 2990486
2021-07-21 14:58:21 -07:00
Bapiraju Alla
733e990dce qcacmn: Fix partner link id updation in ml_info of scan cache entry
Currently, partner info array in scan entry is contains self link
information in first index. to avoid confusion, update partner info
with only partner links information and store self link id in ml_info
of scan entry

Change-Id: I53992fee355613b8521409da412254c05fb63fbf
CRs-fixed: 2991229
2021-07-15 14:33:57 -07:00
Venkateswara Swamy Bandaru
238ae4b7f7 qcacmn: Fix API used for getting band
Replace util_scan_scm_chan_to_band with util_scan_scm_freq_to_band
to work for 6G channels.

Change-Id: I5f8843599cbea194a57cc7fc3b20163a7205f4e7
CRs-Fixed: 2987153
2021-07-14 15:32:12 -07:00
Venkateswara Swamy Bandaru
aece6974f6 qcacmn: Add scan support for 11be puncturing
Add scan support for puncturing by extracting the puncturing
bitmap field in the EHT operation IE.

Change-Id: I221464f52bfce40b55344f995945836f80553579
CRs-Fixed: 2982502
2021-07-14 02:05:24 -07:00
Bapiraju Alla
a62a30a938 qcacmn: Select partner link information based on best link score
Add API to get partner links information to proceed for ML connection
in best links selected in ML scoring.

Change-Id: Ief13bc19d8e44af601e2fe6397112d841bfcce28
CRs-Fixed: 2961883
2021-07-07 11:24:42 -07:00
Bapiraju Alla
561025df10 qcacmn: Add support to RNR and multi link IE parsing for ML scoring
Add support to parse RNS and ML IE and fill ml info in the scan
cache entry.

Change-Id: Ia5fdd0310e20d4435343f0535c071ea3d8510ef8
CRs-Fixed: 2961893
2021-07-07 11:24:33 -07:00
Bapiraju Alla
35de216ce0 qcacmn: Update scan cache entry to support multi link beacons
Update scan cache entry to cache the information required for MLO scoring.

Change-Id: I3b4a848e51a49725970ee2ffd9e44c7efdbad682
CRs-Fixed: 2958058
2021-06-28 23:17:00 -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
Kiran Kumar Lokere
fba32a06f6 qcacmn: Fix the channel validity check for beacon/probe response
Fix the channel validity check for DS param IE in beacon or probe
response frames in scan.

Change-Id: I17132d3d406b2953ad31dc6ab40b0158e21bc5c4
CRs-Fixed: 2960334
2021-06-14 06:28:16 -07:00
sheenam monga
d7adec6324 qcacmn: Don't mark ie invalid based on HT IE
Currently, host comapres HT Ie with htcap_cmn_ie
structure size but returns err in case ie len
is different from structure len which may break
the iteration and can lead to scan entry creation
failure.

Fix is not to break the loop and perform action
based on other Ie to avoid Ie parse failure which
leads to scan entry creation failure.

Change-Id: I93f0d67ae0f7ea8bb5dbeabc895b5c3d1ae43a73
CRs-Fixed: 2965729
2021-06-10 08:17:51 -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
Aditya Sathish
34bffddfd3 qcacmn: Scan channels only from the selected bands
Scan manager currently has two flags - scan_f_2ghz and scan_f_5ghz
for the requestor to specify which channel bands to scan.

Currently, these flags are not utilized by the scan manager to
control the channels selected as part of the scan request channel
list. As a result, specifying a particular band will not
limit the scan manager to scan only the mentioned band - instead
scanning all supported channels.

Add a check to use these flags to avoid channels from bands
which are not selected.

Change-Id: I86e17184b5bb67cbf951eee5d43a8f80a93718d6
CRs-Fixed: 2934215
2021-05-18 04:08:05 -07:00
Abhishek Singh
532d6ae75f qcacmn: Do not drop the beacon in case of RSN len is less than 2
For security cert TC, RSNIE length can be 1 but if the beacon is
dropped, old entry will remain in scan cache and cause cert TC
failure as connection with old entry with valid RSN IE will pass.

So instead of dropping the frame, do not store the RSN pointer so
that old entry is overwritten.

Change-Id: I2fe4d2dd2352be6850f7a18a2ec829733ded7ee8
CRs-Fixed: 2944120
2021-05-13 01:12: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
Sandeep Puligilla
3858136edf qcacmn: Possible OOB read while parsing MBSSID IE
If MBSSID ie contains only header and no payload
then current logic can cause OOB read.

Added validation check for length of IE before
accessing MBSSID IE payload.

Change-Id: Id8b34e5f516f1a1c85bc7d93d9128cad29393e9d
CRs-Fixed: 2838631
2021-05-07 11:32:00 -07:00
Pragaspathi Thilagaraj
58a8a97272 qcacmn: Check the sae single pmk ini for scan entry
Currently when updating the single pmk capability for an AP,
the driver only changes for the sae single pmk OUI advertised
by the AP and not the ini value. This causes the crypto entry
for the AP to be updated with single pmk flag to true even when
the ini is disabled.

So check the sae single pmk ini also to update the scan entry
as sae single pmk bss.

Change-Id: I2ae16c8da5af397b041723f9d5a3b2d8a6e7c986
CRs-Fixed: 2935440
2021-05-03 15:03:22 -07:00
Adwait Nayak
9eb3468a87 qcacmn: Handle non-inhertance IE scanning
The earlier logic for scanning non-inheritance IE fails if
non transmitted bssid profile has any extension element
such as MU EDCA before the extension element with
non-inheritance IE.

Since MU EDCA is also an extension element and it does not
have noninheritance element id in it, the logic used to fail
as the driver does not check further for any other extension
element ID in non transmitted bssid profile. Because of this
the IEs part of non-inheritance list used to get inherited,
causing disconnection issue.

With current fix, the scanning for non-inheritance IE has been
taken care properly. Driver will go through the non transmitted
bssid profile until it finds the extension element with
non-inheritance element ID in it.

Change-Id: Ib4346600a880a8390c6d023cf403ed18c62406d2
CRs-Fixed: 2935065
2021-05-01 02:47:32 -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
Aditya Sathish
2f02bce0e4 qcacmn: Rate limit MBSSID scan entry generation failure print
If multiple MBSSID beacons fail during scan entry generation,
it can lead to flooding of the console.

Rate limit this print to avoid scheduler timeouts.

CRs-Fixed: 2918649
Change-Id: I71ed2dafcedc7da4be130569776870a2bbb6b28f
2021-04-22 13:13:38 -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
Venkateswara Swamy Bandaru
216478aaae qcacmn: EHT changes as per latest fw cmn headers
Updated the EHT related variables as per latest fw cmn headers.
Address review comments from previous EHT gerrits.

Change-Id: I67cd58a4efcf3e06d2ca3b5570432593b1d80825
CRs-Fixed: 2902607
2021-04-05 04:45:25 -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
Venkateswara Swamy Bandaru
873624584b qcacmn: Add scan support for 11be
Add EHT capability and EHT operation IE definitions and supporting
functions to parse these IEs.

Change-Id: Ida6f8b29fb33a581d2f13584f92327162cfa1664
CRs-Fixed: 2858005
2021-04-01 23:36:01 -07:00
sheenam monga
8c26a66b29 qcacmn: Add conditional compilation for util_is_noninh_ie
Currently util_is_noninh_ie is called based on WLAN_FEATURE_MBSSID,
but definition doesn't depend on WLAN_FEATURE_MBSSID which may
cause compilation issue.

Fix is to keep definition under WLAN_FEATURE_MBSSID feature flag

Change-Id: I409c367c98bf1fe06c1c3107348f4a469ebdbd07
CRs-Fixed: 2907601
2021-03-25 03:36:26 -07:00
Adwait Nayak
4eea90754c qcacmn: Add Non-inheritance IE support on STA
If there is any non-inheritance element present as part of the
nontransmitted BSSID profile then while generating scan entry
for that profile, driver need not inherit those list of
element IDs and list of element ID extensions from the
transmitted BSSID profile.

Since non-inheritance element is an element ID extension, it
should be part of extension element. So the logic we use over
here is to find if there are any extension element present in
the nontransmitted BSSID profile. if yes, then only go ahead
with below logic or else go with the normal flow.

Logic:
Mark and store the start of the list of element IDs and
list of Element ID extension.
While generating the new ie for the non transmitted BSSID
profile, do not inherit the IEs present in the above
mentioned lists.

Change-Id: I466afa8273e841b6f7656b1dc59342bc2d4f13bc
CRs-Fixed: 2883389
2021-03-24 09:48:26 -07:00
Adwait Nayak
4a74588f2e qcacmn: Add support for split profile BSSID in MBSSIE
If any nontransmitted BSSID profile is fragmented across
multiple MBSSID elements, then it is called split profile.

For a split profile to exist we need to have at least two
MBSSID elements as part of the RX beacon or probe response
Hence, first we need to identify the next MBSSID element
and check for the 5th bit from the starting of the next
MBSSID IE and if it does not have Nontransmitted BSSID
capability element, then it's a split profile case.

This change is responsible in accumulating the non
transmitted BSSID profile, fragmented across multiple
MBSSIDs, so that the scan entry will not miss any
information.

Change-Id: Ia78cc47d1ffd03ada659d257b83741e7ab921fa2
CRs-Fixed: 2883389
2021-03-24 09:48:22 -07:00
Vivek
afa6d944ca qcacmn: Add API to set scan cache aging time
There is an API to get the scan aging time,
but there in no API to set the scan aging time
and can be configured through INI.

Add API to set the scan aging time run time.

CRs-Fixed: 2894428
Change-Id: Ide2b2eec780dd7ff07ebd783b0916a68c0e94a2c
2021-03-11 14:07:40 -08: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
Alan Chen
1370e032e9 qcacmn: Update default values of INI items
Update default values of INI items to most commonly used values
in WCNSS_qcom_cfg.ini file on commercial devices.

Change-Id: Ie3a4ce2cbf4bc2352d5ebc5be939a47818a6d594
CRs-Fixed: 2874759
2021-03-11 19:38:51 +05:30
Shashikala Prabhu
e601f0d39d qcacmn: Modify the WIDE_BW_CHAN_SWITCH IE length check
Modify the length check to drop beacons which has
WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH IE length less than 3. This is to
accommodate the addition of fields to this IE in the future.

Change-Id: I8cba60b631022f4348cce90ae41a003964040ad1
CRs-Fixed: 2884249
2021-03-02 14:22:50 -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
Jyoti Kumari
a426e5e166 qcacmn: Fix out of bound issue in util_scan_parse_mbssid()
During multiple BSSID scan ie parse, there is memory allocation
on new_ie variable of size 1024 which may create buffer overflow
in util_gen_new_ie() if ie length is greater than 1024.

As part of fix, allocate memory of size ie length in new_ie.
And also add check before copying to pos variable in
util_gen_new_ie().

Change-Id: I55e0819817b5a616684067170bf28a314a145fc2
CRs-Fixed: 2867353
2021-02-17 11:13:18 -08:00