Commit Graph

475 Commits

Author SHA1 Message Date
Sheenam Monga
d47fccbfde qcacmn: Fix potential OOB read in util_scan_parse_rnr_ie
Currently, while parsing scan RNR Ie data is moved to
next neighbor_ap_info_field after parsing the current
neighbor_ap_info_field. But in last iteration pointer may
try to access invalid data if (uint8_t *)ie + rnr_ie_len + 2)
bytes are less than sizeof neighbor_ap_info_field and same
is the case with tbtt_length access.

Fix is to add a length check of data + next data size to be parsed
< (uint8_t *)ie + rnr_ie_len + 2) instead of adding a validation
of data length only.

CRs-Fixed: 3710080
Change-Id: I05e5a9a02f0f4f9bc468db894588e676f0a248c0
2024-04-07 21:07:09 -07:00
Krupali Dhanvijay
77cebf7083 qcacmn: Add check to avoid NULL pointer deference in parse MBSSID
In malformed beacon frame may deference the NULL pointer while
parsing MBSSID IE in util_scan_parse_mbssid will lead to crash.

Add check in util_scan_parse_mbsssid for split_prof_start before
passing to util_gen_new_ie and assign zero to split_prof_len
whenever split_prof_start freed to avoid unanticipated scenario.

Change-Id: Ibb9739d6b5d1775ab52d59f9aa5050ca693cd926
CRs-Fixed: 3717571
2024-04-03 16:43:31 -07:00
Surya Prakash Sivaraj
87778b39c8 qcacmn: Fix potential OOB read in util_scan_parse_mbssid()
If the length of the MBSSID IE is 0, then there is a potential
OOB read in util_scan_parse_mbssid(), when the Max BSSID indicator
field is accessed.

To fix this, do not proceed with MBSSID parsing if the length
of the MBSSID IE is zero.

Change-Id: I2c7a7641b77fed20a910cb77035588a7540caa62
CRs-Fixed: 3717567
2024-03-12 09:07:39 -07:00
Srikanth Marepalli
77e5284c7c qcacmn: Fix potential OOB read in util_scan_is_split_prof_found()
If the tag length in next_elem is some invalid high value then the
existing length check can still pass and lead to the OOB access.

Add an OOB check w.r.t total IE length to ensure it has the
minimum number of bytes in the buffer.

Change-Id: I9778a3e0ced05d3246d91e23c2a47f7318634d75
CRs-Fixed: 3717566
2024-03-12 09:07:27 -07:00
Jianmin Zhu
bf97803ce8 qcacmn: Fix wrong MLO 2 GHz link CCFS1 in response to get_channel
2 GHz link CCFS may not filled correctly in vht/he op, wrong CCFS0
is got from util_scan_sec_chan_freq_from_htinfo and passed to kernel,
regulatory check failed, disconnect will happen.

To fix it, add new API util_scan_ccfs0_from_htinfo, and get CCFS0 by it.

Change-Id: I0e8879f13cff37b85cffb6446cc15c60c05465d2
CRs-Fixed: 3739815
2024-03-11 01:50:08 -07:00
Krupali Dhanvijay
8cd067442d qcacmn: Change minimum mbssid ie length value to 1
Currently, in the driver, the minimum MBSSID IE length value
in the driver is set to 4. Some APs advertize this value as
1. In such situations, driver fails to parse the the ie.
So, to avoid such cases, modify the minimum mbssid ie length
value to 1.

Change-Id: I6ef89706b95318cb9bd38e04cab56b0fdef99fd5
CRs-Fixed: 3684794
2024-03-04 07:26:27 -08:00
Rahul Gusain
b2253d3444 qcacmn: OOB while accessing ML IE
Currently, in function "util_get_ml_bv_partner_link_info" driver
access the ML IE memory with offset which is calculated from ML IE
length and increment this offset with other values (such as
perstaprof_stainfo_len). But this can lead to OOB for ML IE when
this offset value is increment beyond ML IE length.

