WiFi-HAL: Reducing the log prints in case of gscan
In case of report_event being 2 each scan result is forwarded
resulting in lot of logs, reducing the logs for the same.
Change-Id: I0002939e529fb1eb9bc03895efd3bc4d3fcb64c6
diff --git a/qcwcn/wifi_hal/gscan_event_handler.cpp b/qcwcn/wifi_hal/gscan_event_handler.cpp
index f2f9636..87e336e 100644
--- a/qcwcn/wifi_hal/gscan_event_handler.cpp
+++ b/qcwcn/wifi_hal/gscan_event_handler.cpp
@@ -1098,9 +1098,10 @@
u32 resultsBufSize = 0;
u32 lengthOfInfoElements = 0;
+#ifdef QC_HAL_DEBUG
ALOGD("Event QCA_NL80211_VENDOR_SUBCMD_GSCAN_FULL_SCAN_RESULT "
"received.");
-
+#endif
if (!tbVendor[
QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_REQUEST_ID])
{
@@ -1116,8 +1117,10 @@
* request_id value which we're maintaining.
*/
if (reqId != mRequestId) {
+#ifdef QC_HAL_DEBUG
ALOGE("%s: Event has Req. ID:%d <> Ours:%d, continue...",
__FUNCTION__, reqId, mRequestId);
+#endif
reqId = mRequestId;
}
diff --git a/qcwcn/wifi_hal/wifi_hal.cpp b/qcwcn/wifi_hal/wifi_hal.cpp
index c51438a..7942cfd 100644
--- a/qcwcn/wifi_hal/wifi_hal.cpp
+++ b/qcwcn/wifi_hal/wifi_hal.cpp
@@ -49,6 +49,7 @@
#include "cpp_bindings.h"
#include "ifaceeventhandler.h"
#include "wifiloggercmd.h"
+#include "vendor_definitions.h"
/*
BUGBUG: normally, libnl allocates ports for all connections it makes; but
@@ -711,8 +712,12 @@
if (cmd == NL80211_CMD_VENDOR) {
vendor_id = event.get_u32(NL80211_ATTR_VENDOR_ID);
subcmd = event.get_u32(NL80211_ATTR_VENDOR_SUBCMD);
- ALOGI("event received %s, vendor_id = 0x%0x, subcmd = 0x%0x",
- event.get_cmdString(), vendor_id, subcmd);
+ /* Restrict printing GSCAN_FULL_RESULT which is causing lot
+ of logs in bug report */
+ if (subcmd != QCA_NL80211_VENDOR_SUBCMD_GSCAN_FULL_SCAN_RESULT) {
+ ALOGI("event received %s, vendor_id = 0x%0x, subcmd = 0x%0x",
+ event.get_cmdString(), vendor_id, subcmd);
+ }
} else {
ALOGI("event received %s", event.get_cmdString());
}
@@ -742,9 +747,11 @@
}
}
+#ifdef QC_HAL_DEBUG
if (!dispatched) {
ALOGI("event ignored!!");
}
+#endif
pthread_mutex_unlock(&info->cb_lock);
return NL_OK;