]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: ath12k: modify link arvif creation and removal for MLO
authorSriram R <quic_srirrama@quicinc.com>
Tue, 15 Oct 2024 17:14:16 +0000 (20:14 +0300)
committerJeff Johnson <quic_jjohnson@quicinc.com>
Wed, 16 Oct 2024 15:36:20 +0000 (08:36 -0700)
commit477cabfdb776b571fab425813c074f30c02a5cf6
tree6ea58233262665d8c35de6a9e5d6c96f5fa179df
parentf4adb07e0a524a35b34397ad08d0199cfe2c450f
wifi: ath12k: modify link arvif creation and removal for MLO

Currently ath12k_mac_op_assign_vif_chanctx() uses ahvif->deflink to create and
start vdev based on incoming channel context. With MLO multiple links could be
associated to the ahvif. Use link id from link_conf passed by mac80211 and do
vdev create start for intended link of ahvif.

Add ath12k_mac_assign_link_vif() helper to allocate and initialize link arvif
object based on input link_id.  The first link arvif that is being created in
an ahvif will use preallocated ahvif->deflink object and the rest gets
allocated.

Currently link arvif can be removed in two call backs namely
ath12k_mac_op_remove_interface() and ath12k_mac_op_unassign_vif_chanctx():

  * ath12k_mac_op_unassign_vif_chanctx() carries link_info so
    obtain link_id from link_info and handle removal for that
    link

  * ath12k_mac_op_remove_interface() is done at interface/MLD
    level hence loop through the active link arvifs and remove
    all of them

Add ath12k_mac_unassign_link_vif() helper to reset/destroy the link arvifs
allocated for an ahvif.

For scan request from mac80211, check if the any of the link arvifs of the
ahvif is already created on the radio in which scan is requested and use it. If
not use deflink(link 0) for creating scan arvif.

Also ath12k creates vdev during assign_vif_chanctx() mac80211 op callback as it
knows channel associated with given link only in this callback.  Whereas
mac80211 updates addition/deletion of links to an ML vif via
.change_vif_links() callback and this is done before channel assignment.  Hence
register an dummy ath12k_mac_op_change_vif_links() function to
change_vif_links() and acknowledge mac80211s link updates.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Co-developed-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20241015171416.518022-12-kvalo@kernel.org
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
drivers/net/wireless/ath/ath12k/mac.c