diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 677fcb5653..01ed925a8b 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -576,8 +576,6 @@ static void __hdd_soc_remove(struct device *dev) if (hdd_get_conparam() == QDF_GLOBAL_EPPING_MODE) { hdd_wlan_stop_modules(hdd_ctx, false); - epping_disable(); - epping_close(); } else { hdd_wlan_exit(hdd_ctx); } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e84eed89ae..ffc25ace7f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -11370,6 +11370,11 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) hdd_ctx->target_hw_name = NULL; } + if (hdd_get_conparam() != QDF_GLOBAL_EPPING_MODE) { + epping_disable(); + epping_close(); + } + hdd_hif_close(hdd_ctx, hif_ctx); ol_cds_free();