From 9e975c250ff86bf0599fd7950c8b759411df90af Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 31 Aug 2017 09:45:14 -0700 Subject: [PATCH] qcacld-3.0: Remove unnecessary get of global context in HDD Several HDD callback functions call cds_get_global_context() to get the global context. At one time this was necessary since the global context was required to get the module-specific context. However the global context is no longer required, so remove the unnecessary retrieval of the global context. Change-Id: I45921e6b09dcfb72db0ce6044c295d46a064d6e9 CRs-Fixed: 2102482 --- core/hdd/src/wlan_hdd_main.c | 7 ------- core/hdd/src/wlan_hdd_tdls.c | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 3882fb62f99c..c08265081edc 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7345,15 +7345,8 @@ void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind) { struct hdd_context *hdd_ctx = NULL; struct hdd_adapter *adapter = NULL; - void *cds_context = NULL; int i; - /* Get the global VOSS context.*/ - cds_context = cds_get_global_context(); - if (!cds_context) { - hdd_err("Global CDS context is Null"); - return; - } /* Get the HDD context.*/ hdd_ctx = (struct hdd_context *)cds_get_context(QDF_MODULE_ID_HDD); diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 2c59c84710b1..6bdbc20c894e 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -424,16 +424,9 @@ static void wlan_hdd_tdls_discovery_timeout_peer_cb(void *userData) struct list_head *pos, *q; tdlsCtx_t *pHddTdlsCtx; struct hdd_context *hdd_ctx; - v_CONTEXT_t cds_context; ENTER(); - cds_context = cds_get_global_context(); - if (NULL == cds_context) { - hdd_err("cds_context points to NULL"); - return; - } - hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); if (0 != (wlan_hdd_validate_context(hdd_ctx))) return; @@ -5894,7 +5887,6 @@ static void wlan_hdd_tdls_idle_handler(void *user_data) hddTdlsPeer_t *curr_peer; tdlsCtx_t *hdd_tdls_ctx; struct hdd_context *hdd_ctx; - v_CONTEXT_t cds_context; struct hdd_adapter *adapter; if (!tdls_info->staId) { @@ -5902,12 +5894,6 @@ static void wlan_hdd_tdls_idle_handler(void *user_data) return; } - cds_context = cds_get_global_context(); - if (NULL == cds_context) { - hdd_err("cds_context points to NULL"); - return; - } - hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); if (0 != (wlan_hdd_validate_context(hdd_ctx))) return;