[PATCH v2 5/8] wifi: ath12k: move ATH12K_FLAG_REGISTERED flag set to mac_register api
Harshitha Prem
quic_hprem at quicinc.com
Wed Apr 24 22:57:56 PDT 2024
From: Karthikeyan Periyasamy <quic_periyasa at quicinc.com>
When hardware device group abstraction is introduced, in future, a group
abstraction is registered to mac80211 rather than a particular device.
Hence, setting ATH12K_FLAG_REGISTERED in QMI firmware ready event might not
be ideal.
Add changes to move set/unset of ATH12K_FLAG_REGISTERED flag inside
ath12k_mac_register() and ath12k_mac_unregister() respectively.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa at quicinc.com>
Signed-off-by: Harshitha Prem <quic_hprem at quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 2 ++
drivers/net/wireless/ath/ath12k/qmi.c | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 0ff526bfd104..ae0a56bb8d6d 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -8892,6 +8892,7 @@ int ath12k_mac_register(struct ath12k_base *ab)
goto err;
}
+ set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags);
return 0;
err:
@@ -8911,6 +8912,7 @@ 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)
diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index 7a1e4eb0370e..b37ab6244931 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -3327,11 +3327,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:
--
2.34.1
More information about the ath12k
mailing list