Commit Graph

271 Commits

Author SHA1 Message Date
Gururaj Pandurangi
1958f62e8a qcacmn: Add new wrapper API to send peer-level T2LM
Add a new wrapper API to send peer-level negotiated
tid-to-link mapping to FW as the existing API to send
the mapping received from the beacon/probe response
uses ML dev context whereas the new API uses ML peer
context.

Change-Id: Ifada5600e9524585c69847f332ed0280fd316813
CRs-Fixed: 3423127
2023-04-18 20:04:44 -07:00
Deeksha Gupta
28f7114375 qcacmn: Add new APIs to get t2lm info from vdev or peer obj
Add new APIs to get t2lm info from vdev or peer obj

Change-Id: Id1d3bf9ec88cb14574803ac952304a3103397799
CRs-Fixed: 3431479
2023-04-18 20:04:33 -07:00
Shreedhar Parande
9ec10780d7 qcacmn: Fix primary UMAC configuration for bridge peer
Use primary UMAC derivation logic for bridge peer case.

Rename mlo_get_primary_umac_vdev() to
mlo_get_link_vdev_from_psoc_id()

CRs-Fixed: 3454734
Change-Id: Ic732cc6e85b6d9f0d7bc8cea041642164952e304
2023-04-18 12:10:54 -07:00
Srinivas Pitla
4d1ebd3402 qcacmn: Fix duplicate allocation for aid mgr
For MBSSID, aid mgr is allocated twice in
few corner cases of VAP create.

This change adds check, if aid mgr is allocated
by legacy code in vap create, aid mgr allocation
would be skipped

Change-Id: Ie44fab12badb5c9487ce3de333376e1885e727d0
CRs-Fixed: 3461883
2023-04-13 13:59:24 -07:00
Santosh Anbu
be9367e046 qcacmn: Avoid deadlock between ML AP VDEVs bring up
1. Start response is received for vdev-0 and continues processing
mlo_sync_complete for partner vdevs holding ap_ctx lock and waiting
on vdev_sm lock of partner vdev
2. During which one of the partner vdev completes CAC_WAIT and continues
processing mlo_sync_complete holding vdev_sm lock and
waiting on ap_ctx lock. This scenario is resulting in RCU_STALL.

The last vdev in MLD to receive start response is responsible for
dispatching MLO_SYNC_COMPLETE event all the partner vdevs and then to self
If vdev_up_bmap is set, then return.

Change-Id: I5ae7146eeba5154331f442f9987593044bde76b4
CRs-Fixed: 3457019
2023-04-13 13:59:13 -07:00
Himanshu Batra
1611ebc3f4 qcacmn: Add API to get primary link id from ML peer
Add API to get primary link id from ML peer

Change-Id: I530cfad70067cea1e8907bc9d409331091f89f85
CRs-Fixed: 3455058
2023-04-10 03:08:11 -07:00
Rohan Dutta
4600a3b873 qcacmn: skip a radio as primary-umac in MLO
Allow user configuration options to skip a radio as
primary-umac in multi-link operation.

Change-Id: Ic7c8dd5c1cf7855f4fb762daf9ace7cb82e02cac
CRs-Fixed: 3437922
2023-04-06 08:55:47 -07:00
Neha Bisht
9197d3b898 qcacmn: Update primary_umac_psoc_id field for new primary TQM peer
Update primary_umac_psoc_id field for new primary TQM peer

Change-Id: I397069a97ef0741b4c069302e59f4b9a2c005089
CRs-Fixed: 3451704
2023-04-05 02:04:33 -07:00
Kiran Venkatappa
bd5b5ef599 qcacmn: Handle mlo setup soc down from detach path
mlo setup soc down indication can be called from soc_stop and detach
path. Add logic to handle multiple calls by ignoring down if the state
is already cleaned up.

Change-Id: I6f5c11cc30f38423661063d2834a5b4efa088a49
CRs-Fixed: 3450300
2023-04-04 14:41:16 -07:00
Amruta Kulkarni
d325372a5c qcacmn: Fix to remove mutex warnings
Mutex cannot be acquired or released from
interrupt context.
To fix the warning in log, do not acquire
or release log in while stopping t2lm timer

Change-Id: Ie1e885b162a22e327d3260fecbd71153b947e11b
CRs-Fixed: 3444779
2023-04-04 06:44:21 -07:00
Aasir Rasheed
ca023bedc9 qcacmn: Register MLO get link state event handlers
Register and unregister the MLO get link state WMI event handler.

