summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Girigowda <sgirigow@codeaurora.org>2017-01-18 12:09:40 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-02-11 06:10:11 -0800
commit891f5c3873d06c3a29e1e89fb0db9e19ead08788 (patch)
tree1642a9e9b6620543c686f2d5fa97c05ea0b72440
parent758c1f94662fb6fa94f0482a9b7ec5d5b4e02833 (diff)
qcacld-2.0: Add counter for number of times scan was rejected due to -EBUSY
The counter is incremented and logged for each -EBUSY and reset when scan request is successfully accepted. It should help us debug cases where the recovery timeout logic isn't working well or is too slow to react. Change-Id: I9dd4384cec2a6aefb56e97c1d871c2d2a4819bf6 CRs-Fixed: 1113120
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c47
1 files changed, 29 insertions, 18 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index b0744433c5f3..52eb27d1ad43 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -20110,6 +20110,7 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
uint8_t num_chan = 0;
v_U8_t curr_session_id;
scan_reject_states curr_reason;
+ static uint32_t scan_ebusy_cnt;
ENTER();
@@ -20162,11 +20163,12 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
}
}
- if (TRUE == pScanInfo->mScanPending)
- {
- if ( MAX_PENDING_LOG > pScanInfo->mScanPendingCounter++ )
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: mScanPending is TRUE", __func__);
+ if (TRUE == pScanInfo->mScanPending) {
+ scan_ebusy_cnt++;
+
+ if (MAX_PENDING_LOG > pScanInfo->mScanPendingCounter++) {
+ hddLog(LOGE, "%s: mScanPending is TRUE scan_ebusy_cnt: %u",
+ __func__, scan_ebusy_cnt);
}
return -EBUSY;
}
@@ -20175,9 +20177,11 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
//Channel and action frame is pending
//Otherwise Cancel Remain On Channel and allow Scan
//If no action frame pending
- if (0 != wlan_hdd_check_remain_on_channel(pAdapter))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Remain On Channel Pending", __func__);
+ if (0 != wlan_hdd_check_remain_on_channel(pAdapter)) {
+ scan_ebusy_cnt++;
+ hddLog(LOGE, "%s: Remain On Channel Pending. scan_ebusy_cnt: %u",
+ __func__, scan_ebusy_cnt);
+
return -EBUSY;
}
#ifdef FEATURE_WLAN_TDLS
@@ -20213,8 +20217,10 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
if (TRUE == pHddCtx->tmInfo.tmAction.enterImps)
{
mutex_unlock(&pHddCtx->tmInfo.tmOperationLock);
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: MAX TM Level Scan not allowed", __func__);
+ scan_ebusy_cnt++;
+ hddLog(LOGE, "%s: MAX TM Level Scan not allowed. scan_ebusy_cnt: %u",
+ __func__, scan_ebusy_cnt);
+
return -EBUSY;
}
mutex_unlock(&pHddCtx->tmInfo.tmOperationLock);
@@ -20222,7 +20228,10 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
/* Check if scan is allowed at this point of time.
*/
if (hdd_isConnectionInProgress(pHddCtx, &curr_session_id, &curr_reason)) {
- hddLog(LOGE, FL("Scan not allowed"));
+ scan_ebusy_cnt++;
+ hddLog(LOGE, FL("Scan not allowed, scan_ebusy_cnt: %u"),
+ scan_ebusy_cnt);
+
if (pHddCtx->last_scan_reject_session_id != curr_session_id ||
pHddCtx->last_scan_reject_reason != curr_reason ||
!pHddCtx->last_scan_reject_timestamp) {
@@ -20541,14 +20550,13 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: sme_ScanRequest returned error %d", __func__, status);
complete(&pScanInfo->scan_req_completion_event);
- if(eHAL_STATUS_RESOURCES == status)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: HO is in progress.So defer the scan by informing busy",
- __func__);
+ if (eHAL_STATUS_RESOURCES == status) {
+ scan_ebusy_cnt++;
+ hddLog(LOGE, FL("HO is in progress. Defer scan by informing busy scan_ebusy_cnt: %u"),
+ scan_ebusy_cnt);
+
status = -EBUSY;
- }
- else
- {
+ } else {
status = -EIO;
}
@@ -20575,6 +20583,9 @@ free_mem:
if(scanRequest.voui)
vos_mem_free(scanRequest.voui);
+ if (status == 0)
+ scan_ebusy_cnt = 0;
+
EXIT();
return status;
}