So, to fix this, add check for offset before accessing ML IE.

Change-Id: Ie7312ab3379fce16e5b0f83d07d46f263f774ed8
CRs-Fixed: 3710085
2024-03-04 00:57:21 -08:00
Krupali Dhanvijay
f323c32b7d qcacmn: Fix out-of-bound in wlan_mlo_parse_bcn_prbresp_t2lm_ie
Currently, In the MLO t2lm API, wlan_mlo_parse_bcn_prbresp_t2lm_ie
is missing frame boundary checks which may lead to out-of-bound
reads if the lengths are not checked by the caller.

Fix is, while parsing t2lm ie pass the frame length and add
check for frame boundary.

CRs-Fixed: 3704739
Change-Id: If3068db3489ee1c9a9da4945407598e27e3ca276
2024-02-22 22:28:30 -08:00
Vinod Kumar Myadam
a4e329c71c qcacmn: Fix out of bound read issue in ESP ie parse
While parsing ESP IE from beacon/probe response frame,
the condition in loop to copy ESP_INFO from the ESP IE is
incorrect which will iterate for 5 times rather than 4 times,
this may cause OOB access.

data < ((uint8_t *)esp_ie + esp_ie->esp_len + 3)
Here adding 3 for esp_ie->esp_len, actually esp_len itself is
1 byte extra (esp_ len = ESP_ID_EXTN + ESP_INFO * 4),
but by adding 3 again will loop for one more iteration
this will cause OOB access.

Remove 3 in loop condition to avoid one more extra iteration
and ignore ESP_ID_EXTN element for total elements, in function
util_scan_update_esp_data.

Change-Id: Ia9226e483672369af36c6914e3ac914fe9de45e5
CRs-Fixed: 3710081
2024-02-05 01:37:59 -08:00
Adwait Nayak
0b4d82980c qcacmn: Add sanity check to fix OOB issue
Add sanity check to fix OOB issue while generating scan entries
for beacon

CRs-Fixed: 3591858
Change-Id: I35b362bc89ab10fa2d2d6660263c726692384e07
2024-01-31 02:14:56 -08:00
Deeksha Gupta
13c5f7f8d0 qcacmn: Fix ML IE copy from main frame to non-Tx VAP frame
Currently, while generating non-TX VAP scan entry from the
TX VAP beacon or probe response MBSSID IE, driver copies
the ML IE from MBSSID and main frame which lead to 2 ML IE
in the TX VAP frame.

Fix is, add proper check to copy the non-TX VAP ML IE from
MBSSID IE.

CRs-Fixed: 3708786
Change-Id: I93f2552fe8a0080ffc871b39b164fadd86df8ff0
2024-01-21 08:55:28 -08:00
Vinod Kumar Pirla
c739c3b6cd qcacmn: Only allow partner links with matching RSN caps
Each link in MLO can have different RSN capabilities with
different AKMs, PMF capability, UC/MC cipher suites and so on.
For any choice of links for MLO connection, the AKMs of the
links should have one common AKM.

Eliminate partner links without overlapping AKMs from MLO
connection.
Modify partner link AKM to match assoc link AKM, so that
only overlapping AKM is chosen even though an AKM with
higher security exists for partner link.

Change-Id: I9573e938789a4b95ae824872845d31008861f6f2
CRs-Fixed: 3693814
2024-01-11 13:09:19 -08:00
Vinod Kumar Pirla
01e1c46c4e qcacmn: Generate ML prb rsp from assoc rsp
For non-TxMBSSID ML AP ML probe req may not receive any response
from MBSSID AP and later partner link may fail to connect as
scan entry is not present.
Introduce new flag to suggest whether the partner link scan entry
is present or not in the scan DB. If flag is set to true, generate
scan entry for such links.

Introduce new APIs which will generate ML probe resp using
the per-STA profile of partner link from assoc resp frame.