Change-Id: I7ac0a20949cc435907e433c279f14fd792415824
CRs-Fixed: 3432102
2023-04-01 09:15:27 -07:00
Uraj Sasan
ab8cf64ef0 qcacmn: Connect if pri_umac & assoc link are same
Some devices in WDS station mode have limitation when connected
in 3 LINK MLD association where the Primary umac selected and assoc
link should be same. Make sure to have a sanity check before
going for association in such cases.

If the primary umac and assoc links are set to be different then
the connection will be rejected.

Change-Id: If56461a140d4685ba279b1babe04709d919d1650
CRs-Fixed: 3443733
2023-03-30 23:15:34 -07:00
Krunalsinh Padhar
6f685b0907 qcacmn: send assoc resp only once for multilink
Do not send assoc response from wlan_mlo_peer_create for
multilink MLO connection. This makes sure that assoc resp
is invoked only once.

Change-Id: Id1acf20bd5e3e3beb16e0dc3073676c421825ae6
CRs-Fixed: 3443511
2023-03-30 18:30:29 -07:00
Shreedhar Parande
3bdf816735 qcacmn: Add VDEV up check before deriving bridge peer PSOC
If VDEV state is not up, skip such VDEVs for creating
bridge peer.

CRs-Fixed: 3439647
Change-Id: Ibd5eaff197ed0ce984915fc197bcd33b6e674e37
2023-03-30 10:44:02 -07:00
Srinivas Pitla
3edff068ab qcacmn: Primary TQM changes
1) select lower bw vdev link as primary umac for first station
2) Added support to increase group size to distribute stations
   on all PSOCs

Change-Id: Ic6762fbe8e6bc5feef70ddaaa118af121d38a1f4
CRs-Fixed: 3366442
2023-03-29 05:23:29 -07:00
Neha Bisht
1cfaea506b qcacmn: Move PTQM update API to appropriate file
Move PTQM update API to appropriate file

Change-Id: Ibc7c346beebd468913363ca6532ddaf8ada4704d
CRs-Fixed: 3438694
2023-03-25 22:03:05 -07:00
Paul Zhang
2859ea85d1 qcacmn: Add flag WLAN_VDEV_FEXT2_MLO_STA_TDLS
Add a flag WLAN_VDEV_FEXT2_MLO_STA_TDLS to mark whether
the vdev is used for TDLS or not.
It can use these API:
wlan_vdev_mlme_feat_ext2_cap_set(vdev, WLAN_VDEV_FEXT2_MLO_STA_TDLS);
wlan_vdev_mlme_feat_ext2_cap_clear(vdev, WLAN_VDEV_FEXT2_MLO_STA_TDLS);
tdls_vdev = mlo_get_tdls_link_vdev().

Change-Id: I89c50ad5321013993e798ebb5549c5015ac18969
CRs-Fixed: 3435963
2023-03-25 05:32:51 -07:00
Surya Prakash Raajen
3b2a716195 qcacmn: Detach dp soc and mlo ctx in soc down sequence
Detach dp soc and mlo ctx in mlo soc down sequence,
to remove the dependency with link teardown event

Change-Id: I2dc2f64398904a7c57f579029297d11d887979c4
CRs-Fixed: 3390199
2023-03-23 00:14:40 -07:00
Shwetha G K
40931af2b3 qcacmn: t2lm draft 3.0 changes
Changes to incorporate link mapping size in t2lm control
field of t2lm ie per draft 3.0

CRs-Fixed: 3431897
Change-Id: I61834258e6348b6483a86eb9e9217e3d5997c2c9
2023-03-22 07:33:20 -07:00
Uraj Sasan
975f28b2fc qcacmn: Limit Max number of assoc links for AP-MLD
Limit the AP-MLD association links to 3 currently.
More than 3 links will not be supported currently
for association.

Change-Id: I3cd6acda27d2f538172673a8d573367d77ee00b5
CRs-Fixed: 3435787
2023-03-21 17:33:05 -07:00
Balaganapathy Palanisamy
ca53ea9c0c qcacmn: Export MLO peer APIs
Export MLO peer APIs
wlan_mlo_peer_get_assoc_peer
wlan_mlo_get_mlpeer_by_mld_mac

