Commit Graph

161 Commits

Author SHA1 Message Date
Shwetha G K
05aacf97e5 qcacmn: Do not wait for teardown completion in SSR
In case of SSR, do not wait for the teardown completion.

CRs-Fixed: 3247401
Change-Id: Ib81eeff8a81134d3108c7d74bb78974f89adf3c4
2022-07-26 03:56:50 -07:00
Rohan Dutta
8df93e3dd4 qcacmn: add null check on connect req params
Add null check on connect req params before
invoking cloning of rsn/rsnx ies for mlo stations

Change-Id: I651683ad7eb6a5c0404feee321402ac1f39edcfc
CRs-Fixed: 3234326
2022-07-25 05:14:03 -07:00
Gururaj Pandurangi
e305f83430 qcacmn: Validate vendor IE len in util validate API
Add check to validate vendor IE length in util validate
reporting STA IE API to avoid OOB read.

Change-Id: I1cdd8eced7b5ffcecde6f0337eb45fc90077932f
CRs-Fixed: 3236561
2022-07-24 04:41:04 -07:00
Srinivas Pitla
ce514f7963 qcacmn: Add NULL checks to prevent invalid access
Currently, in few instances the MLO peer APIs are called
with invalid ML peer pointer.

This change prevents NULL pointer access and clears MLO
flag for peer.

Change-Id: I8bcdae1d71655f7ed267cc5bc3f6d0fc51e930df
CRs-Fixed: 3245158
2022-07-24 04:40:58 -07:00
Shreedhar Parande
e6b1ed7180 qcacmn: Read EML and MLD Cap from target
Extract EML and MLD Capabilities from Target via
wmi_service_ready_ext2_event. These values can be
used while advertising EML and MLD Capabilities.

Add helper function to get EML related delays in
Micro Secs from values got from EML and MLD advertisments.

Send EML Capabilities received from node to Target
via WMI_PEER_ASSOC.

CRs-Fixed: 3225495
Change-Id: Ibfa2ff8dbf11d4293125331376a7986e611d5f63
2022-07-23 19:14:48 -07:00
Srinivas Pitla
b39112e991 qcacmn: add mld address to auth params
This change adds MLD address to deferred auth params
as Auth req carries MLD address

Change-Id: I4a97299967bc052166f351ce041ccc8d13656e9e
CRs-Fixed: 3246869
2022-07-21 07:46:24 -07:00
Srinivas Pitla
baaea274e7 qcacmn: Reset primary umac bit in assoc peer
In current code, assoc peer is designated as primry umac,
on primary umac allocation, primary umac bit gets reset.
But in force umac case, primary umac bit not getting reset.

This change resets primary umac bit of assoc peer, if
assoc peer is not designated primary UMAC.

Change-Id: I640433548b9efeb20ba2b23f8d1141cc5505087b
CRs-Fixed: 3243326
2022-07-19 01:36:17 -07:00
Deeksha Gupta
3d3d3c4fdb qcacmn: Validate next_ie length in util_get_successorfrag()
Currently, in wlan_defrag_elemsubelem_fragseq() API,
there is possible buffer over-read in fragbuff buffer.
Buffer may have a malicious length larger than their
payload size, which leads to a buffer over-read during
defragmentation.

Fix is to validate the fragment length against the buffer
boundary in util_get_successorfrag().

Change-Id: Ia9e688a0ab17954eb464ec586820bb95b51f12d1
CRs-Fixed: 3236560
2022-07-19 01:36:02 -07:00
Gururaj Pandurangi
a57b8d20e4 qcacmn: Add host fixes for 11be eMLSR mode
Add following fixes for STA to support and operate in
eMLSR mode
1) Update and send eMLSR cap flag to FW even in vdev start
request on both links.
2) Copy EML caps to wmi peer assoc mlo params to send it
to FW.

Change-Id: Ic17b9b82809659d7a4392c09eceecae7c53b2049
CRs-Fixed: 3237737
2022-07-18 23:36:38 -07:00
Surya Prakash Raajen
d8c841f63b qcacmn: Add mld config checks in vap create
Add mld config checks in osif_vap_create_check and fail
once the config is invalid.

Change-Id: I26c3b4719fa9b18be0a4590861c654504fb3e6bf
CRs-Fixed: 3200923
2022-07-18 04:53:18 -07:00
Himanshu Batra
bccbe0389d qcacmn: Add fix to avoid race between connect comlplete and disconnect
In case of MLO, if connect is in progress and assoc vdev is moved to
connected state, if the disconnect is received before mlo mgr is
notified for connect, then it can lead to race between connect and
disconnect processing.

Add fix to avoid race between connect comlplete and disconnect by
checking connected link bitmap which is set in mlo connect notifier

Change-Id: I5783827c00106bf6bda2949e4154088fd172de15
CRs-Fixed: 3241708
2022-07-15 07:15:50 -07:00
Shashikala Prabhu
79b3391de9 qcacmn: Replace WLAN_FEATURE_T2LM flag with WLAN_FEATURE_11BE
Replace WLAN_FEATURE_T2LM compile-time flag with WLAN_FEATURE_11BE.

Change-Id: If3253bf3aae04f434252bfc92d00b8649f831bfe
CRs-Fixed: 3238444
2022-07-12 08:57:02 -07:00
Paul Zhang
b4a50cb3ce qcacmn: Lock protection when access mlo peer list
The api wlan_mlo_peer_list_peek_head is invoked with lock acquired.
wlan_mlo_peer_create api does not invoke ml_peerlist_lock_acquire
and ml_peerlist_lock_release when invoking api mlo_get_mlpeer, this
causes race condition issue.

To resolve this issue, using api wlan_mlo_get_mlpeer instead of
api mlo_get_mlpeer.

Change-Id: Ifb41b7d83bf17938d210ce5a2d7f370d6355197c
CRs-Fixed: 3228243
2022-07-11 03:59:16 -07:00
Paul Zhang
8bddc409a3 qcacmn: validate frame length in util_find_extn_eid
A malicious input can cause a buffer over-read in util_find_extn_eid.
When len==2 and frame[TAG_LEN_POS]==0, the while loop will be entered
and an over-read will happen for frame[ELEM_ID_EXTN_POS].

Since both MIN_IE_LEN and ELEM_ID_EXTN_POS are equal to 2, ensure
(len > MIN_IE_LEN) before accessing the index.

Change-Id: Ia0aa8a2b59e8bf9ac06f5454e40687c5c34c5d88
CRs-Fixed: 3236559
2022-07-08 05:41:04 -07:00
Edayilliam Jayadev
23ab68e55c qcacmn: Add TSF offset field in per-STA profile subelement
As per draft 2.0, add TSF offset field in per-STA profile
sub element.

CRs-Fixed: 3221744
Change-Id: I4c38012054decb5366b1e280c671f254fe5dffdf
2022-06-29 01:09:28 -07:00
Deeksha Gupta
b52e67679a qcacmn: Update ML IE handling as per draft 2.0 new definitions
Update multi link IE definition as per 11BE draft 2.0 spec.

Change-Id: I120f1a99ef683f6bf0b9fb0ba3b5d157625639ca
CRs-Fixed: 3220212
2022-06-29 01:09:22 -07:00
Srinivas Pitla
c6edce51c0 qcacmn: Fix max aid assignment
Current max aid assignment doesn't consider start aid
which is causing start aid greater than max aid in
MBSSID MLO case.

This change accounts start aid while updating max aid

Change-Id: Ic6af28cd2599090538393082032932ba416b4c66
CRs-Fixed: 3220059
2022-06-27 19:35:43 -07:00
Vinay Adella
0e54add2cb qcacmn: Utility functions to parse Probe Request Variant of Multi-Link IE
These utility functions help to parse the Probe Request Variant of
Multi-Link IE.
It implements 11BE draft 2.0 spec

Change-Id: I09dcf47ef481278f5c74082002f83d9c8e2155a4
CRs-Fixed: 3213367
2022-06-27 02:10:23 -07:00
Pooventhiran G
ea990338cf qcacmn: Add API to copy MLO vdev list
Add a new API to copy all partner vdev's from MLD vdev_list

Change-Id: I34ab253f4939e2f1f607e971e38c245cad091037
CRs-Fixed: 3224259
2022-06-24 14:14:24 -07:00
Shreedhar Parande
7c2d02ecf3 qcacmn: Update definitions for MLD capability subfield
Update definition for MLD capabilities subfield present in
the Common Info field of Basic Multi-Link element as per
IEEE802.11be D1.5.

Store parsed MLD capability in node to send these to Target.
Add endianness handling for MLD Capability.