Introduce API to get the current candidate scan entry from
connect request.

Change-Id: I1c33956b01eb468afa26be5b0bfba634ee3a0aee
CRs-Fixed: 3675830
2024-01-10 09:54:22 -08:00
Vinod Kumar Pirla
da11474ac2 qcacmn: Add MLD addr filter in link VDEV candidate selection
Wireless environment may have APs with same BSSID but different
MLD address and if any APs BSSID is similar to the current
candidates affiliated partner link BSSID, then receiving beacon
or probe resp from such APs will override the affiliated link's
scan entry and the MLD address may be different or NULL if the
AP is non-ML.

If link VDEV connection starts and during candidate selection
it may find the scan entry of this other AP and attempt to drive
connection will lead to creating ML link VDEV's peer with
different MLD address than assoc VDEV's peer.

Enhance scan filter to match MLD address for link VDEV to avoid
such scan entry override.

Change-Id: I11c9b4efdf2d60e92482b296d731d613a200bf0e
CRs-Fixed: 3668326
2024-01-04 02:53:14 -08:00
Arun Kumar Khandavalli
a6fb445d02 qcacmn: Restrict max tbtt info length to current max supported length
Currently if the TBTT length is more than max supported length
driver doesn't the mld information from the RNR IE. This leads
to SLO rather than MLO.

Add the fix to restrict the max length to current supported max
length which helps to parse the ML information further
results in ML association.

CRs-Fixed: 3679296
Change-Id: Id8c58044be162f638ed5e74e0fd04aa0b77780f5
2023-12-28 13:01:10 -08:00
Vinod Kumar Pirla
f26efecdf9 qcacmn: Add VSIE matching with select action OUI filter
In order to identify certain vendor APs, it generated
AP beacon from MBSSID nonTx profile shall include these
Vendor Specific IEs (VSIEs).
If any matching VSIE of interest is present, copy the
IE to generated frame.

Change-Id: Ic3566ad0123c7353d7ace1b0077d6a3730d10dc8
CRs-Fixed: 3682937
2023-12-21 04:35:11 -08:00
Jyoti Kumari
a50ca46487 qcacmn: Allow scan on same mac channel where LL_LT_SAP present
Currently, scan on same mac channel is not allow where
LL_LT_SAP is present.

But as part of this change, allow scan on same mac channel
where LL_LT_SAP is present.

Change-Id: I0c781caa70bf5c95c0639218dd08a409ebeefbfc
CRs-Fixed: 3636119
2023-10-18 22:47:35 -07:00
Shashikala Prabhu
608e4120f0 qcacmn: Use the correct offset to fetch STA profile subelement
STA info length subfield of STA info field indicates the number of
octets in the STA Info field, including one octet for the STA Info
Length subfield.
In the current implementation, one extra byte is added to STA info
length subfield to access STA profile subfield. Due to this, unable
to extract CSA, ECSA and MCST IEs from the STA profile.

To fix this, don't add WLAN_ML_BV_LINFO_PERSTAPROF_STAINFO_LENGTH_SIZE
to offset field to access the STA profile subelement.

Change-Id: I99fb3c5d1bfb9b3bf414fc0b778d724e98a3c7ae
CRs-Fixed: 3640538
2023-10-18 04:25:30 -07:00
Gururaj Pandurangi
cfbb3005ef qcacmn: Add a cfg set API to configure scan mode for 6 GHz
Add a cfg set API to configure scan mode for 6 GHz. This is
invoked in reset HE capability API.

Change-Id: If4891036dec3777d85f3584eef965ed65ececadd
CRs-Fixed: 3629445
2023-10-10 23:10:02 -07:00
Gururaj Pandurangi
852d0cee43 qcacmn: Add support to configure MLD ID in scan request
In the MLO-MBSSID test, STA can request information of
non-Tx BSS through Tx BSS by configuring non-Tx BSS MLD
ID within the ML probe request that is invoked as part
of scan request. Add support to configure MLD ID in
scan start params to FW.

