]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: move ATH12K_FLAG_REGISTERED handling to ath12k_mac_register()
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Wed, 4 Dec 2024 16:32:10 +0000 (18:32 +0200)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 5 Dec 2024 22:28:41 +0000 (14:28 -0800)
When hardware device group abstraction is introduced, a group abstraction is
registered to mac80211 rather than a particular single device.  So we cannot
set the device registered when the QMI firmware ready event is received, only
after all the devices in group have received the event. To do that set and
unset ATH12K_FLAG_REGISTERED flag inside ath12k_mac_register() and
ath12k_mac_unregister() respectively.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20241204163216.433795-2-kvalo@kernel.org
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/qmi.c

index 129607ac6c1a15773ba7a30aaa86cde6fc0f924e..1180070278dacc7d283d9894805fd9528a1d6ec8 100644 (file)
@@ -10839,6 +10839,8 @@ int ath12k_mac_register(struct ath12k_base *ab)
                        goto err;
        }
 
+       set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags);
+
        return 0;
 
 err:
@@ -10858,6 +10860,8 @@ void ath12k_mac_unregister(struct ath12k_base *ab)
        struct ath12k_hw *ah;
        int i;
 
+       clear_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags);
+
        for (i = ath12k_get_num_hw(ab) - 1; i >= 0; i--) {
                ah = ath12k_ab_to_ah(ab, i);
                if (!ah)
index 77d8ee14bf33e657e270a74a95d13c229b56d2e1..20382b751829e5bbc6ef74e971cb5bad465649d9 100644 (file)
@@ -3349,11 +3349,9 @@ static void ath12k_qmi_driver_event_work(struct work_struct *work)
                                  &ab->dev_flags);
                        clear_bit(ATH12K_FLAG_RECOVERY, &ab->dev_flags);
                        ret = ath12k_core_qmi_firmware_ready(ab);
-                       if (!ret) {
+                       if (!ret)
                                set_bit(ATH12K_FLAG_QMI_FW_READY_COMPLETE,
                                        &ab->dev_flags);
-                               set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags);
-                       }
 
                        break;
                default: