summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVignesh Viswanathan <viswanat@codeaurora.org>2017-08-30 19:22:57 +0530
committersnandini <snandini@codeaurora.org>2017-08-31 10:44:08 -0700
commit77c06a482f2aab3efc1c9efa4e72af447c864e94 (patch)
treeaaf569496d4e53cd92cfe3b3991b4c3f7eff360b
parent00d05755e7e64713c4ac66a9720ece9f1723a496 (diff)
qcacld-3.0: rate limit logs from HDD during scan and connect
Currently logs are printed from HDD during scan and connect for every retry, which is causing MCThread to get stuck at printk and crash Rate limit the hdd logs to print for every 5 retries to avoid filling the log buffer. Also change some error logs to debug level. Change-Id: I09ad38cd89bbd20081673142bf5a350c55b0f005 CRs-Fixed: 2090761
-rw-r--r--core/cds/src/cds_concurrency.c10
-rw-r--r--core/hdd/src/wlan_hdd_scan.c16
2 files changed, 16 insertions, 10 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index 731b9148decc..f8fa4a857b08 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -2854,7 +2854,7 @@ bool cds_is_connection_in_progress(uint8_t *session_id,
&& (eConnectionState_Connecting ==
(WLAN_HDD_GET_STATION_CTX_PTR(adapter))->
conn_info.connState)) {
- cds_err("%p(%d) Connection is in progress",
+ cds_debug("%p(%d) Connection is in progress",
WLAN_HDD_GET_STATION_CTX_PTR(adapter),
adapter->sessionId);
if (session_id && reason) {
@@ -2872,7 +2872,7 @@ bool cds_is_connection_in_progress(uint8_t *session_id,
WLAN_HDD_GET_HAL_CTX(adapter),
adapter->sessionId)) ||
hdd_is_roaming_in_progress(adapter)) {
- cds_err("%p(%d) Reassociation in progress",
+ cds_debug("%p(%d) Reassociation in progress",
WLAN_HDD_GET_STATION_CTX_PTR(adapter),
adapter->sessionId);
if (session_id && reason) {
@@ -2892,7 +2892,7 @@ bool cds_is_connection_in_progress(uint8_t *session_id,
hdd_sta_ctx->conn_info.uIsAuthenticated)) {
sta_mac = (uint8_t *)
&(adapter->macAddressCurrent.bytes[0]);
- cds_err("client " MAC_ADDRESS_STR
+ cds_debug("client " MAC_ADDRESS_STR
" is in middle of WPS/EAPOL exchange.",
MAC_ADDR_ARRAY(sta_mac));
if (session_id && reason) {
@@ -2913,7 +2913,7 @@ bool cds_is_connection_in_progress(uint8_t *session_id,
sta_mac = (uint8_t *)
&(adapter->aStaInfo[sta_id].
macAddrSTA.bytes[0]);
- cds_err("client " MAC_ADDRESS_STR
+ cds_debug("client " MAC_ADDRESS_STR
" of SAP/GO is in middle of WPS/EAPOL exchange",
MAC_ADDR_ARRAY(sta_mac));
if (session_id && reason) {
@@ -2923,7 +2923,7 @@ bool cds_is_connection_in_progress(uint8_t *session_id,
return true;
}
if (hdd_ctx->connection_in_progress) {
- cds_err("AP/GO: connection is in progress");
+ cds_debug("AP/GO: connection is in progress");
return true;
}
}
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index 131fe51f0e60..8383f11fc7d1 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -55,6 +55,11 @@
#define SCAN_DONE_EVENT_BUF_SIZE 4096
#define RATE_MASK 0x7f
+/*
+ * Count to ratelimit the HDD logs during Scan and connect
+ */
+#define HDD_SCAN_REJECT_RATE_LIMIT 5
+
/**
* enum essid_bcast_type - SSID broadcast type
* @eBCAST_UNKNOWN: Broadcast unknown
@@ -2018,7 +2023,9 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
/* Check if scan is allowed at this point of time */
if (cds_is_connection_in_progress(&curr_session_id, &curr_reason)) {
scan_ebusy_cnt++;
- hdd_err("Scan not allowed. scan_ebusy_cnt: %d", scan_ebusy_cnt);
+ hdd_err_ratelimited(HDD_SCAN_REJECT_RATE_LIMIT,
+ "Scan not allowed. scan_ebusy_cnt: %d Session %d Reason %d",
+ scan_ebusy_cnt, curr_session_id, curr_reason);
if (pHddCtx->last_scan_reject_session_id != curr_session_id ||
pHddCtx->last_scan_reject_reason != curr_reason ||
!pHddCtx->last_scan_reject_timestamp) {
@@ -2030,14 +2037,13 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
pHddCtx->scan_reject_cnt = 0;
} else {
pHddCtx->scan_reject_cnt++;
- hdd_debug("curr_session id %d curr_reason %d count %d threshold time has elapsed? %d",
- curr_session_id, curr_reason, pHddCtx->scan_reject_cnt,
- qdf_system_time_after(jiffies_to_msecs(jiffies),
- pHddCtx->last_scan_reject_timestamp));
if ((pHddCtx->scan_reject_cnt >=
SCAN_REJECT_THRESHOLD) &&
qdf_system_time_after(jiffies_to_msecs(jiffies),
pHddCtx->last_scan_reject_timestamp)) {
+ hdd_err("scan reject threshold reached Session %d Reason %d count %d",
+ curr_session_id, curr_reason,
+ pHddCtx->scan_reject_cnt);
pHddCtx->last_scan_reject_timestamp = 0;
pHddCtx->scan_reject_cnt = 0;
if (pHddCtx->config->enable_fatal_event) {