提交图

331 次代码提交

作者 SHA1 备注 提交日期
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
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
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
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
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
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
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
Shashikala Prabhu
a5d8ab2306 qcacmn: Add length check in beacon IE parsing function
Add length check in scan beacon IE processing function for the below IEs to
avoid any possible memory corruption.
1. WLAN_EXTN_ELEMID_SRP
2. WLAN_EXTN_ELEMID_HEOP
3. WLAN_EXTN_ELEMID_MUEDCA
4. WLAN_EXTN_ELEMID_HE_6G_CAP
5. WLAN_ELEMID_XRATES
6. WLAN_VENDOR_WPA_IE_LEN
7. WLAN_VENDOR_WME_IE_LEN
8. WLAN_VENDOR_ATHCAPS_IE_LEN
9. WLAN_VENDOR_ATH_EXTCAP_IE_LEN
10. WLAN_VENDOR_SFA_IE_LEN
11. WLAN_VENDOR_SON_IE_LEN
12. WLAN_BWNSS_MAP_OFFSET

Change-Id: I8441178c8e9da6f9e7a16915e7664bca090fe86e
CRs-Fixed: 2874025
2021-02-15 00:23:43 -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
Shashikala Prabhu
b69d3780be qcacmn: Add length check in beacon IE parsing function
Add length check in scan beacon IE processing function for the below IEs to
avoid any possible memory corruption.

1. WLAN_ELEMID_COUNTRY
2. WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH
3. WLAN_ELEMID_VHT_TX_PWR_ENVLP
4. WLAN_EXTN_ELEMID_MAX_CHAN_SWITCH_TIME

Change-Id: I860bee8633849215d46c2dfe60a1a98d7c80f510
CRs-Fixed: 2873039
2021-02-09 23:07:24 -08:00
Rakshith Suresh Patkar
cb5da5d67e qcacmn: Update missing ie pointers in util_scan_copy_beacon_data
util_scan_copy_beacon_data copies beacon and updates ie
pointers for the cache entry. However, two of the ie pointers
listed below are not updated:
 1) hecap_6g - pointer to he 6ghz cap ie.
 2) srp - pointer to spatial reuse parameter sub extended ie.

These non updated pointers will cause use after free issues
if the parent scan entry is freed.

Update ie pointers for hecap_6g and srp.

Change-Id: I6d0a6129941e3dc1267404a4191ab368c013a102
CRs-Fixed: 2862607
2021-02-06 05:53:18 -08:00
Adwait Nayak
eb4f57ac02 qcacmn: Add boundary checks to restrict memory corruption
With the reception of MBSSIE beacon frame, host tries to
construct beacon frames for the non tx VAPs as well.
For which, it has to copy all the IEs from the
received beacon's IE except the MBSSID relevant element
IDs, by comparing the subelement data.

The memcpy that is being used in this case, does not check
the space availability in the target buffer which may lead
to random memory corruption. Hence, using safe memcpy to
avoid buffer overflow.

Change-Id: Ib0861d606dba7725077dd530dd15ebff59058cfd
CRs-Fixed: 2857436
2021-02-04 11:00:20 -08:00
Aditya Sathish
32515d5e22 qcacmn: Avoid checking extcaps byte if equal to IE len
Reading extcaps from the scan entry currently checks if the byte
to be accessed is less than the length of the IE. Following this,
it will attempt to access the extcap IE using the requested byte
as the index.

Avoid accessing the extcap IE if the byte is greater than one less
than the ie_len (since indexing starts from zero).

CRs-Fixed: 2856212
Change-Id: Ie357edcd6095570c05871af657381c287e92504e
2021-02-03 12:50:39 -08:00
Shwetha G K
ce7ed5dc37 qcacmn: Correct SNR dummy marker value
Set the SNR max/dummy marker as 127

Change-Id: Ia87944d3dfd9afffec1fdf26e5ef51e6029a3e35
2021-01-11 08:41:05 -08:00
Jyoti Kumari
82a2d30a28 qcacmn: Fix out of bound read issue in ESP ie parse
During esp ie parse from beacon/probe response, the data pointer
is getting read from esp ie and it's not validate while updating
to esp params which may cause out of bound read issue.

Validate data pointer before updating to esp params.