Change-Id: I4d71cf0ad2214f63f0b4c2be6a63f33fd407d1bf
CRs-Fixed: 3437752
2023-03-21 07:51:02 -07:00
Srinivas Pitla
68a9eec276 qcacmn: Prevent ML peer creation with duplicate MLD address
This change searches for ML Peer across all MLDs, if ML peer
is found in other MLDs, it will reject MLO peer creation
and rejects association

Change-Id: Ifcb150615d840f536d92734e2ef4f86080f5bb6b
CRs-Fixed: 3425900
2023-03-20 00:23:46 -07:00
Vinay Adella
c847ddd958 qcacmn: Clear partner link state before starting to connect
This is needed in case the STA is configured with more MLO links
than the AP. It will make sure only links that the AP allows
are in use in the STA MLO as well.
Also check for mlo flag on vdev before sending link connect and
updating partner bitmap.

CRs-Fixed: 3423668
Change-Id: Iceec3cf7e8dc7e5bc0a29c56b990faef4f741158
2023-03-19 22:53:08 -07:00
Uraj Sasan
f5553f82ef qcacmn: Fix logical_link_index for STA vaps
There was a case in which the logical_link_index for link vdev and
partner vdev was matching which was causing an issue.

The reason for duplicate logical link was because the mlo_link_connect
was not sent in same order in which partner link vdevs are added.

Send mlo_send_link_connect in order in which partner links are added.
This will ensure generation of logical link indices for link vdev
and partner vdevs correctly.

Change-Id: I4053fad7a7b615bca9b6386bf142ea785bca5ccf
CRs-Fixed: 3427985
2023-03-16 15:35:08 -07:00
Chaithanya Garrepalli
b57fbc13f4 qcacmn: Add umac callback to get MLO chip ID
Add new MLO mgr callback to return MLO chip ID

Change-Id: I214b600830991f846ded208b16ed2fb1407a5a28
CRs-Fixed: 3432589
2023-03-15 13:02:42 -07:00
Jianmin Zhu
41c19f596d qcacmn: Add API mlo_is_ml_connection_in_progress
Add API mlo_is_ml_connection_in_progress.
When wpa supplicant enable/disable roaming, need check it to avoid race
condition issue.

Change-Id: I85cc9f8b542169563881c601a477f5c646629071
CRs-Fixed: 3430980
2023-03-15 04:33:56 -07:00
Shreedhar Parande
000049c119 qcacmn: Delete link peers upon bridge peer creation failure
If bridge peer creation is failed, delete all link peers belongs
to that MLD.

CRs-Fixed: 3428992
Change-Id: Ife492cbaa4bb0e80df2f5a62539804912fe76637
2023-03-11 16:02:53 -08:00
Neha Bisht
80ee0f60c6 qcacmn: Add support for primary TQM migration
Add support for primary TQM migration.

Change-Id: Ifd62eb7e731bbd9e86c462642fd2e20d50d5495a
CRs-Fixed: 3410900
2023-03-10 16:11:33 -08:00
Shreedhar Parande
60919a5e84 qcacmn: Add APIs to create bridge peer
Add APIs to create bridge peer. Register call
back for the same to handle bridge peer
creation.

CRs-Fixed: 3416877
Change-Id: I51d8f023576c93121e42d54243721edbf705e6b4
2023-03-08 12:27:42 -08:00
Jianmin Zhu
b2e038a217 qcacmn: Fix mlo assoc vdev disconnect before link dev issue
Assoc dev disconnect happened before link vdev for following sequence
1) SB disconnect followed by NB disconnect.
2) SB disconnect queue disconnect on both link and assoc same time.
3) NB disconnect queue link disconnect first and wait for it to complete.

Fix in mlo_sync_disconnect by using sync API only for assoc vdev, for link
vdevs, let the non-sync API post the disconnect, thus all disconnect goes
in 1 instance and wait for assoc disconnect (last) to complete, similar to
SB disconnect.
With this both vdev1 and vdev0 disconnect will be queued at same time, thus
maintain the sequence.

Also optimize the wait time of the assoc vdev in
cm_disconnect_start_req_sync, to include all link disconnect time as well
(DISCONNECT_TIMEOUT * 2 + 5000).

Flush old disconnect only for non-MLO and assoc link, do not flush for link
vdev.