Change-Id: I4a6debf6c3ec830fbe3aee1d3aa60ad7218cbcd6
CRs-Fixed: 3591596
2023-10-02 20:30:12 -07:00
Aasir Rasheed
8c6365939b qcacmn: Send max num of active links to fw
This change is to send max num of active links recommended
by AP to the fw.

CRs-Fixed: 3599429
Change-Id: Id84b7d1aa8d6eb29d3acef2f3e8c552bc6c636f0
2023-10-01 18:12:23 -07:00
Srinivas Dasari
aafe99c365 qcacmn: Parse 11AX RNR TBTT info field even if 11BE is disabled
Currently, below 11BE RNR TBTT field doesn't get processed when
11BE is not defined,
TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM
So, station is not able to parse the RNR IEs from the 11BE APs.
Parse TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM
always but extract 11be info only when 11BE define is enabled.
Also, cleanup the duplicate code.

Change-Id: I49e38875f3f0a3ab238636f7a8e0f93c7aa4d04b
CRs-Fixed: 3624227
2023-09-29 02:24:16 -07:00
Jyoti Kumari
d14e4dcaa0 qcacmn: Modify default value of last_scan_ageout_time
Currently, default value of last_scan_ageout_time ini is 0 sec.
Modify it to 30 sec to avoid dependency on userspace
configuration.

Change-Id: If0d00c98950a0c20f22ee73d01e4442bd0d677c0
CRs-Fixed: 3625696
2023-09-29 02:24:03 -07:00
Guru Pratap Sharma
d383bdce33 qcacmn: Adding memory not allocate debug print
Adding memory not allocate debug print when fail to allocate
memory for scan node

Change-Id: I77c9a3deeb9fff9fd265188060ff3aa3aa17b866
CRs-Fixed: 3611905
2023-09-26 14:41:00 -07:00
Paul Zhang
a64af3b447 qcacmn: Get profile index and count for non-tx AP
In the scenario about MLO 5 GHz + 6 GHz and 6 GHz is non-tx AP in
MBSSID, if DUT tries to connect 5 GHz link as assoc link and uses
the scan entry generated from 5 GHz beacon. Then there is no info
about profile index and count in the scan entry and these info is
necessary for firmware when vdev up.

To resolve this issue, get the info from 6 GHz scan entry if it
exists.

CRs-Fixed: 3616899
Change-Id: Ic9bf9bc107c3486be1e87ea2c19c5d388ca41883
2023-09-25 01:30:04 -07:00
Linux Build Service Account
38ceb24812 Merge "qcacmn: Parse Extended MLD CAP & OP of ML IE" 2023-09-22 11:09:35 -07:00
Linux Build Service Account
771b5ac7a1 Merge "qcacmn: Get new scan capability" 2023-09-22 01:13:58 -07:00
Shwetha G K
2c7b2d2388 qcacmn: Fix OOB issue
Changes to fix OOB issue seen util_scan_parse_beacon_frame.

CRs-Fixed: 3582496
Change-Id: I53244be54d31e87b55d0b44ce94315c8001f417d
2023-09-14 04:45:19 -07:00
David Oladunjoye
096449a4fe qcacmn: Get new scan capability
Host needs to check new scan is enabled on device before
sending scan request.
Changes are as follows:

-Add new scan bit to scan obj.
-Fetch new scan service bit from FW.
-Update new scan in scan obj based on service bit from FW.

Change-Id: I19d874e859208dcdb2476e0fd2fbd61fcc77e565
CRs-Fixed: 3509136
2023-09-13 09:33:00 -07:00
Paul Zhang
3ceac81c5e qcacmn: Fix issue about generating MBSSID frames
When generating MBSSID beacon/probe response frames, it
misses the last IE in the MBSSID ie list. To address it,
correcting the comparing length.

