Commit Graph

88 Commits

Author SHA1 Message Date
Kiran Venkatappa
9d402b668b qcacmn: MLO Teardown sequence
Trigger MLO teardown and wait for response before proceeding with soc
power down.

Change-Id: Ie1d00408862459b0e5240ef3151a0d969ab65e80
CRs-Fixed: 3102143
2022-01-14 20:53:14 -08:00
Himanshu Batra
49204da745 qcacmn: Clear MLO_STA_LINK flag when clearing MLO capability
Currently the MLO_STA_LINK flag is not getting cleared. If a connect is
received on a different link as assoc link, because of STA_LINK flag,
none of the link will be considered as assoc link.
Add fix to clear MLO_STA_LINK flag when clearing MLO capability.
And also clear the MLO_STA_LINK flag on handling pending connect req.

Change-Id: Iaf7c557786bac7754c4b33c80f0f92cb007870ae
2022-01-12 10:03:51 -08:00
Amruta Kulkarni
951e13a2ea qcacmn: Add wlan_ api to get assoc vdev
- Add wlan_ api to get assoc vdev.
- Update mlo_update_connected_links_bmap() to
non static.

Change-Id: Ib7948023041481c27f1e98a6bd1ecfe583abd3ef
CRs-Fixed: 3098594
2022-01-06 07:55:37 -08:00
Bapiraju Alla
fdaf4235b8 qcacmn: Update MLD mac address with ML dev ctx lock held
Currently MLD address is not being updated under lock. This may result
in unexpected behavior in racy scenarios.

To avoid this, update MLD address with ML dev ctx lock held.

Change-Id: I7c27edb0c02ebae0332f0498dfe1a1534d3d3379
CRs-Fixed: 3104028
2022-01-05 11:30:13 -08:00
Bapiraju Alla
3c40f95843 qcacmn: Add API to update MLD MAC address
Currently there is no provision to update MLD mac address in MLO manager.
MLD MAC address updation is required when MAC address randomization is
enabled.

To enable MLD address updation, add MLO manager API to update MLD address.

Change-Id: Ia2ccb1c32a3533748bda512e991e3d48d14c39f0
CRs-Fixed: 3103074
2022-01-03 15:02:52 -08:00
Himanshu Batra
0ae42b09e4 qcacmn: Use correct API to find is peer is assoc peer of an MLD
Use correct API to find if peer is assoc peer of an MLD

Change-Id: If485222ed23a1ac7b7fc625c6d9dfd6000959f36
2021-12-28 02:55:59 -08:00
Bapiraju Alla
df5cc86477 qcacmn: Set partner vdev link id before initiating the connect on it
Currently, Driver is notifying the connect response to the user-space
immediately after first link connection. At this time, partner vdev
information is not available. Hence user space is notified with invalid
partner wdevs.

To avoid this, set link ID's for the partner VDEVs before notifying the
connect completion to is_if.

Change-Id: I6524e9af9359fced471db8f25220d2ac6854fc22
CRs-Fixed: 3097646
2021-12-23 00:54:30 -08:00
Santosh Anbu
dc34c41ae6 qcacmn: Wait in MLO sync wait until start response is rcvd
In scenarios where if the VDEV has just sent the start request and a
partner vdev has received start response, will bring up all the MLD
AP vdevs without waiting in MLO_SYNC_WAIT as the existing check only
validates if the VDEV is in INIT or STOP state.

Add change to send MLO_SYNC_COMPLETE only after all the partner VDEVs
have move to either UP or DFS_CAC_WAIT state.

Change-Id: I3175b94e90abf6994fc6922bbe8e62a7986208a6
CRs-Fixed: 3096634
2021-12-22 10:43:53 -08:00
Chaithanya Garrepalli
ed4b7bf28b qcacmn: Write Rx desc SPT on partner SOC
Changes to write Rx descriptor secondary page
tables on partner SOCs.

