Commit Graph

229 Commits

Author SHA1 Message Date
Vinod Kumar Myadam
2afbe37a20 qcacmn: Fix for scan passive dwell time
Prensently for initial scan and roam passive scan dwell time,
the same ini CFG_PASSIVE_MAX_CHANNEL_TIME is used. This will
cause initial scan to have the roam passive scan value.

Decouple passive scan and roam passive scan ini parameter by
adding new ini param for roaming

Change-Id: I7bffb24a1e45548ed57492abc35e80958e9955ee
CRs-Fixed: 3272817
2022-08-24 04:11:10 -07:00
Ashish Kumar Dhanotiya
99694b6f53 qcacmn: Add support to get feature set info
Based on the new requirement, add support to get requested
feature set info from different feature components.

Change-Id: I75c5a3062312b1124d21d1ae429a7c5a18d9f2d0
CRs-Fixed: 3262867
2022-08-12 18:55:42 -07:00
Surabhi Vishnoi
0283e89faf qcacmn: Store per channel scan time completion info
Add APIs to update and get the time at which scan
is completed in that channel.

Change-Id: I8c594b1881fc83daa88800eac9eac94c2e0df64a
CRs-Fixed: 3239359
2022-07-29 16:24:36 -07:00
Abhishek Singh
9738cd5a32 qcacmn: Print eht self and AP caps while calculating candidate scores
Print eht self and AP caps while calculating candidate scores.

Change-Id: I67db8781ee11c06ba5ec22608dcddace3f7c406b
CRs-Fixed: 3253959
2022-07-29 02:37:57 -07:00
Jianmin Zhu
a7a1ff47f1 qcacmn: Fix wrong score if channel width isn't 20N MHz
Some operating class like 81, channel spacing is 25, need convert
channel width to 20 to get right score when select candidate.

Fix some code style issues too.

Change-Id: I15795d016cae74b7596a199ae2883aeababaf081
CRs-Fixed: 3250207
2022-07-25 22:33:03 -07:00
Jianmin Zhu
f2a742540b qcacmn: Select best partner for MLO of 2+ links
Select best candidate by mlo score algorithm.

Check bss mlo type first by mlo info, mlo config, partner frequency and
dbs/sbs cap, calculate candidate score for SLO/MLMR/EMLSR bss types.

For SLO case, same as before except:
Decrease percent of legacy band and nss to include 320M and 8x8.
Decrease max percent of congestion from 100 to 80 to include MLMR joint
congestion.
Increase weight of both band width and nss to 20.

For EMLSR case, same as SLO except adding EMLSR boost score.

For MLMR case, besides adding MLMR boost score,
calculate joint RSSI/band width/congestion score for combination of
scan entry + each partner link by new mlo algorithm, select partner with
highest total joint score as candidate combination, only activate that
partner link.

Change-Id: I640c6825d945caf5fab504a77717195c2eac0c93
CRs-Fixed: 3234912
2022-07-18 11:55:27 -07:00
Aakanksha Doda
af7b3ad2cd qcacmn: Add QCN IE to the scan entry IEs list
Add QCN IE to the scan entry IEs list to support
240 MHz on 5 GHz radio.

Change-Id: I7fafae518baf6b8633729f65810fbba663744ec6
CRs-Fixed: 3230190
2022-06-30 10:54:33 -07:00
Jianmin Zhu
3061409081 qcacmn: Add band bitmap filter for mlo ap candidate
Get mlo partner link freq from RNR IE.

Use band bitmap to filter mlo AP by band.
Force link on 2 GHz: mlo_support_link_band=1
Force link on 5 GHz: mlo_support_link_band=2
Force link on 6 GHz: mlo_support_link_band=4

Change-Id: Ib11dee117bef6121bbc455b62a2803138881a72a
CRs-Fixed: 3211974
2022-06-08 11:47:53 -07:00
Deeksha Gupta
45c39ea4b3 qcacmn: Update RNR IE as per D1.5
Update RNR IE as per 11be draft 1.5 specification.

Change-Id: I7b3e3d2017c2d7eedbba82d6591cdf93fd755b95
CRs-Fixed: 3210818
2022-06-06 04:26:48 -07:00
Jyoti Kumari
02f2ffb93a qcacmn: Skip STA scan on 6Ghz or 5ghz indoor chan if SAP is up
Currently STA can scan and come up on 6Ghz or indoor channel if
hardware is non-dbs and SAP is present

As part of this change, do not allow STA to scan on 6Ghz or
5Ghz indoor channel for non-dbs hardware if SAP is present