Change-Id: Ibaf4051d6e06a8e8354571e87883ac72b6ac07f0
CRs-Fixed: 3420508
2023-03-08 00:45:01 -08:00
Rhythm Patwa
aa8703f473 qcacmn: Add support to find ML peer from MLD MAC
Add API to retrieve ML peer context using peer MLD address
from the list of MLDs.

Change-Id: I7136e6b9cbcc96e897457c01c187965978e85d77
CRs-Fixed: 3422684
2023-03-07 21:04:52 -08:00
Srinivas Pitla
76dd8f5ce7 qcacmn: Fix issue in num PSOC counter
This change adds missing increment for num_psoc in
primary umac selection algorithm

Change-Id: If9b3870b6c3d3e05b12af1897a4e238fc2ef687f
CRs-Fixed: 3404121
2023-03-06 21:52:06 -08:00
Shashikala Prabhu
4ed5695ef3 qcacmn: Add NULL check for MLO dev context
MLO dev context is accessed without NULL check.
Add NULL check before accessing the MLO dev context.

Change-Id: I51d672924dbbf70cbf4b7e4951a3a45d4fd551ec
CRs-Fixed: 3409901
2023-03-05 21:52:13 -08:00
Krunalsinh Padhar
6d5fea01f7 qcacmn: Selective peer discon during non-DFS to DFS
Disconnect only non ML peers in CSA from non-DFS channel to DFS channel,
while keeping all MLO peers connected.

Change-Id: I7e8347cf4692b16b84ffbce4b102dd2f23bb70f0
CRs-Fixed: 3394219
2023-03-05 11:23:00 -08:00
Balaganapathy Palanisamy
39a0cd23ed qcacmn: Add a flag to identify MLO bridge peer
Add flag to identify MLO bridge peer.

Change-Id: I4d42312165df7904cafad83a5df0e8d2f7751028
CRs-Fixed: 3412299
2023-03-04 11:52:57 -08:00
Krunalsinh Padhar
66e6f0c19c qcacmn: primary UMAC selection for 3 link MLO association
Add capabilities to select primary TQM in case of
3-link association in a four chip HW.
The idea is to find the link that is adjacent to both the
other links and use it as the primary UMAC

CRs-Fixed: 3417387
Change-Id: Ibf2f6040cbc6f355980cdfcb5491109998ad8919
2023-03-01 05:45:03 -08:00
Uraj Sasan
f48d910d04 qcacmn: APIs to set and get chip adjacencies in 4 link MLO
For 4 LINK MLO new API's for
1. Update chip info with the chip id and adjacent chip id's.
2. Given two psoc ID's return if two psoc are adjacent.

Sample topology

        chip0
      /      \
    chip1    chip2
      \      /
        chip3

Above, chip0 has chip1 and chip2 as adjacent chips.

Change-Id: I7eafde7779e957bc8161ef37baa6077278800e81
CRs-Fixed: 3381066
2023-03-01 05:44:54 -08:00
Himanshu Batra
d1d1ea0482 qcacmn: Add vdev up bitmap for mlo sync wait state handling
In MLO scenario where start/cac response for partner ML AP vdevs are
processed simultaneously on different CPU cores, the order in which
the vdev sm lock is acquired may lead to deadlock.
To fix add change to have vdev up bitmap and process sync complete
only for those vdevs for which the bitmap is set

Change-Id: I9ca8b192edeb7d491be3a7acff30c2d3545a5417
CRs-Fixed: 3403603
2023-02-28 11:20:08 -08:00
Vinay Adella
8d4392b4b4 qcacmn: Pass mlo_flags to partner links during Assoc
The FW needs mlo_flags of partner links as well during Assoc
to handle more than 2-link MLO Association.
Extend the mlo target link info struct to pass them.

CRs-Fixed: 3403849
Change-Id: Ia426cf16a5d8cfa1f6e4117a0b372899642494c6
2023-02-23 22:07:24 -08:00
Paul Zhang
79720d811d qcacmn: Add support for 2+ mlo links
Add support for generating link specific assoc request/response
and probe response for 2+ mlo links.

Change-Id: Iadd09efeb0b0098baeae25f3b1968826e75dedc4
CRs-Fixed: 3049640
2023-02-17 09:32:31 -08:00
Liangwei Dong
dec5632356 qcacmn: Add ML reconfig starting notify for link removal
Add mlme_vdev_reconfig_notify callback to notify the ML
reconfig link removal starting after receive the first
ML reconfig link removal IE.

