コミットグラフ

185 コミット

作成者 SHA1 メッセージ 日付
Abishek Ganapathy
ba230e214e qcacmn: Bringup/Bringdown standalone AP vaps in Dependent WDS Repeater
If repeater is configured as dependent WDS repeater, call the
handler to bringup/bringdown all the standalone AP vaps in the
repeater once all the other AP vaps present in the AP ML context
are up/down.

Change-Id: Icad3d0434180cb25bdcdedec3334ccbbe642cf4c
CRs-Fixed: 3299010
2022-10-10 07:34:14 -07:00
Jianmin Zhu
0e57c9b492 qcacmn: Handle roam target AP and current AP same MLD address case
If 2 MLO AP have same MLD addr, when roam between them,  link vdev1 old
peer is deleted first, ML peer goes to state ML_PEER_DISCONN_INITIATED,
Since ML peer can be found for same MLD addr, no new ML peer is created,
but vdev1 new link peer is failed to attach to ML peer for wrong state,
then ML peer will be double freed, assert will happen.

To fix it, if roam target AP and current AP have same MLD addr, before
attach new peer to reused ML peer, update different info from target AP,
update ML peer state to ML_PEER_CREATED again.

Change-Id: Ia656ed61be4ae417b8cfbe7711d421fbcee89b97
CRs-Fixed: 3302438
2022-10-08 22:08:10 -07:00
Jianmin Zhu
0f719d3ee2 qcacmn: Free copied connect req after successful disconnect
While schedule thread handle connect, disconnect from OSIF will
fail but free copied connect req wrongly.
When connect partner link, will access copied connect req, assert will
happen.

To fix it, don't free copied connect req until disconnect return
success, add function mlo_free_copied_conn_req.

Change-Id: Id0e40b4bb6e4927f7b31aa7443b581a62f64e6fa
CRs-Fixed: 3305286
2022-10-06 13:01:36 -07:00
Amruta Kulkarni
75494853d0 qcacmn: Add ml ie to link specific prb rsp generation
Currently link specific probe response ie does not include
the basic variant ml ie. This results in multi link connection failure.

To solve this add basic variant mlo ie in the link probe response.

Change-Id: I7d6e9bcc461bf4e855c5613ad28a08749303a81d
CRs-Fixed: 3301288
2022-10-06 02:12:41 -07:00
Asutosh Mohapatra
9ab40cb89e qcacmn: Fix uninitialized var ptr issue and null check for num_pscos
1.This change fixes the use of uninitialized
variable in host driver.

2.Adds NULL check for num_psocs in mlo_peer_calculate_avg_rssi to
avoid undefined behaviour.

Change-Id: Ifbfef42b5930dfe15736a75a74e81155c5f1fbce
CRs-Fixed: 3297794
2022-10-06 00:22:18 -07:00
Jeff Johnson
93723c6fe1 qcacmn: umac: mlo_mgr: Fix misspellings
Fix misspellings in umac/mlo_mgr/...

Change-Id: I740ec04feca2ed8fe38d0a6fe0cea31683bce439
CRs-Fixed: 3304699
2022-10-06 00:22:12 -07:00
Jianmin Zhu
e44fc21aea qcacmn: Fix partner link scan entry generated with wrong bssid issue
When partner link probe rsp is generated from ML probe rsp, bssid is
filled wrongly, then scan entry with wrong bssid is added, if no beacon
or probe rsp of partner link is received, then candidate can't be found
by partner link bssid, partner link connect fails, at last MLO connect
fails.

Change-Id: I3fa51dbde1cf9d8e256ecfc17059660a4430056a
CRs-Fixed: 3298706
2022-09-26 02:04:37 -07:00
Krunalsinh Padhar
aaa7ef6872 qcacmn: Add API wlan_mlo_peer_get_links_info
This change adds API that searches for the primary peer in the peer list.

It returns vdev link id of the primary peer.

