Commit Graph

115 Commits

Author SHA1 Message Date
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
Edayilliam Jayadev
412d3efb03 qcacmn: Add APIs related to MLO link capabilities
Add the following APIs related MLO links in MLO manager.

1. Get number of active MLO links
2. Get valid MLO link bitmap

CRs-Fixed: 3154979
Change-Id: I49c544a5c73a9ce72305bbe83230a4566d909095
2022-03-30 08:23:32 -07:00
Shwetha G K
2d87b61c0e qcacmn: Add support for MLO target recovery
Add support for MLO target recovery. Add MLO target recovery
types, add API to cleanup the asserted SOC's MLO setup info
during recovery.

CRs-Fixed: 3153534
Change-Id: Ibcfab35460de0c7b458377e24e63ab63cbe39e3c
2022-03-29 12:22:29 -07:00
Himanshu Batra
896411a36b qcacmn: Handle mlo disconnect while connection is in progress
In case of MLO, when connect is in progress and disconnect is received,
there may be a possibilty that the assoc link's bss peer is deleted
before non-assoc link's connect is still in progress which can lead to
issue in peer setup at DP and FW.
Add fix to handle mlo disconnect while connection is in progress

Change-Id: I550abff439deca19c7ab355cae1fa46db1f0f61b
CRs-Fixed: 3152770
2022-03-22 19:00:42 -07:00
Surya Prakash Raajen
3f83cb1051 qcacmn: Clear mld soc setup if teardown fails
Add support to clear mld soc setup and link down
such that in case of teardown fails counters are updated
properly.

Change-Id: I5dc8c581069ef1d5bd0614568b435c0a9448fdcc
CRs-Fixed: 3127308
2022-03-22 14:50:05 -07:00
Paul Zhang
648757b8ca qcacmn: copy the right Vendor IE for reported STA
If Vendor IE also presents in STA profile, it only needs
to copy the vendor IE from STA profile for link specific
frame and reported BSSID.

Change-Id: I48ed4e88f097fe6570b3f3df764cd707c4b758d3
CRs-Fixed: 3136382
2022-03-22 03:25:02 -07:00
Srinivas Pitla
d6beb68484 qcacmn: Fix issue in primary umac id
This change fixes psoc id assignment in primary UMAC
selection

Change-Id: I04beaf3cdce4f9487380ac5ab84e1d0070c243dd
CRs-Fixed: 3144033
2022-03-08 23:59:30 -08:00
Amruta Kulkarni
8d0d85c7e4 qcacmn: Add null check for mlo api's
When mlo_dev_ctx is not initialized, it causes NULL ptr
access causing crashes.
Add NULL check in mlo api's to avoid the issue.

Change-Id: Icd7472cab22e3ff441cc9327f0443adb939bbc05
CRs-Fixed: 3143777
2022-03-04 01:50:43 -08:00
Bapiraju Alla
49a86029a8 qcacmn: Update VDEV connected links bitmap after STA link connect
Currently, VDEV connected links bitmap is not being updated properly
for link VDEVs. Because of this, during the disconnect assoc peer
is being deleted first instead of link VDEV peer.

To address this, update VDEV connected links bitmap after STA link
connection complete.

Change-Id: Id8465948fbb3af2f063e04ec9403cb4e3a6f98d8
CRs-Fixed: 3125636
2022-03-03 02:11:18 -08:00
Himanshu Batra
8da6f58098 qcacmn: Fix static analysis issue in MLO disconnect API
Fix static analysis issue in MLO disconnect API

Change-Id: Ibf7b82e4805a81d2d32ea2bfa82a8e1f3756867c
CRs-Fixed: 3140790
2022-03-02 05:28:55 -08:00
Krishna Rao
f94ac12152 qcacmn: Add support for ML subelement defragmentation
Add support for subelement defragmentation in the common handler for
generating link specific (re)association request/response, as well as
in the helper for parsing partner info from the Link Info field of the
Basic variant Multi-Link element.

CRs-Fixed: 3117210
Change-Id: I3727c9008043ac4132a8675bf15e73949fde63cd
2022-02-28 09:10:22 -08:00
Krishna Rao
30b0de6998 qcacmn: Add support for ML IE defragmentation
Add support for Multi-Link element defragmentation in the common
handler for generating link specific (re)association request/response,
as well as in the API for getting per-STA partner link information.

CRs-Fixed: 3116412
Change-Id: I237c593b44ec3a7c3347ccb95633cec362ba5411
2022-02-28 09:10:04 -08:00
Lincoln Tran
badb6230e2 qcacmn: Back to back connect changes
Currently, the code does not handle an MLO connect when in
non-init state. Add logic to clean up any existing connection
before going ahead with the latest request.