Add a check if the value in the common info length tallies
with the length as determined from the presence bitmap for
MLD capabilities.

CRs-Fixed: 3206837
Change-Id: I3d03afbd60171b2cf5e81c9a8dbb51d7673c9163
2022-06-16 09:15:33 -07:00
Amruta Kulkarni
83e349e4ae qcacmn: Generate link specific probe response
Changes made to link generation api to handle probe response.

Change-Id: I5b86599a9704e3c41bbb0d0127078d586e4d1d8c
CRs-Fixed: 3158769
2022-06-15 11:09:00 -07:00
Krishna Rao
4ce7d8f466 qcacmn: MLO D1.5 - Process BSS param change count presence in STA Info
As part of a transition of basic MLO functionality to IEEE802.11be
D1.5, add definitions and receive processing for the signaling of the
presence of BSS Parameters Change Count subfield in STA Info field in
Per-STA Profile subelement in Basic Multi-Link element Link Info
field. This presence is signaled by a new bit in the STA Control
field of the corresponding Per-STA Profile subelement. Rename the
definition for BSS Parameters Change Count (sub)field size to make it
generic since it may occur in various protocol signaling areas
related to MLO.

Change-Id: Ieb17f65547b7106442369b51cd6bc303046a224a
CRs-Fixed: 3197012
2022-06-13 10:51:39 -07:00
Srinivas Pitla
18e9ba976b qcacmn: Reject MLO association on same STA MLD MAC address
This change rejects association if MLD MAC address of Station
is same as AP MLD MAC address.

Change-Id: Ie8cafcf8bf0033dc63efbcd0047ddcabf996942b
CRs-Fixed: 3212459
2022-06-11 06:56:41 -07:00
Kiran Venkatappa
1c9f11fa8a qcacmn: AID changes for T2LM clients
Aid pool is divided into three pools. pool0 and pool2 is for legacy and
MLO clients. pool1 is for T2LM enabled clients. This is done to ensure
that T2LM enabled clients are starting from particular index so that
multi-link traffic element can be updated optimally.

Change-Id: I2d5fe50a6ba339e89f4b65febc7b1b1bbb200477
CRs-Fixed: 3205993
2022-06-08 11:47:47 -07:00
Paul Zhang
96b039f9f8 qcacmn: Correct the kernel-doc format
Correct kernel-doc format for the functions in file utils_mlo.h.

Change-Id: I5a91675867885d8fdf262c7ea7f98a09f9e2e539
CRs-Fixed: 3203893
2022-06-07 08:18:52 -07:00
Srinivas Pitla
e89b339b23 qcacmn: Select assoc peer's psoc as primary UMAC
select assoc peer as primary umac,
1) if all links are from single PSOC
2) single link MLO connection

Change-Id: Ia38e6809ef7d0201a2267051b8b4bcec7b36547f
CRs-Fixed: 3203804
2022-06-05 23:54:06 -07:00
Srinivas Pitla
34c16f4118 qcacmn: AID manager fixes for MBSSID vaps
1) Do not free Tx VAP's AID manager, if AID manager of
   non-Tx vap and Tx vap doesn't match
2) Do not allocate AID manager for MLD vaps, if AID
   manager is already allocated

Change-Id: I08b19397540f364503eaa1c269c6d0679a9a9fc0
CRs-Fixed: 3212368
2022-06-05 12:38:13 -07:00
Shreedhar Parande
5f96fd74c9 qcacmn: Parse EML capability subfield in Common info for non-AP MLD
Parse EML capability sub field present in Common Info field of Basic
Multi-Link element from Association request send by non-AP MLD.

Add new API to get EML capabilities from the ML IE.
Update definitions for EML as per IEEE802.11be D1.5.
Store parsed EML capability in node to send these to Target.

CRs-Fixed: 3203322
Change-Id: Ib208ba2d8e86df7360656c1c844e4835a93cedc4
2022-06-03 11:39:20 -07:00
Paul Zhang
aeacfe3922 qcacmn: Add new API to fetch ML IE info
In order to provide the info about common info len and BSS
param change count, add API util_get_mlie_common_info_len()
and util_get_bvmlie_bssparamchangecnt().

Change-Id: I0f5fea2265cbb8f1df265542af7009d624a0129b
CRs-Fixed: 3202491
2022-05-27 19:37:23 -07:00
Arun Kumar Khandavalli
b0fafa0130 qcacmn: Disconnect the ml connection incase of link assoc failure
Currently even when the partner link assoc failure driver is maintining
the assoc link this is resulting in several side effects w.r.t
memory corruptions etc.

Disconnect the ml connection incase of link assoc failure.

Change-Id: I4bbdcf4099f3042f5065067ca5d817f986ffb30a
CRs-Fixed: 3204310
2022-05-27 05:08:37 -07:00
Ruben Columbus
751084e7f8 qcacmn: Fix flaw in cdp_update_mlo_ptnr_list() parameter
In mlo_ap_vdev_attach() we call cdp_update_mlo_ptnr_list(), and logic
exists which was supposed to test the return value for success.
However due to a misplaced parenthesis, the test for success is actually
applied to the last parameter, and that test result is sent as a
true/false value to cdp_update_mlo_ptnr_list().

To fix this issue relocate the parenthesis so that the last parameter
is correctly passed and the test for success is applied to the
return value.

Change-Id: I055150dae726a69f0e70f02f7fbe26550f48e558
CRs-Fixed: 3181220
2022-05-25 01:45:01 -07:00
Srinivas Pitla
d5f73ed96a qcacmn: MBSSID support for MLO AID manager
This change adds MBSSID support for MLO AID manager.
It handles AID allocation and AID free for MLO and Non-MLO peers
associated to MLO/Non-MLO VDEVs

Change-Id: I616cca6afeb9178a3b7f183c6bd986fe9b30a4fa
CRs-Fixed: 3200173
2022-05-24 11:00:26 -07:00
Surya Prakash Raajen
ff354463a5 qcacmn: Check mld ctx info first and then print debug info
Check mld ctx info first and then print the debug info
for teardown request with num socs and num links.

Change-Id: Ib37ce76955e2b83aaa5ecec08010f05e293c2a19
CRs-Fixed: 3200920
2022-05-20 07:38:15 -07:00
Himanshu Batra
05072ad2c0 qcacmn: Add fix to release ml dev lock in case of failure
Add fix to release ml dev lock in case of failure.
Also add null check for assoc vdev

Change-Id: I5f81217b32d676b556030b504476bf4e3c92b718
CRs-Fixed: 3199710
2022-05-19 01:57:42 -07:00
Aditya Kodukula
16c15a6499 qcacmn: Add support for MLO stats
As part of MLO stats feature, add support to send ll_stats
and get_station stats request to firmware for all the MLO vdevs.

Change-Id: Ic50a6294f868f0604d4cfc0d4b657b6085da2fb4
CRs-Fixed: 3181020
2022-05-14 03:35:17 -07:00
Srinivas Pitla
feb53a95ee qcacmn: Release link peer ref if MLO peer attach fails
MLO peer attach fails if MLO peer with same MLD address gets
created. While freeing MLO peer, releasing of link peer ref
is missed

Fixed some of the corner cases handling with ml peer id, AID

Change-Id: Ia3ff13a3840083bfe389b39086a6c5aa1f709fca
CRs-Fixed: 3185069
2022-05-12 00:04:06 -07:00
Edayilliam Jayadev
40dacfa471 qcacmn: Count MLO vdevs in a pdev
Count the MLO vdevs in a pdev. WLAN_VDEV_FEXT2_MLO feature
flag in vdev object is set for all MLO vdevs. Simple solution is
to increment/decrement the count on every set/clear of
WLAN_VDEV_FEXT2_MLO feature flag. Since this feature flag will be
set/clear at multiple places for a given vdev, this approach
will lead to wrong MLO vdev count. To fix this we need to
increment/decrement the count on first set/first clear of
WLAN_VDEV_FEXT2_MLO flag. Add a lock also to prevent the race
conditions.

CRs-Fixed: 3106235
Change-Id: Ice7edde04553088fbb7c9b769508d441ccd6e4bf
2022-05-11 05:53:18 -07:00
Himanshu Batra
826f250128 qcacmn: Add support for mlo peer delete params
Add support for mlo peer delete params

Change-Id: Ic6ef0786f73a7bb16c8a5de035b13a0a56862125
CRs-Fixed: 3188357
2022-05-09 04:08:28 -07:00
Deeksha Gupta
598c7f9c07 qcacmn: Update ML IE handling as per D1.4 new definitions
Update multi link IE definition as per 11BE draft 1.4 spec.

