From 4cc97a9b18a48207be0abc2c0886bd281c976bf3 Mon Sep 17 00:00:00 2001 From: Arunk Khandavalli Date: Wed, 14 Sep 2016 23:13:07 +0530 Subject: [PATCH] qcacld-3.0: set global context to NULL only when all the cleanup is completed In cds_deint, cds global context is set to NULL and then cleanup handlers of memory/timer/nbuf manager's are invoked. During the cleanup these handlers use QDF_TRACE to print the cleanup information which internally tries to get the global context resulting in not clean unload of driver. To migitate the issue set global context to NULL once the clean up of all handlers is completed cleanly. Change-Id: Ic58962dfd543020d79cabd7b646e483c4f7961f2 CRs-Fixed: 1067340 --- core/cds/src/cds_api.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index e37e9c729f25..a493dc34c55f 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -117,14 +117,13 @@ void cds_deinit(void) if (gp_cds_context == NULL) return; + qdf_mc_timer_manager_exit(); + qdf_mem_exit(); + gp_cds_context->qdf_ctx = NULL; gp_cds_context = NULL; qdf_mem_zero(&g_cds_context, sizeof(g_cds_context)); - - qdf_mc_timer_manager_exit(); - qdf_mem_exit(); - return; }