Change-Id: Ia5a10bcc1e0d2c8e82d6ea0d82d1a5bf0604a1e5
CRs-fixed: 3116687
2022-02-23 20:49:08 -08:00
Bapiraju Alla
6bb2ad7c5b qcacmn: Get partner vdev using vdev ID instead of link ID
While notifying the ML connection status to the supplicant, partner vdev
information will be filled in the connect response. This partner vdev info
is populated using partner link IDs. This may cause issues since it is
not guaranteed that link id information in the partner vdev is valid while
notifying the connection status to the supplicant.

To address this, get partner vdev information using vdev ID instead of
link ID.

Change-Id: I5e45b038b1fe5b6ab9c6bbb514eefb0ad4c39e66
CRs-Fixed: 3117702
2022-02-23 11:10:35 -08:00
Lincoln Tran
94df448341 qcacmn: Return from function if pointers are NULL
In some MLO functions, there are NULL pointer checks, but the logic
continues even if it is NULL. Return from the function in this case so
there is no potential NULL pointer dereference. This also addresses
a static analysis issue.

Change-Id: I22c4a47d724d8576a2ce78059dec219cbc3de91e
CRs-fixed: 3127461
2022-02-19 06:25:14 -08:00
Srinivas Pitla
e8ea09fe28 qcacmn: Fix static analysis issue in ML AID free
This change handles the scenario,if the caller passes invalid
link ix during AID free

Change-Id: I494cb55573ea5d8ecd351aac454d3395710273c1
CRs-Fixed: 3127458
2022-02-18 16:39:23 -08:00
Bing Sun
bdbcc9ddf0 qcacmn: Handle CSA in MLO sta partner link before it is up
Before MLO sta partner link is up, FW can't indicate CSA event to host.
For this case, host need save csa parameters and process it when MLO
sta partner link is up.

Change-Id: Id1803f32787002e020c6899ec72e428feb765b7f
CRs-Fixed: 3082438
2022-02-11 02:57:46 -08:00
Bing Sun
7ee4663048 qcacmn: Save quiet status to sta context of MLO mgr
Save quiet status of indicated link to sta contect of MLO mgr. Any link
should check quiet status of MLO connection, then decide whether it
can trigger inactivity to FW or not.

Change-Id: Ic294bbe6452030b6cae495ca0dd3e504416e2c9e
CRs-Fixed: 3117825
2022-02-11 02:57:40 -08:00
Santosh Anbu
7260cc5d95 qcacmn: Add pdev check when creating MLD vdevs
MLD can be formed only between APs of different pdev.
Add check to avoid creation of MLD between vdevs of same pdev.

Change-Id: I00f53de7016050b120db4b90b2e7662ea81612af
CRs-Fixed: 3104153
2022-02-10 12:49:48 -08:00
Santosh Anbu
94f1c1c7ed qcacmn: Add opmode check when creating vdevs with MLD
MLD can be formed only b/w AP vdevs or STA vdevs.
MLDs cannot contain vdevs of different opmode.

Add change to check for opmode of MLD VDEVs

Change-Id: I21112ba111bcadc48adf582b7ca9e7b936bd8e91
CRs-Fixed: 3104152
2022-02-10 04:25:41 -08:00
Srinivas Pitla
6d7ae524a3 qcacmn: Implement primary UMAC selection based on RSSI
This implements RSSI Primary UMAC selection algorithm for MLO

Change-Id: Ia1901e91e2b6184a5895c4d784425f387cd9474d
CRs-Fixed: 3105927
2022-02-02 13:15:37 -08:00
Srinivas Pitla
3ceae2fe28 qcacmn: Add support for Auth defer framework
This change adds framework for deferring auth request
while link peers are in the process of deletion

Change-Id: Ic96daf7d994c65b10e15f72e4a676b8156573cf2
CRs-Fixed: 3113557
2022-01-28 23:15:35 -08:00
Himanshu Batra
aab941747a qcacmn: Add API to iterate over ML vdev list and call custom handler
Add API to iterate over ML vdev list and call custom handler

Change-Id: Ie5c16b085528eed64436c26d0ca9700700a86949
2022-01-26 12:43:05 -08:00
Kiran Venkatappa
af29776e45 qcacmn: Add support to config max MLO links and MLD max
Add max MLO (WLAN_UMAC_MLO_MAX_VDEVS) and MLD max WLAN_UMAC_MLO_MAX_DEV
in #ifndef block so that this can be overridden by cflags.

Change-Id: Iaa2dd1a8d6759b9f9e79bc076e8a4e4673921be8
CRs-Fixed: 3115703
2022-01-24 15:50:18 -08:00
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