Change-Id: I1167b82248613cc65fcd7c70cdcfe57595de6b21
CRs-Fixed: 2842234
2021-01-07 19:11:32 -08:00
Jyoti Kumari
a7cc077a26 qcacmn: Fix out of bound read issue in util_scan_parse_rnr_ie()
During ie parse from beacon/probe response, the variable
tbtt_count and tbtt_length in util_scan_parse_rnr_ie() getting
read from ie and the value is not checked before using it which
may cause out of bound read issue

Validate tbtt_count and tbtt_length before using it

Change-Id: I51cfb2356fb16feda8a70c4b76c7f76c90b1393b
CRs-Fixed: 2836205
2021-01-06 21:55:03 -08:00
Chaoli Zhou
4096046a47 qcacmn: Fix OOB issue for bwnss oui
If is_bwnss_oui return true in util_scan_parse_vendor_ie,
and it will run into below logical:
scan_params->ie_list.bwnss_map = (((uint8_t *)ie) + 8)
But in fact if ie->ie_len < 6, it will casue read out
of boundary issue. So add the length chekcing before
reading it

Change-Id: I0cdf723154eb808f8062efd897f9d67d54d4573b
CRs-Fixed: 2838849
2021-01-06 11:44:29 -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
Vignesh U
1a80505918 qcacmn: Store and retrieve TPE IE in scan cache
Declare a TPE pointer to store the TPE IE in the scan cache ie list.
Write a function to obtain the TPE IE stored in the scan cache ie list.

Declare a minimum TPE IE length as 2 Bytes and use that to check the
sanity of the received TPE IE before storing it. Discard the TPE IE if the
length check fails.

Change-Id: If5b06604b03d07dd5fb26a62f90fb7202ce4eff0
CRs-Fixed: 2826300
2020-12-03 02:41:03 -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
Venkateswara Swamy Bandaru
59234d61cb qcacmn: Fix memalloc failure issue in MBSSID IE parsing
Fix MBSSID IE pasring by properly incrementing offsets while
pasing the IE.
Copy ext IEs also in final iteration.
Minor code readability changes done along with the above fixes.

Change-Id: I3aaf5dd440b48c4229ddefc37f75703fc58ba994
CRs-Fixed: 2814732
2020-11-22 23:09:23 -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
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
9305e680b1 qcacmn: Enhance the ini scan_mode_6ghz for RNR scan optimization
Add the below values to scan_mode_6ghz enum,
1. SCAN_MODE_6G_RNR_ONLY: Scan the channels (PSC and non-PSC)
   found in RNR-IEs while scanning 2g and 5g bands. Host fills
   all PSC and non-PSC channels in the scan request and set the
   flag FLAG_SCAN_ONLY_IF_RNR_FOUND for each channel.

2. SCAN_MODE_6G_PSC_DUTY_CYCLE: Scan the complete PSC channel
   list for every duty cycle. For every duty cycle scan, host
   fills all 6g channels and sets the flag
   FLAG_SCAN_ONLY_IF_RNR_FOUND only for non-PSC channels. Rest
   of the scans will be done only on RNR channels(PSC and non-PSC).

3. SCAN_MODE_6G_ALL_DUTY_CYCLE: Scan the complete 6g(PSC and
   non-PSC) channel list for every duty cycle. For every duty
   cycle scan, host fills all 6g channels and doesn't set
   the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for any 6g
   channel(PSC/non-PSC). Rest of the scans will be done only
   on RNR(PSC/non-PSC) channels.
Change the default ini value to PSC_DUTY_CYCLE.

Change-Id: I73bc08d973bd57dbe2ba6644c3842da9ce850cec
CRs-Fixed: 2806406
2020-11-05 16:12:59 -08:00
Srinivas Dasari
58fe05f9ba qcacmn: Introduce new ini parameter for 6ghz scan enhancement
Introduce scan_mode_6ghz_duty_cycle ini parameter.

It disables full scan optimization after every default value
provided in ini and forward scan request as it is to firmware
without optimization.

Change-Id: I68c1f79432ae646157be94241a779af8189c3c8c
CRs-Fixed: 2801797
2020-11-05 16:12:50 -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
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
Amruta Kulkarni
9c66930943 qcacmn: Add scan public APIs for non-osif component
Adds wlan_scan_get_scan_id, wlan_scan_init_default_params,
wlan_scan_register_requester and wlan_scan_unregister_requester
APIs to use from non-osif component, as ucfg_* API should only
be used from OSIF.

Change-Id: Ia90313030e853c957ca85e47ff2b67097490ef87
CRs-Fixed: 2791549
2020-10-09 22:49:57 -07:00