Change-Id: I43bef7ec56c5785669f217d63a15f95717f8d349
CRs-Fixed: 3280575
2022-09-21 16:49:18 -07:00
Jianmin Zhu
0e52b90c77 qcacmn: Fix assert when disconnect after roam from legacy to mlo
When roam from legacy to mlo, vdev1 is updated first, ml peer is created,
but failed to attach since it is link vdev, then vdev0 is updated, ml peer
is created again, ref count is 1.

When disconnect, stop vdev1 first, in stop event handler, ml peer ref count
becomes 0, mlo_peer_cleanup is called unexpectedly.
mlo_peer_cleanup  should be called after MLO vdev0 stopped.

To fix it, change wlan_mlo_peer_create, mlo_dev_mlpeer_attach is called if
the ml peer not attached and can't be found.

Change-Id: Iae3b2b498849646ae71154484b555a7fc9a36017
CRs-Fixed: 3277886
2022-09-09 04:09:09 -07:00
Paul Zhang
386783a30d qcacmn: calculate the TSF for the reported AP
Per spec 11be_D2.1.1, the TSF Offset subfield of the STA Info field
indicates the offset (Toffset)between the TSF timer of  the reported
AP (TA) and the TSF timer of the reporting AP (TB) and is encoded
as a 2s complement signed integer with units of 2 µs. Toffset is
calculated as Toffset= Floor((TA – TB)/2).

Change-Id: I7810568f6308e369dcf2ff26bdfd1246783466d4
CRs-Fixed: 3276836
2022-09-08 19:45:30 -07:00
Surya Prakash Raajen
642b26aaf0 qcacmn: Fix wmi_mlo_teardown_cmd_send issue
When teardown completeion event is received from FW, teardown
completion handler resets pdev link to NULL, when the expectation
is only to put pdev state in teardown, such that when soc goes
down the list gets cleared.

Change-Id: Ief490eabe0546207f0ef649cb6d5cde1faf582d8
CRs-Fixed: 3280671
2022-09-07 16:34:34 -07:00
Gururaj Pandurangi
9fa8fc8b46 qcacmn: Add API to extract MSD caps from cmn info field
Add API to extract MLD AP MSD capabilities from MLO IE
common info field if present. This will be shared with FW
via peer assoc cmd.

Change-Id: I0ebcd5408a40f3314932d4a2a7e586c208af2ee5
CRs-Fixed: 3271118
2022-09-02 21:00:31 -07:00
Jianmin Zhu
ea0eca7d21 qcacmn: Fix link probe response generation failure
As 11be 2.1 spec 35.3.3.3 Fields and elements not carried in a per-STA
profile, an AP affiliated with an AP MLD shall not include a Timestamp
field, a Beacon Interval field. Change ML probe rsp per-STA profile decode
logic accordingly. Copy Timestamp from the starting of the probe response
frame.

Change-Id: I0fe5682c170dc3dcd6e5a93c68473cd4cb6999b8
CRs-Fixed: 3280227
2022-09-02 17:42:47 -07:00
Srinivas Pitla
4466787729 qcacmn: Return failure on partner link peer creation failure
This change adds protection, if partner link peer creation failure
leads to MLO peer free. It also returns failure.

Change-Id: I4f2097c3a2942cecf01f77c7e4899595bbce0dff
CRs-Fixed: 3277770
2022-08-31 12:50:57 -07:00
Shashikala Prabhu
aec62be3c7 qcacmn: Fix the inconsistencies observed in MLO AID allocation
For T2LM capable MLO STAs the AID is allocated from the second pool.
There is an inconsistency in allocating these AID pools.

Please check the example below.
Let's say the max_aid in ML AID manager is 12 and the start_aid is 3.
As per the current implementation,
   aid_end1 = (ml_aid_mgr->max_aid - start_aid)/AID_NUM_BUCKET
            = ( 12 - 3)/3 = 3
Only 3 AIDs are available in pool_1. But, all these 3 AID are reserved due
to start_aid = 3. Hence, we will not be able to allocate any AID from
pool_1.