Change-Id: If89eff3425078aebb975463a01d0a45c9f5a21db
2021-12-21 01:10:24 -08:00
Krishna Rao
c6f1baf93f qcacmn: Rectify decrement of unparsed Non-Inheritance IE length
At the point in an MLO Manager utility function where we process the
length of the Element ID Extension List in the Non-Inheritance
Information Element, rectify the decrement of the unparsed length so
that it is decremented by the length of the Element ID Extension List
rather than the length of the Element ID List.

CRs-Fixed: 3095660
Change-Id: If4913a47762bc96f26875a04da2880409353fb0e
2021-12-17 01:04:23 -08:00
Srinivas Pitla
3ced6a46de qcacmn: Add API to get partner link info
This API retrievs link address and link id of all partner links
in structure to the caller.

This change also includes few compile fixes for msgq mode

Change-Id: I2a30904a3b41876783de611ac14697338c617689
CRs-Fixed: 3091850
2021-12-15 09:43:41 -08:00
Srinivas Pitla
e9f0077a00 qcacmn: Add debug prints for MLO peer mgmt
This change adds debug prints in error cases to
print error and relevant info to understand issue.

Change-Id: Ie5670d535015f410e81bd5b06ce58046a02b19f0
CRs-Fixed: 3091155
2021-12-15 07:40:10 -08:00
Manoj Ekbote
80e882aa2a qcacmn: Intra-BSS changes for MLO
Use chip ID and destination peer to determine the target soc
and partner vdev for Intra-BSS in MLO case.

Change-Id: I709c52e74426c5e81b50c8063cad7669c0e7002d
2021-12-14 18:13:29 -08:00
Yu Wang
f13b79ec7f qcacmn: implement mlo manager APIs for mlo link set active cmd
Add interface for sending mlo link set active cmd and
register the response handler.

Change-Id: Icd7cf3294cddec1aa4a417e29a22fcd6fbea0dfb
CRs-Fixed: 3036846
2021-12-14 01:43:34 -08:00
Abhishek Singh
a83c541117 qcacmn: Remove Union in mlo_link_set_active_param
Remove Union between link_num and vdev_bitmap as
it is possible send vdev_bitmap along with link_num
for forcemode MLO_LINK_FORCE_MODE_ACTIVE_NUM and
MLO_LINK_FORCE_MODE_INACTIVE_NUM.

Change-Id: Ie15c5f20d7990baebee50bdc7a37734331eb891c
CRs-Fixed: 3090334
2021-12-13 19:13:31 -08:00
Lincoln Tran
b9c91b6554 qcacmn: Add synchronization to copied conn req
When accessing the copied connect request, concurrent accesses may
arise. This could cause a double free in certain scenarios. Add locks to
any write access so there is no unexpected behavior.

Change-Id: I011b8980d5756d7105704449af2dba6df1f23a8d
CRs-fixed: 3070966
2021-12-13 16:43:37 -08:00
Krishna Rao
a50a68c40d qcacmn: Generate Link Specific Assoc Request for MLO
Generalize the existing link specific assoc response generation
functionality to make it common between link specific assoc request and
assoc response generation, and expose modified APIs for both. Add
handling of Non-Inheritance IEs as well as fixed field parsing to both.
Add guard checks and other fixes.

CRs-Fixed: 3083541
Change-Id: Ibf642ddc6b40ce258d50f3eeb4f820648222a758
2021-12-09 13:42:00 -08:00
Santosh Anbu
1c97f0226b qcacmn: Rename peer create check to be MLD specific
Add change to rename peer create in MLO scenario to include MLO prefix
to void interpretation with generic peer create

Change-Id: I0ebf15964390275270e8b02d1e87df8532c63a0b
CRs-Fixed: 3075987
2021-12-09 12:25:46 -08:00
Shwetha G K
3c5ce319c3 qcacmn: Add MLO NAWDS support
Changes to support NAWDS (Non Association based
WDS) when MLO is enabled.
Since NAWDS repeater works without association, user
inputs capabilities and puncture_bitmap associated with
each link. The same information is to be passed to
mlme peer create API to configure the STA nodes per
capability & puncture bitmap provided by user.

