|
@@ -5972,7 +5972,6 @@ static void wlan_destroy_bug_report_lock(void)
|
|
|
*/
|
|
|
static void hdd_wlan_exit(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- QDF_STATUS qdf_status;
|
|
|
struct wiphy *wiphy = hdd_ctx->wiphy;
|
|
|
int driver_status;
|
|
|
|
|
@@ -6047,17 +6046,6 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx)
|
|
|
hdd_deinit_all_adapters(hdd_ctx, false);
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- * Close the scheduler before calling cds_close to make sure
|
|
|
- * no thread is scheduled after the each module close is
|
|
|
- * is called i.e after all the data structures are freed.
|
|
|
- */
|
|
|
- qdf_status = cds_sched_close();
|
|
|
- if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
- hdd_alert("Failed to close CDS Scheduler");
|
|
|
- QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
|
|
- }
|
|
|
-
|
|
|
unregister_netdevice_notifier(&hdd_netdev_notifier);
|
|
|
|
|
|
hdd_wlan_stop_modules(hdd_ctx, false);
|
|
@@ -9647,6 +9635,16 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
|
|
|
QDF_ASSERT(0);
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * Close the scheduler before calling cds_close to make sure
|
|
|
+ * no thread is scheduled after the each module close is
|
|
|
+ * is called i.e after all the data structures are freed.
|
|
|
+ */
|
|
|
+ qdf_status = cds_sched_close();
|
|
|
+ QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
|
|
+ if (QDF_IS_STATUS_ERROR(qdf_status))
|
|
|
+ hdd_alert("Failed to close CDS Scheduler");
|
|
|
+
|
|
|
qdf_status = cds_close(hdd_ctx->hdd_psoc);
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
hdd_warn("Failed to stop CDS: %d", qdf_status);
|
|
@@ -9982,14 +9980,6 @@ err_stop_modules:
|
|
|
hdd_objmgr_release_and_destroy_pdev(hdd_ctx);
|
|
|
|
|
|
err_hdd_free_psoc:
|
|
|
- if (DRIVER_MODULES_CLOSED == hdd_ctx->driver_status) {
|
|
|
- status = cds_sched_close();
|
|
|
- if (!QDF_IS_STATUS_SUCCESS(status)) {
|
|
|
- hdd_err("Failed to close CDS Scheduler");
|
|
|
- QDF_ASSERT(QDF_IS_STATUS_SUCCESS(status));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
hdd_green_ap_deinit(hdd_ctx);
|
|
|
hdd_request_manager_deinit();
|
|
|
hdd_exit_netlink_services(hdd_ctx);
|