Ver Fonte

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
Bhargav Shah há 9 anos atrás
pai
commit
1efa55ca9d
2 ficheiros alterados com 9 adições e 0 exclusões
  1. 4 0
      core/hdd/src/wlan_hdd_scan.c
  2. 5 0
      core/hdd/src/wlan_hdd_tdls.c

+ 4 - 0
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);

+ 5 - 0
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);