CRs-Fixed: 3609711
Change-Id: Ia406be0ade901c9bc01698faec473bd25c59dfb3
2023-09-09 03:36:33 -07:00
Rakesh Boyina
f4b054cd11 qcacmn: Parse Extended MLD CAP & OP of ML IE
Include Extended MLD Capabilities & Operations subfield size
calculation in the calculation of Common Info Length of the
Basic Variant ML-IE parsing

Change-Id: I8fea9058dc37b7605827ef827a3ccba71be00982
CRs-Fixed: 3590364
2023-09-07 11:19:32 -07:00
Guru Pratap Sharma
dbd510c42c qcacmn: handle integer underflow in util_gen_new_ie
handle integer underflow for subie_len in util_gen_new_ie

Change-Id: I2f73e5a7e0462100deae1e85e6a51f77bfc46b95
CRs-Fixed: 3582487
2023-08-24 01:26:59 -07:00
Aravind Kishore Sukla
78d988e666 qcacmn: Reject partner link based on security check
For multi link connection there might be the case where
rsnxe of the AP is not present on the link vdev.
This causes the link vdev alone to downgrade to 11ax
mode and assoc vdev is in 11be dot11 mode.
So for vdev with ML peer, the dot11mode is 11ax,
which causes abnormal firmware behavior.

Reject the partner link that doesn’t pass the security
check and validate the next available partner link.
if none of the partner link passes the security check,
proceed connection with single link.

Change-Id: I080557027180c0566a1c284a93fcc4b69c61a9c8
CRs-Fixed: 3581189
2023-08-21 10:58:15 -07:00
Paul Zhang
674627f868 qcacmn: Fix use-after-free issue in util_scan_parse_mbssid
In some scenario, mbssid_info->prof_residue could be set to
true, hence mbssid_info->split_prof_continue will also be
set to true. Then for the next loop if buffer split_prof_start
is freed but split_prof_end does not reinitialize to NULL,
then use-after-free happens.

To address this issue, reinitialize split_prof_end properly
when split_prof_start is freed.

Change-Id: Iad7448868cfa4c2dd7922f6c1b2622cf20a6a28c
CRs-Fixed: 3583521
2023-08-18 18:10:48 -07:00
Ashish Kumar Dhanotiya
a0bd216fc8 qcacmn: Add support for LL_LT_SAP_MODE in policy mgr
Currently PM_LL_LT_SAP_MODE is not handled in policy manager.
With this change add support for PM_LL_LT_SAP_MODE in the policy
manager.

Change-Id: I7b893b04498957eb4a7e9f74c4b4395d4a823bf9
CRs-Fixed: 3536612
2023-08-17 21:01:54 -07:00
Surya Prakash Sivaraj
9cd7aef35e qcacmn: Use HT info to get operating bandwidth
APs can broadcast support for 20 & 40 MHz in the
HT cap IE and operate in 20 MHz also.

Therefore, use the extension channel offset field
of the HT info IE to identify the bandwidth of the
BSS.

Change-Id: I9987d45ec34ba3327b43ef70eb891d346e9e78c9
CRs-Fixed: 3587792
2023-08-16 19:16:42 -07:00
Vijay Raj
c9ffbec347 qcacmn: Remove redundant check in wlan_scan_start
In api wlan_scan_start(), redundant check for
scan_start_req is observed in some static analysis
tool.

Remove the redundant check in the ap
wlan_scan_start() as the check is present in the
api scm_scan_free_scan_request_mem

Change-Id: Ic320bb95253668310c5d738216daba62ba2f4b3f
CRs-Fixed: 3528505
2023-06-22 09:10:44 -07:00
Thirusenthil Kumaran J
9c6e306ffd qcacmn: Do not drop beacons for channels present in NOL
Currently, during scanning, while parsing the received beacons,
the beacon IEs are checked to verify whether the channel
present in the beacon is invalid. If the channel is found to be
invalid, the corresponding beacons are dropped. This check treats
the channels in the NOL list as invalid channels.