Change-Id: Ia0722a454321bf9d408860276f852dd10712c12c
CRs-Fixed: 3077880
2021-12-09 12:25:36 -08:00
Lincoln Tran
3bb859e795 qcacmn: Retain link disconnect source if northbound
If the MLO module is sending link disconnect from the north, retain its
disconnect source. If it is a southbound disconnect, update the source
to be from MLO manager. This is needed so some legacy modules handle the
disconnect properly and send vdev stop when appropriate. Also make sure
that the SB disconnect will be processed if the link is in connecting
state.

Change-Id: I6644751934697496147b9177ee7beab4d7355e10
CRs-fixed: 3086012
2021-12-07 22:39:25 -08:00
Rohan Dutta
a6be671ddf qcacmn: Clone security params for MLO STA
Clone security params in MLO STA over the partner links.

Change-Id: I06ba32e384244fe983ecf56d7743c89b33524d6f
2021-12-07 11:15:42 -08:00
Himanshu Batra
14325a4a60 qcacmn: Clear MLO cap only when it is the last disconnect req
Clear MLO cap only when it is the last disconnect req as osif would not
have informed userspace for other disconnect req because of
cm_id mismatch

Change-Id: Ifcfde3e0efd6fb28e73679cbbccfa6f64ed35902
2021-12-06 02:44:37 -08:00
Yu Wang
2cec5acc85 qcacmn: move MLO related common definitions to umac
WMI includes are not part of include path in some WIN projects,
move MLO related common definitions to wlan_mlo_mgr_public_structs.h.

Change-Id: If63c82bc15a2a0e0a045be896b74ea9addb3a64d
CRs-Fixed: 3083776
2021-12-03 03:05:22 -08:00
Himanshu Batra
b9f1cd3492 qcacmn: Update mlo connected_links_bmap for self vdev
As part of mlo connect notification, connected_link_bmap is gatting
updated for partner links, but for assoc link also this needs to be set
Add fix to update mlo connected_links_bmap for self vdev

Change-Id: I4d64d97e67484dac2e96a3d22b5648ec2bc320d4
2021-12-02 07:15:21 -08:00
Lincoln Tran
da5f535c52 qcacmn: Free memory on connect failure
Currently, the check to free the original connect req when connection
fails is specific to MLO connection. Update the check to free on a
failed legacy connection as well.

Change-Id: I168d0555fecabf31c4702e382f2bd4bd63a15839
CRs-fixed: 3081248
2021-11-30 11:04:46 -08:00
Chaithanya Garrepalli
1cee4a643a qcacmn: Skip MLO setup if there are no ML capable SOCs
In MLO link setup and MLO soc setup return if num_tot_links
are zero

Change-Id: I2767c519cc19e47523c39f7ea32d0df4e053e4ea
2021-11-29 07:34:10 -08:00
Krishna Rao
39c0eb2153 qcacmn: Add API to get partner link info from Basic Variant ML element
Add API to get partner link information in the per-STA profiles
present in a Basic variant Multi-Link element. The partner link
information is returned only for those per-STA profiles which have a
MAC address in the STA Info field. Also note that the current
implementation does not have Multi-Link element fragmentation support
- this will be added in an upcoming change after shared helper
utilities for the same are available. Similarly, the current
implementation does not have support for per-STA profile fragmentation
- this may be added once it is introduced in the IEEE802.11be
standard.

Change-Id: Ied7092ba1366d39fa15adffc3737d4ad5c0adf59
CRs-Fixed: 3040491
2021-11-29 07:34:05 -08:00
Chaithanya Garrepalli
65137277e8 qcacmn: chages to save soc list in mlo setup
Changes to save SOC list in MLO setup

Change-Id: I185bf26b1dac6eced03931c213297564abe74747
2021-11-23 21:59:34 -08:00
Kiran Venkatappa
3e3ed9ca89 qcacmn: MLO setup, teardown sequence changes
MLO setup, teardown sequence changes

Change-Id: I76d14cd66c373b3b734a17e44f3655ffd17893c5
CRs-Fixed: 3059859
2021-11-23 16:57:00 -08:00
Chaithanya Garrepalli
1faab04393 qcacmn: Changes to create DP ML context
Changes to create DP ML context and associate
with CP MLO manager.