Change-Id: I97759f8b2c6a1c460d90fbb797a0e64d2532797c
CRs-Fixed: 3186406
2022-05-18 05:21:06 -07:00
Gyanranjan Hazarika
f00cc9f71a qcacmn: Header file change to support MLO-RNR requirement
1. MLO requires a tbtt_info length of 16 octets. To support
16 MLDs, it requires to extend the current global_rnr cache
accommodating this new requirement in 11be MLO context.

Redefine MAX_RNR_SIZE accordingly.

2. Currently, scan-module is considering only upto 5 reported
APs in a RNR element. This will be ok pre-11be as the RNR info
is not used for connection. RNR info is required for link to
vdev matching for MLO based connection starting 11be. So, the
limit specified by MAX_RNR_BSS needs to be extended to be able
to parse upto 16 tbtt_infos from the RNR elements present in
beacon or probe-response. Some APs can advertise upto 16 co-
MLDs when 6Ghz link is involved in those MLDs.

CRs-Fixed: 3191537
Change-Id: Iff532f7ea4f0ebf21947e24edbfa1f28d2d92af3
2022-05-17 13:50:26 -07:00
Sai Pavan Akhil Remella
aabe3575e9 qcacmn: Add mode based flags to channels in PNO request
Currently 6 GHz channel flags are not set for channels
present in the list from PNO scan request but are set for
all other 6 GHz channels which are added when either of the
two below conditions are satisfied
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in PNO scan request.
2. At least one 6 GHz channel is present in the PNO scan req.

Add flags for channels in the PNO scan request based on the
scan_mode_6g ini configured similar to active scan request.

Add changes to remove the RNR flag for the channel if the
corresponding short SSID entry is present in the RNR db
Cache since if colocated SSID is different userspace doesn't
include corresponding 2.4/5 GHz channel information in PNO
request.

Change-Id: I22c4f7ecf65d4ab09dfbbe126aefe02f9145de42
CRs-Fixed: 3119113
2022-05-11 16:50:46 -07:00
Deeksha Gupta
928ebb4225 qcacmn: Update RNR IE as per 11be D1.4 specification
Update RNR IE fields as per 11be D1.4 specification.

Change-Id: I46b04e430ee4477117e8396d65a9de4608cd8dbe
CRs-Fixed: 3157064
2022-05-06 16:42:31 -07:00
Sai Pavan Akhil Remella
05b99c2d66 qcacmn: Add API to get min_dwell_time_6g configured ini
Added API support to get min_dwell_time_6g configured value
from the ini.

Change-Id: I214871afdde26bd4d7ca9796e264ed9699f5dd58
CRs-Fixed: 3143107
2022-04-11 04:09:51 -07:00
Vinay Adella
88c89dc960 qcacmn: Add scan macros related to scan start-offset parameter
These macros define the min & max time from TBTT, when the scan
dwell time starts. They can be used as a parameter to the scan
WMI command.

CRs-Fixed: 3154082
Change-Id: Ieca8acfd2e6897a8e45fafaaffd8f283f451d203
2022-03-23 02:12:14 -07:00
chunquan
19cc13911c qcacmn: Replace blacklist/whitelist with denylist/allowlist
Replace blacklist/whitelist with denylist/allowlist
in qca-wifi-host-cmn.

Change-Id: I1a27d025ccb9d5fcc3c573d47a84f9667a229c9b
CRs-Fixed: 3098934
2022-03-05 07:11:01 -08:00
sheenam monga
00f035dcde qcacmn: Update gEnableSNRMonitoring to true
Currently in wma_chan_info_event_handler chan info
is updated based on gEnableSNRMonitoring. By default
gEnableSNRMonitoring is set to false, due to which
chan info is not updated.

Fix is to keep gEnableSNRMonitoring enbaled, so that
chan info can be updated.

Change-Id: I77a999d64fca093c8bc50e4532e659f37a3ac593
CRs-Fixed: 3109317
2022-03-02 11:06:13 -08:00
Venkateswara Swamy Bandaru
fb75228fd8 qcacmn: Fix partner link updation
Fix partner link updation in scan entry when AP MLD has more than one
partner link.

Change-Id: I981f16c9de819390d6830ffe7a5b1e438a4f8403
CRs-Fixed: 3125861
2022-02-28 12:56:51 -08:00
abhinav kumar
3b1731aa70 qcacmn: Allow FW to pno scan 6G chan based on RNR flag only
First host checks below two things in PNO scan request:
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in pno scan request.
2. At least one 6G channel is present in the pno scan req.

If any of above conditions satisfy, Host fills all remaining
(other than channel(s) present in pno scan req) valid 6 GHz
channel(s) to pno scan requests and set the flag
FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining channel(s).
Host sends this updated channel list via WMI command
WMI_START_SCAN_CMDID_param_tlvs->channel_list for pno scan
to firmware.