Change-Id: I9ae37b7defc75c97e7bc39e07c9d154e1923aedd
CRs-Fixed: 3380159
2023-02-16 21:31:16 -08:00
Vinod Kumar Pirla
cad19e4fc7 qcacmn: Introduce API to modify MAC address in action frame
Introduce two APIs which will change the RA, DA and BSSID fields
of 802.11 MAC header.

For any non-public action frame, supplicant will send RA, DA and BSSID
with MLD address which needs to be translated to link addresses to
transmit over the air. wlan_mlo_update_action_frame_from_user() API
will do the address translation from MLD to link.

If any non-public action frame is received over the air that needs
to be sent to userspace, the kernel expects MLD address in RA, DA
and BSSID fields. wlan_mlo_update_action_frame_to_user() API will
do the address translation from link to MLD.

Change-Id: Iab93dd1301003b78edf6d619cfbf552afa53ae7a
CRs-Fixed: 3394706
2023-02-07 23:41:52 -08:00
Liangwei Dong
1ffc60a883 qcacmn: Add API to stop reconfig timer
Add API to stop link reconfig timer on vdev or ml dev.
Add API to query the reconfig timer state.

Change-Id: I729d403122e4e84cdf0dced21c49176397e10e5d
CRs-Fixed: 3352937
2023-02-05 22:51:38 -08:00
Himanshu Batra
97524335e8 qcacmn: Add mlo peer check in disconnect handling
In case of handling disconnect while sta is connected, if previous
connection is non-ml and a new connect is received with ml
connection on partner link then disconnect request on connected link
is getting ignored.
Fix to add mlo peer check in disconnect handling.

Change-Id: I456b45a080375b93ce209300bf7719e9e53733dc
CRs-Fixed: 3394233
2023-02-05 18:57:30 -08:00
Srinivas Pitla
6f49a4b14b qcacmn: Add API to invoke MLO peer delete
This API invokes peer delete on all link peers

Change-Id: If20274ca67c93a3e6c0706c04007215d5330bea0
CRs-Fixed: 3389049
2023-01-30 12:38:31 -08:00
Himanshu Batra
110b8dfe15 qcacmn: Add mlo peer check in validating disconnect
In case of handling disconnect while sta is connected, if previous
connection is non-ml and a new connect is received with ml
connection then disconnect request is getting ignored.
Fix to add mlo peer check in validating disconnect

Change-Id: I037854f2b4f16e17b8cc75d8a27f5806ed5f783a
CRs-Fixed: 3387398
2023-01-29 10:28:23 -08:00
Paul Zhang
37b58d0525 qcacmn: add critical update feature
Add the code logic to save the BSS parameters change count (BPCC)
for critical update feature.

Change-Id: I3fafd44af8661d1dcf5d7bbde84d2729d390a44c
CRs-Fixed: 3324174
2023-01-26 01:25:10 -08:00
Chaithanya Garrepalli
7799db5d9e qcacmn: ml peer id allocation change
Change to allocate next available ML peer id
instead of using recently free peer_id

Change-Id: I493ef2d838d7880568462ae3e8024ae3be5f1ba7
CRs-Fixed: 3384320
2023-01-25 21:26:56 -08:00
Surya Prakash Raajen
321b889b11 qcacmn: Remove DP mlo context only after all soc are brought down
DP mlo context should be removed only after all socs are down.
In case of target recovery it was getting removed before socs/vaps
are down. Fix this to avoid invalid access

Change-Id: Icc62758ed2b62070428548476e33df4065948948
CRs-Fixed: 3376670
2023-01-25 16:36:44 -08:00
Vinod Kumar Pirla
ba7c39769d qcacmn: Modify API to check peer address in global ML ctx
Modify the mlo_mgr_ml_peer_exist() API to accept
pointer to vdev_id of the peer and rename as
mlo_mgr_ml_peer_exist_on_diff_ml_ctx().

The API returns true if the peer address matches on
any vdev which is on different ML dev context, if
match is found on same ML dev context the API will
return false.
If the peer address match is found but the pointer
to peer vdev ID is NULL, the API will return true.

Change-Id: I8045325f31850782551c7468aa1eac7c5f77fd69
CRs-Fixed: 3377752
2023-01-25 16:36:33 -08:00