Consider a case of a repeater with RCSA enabled; when the RE
detects a radar, the RE adds the radar detected channels to
NOL and sends an RCSA action frame to the Root AP to intimate
the Root about the radar detection. The RE will also wait for the
Root to send CSA to RE. But in this case, the RE will not parse
the CSA IE received from the Root, as the beacons from the Root
AP are dropped, as the channel present in the beacon is
considered invalid.

The purpose of the channel validity check in the beacon parsing is
to avoid receiving beacons from an invalid channel, that is, the
channels that are not supported by the device. Since NOL channels
are valid, we can parse the beacons received from an NOL channel.
Therefore, to fix this issue, use the regulatory API
'wlan_reg_is_freq_enabled' instead of the API
'wlan_reg_is_disable_for_pwrmode' to check if the channel is
invalid.

The API 'wlan_reg_is_freq_enabled' treats NOL channels as valid
channels.

Change-Id: Iad502363c0ad15be2a009480c49bffcf8e004943
CRs-Fixed: 3513560
2023-06-21 13:30:48 -07:00
Jianmin Zhu
da25bf14e9 qcacmn: Select best link as assoc link
For mlo 5+6, 6 GHz band score is higher than 5 GHz, so 6+5 total score is
higher than 5+6, 6+5 is always selected before 5+6 even 6 GHz link score is
much worse than 5 GHz.

To fix it, calculate each link score for each MLO AP, if assoc link is
best link, add a boost score, then it can be selected first.

Update band weight and score for both SLO and MLO, select average of link
band score as MLO band score.

Change-Id: If0714fa94031d5746d89388917540f0e34086d86
CRs-Fixed: 3483850
2023-06-17 17:02:27 -07:00
Pragaspathi Thilagaraj
fe4e1c1ae3 qcacmn: Retry MLO connection with SLO on connection failure
Currently if MLO connection fails then connection is tried
with same link until it reaches to maximum no of trials but
connection is not tried with same assoc link by changing partner
link or with SLO.

So, when vendor roam score algorithm is enabled, add logic to try
MLO connection again by reducing number of partner links with
each retry till SLO connection is tried.

Change-Id: Ic0e3acd2198cfa0ed0ff893da6ae32d669d32a41
CRs-Fixed: 3521159
2023-06-08 05:09:28 -07:00
Abhishek Singh
e7e15dbff4 qcacmn: Optimize scan logs while dropping frame
Optimize scan logs while dropping frame to print frame type
and freq and other info and use same format to print.

Also If bssid hint is zero, avoid printing hidden bssid which
are filtered out.

Change-Id: Ibb6cb523b9be6af2c05c4a5a7a5cbccb44f984af
CRs-Fixed: 3506377
2023-05-23 21:57:17 -07:00
Paul Zhang
2c6112bf44 qcacmn: Copy ML IE from right position for MBSSID
For MBSSID case, ML IE does not contain full per-STA profile info
in MBSSID IE. When generating the beacon and probe response frame
for MBSSID case, it needs to copy the ML IE info from main frame.

Change-Id: Id369d08772f11a5f0f838351b5b76ecce3762c55
CRs-Fixed: 3479932
2023-05-16 09:16:18 -07:00
abhinav kumar
058889e6a0 qcacmn: Process ML Channel Measurement request
Host parse newely added vendor command
QCA_NL80211_VENDOR_SUBCMD_CONNECTED_CHANNEL_STATS and trigger
scan to get connected channel stats from FW in case of MLO
connection.

On scan done host sends scan done indication to upper layer
via QCA_NL80211_VENDOR_SUBCMD_CONNECTED_CHANNEL_STATS vendor
command.

Change-Id: I92dbd779c5fbdb1652a37cfa54c177bd13de4f28
CRs-Fixed: 3491060
2023-05-14 05:07:51 -07:00
Abhishek Singh
587f3af96b qcacmn: Optimize beacon/probe rsp logs
Optimize beacon/probe rsp logs, by printing the params when
their values are non 0. Thus reducing the logs size.