By this driver allows Firmware to scan 6G channels based on
RNR IEs only (for colocated APs reported by 2.4/5 GHz APs).

Change-Id: Ib6118c4525e9fbe233eb6a7e07a4a3345d486e8a
CRs-Fixed: 3103923
2022-01-27 23:01:01 -08:00
abhinav kumar
9c2ce46fc6 qcacmn: Allow FW to scan 6G chan based on RNR flag only
First host checks below two things in host scan request:
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in host scan request.
2. At least one 6G channel is present in the host scan req.

If any of the above conditions satisfies, Host fills all
remaining (other than channel(s) present in host scan req)
valid 6 GHz channel(s) to scan requests and set the flag
FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining channel(s).

Host sends this updated channel list via WMI command
WMI_START_SCAN_CMDID_param_tlvs->channel_list for host scan
to firmware.

With this change, driver allows Firmware to scan 6G channels
based on RNR IEs only (for colocated APs reported by 2.4/5
GHz APs).

Change-Id: I2d9d2aac58bbc521b2476756d5919647bdc265cc
CRs-Fixed: 3103873
2022-01-13 04:54:22 -08:00
Yu Ouyang
b6a3f2fd44 qcacmn: Trim scan channel list
As requirement, concurrent mode, station 5G/2G scan need stop when AP
connected by peer station.

Condition:
STA + AP 5G (connected) + AP 2.4G	skip 5G scan
STA + AP 5G (connected)			skip 5G scan
STA + AP 2.4G (connected && 2.4G only)	skip 2.4G scan
Others concurrency			skip none

Add ini ch_list_trim_conc to enable/disable the feature. Default is
disabled.

Before send WMI_SCAN_CMD to firmware, call API
policy_mgr_scan_trim_chnls_for_connected_ap() to check if need
trim scan channel list. Which channel list need be trimmed

Change-Id: If4d1cf7347f757fb013ffcb4016e8e6f16859f42
CRs-Fixed: 3075068
2021-12-21 22:10:35 -08:00
Shashikala Prabhu
0a725937cd qcacmn: Get pointers to per-STA profile CSA, eCSA, MCST IE
Parse the per-STA profile IE and save the CSA, eCSA, Max Channel Switch
Time IE pointers in partner_link_info structure.

Change-Id: Icac75e3ad1f45bd5325c9144db7732684ebb4512
CRs-Fixed: 3087692
2021-12-21 10:23:19 -08:00
Surya Prakash Sivaraj
c4e6b83afe qcacmn: Update preauth candidate entry to scan table
During SAE roam auth offload, update the beacon/probe response
frame coming from the FW via WMI_ROAM_FRAME_EVENTID into the
scan db.

When the bss info of the preauth candidate is unavailable in
the host/kernel scan entry, supplicant fails to determine the
proper SAE PWE config of the peer and the commit request fails.

Change-Id: I8537147104f30b74ffb2e87946f2e5f4b129f0df
CRs-Fixed: 3075460
2021-12-02 12:15:07 -08:00
Jyoti Kumari
9f3995df8f qcacmn: Add support for lower span active and passive dwell time
Add LOW_SPAN_ACTIVE_DWELL_TIME and LOW_SPAN_PASSIVE_DWELL_TIME
macro support to keep all 2.4g/5g active/passive dwell time
same for low span scan mode.
Disable adaptive dwell to firmware so that firmware cannot
modify dwell time.

Change-Id: Iff05dd7b37a40226c61b28a1e59ea8aa8c57cb52
CRs-Fixed: 3076163
2021-12-02 02:25:11 -08:00
Bapiraju Alla
8354390c7d qcacmn: Add ML IE handling in util_scan_copy_beacon_data
Currently, ML IE address update is missing while copying the beacon data.
This may result in illegal memory access when ML IE accessed from copyied
scan entry after original scan entry got freed.

To avoid this, update ML IE address in new scan entry while copying
scan entry.

Change-Id: I6161481cbd13573b8177f122f7d26d177cc07aaa
CRs-Fixed: 3052302
2021-10-07 18:42:54 -07:00
Lincoln Tran
bb30b105cf qcacmn: Fix MLO compilation issues
Fix compilation issues in MLO related code.
Add debug prints when generating link assoc response.
Add NULL value check.

Change-Id: Ie5951816ee39428c086ec91eaa6fc9cf598072b6
CRs-fixed: 3038725
2021-09-27 17:57:59 -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
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
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
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
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
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
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
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
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
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