@@ -1175,7 +1175,6 @@ static int ath11k_core_soc_create(struct ath11k_base *ab)
static void ath11k_core_soc_destroy(struct ath11k_base *ab)
{
ath11k_debugfs_soc_destroy(ab);
- ath11k_reg_free(ab);
ath11k_qmi_deinit_service(ab);
}
@@ -1471,6 +1470,7 @@ static void ath11k_core_reconfigure_on_crash(struct ath11k_base *ab)
mutex_unlock(&ab->core_lock);
ath11k_dp_free(ab);
+ ath11k_reg_free(ab);
ab->free_vdev_map = (1LL << (ab->num_radios * TARGET_NUM_VDEVS(ab))) - 1;
}
@@ -1844,6 +1844,7 @@ void ath11k_core_stop_device(struct ath11k_base *ab)
ath11k_thermal_unregister(ab);
ath11k_dp_pdev_free(ab);
ath11k_dp_free(ab);
+ ath11k_reg_free(ab);
}
EXPORT_SYMBOL(ath11k_core_stop_device);
@@ -757,5 +757,7 @@ void ath11k_reg_free(struct ath11k_base *ab)
for (i = 0; i < ab->hw_params.max_radios; i++) {
kfree(ab->default_regd[i]);
kfree(ab->new_regd[i]);
+ ab->default_regd[i] = NULL;
+ ab->new_regd[i] = NULL;
}
}
In the continuous WiFi ON/OFF scenario, we see a lot of "failed to parse regulatory event" prints on the console. This is because we already would have created a regulatory domain for the wiphy and we will discard the subsequent events to create the same regulatory event. Fix this error print by freeing up the regulatory resources in WiFi OFF and create the database again in WiFi ON. The same applies for hardware recovery as well. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com> --- drivers/net/wireless/ath/ath11k/core.c | 3 ++- drivers/net/wireless/ath/ath11k/reg.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)