From c949ad28abcc05e91cc4fd32a491c44410c18ee7 Mon Sep 17 00:00:00 2001 From: Visweswara Tanuku Date: Wed, 20 Mar 2019 13:00:30 +0530 Subject: [PATCH] qcacld-3.0: Handle epping disable and epping close during rmmod In hdd_soc_remove, epping_disable/epping_close are called after hif context is cleared by hdd_wlan_stop_modules. hif context is needed to cleanup epping adapter and since hif context is not available during epping disable/close, epping adapter cleanup fails. Handle epping_disable & epping_close by moving them to hdd_wlan_stop_modules before hif is closed Change-Id: I43d516006c413daa936d2401484cf3d745a94c74 CRs-Fixed: 2419665 --- core/hdd/src/wlan_hdd_driver_ops.c | 2 -- core/hdd/src/wlan_hdd_main.c | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 677fcb565376..01ed925a8bd3 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 e84eed89ae3d..ffc25ace7fb2 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();