Also add the frame length in the logs.

Change-Id: I6cad77b6cdc4576804cdabd9f53235029e6cebd7
CRs-Fixed: 3490632
2023-05-12 23:08:59 -07:00
aloksing
d8e1a8418c qcacmn: keep non intesected phymode in scan db
scan db has intersected phymode. For BSS information via iwlist we need
non intersected phymode.

Change-Id: I62a4aea33a67ac12b5be5bcdd4a3fc4538056df9
CRs-Fixed: 3454700
2023-05-12 16:39:25 -07:00
abhinav kumar
df618544a3 qcacmn: Process get_cu_for_each_subbw driver command
1. Read the new service capability:
WMI_SERVICE_CCA_BUSY_INFO_FOREACH_20 MHz: Via this host knows
whether FW supports reporting of CCA busy info for each 20 MHz
subband of wideband scan channel or not.

WMI_SERVICE_VDEV_PARAM_CHWIDTH_WITH_NOTIFY_SUPPORT: Via this
host knows whether FW supports VDEV param channel width switch
with OMN/OMI notification or not

2. Register osif callback to send scan done indication to upper
layer

3. Add 2 new scan flags pause_home_channel and
report_cca_busy_for_each_20 MHz

Change-Id: I63d561a3c5f8e49a3ca42d956e6b630c63edeaf4
CRs-Fixed: 3460901
2023-05-03 04:58:20 -07:00
Vinod Kumar Pirla
7382a9f799 qcacmn: Use MLD address of BSS peer for PMKSA operations
If PMKID present in AP expires, AP rejects the PMKID based association.
Current design is to clear the cache using BSSID/MAC address of link
in such cases to let a fresh SAE authentication to happen.
But host driver stores PMKSA with MLD address for ML BSS.
Adapt to the same and update PMKSA cache clear APIs to use
MLD address instead of link address.

Introduce new API which return the legacy address for non-ML
association and MLD address for MLO association of the BSS peer.
Use this API to get the correct entry from PMKSA cache to delete.

Introduce new utility API to fetch the MLD address from scan entry.
Use this API to get the MLD address of the ML candidate.

Change-Id: Id35a3937ba6649e8ba7ae8f849ac1ed2a9cc83f8
CRs-Fixed: 3453839
2023-04-26 18:25:02 -07:00
Guru Pratap Sharma
42a7f2f1b4 qcacmn: Adding and parsing of bandwidth indication element
Adding and parsing of bandwidth indication element sub IE

Change-Id: I20fca6ecf370d5d20f0e6e8e4f873bf57da3d181
CRs-Fixed: 3464120
2023-04-20 00:15:51 -07:00
Guru Pratap Sharma
08131c79a1 qcacmn: Add Bandwidth Indication Element support
Adding Bandwidth Indication Element Sub IE structure and other support

Change-Id: Iae761582e8c5d2b12af231e58c6dcbb23421e9dd
CRs-Fixed: 3444254
2023-04-06 18:13:29 -07:00
Vinod Kumar Myadam
b7987d7b29 qcacmn: Fix OOB in util_gen_new_ie
For example, If tmp_new[1] = 3, subie_len=160,
tmp_new + tmp_new[1] + MIN_IE_LEN) - sub_copy will be 159.
In this scenario, while condition gets true (159 <= 160)
In if condition (159 >= 160), we are not breaking the loop in if.
tmp_new will get incremented, tmp_new will point at 159,
tmp_new[1] will point at 160, tmp_new[2] point at 161.
So, we are accessing one byte out-of-bound value.

To fix accessing out-of-bound value subtract one from the subie_len
in while and if condition to avoid this scenario.

Change-Id: I624585323963b6d79acf9ff0f96ec17e0b415c2d
CRs-Fixed: 3358833
2023-03-17 07:20:18 -07:00