In case of split profile, while parsing the other segment
of the non transmitted profile present in the subsequent
MBSSID tag, it is possible that the beacon is corrupted where
the non tx profile length has gone out of bound.
In case of above scenario, the MBSSIE parsing code does not
free up the memory allocated for split_prof_start before
returning, which could possibly result into a memmory leak.
Handling the split_profile_continue bit before non tx profile
length check can avoid this situation.
Change-Id: Iaa491fd2803d88759e74ca5a668dddb9f8a42708
CRs-Fixed: 3023554
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
"scan_entry->ie_list.multi_link is null" print is
flooding the scan component. Hence, remove this print.
Change-Id: I921eea8afc2dba5637c7c02717e2d1fb544ba103
CRs-Fixed: 3023813
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
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
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
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
Add scan support for puncturing by extracting the puncturing
bitmap field in the EHT operation IE.
Change-Id: I221464f52bfce40b55344f995945836f80553579
CRs-Fixed: 2982502
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
Fix the channel validity check for DS param IE in beacon or probe
response frames in scan.
Change-Id: I17132d3d406b2953ad31dc6ab40b0158e21bc5c4
CRs-Fixed: 2960334
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
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
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
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
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
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
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
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
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
Updated the EHT related variables as per latest fw cmn headers.
Address review comments from previous EHT gerrits.
Change-Id: I67cd58a4efcf3e06d2ca3b5570432593b1d80825
CRs-Fixed: 2902607
Add EHT capability and EHT operation IE definitions and supporting
functions to parse these IEs.
Change-Id: Ida6f8b29fb33a581d2f13584f92327162cfa1664
CRs-Fixed: 2858005
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Currently, there is no provision for dynamic dwell time control in 6G.
Update existing driver commands SETDWELLTIME and GETDWELLTIME to
support 6G.
Change-Id: Id284097e300f3ed45557ebe7ea2287e0da9a485b
CRs-Fixed: 2789720
Non-Tx beacon generated in driver contains TX
beacon capabilities instead of capabilities
advertised as part of non-TX profile in MBSSID IE.
Copy the non-TX beacon capabilities from MBSSID IE
profile to driver generated non-TX beacon.
Change-Id: Iecf63b959176bac8d60055e6b77082a6f3ec117c
CRs-Fixed: 2789394
SAE Public Key (SAE-PK) authentication is an extension of SAE. Host adds
support for SAE-PK APs roam score which host uses to select AP for initial
connection and roaming.
User configures SAE-PK APs weightage using INI "sae_pk_ap_weightage".
Change-Id: I9066c483188bcbf01e3ffbcc4c57f04e1a9129f1
CRs-Fixed: 2769373
Adds wlan_scan_start and wlan_scan_cancel public APIs to use
from non-osif component, as ucfg_* API should only be used from
OSIF.
Change-Id: If603e49a57641dba26163454bce12327660b20fd
CRs-Fixed: 2773612