qcacld-3.0: Use scan reject count along with time to detect scan failure

qcacld-2.0 to qcacld-3.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: 2064605
这个提交包含在:
Abhishek Singh
2017-07-14 10:46:17 +05:30
提交者 snandini
父节点 4c1ec99d15
当前提交 001306866e
修改 3 个文件,包含 12 行新增3 行删除

查看文件

@@ -288,6 +288,7 @@
#define HDD_SESSION_ID_INVALID 0xFF #define HDD_SESSION_ID_INVALID 0xFF
#define SCAN_REJECT_THRESHOLD_TIME 300000 /* Time is in msec, equal to 5 mins */ #define SCAN_REJECT_THRESHOLD_TIME 300000 /* Time is in msec, equal to 5 mins */
#define SCAN_REJECT_THRESHOLD 15
/* Default Psoc id */ /* Default Psoc id */
#define DEFAULT_PSOC_ID 1 #define DEFAULT_PSOC_ID 1
@@ -1621,6 +1622,7 @@ struct hdd_context_s {
uint8_t last_scan_reject_session_id; uint8_t last_scan_reject_session_id;
enum scan_reject_states last_scan_reject_reason; enum scan_reject_states last_scan_reject_reason;
unsigned long last_scan_reject_timestamp; unsigned long last_scan_reject_timestamp;
uint8_t scan_reject_cnt;
bool dfs_cac_offload; bool dfs_cac_offload;
bool reg_offload; bool reg_offload;
#ifdef FEATURE_WLAN_CH_AVOID #ifdef FEATURE_WLAN_CH_AVOID

查看文件

@@ -1406,6 +1406,7 @@ QDF_STATUS hdd_wlan_re_init(void)
pHddCtx->last_scan_reject_session_id = 0xFF; pHddCtx->last_scan_reject_session_id = 0xFF;
pHddCtx->last_scan_reject_reason = 0; pHddCtx->last_scan_reject_reason = 0;
pHddCtx->last_scan_reject_timestamp = 0; pHddCtx->last_scan_reject_timestamp = 0;
pHddCtx->scan_reject_cnt = 0;
hdd_set_roaming_in_progress(false); hdd_set_roaming_in_progress(false);
complete(&pAdapter->roaming_comp_var); complete(&pAdapter->roaming_comp_var);

查看文件

@@ -925,14 +925,19 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
pHddCtx->last_scan_reject_timestamp = pHddCtx->last_scan_reject_timestamp =
jiffies_to_msecs(jiffies) + jiffies_to_msecs(jiffies) +
SCAN_REJECT_THRESHOLD_TIME; SCAN_REJECT_THRESHOLD_TIME;
pHddCtx->scan_reject_cnt = 0;
} else { } else {
hdd_debug("curr_session id %d curr_reason %d threshold time has elapsed? %d", pHddCtx->scan_reject_cnt++;
curr_session_id, curr_reason, 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), qdf_system_time_after(jiffies_to_msecs(jiffies),
pHddCtx->last_scan_reject_timestamp)); pHddCtx->last_scan_reject_timestamp));
if (qdf_system_time_after(jiffies_to_msecs(jiffies), if ((pHddCtx->scan_reject_cnt >=
SCAN_REJECT_THRESHOLD) &&
qdf_system_time_after(jiffies_to_msecs(jiffies),
pHddCtx->last_scan_reject_timestamp)) { pHddCtx->last_scan_reject_timestamp)) {
pHddCtx->last_scan_reject_timestamp = 0; pHddCtx->last_scan_reject_timestamp = 0;
pHddCtx->scan_reject_cnt = 0;
if (pHddCtx->config->enable_fatal_event) { if (pHddCtx->config->enable_fatal_event) {
cds_flush_logs(WLAN_LOG_TYPE_FATAL, cds_flush_logs(WLAN_LOG_TYPE_FATAL,
WLAN_LOG_INDICATOR_HOST_DRIVER, WLAN_LOG_INDICATOR_HOST_DRIVER,
@@ -954,6 +959,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
pHddCtx->last_scan_reject_timestamp = 0; pHddCtx->last_scan_reject_timestamp = 0;
pHddCtx->last_scan_reject_session_id = 0xFF; pHddCtx->last_scan_reject_session_id = 0xFF;
pHddCtx->last_scan_reject_reason = 0; pHddCtx->last_scan_reject_reason = 0;
pHddCtx->scan_reject_cnt = 0;
/* Check whether SAP scan can be skipped or not */ /* Check whether SAP scan can be skipped or not */
if (pAdapter->device_mode == QDF_SAP_MODE && if (pAdapter->device_mode == QDF_SAP_MODE &&