Skip to content

Commit a5686ae

Browse files
Karthikeyan PeriyasamyJeff Johnson
authored andcommitted
wifi: ath12k: move ATH12K_FLAG_REGISTERED handling to ath12k_mac_register()
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 <[email protected]> Signed-off-by: Harshitha Prem <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]>
1 parent 45e72c3 commit a5686ae

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/net/wireless/ath/ath12k/mac.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10839,6 +10839,8 @@ int ath12k_mac_register(struct ath12k_base *ab)
1083910839
goto err;
1084010840
}
1084110841

10842+
set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags);
10843+
1084210844
return 0;
1084310845

1084410846
err:
@@ -10858,6 +10860,8 @@ void ath12k_mac_unregister(struct ath12k_base *ab)
1085810860
struct ath12k_hw *ah;
1085910861
int i;
1086010862

10863+
clear_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags);
10864+
1086110865
for (i = ath12k_get_num_hw(ab) - 1; i >= 0; i--) {
1086210866
ah = ath12k_ab_to_ah(ab, i);
1086310867
if (!ah)

drivers/net/wireless/ath/ath12k/qmi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3349,11 +3349,9 @@ static void ath12k_qmi_driver_event_work(struct work_struct *work)
33493349
&ab->dev_flags);
33503350
clear_bit(ATH12K_FLAG_RECOVERY, &ab->dev_flags);
33513351
ret = ath12k_core_qmi_firmware_ready(ab);
3352-
if (!ret) {
3352+
if (!ret)
33533353
set_bit(ATH12K_FLAG_QMI_FW_READY_COMPLETE,
33543354
&ab->dev_flags);
3355-
set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags);
3356-
}
33573355

33583356
break;
33593357
default:

0 commit comments

Comments
 (0)