Change-Id: I560d63019d10e22672dc95e9426fa6e8aca5a105
CRs-Fixed: 3156980
2022-05-06 16:42:10 -07:00
Surya Prakash Raajen
7521505f91 qcacmn: Initialize teardown event only once
Initialize teardowen event only once, intializing
events multiple times leads to assert.

Change-Id: I93a72c787dffa7ab081df9cca8ba17cc065e207a
CRs-Fixed: 3186523
2022-05-06 16:41:43 -07:00
Sheenam Monga
6606026e3f qcacmn: Avoid re allocation of req in mlo_ser_set_link_req
In mlo_ser_set_link_req, req is again allocated and thus
the req->ctx.cb_arg doesn't points to the new memory.

so avod reallocating the req memory again in
mlo_ser_set_link_req and use the passed memory directly
as umac_cmd.

Change-Id: I0bdc9cf746b2a36c69b5ca0f773f06900a9783dd
CRs-Fixed: 3188736
2022-05-05 07:13:08 -07:00
Shashikala Prabhu
6f0d0248f0 qcacmn: Define T2LM structure in wlan_mlo_peer_context structure
T2LM negotiation happens per MLD level. Hence, define the T2LM related
structure in wlan_mlo_peer_context.

Add API to get the protected EHT action frame subtype.

Change-Id: Ia3870fbb38b8d673f96954af18078c96d20365f3
CRs-Fixed: 3167178
2022-04-29 02:10:57 -07:00
Himanshu Batra
bef237765d qcacmn: Add fix to use correct vdev pointer
Add fix to use correct vdev pointer

Change-Id: I14721d494b9ca40b480cf9315002e96006f848a1
CRs-Fixed: 3178303
2022-04-27 07:24:20 -07:00
Shashikala Prabhu
1a3a58f4de qcacmn: Add API to get MLD CAP info from Basic Variant ML element
Add API to get the MLD capabilities from a given Basic variant Multi-Link
element or element fragment  sequence.

Change-Id: I9f0d8069a970523948fd604b4977efd3d41a4d2d
CRs-Fixed: 3177254
2022-04-27 07:24:14 -07:00
Shwetha G K
6f4cc59749 qcacmn: Fix NAWDS ML peer creation crash
Fix for crash seen during MLO NAWDS peer creation.
Peer assoc for MLO NAWDS peer is done in a different way
hence avoid peer assoc in wlan_mlo_peer_create.

CRs-Fixed: 3179437
Change-Id: I76356e68ef267fe2b4d37bfe29faca5ed8c02347
2022-04-25 15:22:20 -07:00
Edayilliam Jayadev
3d17fd1925 qcacmn: Update bitmap of valid MLO links
Update the bitmap of valid MLO links.

CRs-Fixed: 3166124
Change-Id: I295531325e7e1d787323b4bfff34e3cd1f9001ef
2022-04-20 07:52:02 -07:00
Bing Sun
67df961d63 qcacmn: Allow MLO sta connetion with single link
For single link MLO connection, there is no partner peer creation,
so wlan_mlo_link_peer_attach is not triggered. wlan_mlo_peer_create
is good enough to trigger mlo_mlme_peer_assoc_resp.

Change-Id: Ia76503e146a07d15d7b263aa36f9e8c4d110fc6e
CRs-Fixed: 3168623
2022-04-20 01:37:52 -07:00
Santosh Anbu
1a6feacd14 qcacmn: Add null check before accessing vdev
Check for the validity of vdev in vdev_list before accessing

Change-Id: I56877eeb4c013dd364e8db26b13472d3513d810e
CRs-Fixed: 3166615
2022-04-11 14:09:59 -07:00
Himanshu Batra
25e3a4aa88 qcacmn: Add fix to avoid NULL pointer deref during ml peer create
Add fix to avoid NULL pointer deref during ml peer create

Change-Id: I8b24ceff952ffacd939efc2a56896089626f6d08
CRs-Fixed: 3165690
2022-04-04 07:29:57 -07:00
Surya Prakash Raajen
e1ddefa5f2 qcacmn: Add support to get single/multi soc info
Add support to get single/multi soc info for
a mld vdev list

Change-Id: I082e1172bdfad0188944a79da9652b9ffd09290b
CRs-Fixed: 3141416
2022-03-31 03:10:07 -07:00