summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@codeaurora.org>2017-07-12 11:55:37 +0530
committersnandini <snandini@codeaurora.org>2017-07-29 23:45:49 -0700
commit6b97badde02ccd204ecfbe794332a29abb83c321 (patch)
treee1b0f6c3727e4023cc3e5966635207ec7db26d6a
parent78f01018fa3212291b0e99b078725513b0bcc9bf (diff)
qcacld-2.0: Use scan reject count along with time to detect scan failure
prima to qcacld-2.0 propagation If scan is scheduled after long interval there is a chance that driver is busy with same reason. i.e if scan is scheduled after 5 min there is a chance that driver is busy in reassoc both time but this will give false alarm that driver is stuck. To reduce this condition include number of scan failures as well along with time interval. Change-Id: I6fdd0813541aa5d3d069fe8bf3934cfa47425550 CRs-Fixed: 2084598
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h3
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c14
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c1
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c1
4 files changed, 15 insertions, 4 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 5194eee0957a..b4d8f9b46d6a 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -269,6 +269,8 @@ typedef v_U8_t tWlanHddMacAddr[HDD_MAC_ADDR_LEN];
#define MAX_PROBE_REQ_OUIS 16
#define SCAN_REJECT_THRESHOLD_TIME 300000 /* Time is in msec, equal to 5 mins */
+#define SCAN_REJECT_THRESHOLD 15
+
/*
* @eHDD_SCAN_REJECT_DEFAULT: default value
@@ -2110,6 +2112,7 @@ struct hdd_context_s
v_U8_t last_scan_reject_session_id;
scan_reject_states last_scan_reject_reason;
v_TIME_t last_scan_reject_timestamp;
+ uint8_t scan_reject_cnt;
uint8_t hdd_dfs_regdomain;
#ifdef WLAN_FEATURE_TSF
/* indicate whether tsf has been initialized */
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 4b77307dbba0..fcd896b7b4d1 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -21540,15 +21540,20 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
pHddCtx->last_scan_reject_session_id = curr_session_id;
pHddCtx->last_scan_reject_reason = curr_reason;
pHddCtx->last_scan_reject_timestamp = jiffies_to_msecs(jiffies);
+ pHddCtx->scan_reject_cnt = 0;
} else {
- hddLog(LOGE, FL("curr_session id %d curr_reason %d time delta %lu"),
+ pHddCtx->scan_reject_cnt++;
+ hddLog(LOGE, FL("curr_session id %d curr_reason %d time delta %lu count %d"),
curr_session_id, curr_reason,
(jiffies_to_msecs(jiffies) -
- pHddCtx->last_scan_reject_timestamp));
- if ((jiffies_to_msecs(jiffies) -
+ pHddCtx->last_scan_reject_timestamp), pHddCtx->scan_reject_cnt);
+ if ((pHddCtx->scan_reject_cnt >=
+ SCAN_REJECT_THRESHOLD) &&
+ ((jiffies_to_msecs(jiffies) -
pHddCtx->last_scan_reject_timestamp) >=
- SCAN_REJECT_THRESHOLD_TIME) {
+ SCAN_REJECT_THRESHOLD_TIME)) {
pHddCtx->last_scan_reject_timestamp = 0;
+ pHddCtx->scan_reject_cnt = 0;
if (pHddCtx->cfg_ini->enable_fatal_event) {
vos_flush_logs(WLAN_LOG_TYPE_FATAL,
WLAN_LOG_INDICATOR_HOST_DRIVER,
@@ -21565,6 +21570,7 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
pHddCtx->last_scan_reject_timestamp = 0;
pHddCtx->last_scan_reject_session_id = 0xFF;
pHddCtx->last_scan_reject_reason = 0;
+ pHddCtx->scan_reject_cnt = 0;
/* Check whether SAP scan can be skipped or not */
if (pAdapter->device_mode == WLAN_HDD_SOFTAP &&
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index c2475e944320..36a5e8f9be8e 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -2470,6 +2470,7 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
pHddCtx->last_scan_reject_session_id = 0xFF;
pHddCtx->last_scan_reject_reason = 0;
pHddCtx->last_scan_reject_timestamp = 0;
+ pHddCtx->scan_reject_cnt = 0;
pHddCtx->hdd_mcastbcast_filter_set = FALSE;
pHddCtx->btCoexModeSet = false;
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index debd196ca384..dd8612146a4c 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -15413,6 +15413,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
pHddCtx->last_scan_reject_session_id = 0xFF;
pHddCtx->last_scan_reject_reason = 0;
pHddCtx->last_scan_reject_timestamp = 0;
+ pHddCtx->scan_reject_cnt = 0;
init_completion(&pHddCtx->full_pwr_comp_var);
init_completion(&pHddCtx->standby_comp_var);