From 1efa55ca9df343fdb99115ea0361989b5426abe2 Mon Sep 17 00:00:00 2001 From: Bhargav Shah Date: Wed, 4 Nov 2015 11:58:27 +0530 Subject: [PATCH] wlan: Fix for redundant TDLS log during scan_done callback qcacld-2.0 to qcacld-3.0 propagation In wlan_hdd_tdls_check_bmps(), NULL check for pHddTdlsCtx will be TRUE if TDLS support is not enabled. This leads to redundant logs, as this is called for every scan_done callback. Call wlan_hdd_tdls_scan_done_callback() only when TDLS support is enabled. Change-Id: Ice6f8fb1dc64f0669c19a9b5f5ce3d23c8cdc11c CRs-Fixed: 672099 --- core/hdd/src/wlan_hdd_scan.c | 4 ++++ core/hdd/src/wlan_hdd_tdls.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 586c50f56334..715cf884ee2b 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -1107,6 +1107,10 @@ static CDF_STATUS hdd_cfg80211_scan_done_callback(tHalHandle halHandle, uint32_t scan_time; uint32_t size = 0; + ret = wlan_hdd_validate_context(hddctx); + if (0 != ret) + return CDF_STATUS_E_INVAL; + hddLog(CDF_TRACE_LEVEL_INFO, "%s called with hal = %p, pContext = %p, ID = %d, status = %d", __func__, halHandle, pContext, (int)scanId, (int)status); diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 459724608f9b..b3a1e0e88d19 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -2751,6 +2751,11 @@ void wlan_hdd_tdls_scan_done_callback(hdd_adapter_t *pAdapter) return; } + if (eTDLS_SUPPORT_NOT_ENABLED == pHddCtx->tdls_mode) { + hdd_info("TDLS mode is disabled OR not enabled"); + return; + } + /* free allocated memory at scan time */ wlan_hdd_tdls_free_scan_request(&pHddCtx->tdls_scan_ctxt);