]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: Set up MLO after SSR
authorRamya Gnanasekar <ramya.gnanasekar@oss.qualcomm.com>
Fri, 27 Feb 2026 04:11:27 +0000 (09:41 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 2 Mar 2026 21:02:05 +0000 (13:02 -0800)
During recovery of an MLO setup from a core reset,
ATH12K_GROUP_FLAG_REGISTERED is set because ath12k_mac_unregister is not
called during core reset. So, when an MLO setup is recovering from a core
reset, ath12k_core_mlo_setup() is skipped. Hence, the firmware will not
have information about partner links. This makes MLO association fail
after recovery.

To resolve this, call ath12k_core_mlo_setup() during recovery, to set up
MLO. Also, if MLO setup fails during recovery, call
ath12k_mac_unregister() and ath12k_mac_destroy() to unregister mac and
then tear down the mac structures.

Also, initiate MLO teardown in the hardware group stop sequence to align
with the hardware group start sequence.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01181-QCAHKSWPL_SILICONZ-1

Signed-off-by: Ramya Gnanasekar <ramya.gnanasekar@oss.qualcomm.com>
Signed-off-by: Roopni Devanathan <roopni.devanathan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260227041127.3265879-1-roopni.devanathan@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/core.c

index 9dca1a0af73e39e4a492505e99ae68e6f8990e4e..218c0a0c969996ebd0fb4a0e41ed5fd0926c5c17 100644 (file)
@@ -1017,6 +1017,8 @@ static void ath12k_core_hw_group_stop(struct ath12k_hw_group *ag)
 
        ath12k_mac_unregister(ag);
 
+       ath12k_mac_mlo_teardown(ag);
+
        for (i = ag->num_devices - 1; i >= 0; i--) {
                ab = ag->ab[i];
                if (!ab)
@@ -1134,8 +1136,14 @@ static int ath12k_core_hw_group_start(struct ath12k_hw_group *ag)
 
        lockdep_assert_held(&ag->mutex);
 
-       if (test_bit(ATH12K_GROUP_FLAG_REGISTERED, &ag->flags))
+       if (test_bit(ATH12K_GROUP_FLAG_REGISTERED, &ag->flags)) {
+               ret = ath12k_core_mlo_setup(ag);
+               if (WARN_ON(ret)) {
+                       ath12k_mac_unregister(ag);
+                       goto err_mac_destroy;
+               }
                goto core_pdev_create;
+       }
 
        ret = ath12k_mac_allocate(ag);
        if (WARN_ON(ret))