void ath10k_core_destroy(struct ath10k *ar) { flush_workqueue(ar->workqueue); destroy_workqueue(ar->workqueue); ath10k_debug_destroy(ar); ath10k_mac_destroy(ar); }
void ath10k_core_unregister(struct ath10k *ar) { /* We must unregister from mac80211 before we stop HTC and HIF. * Otherwise we will fail to submit commands to FW and mac80211 will be * unhappy about callback failures. */ ath10k_mac_unregister(ar); ath10k_core_free_firmware_files(ar); ath10k_debug_destroy(ar); }
void ath10k_core_destroy(struct ath10k *ar) { flush_workqueue(ar->workqueue); destroy_workqueue(ar->workqueue); flush_workqueue(ar->workqueue_aux); destroy_workqueue(ar->workqueue_aux); ath10k_debug_destroy(ar); ath10k_wmi_free_host_mem(ar); ath10k_mac_destroy(ar); }
static void ath10k_core_register_work(struct work_struct *work) { struct ath10k *ar = container_of(work, struct ath10k, register_work); int status; status = ath10k_core_probe_fw(ar); if (status) { ath10k_err(ar, "could not probe fw (%d)\n", status); goto err; } status = ath10k_mac_register(ar); if (status) { ath10k_err(ar, "could not register to mac80211 (%d)\n", status); goto err_release_fw; } status = ath10k_debug_register(ar); if (status) { ath10k_err(ar, "unable to initialize debugfs\n"); goto err_unregister_mac; } status = ath10k_spectral_create(ar); if (status) { ath10k_err(ar, "failed to initialize spectral\n"); goto err_debug_destroy; } status = ath10k_thermal_register(ar); if (status) { ath10k_err(ar, "could not register thermal device: %d\n", status); goto err_spectral_destroy; } set_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags); return; err_spectral_destroy: ath10k_spectral_destroy(ar); err_debug_destroy: ath10k_debug_destroy(ar); err_unregister_mac: ath10k_mac_unregister(ar); err_release_fw: ath10k_core_free_firmware_files(ar); err: /* TODO: It's probably a good idea to release device from the driver * but calling device_release_driver() here will cause a deadlock. */ return; }
void ath10k_core_unregister(struct ath10k *ar) { cancel_work_sync(&ar->register_work); if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) return; /* Stop spectral before unregistering from mac80211 to remove the * relayfs debugfs file cleanly. Otherwise the parent debugfs tree * would be already be free'd recursively, leading to a double free. */ ath10k_spectral_destroy(ar); /* We must unregister from mac80211 before we stop HTC and HIF. * Otherwise we will fail to submit commands to FW and mac80211 will be * unhappy about callback failures. */ ath10k_mac_unregister(ar); ath10k_core_free_firmware_files(ar); ath10k_debug_destroy(ar); }