Change-Id: Ic254c883de7c6d6db0fe722a48f0faabbaad0247
2021-11-23 03:55:30 -08:00
Himanshu Batra
cc99f5487f qcacmn: ML peer changes for STA
Add changes to support ML peer for STA vdev.

Change-Id: I173a2ad5441bbbf1c1185c677c6cc92c4f1a166f
2021-11-22 15:10:01 -08:00
Lincoln Tran
ddfe7df316 qcacmn: Update mlo_disconnect_no_lock to check for MLO cap
When a connection is requested but the client is unable to find the
candidate, connection will fail. In legacy case, legacy disconnection
path should be invoked. Update the mlo_disconnect_no_lock function to
match the mlo_disconnect logic when checking for MLO capabilities.
Also update the link connect notify function to prevent queuing
multiple disconnect requests.

Change-Id: I5ed4b213b1fe6b48d2d5631bf1625bea2864f606
CRs-fixed: 3069545
2021-11-17 23:17:11 -08:00
Krishna Rao
5f1d4dd7fb qcacmn: Add API to get link ID from Basic Variant ML element
Add API to get the link identifier from a given Basic variant
Multi-Link element or element fragment sequence, of the AP that
transmits the Multi-Link element/element fragment sequence or the
nontransmitted BSSID in the same multiple BSSID set as the AP that
transmits the Multi-Link element/element fragment sequence and that is
affiliated with the MLD that is described in the Multi-Link element.

Change-Id: I45039a6ed8ccd9403eae9514c60bcd8d694d2a31
CRs-Fixed: 3040407
2021-11-16 20:58:00 -08:00
Lincoln Tran
632f919086 qcacmn: Fix compilation issues related to MLO disconnect
When the WLAN_FEATURE_11BE_MLO_ADV_FEATURE macro is enabled,
some functions are not reachable or defined. Move the
definitions accordingly to fix compilation issues.

Change-Id: I698f290e69f0acc9b72d60081849bce093d05741
CRs-fixed: 3075650
2021-11-16 14:53:29 -08:00
Krishna Rao
77e686b250 qcacmn: Add API to get MLD address from Basic Variant ML element
Add API to get the MLD MAC address from a given Basic variant
Multi-Link element or element fragment sequence.

CRs-Fixed: 3053521
Change-Id: I96cf893ae4a089c20bd2d8b783c4e3d1d4eb3e4a
2021-11-16 12:21:57 -08:00
Krishna Rao
b5253e0f65 qcacmn: Add API to get the variant of the given ML element
Add API to get the variant of the given Multi-Link element or element
fragment sequence.

Change-Id: I09b10c8e14e1a7e7b500116782f07d9fde7a78e1
CRs-Fixed: 3040403
2021-11-14 07:07:39 -08:00
Krishna Rao
f0b40c96d7 qcacmn: Add API to find Multi-Link element
Add API to find the first Multi-Link element or the start of the first
Multi-Link element fragment sequence in a given buffer containing
elements, if a Multi-Link element or element fragment sequence exists
in the given buffer.

Change-Id: I3dbd0f9053e3a1e20b47c182b5258f49b1e2c409
CRs-Fixed: 3040400
2021-11-12 18:06:25 -08:00
Yu Wang
0c8f452ae6 qcacmn: move API for getting ML vdev list out of WLAN_MLO_MULTI_CHIP
mlo_get_ml_vdev_list() is a common API, it should not be
embraced by macro WLAN_MLO_MULTI_CHIP.

Change-Id: Icf22de20fdeca374d674109d10b4887b833fa346
CRs-Fixed: 3073916
2021-11-12 15:07:14 -08:00
Srinivas Pitla
cc7d98b794 qcacmn: MLO Peer changes
This change implements timer based msgq processing to defer
the context for MLO peer. It also fixes some of the issues in
MLO peer path, It adds utils APIs for MLO params