With the fix,
   pool_1_max_aid = (ml_aid_mgr->max_aid - start_aid)/AID_NUM_BUCKET
	              = 3
   aid_end1 = pool_1_max_aid + start_aid
            = 6
So for pool 1, AID 4,5 and 6 are available now.

Change-Id: Ia96966b542e68511acbf46de32448f0d95d31c69
CRs-Fixed: 3276564
2022-08-29 17:43:42 -07:00
Srinivas Pitla
5aab8590be qcacmn: Fix issue with is_primary flag in splitphy mode
Currently, for all link peers of ML peer, is_primary set as
true, since all link peers are attached to same PSOC.

But, FW and DP needs only one peer to be set primary.
So far, FW and DP are considering last peer created or last peer
assoc received as primary peer.

This method causing issue since the order is not guaranteed
between FW and DP layer.

So, added a change to set is_primary to one of the link peers
only

Change-Id: I1c1aa87056baf86091fefc780180b5fc6a16af0d
CRs-Fixed: 3274360
2022-08-28 23:16:12 -07:00
Liangwei Dong
6809114926 qcacmn: Fix vdev detach failed from mlo dev ctx
During dynamic mac address change process, some link vdev mld
address will be changed successfully and some link vdev mld
address will be failed to be changed from target in failure case.
In vdev deleting, if no result to find mlo dev ctx by mld mac
address, try to use vdev->mlo_dev_ctx to detach vdev from mlo
dev ctx. This will avoid memory leak in above failure case of
dynamic mac address change.

Change-Id: I11304c92f9258e2390cfe2d03f29ada0db80e6af
CRs-Fixed: 3271092
2022-08-26 05:49:52 -07:00
Chaithanya Garrepalli
eb8d16e0c7 qcacmn: Indicate MLO teardown to DP
When MLO teardown for links is received call
DP MLO teardown for all SOCs

Change-Id: Ie5608dc3c97344c4d951dd006e49bdb52bf00a60
CRs-Fixed: 3273650
2022-08-25 12:13:24 -07:00
Jianmin Zhu
1dde62833a qcacmn: Fix reassoc rsp per-sta profile parse failure
For fixed field of per-sta profile for mlo, only assoc rsp is parsed,
need include reassoc rsp.

Change-Id: I8be3ab2d2f7719bda0190b59c6d24c07d12f21e8
CRs-Fixed: 3273819
2022-08-24 04:11:17 -07:00
Uraj Sasan
02a498a074 qcacmn: Clean up code to avoid duplication
Avoid code duplication by using common definitions
i.e use enum wlan_ml_linfo_subelementid.

Change-Id: Ia09c1a42207461878d023e8f4534f2d26fb2f81b
CRs-Fixed: 3227859
2022-08-23 02:41:03 -07:00
Srinivas Pitla
0f6b60eed6 qcacmn: Fix ML peer state update for PMF stations
In current code, deauth is skipped for PMF clients
but ML peer state is updated for PMF clients also

This fix skips ML Peer state update for PMF clients

Change-Id: I41c870a5ff4bb658f378b65c729947fad324e807
CRs-Fixed: 3261671
2022-08-19 16:15:29 -07:00
Rohan Dutta
1f9ff41325 qcacmn: set partner link op-class
Update partner link op-class in station mode

Change-Id: I8d6908253e78adebabab724e7fd89737906367d2
CRs-Fixed: 3206442
2022-08-04 03:55:35 -07:00
Edayilliam Jayadev
d6e188af07 qcacmn: Add lock for TSF calculation
Add lock at MLD level for TSF calculation of partner vdevs.

CRs-Fixed: 3240367
Change-Id: Ia9305e271aa69a5de2c21d66457deb921bd79c61
2022-08-01 08:54:28 -07:00
Veerendranath Jakkam
2e5ddc9546 qcacmn: Get all the vdev's of mld
Get all the vdev of a ml device

Change-Id: Ie25304c00eed69b479bac552c8923144bf4cd41f
CRs-Fixed: 3250832
2022-07-29 09:20:44 -07:00
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