Change-Id: I94384c91adfb8785d833bff1ba5541dc98cfc383
CRs-Fixed: 3059837
2021-11-12 11:32:39 -08:00
Himanshu Batra
b21d96305e qcacmn: Modify MLO disconnect handling
Modify MLO disconnect handling to issue disconnect on all links in
parallel
Also modify connect resp to accommodate ml info in connect resp

Change-Id: I57575c6ce7c8ebff7770f862dc81e7dfd20aa42d
2021-11-11 00:37:03 -08:00
Bapiraju Alla
055acf7a87 qcacmn: Notify partner links info in connect response to the supplicant
Fill ML partners info in connect response structure of the connect
notification to the supplicant.

Change-Id: I3b972254138d0f00ef63f2b4d336d142e6d5e2ae
CRs-Fixed: 3036325
2021-11-03 11:31:38 -07:00
Lincoln Tran
a89e4f0c78 qcacmn: Fix MLO peer manager compilation issue
Fix MLO compilation issue while exporting the symbol
wlan_mlo_link_peer_delete.

Change-Id: I911917ab7f142fdc49ea99e9613ddb6fb86b5ab3
CRs-Fixed: 3067718
2021-11-02 16:32:03 -07:00
Himanshu Batra
5a4b4ec7ca qcacmn: Ignore ml sta connect notification when connect req is flushed
If vdev is not in disconnected or connected state,
then the event is received due to connect req being flushed.
Hence, ignore this event

Change-Id: If7f51496fcca283cb6559b027a21df82ae9ec7d2
2021-11-01 01:42:27 -07:00
Himanshu Batra
b981e05832 qcacmn: Add API to get link peer assoc req buffer
Add API to get link peer assoc req buffer

Change-Id: I293a86f8eaaaf5a2e02802388960386848201a2c
2021-10-26 04:44:06 -07:00
Himanshu Batra
2100a410a5 qcacmn: Add APIs to modify connect_req/connected vdevs bmap for ML STA
Add APIs to modify connect_req/connected vdevs bmap for ML STA

Change-Id: I3c68f2f7a87db49eb72ddf0d9e85ae7387974c85
2021-10-19 09:49:48 -07:00
Arun Kumar Khandavalli
666ab22622 qcacmn: fix the memory leak in the connect failure path
There is a memory leak in the mlo connect failure the connect req
and the connect, ies are not getting freed because of the mlo is vdev
check. During the allocation there is no condition as such, so remove
the same during the connect failure path to resolve the memory leak.

Change-Id: I9076761cd3b918435af9929fcf888996d2129e98
CRs-Fixed: 3057979
2021-10-18 18:47:00 -07:00
Lincoln Tran
3cbefea6d0 qcacmn: Set MLO cap bit for subsequent links
When sending the connect for subsequent links in MLO, make sure to set
the capability bit, otherwise it will be marked as assoc link.

Change-Id: Ic0145b40e84ea440ea389200356d1f916a1ba530
CRs-fixed: 3055892
2021-10-15 15:32:14 -07:00
Bapiraju Alla
eadfb45b23 qcacmn: Fix MLO connection issues
Add minor fixes to allow MLO connection.

Change-Id: Ic9e464b6e5c948676d5ad0e2519c096a9e1b1964
CRs-fixed: 3021328
2021-10-15 15:32:04 -07:00
Lincoln Tran
82ee197386 qcacmn: Store original connect req in connection types
When performing an MLO connection, the subsequent links need data
from the original connection request. There is no easy way to
determine if the connection is MLO or not at this point, so
store the original connect request regardless of the connection
type. Also make sure all instances are freed properly.

Change-Id: Iccce376ba36a8c49127b177fc4a1bac54aafb315
CRs-fixed: 3051842
2021-10-14 17:11:06 -07:00
Himanshu Batra
069f37b825 qcacmn: Use osif_cfg as disconnect source for ML internal disconnect
In case when connect req is received while ML connect is in progress,
disconnect is issued with SB_disconnect as source but sb disconnect is
not handler in join active. So, send osif_cfg_disconnect as a source

Change-Id: I9604e23193ba3aef334f0873d2460a992b1914ea
2021-10-06 13:06:04 -07:00