summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhinav Kumar <abhikuma@codeaurora.org>2018-08-08 16:48:39 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-26 22:41:05 -0700
commit2ce6570b2899ce2629b10ae17da531332b5943f7 (patch)
tree4f57b6be6094f01bbcf19e090ea1715ffb3a0c50
parent1c1c5eca548b2d17848f610b5685a50441901925 (diff)
qcacld-2.0: Update last_scan_reject_timestamp with proper value
When the scan is rejected, driver saves the scan reject reason and the rejected time by converting the jiffies to msec. In case when HZ is 100 while converting jiffies to msec, jiffies_to_msecs() return wrapped value of jiffies(in msec). This result value of the current jiffies (return value of jiffies_to_msecs API) becomes greater than scan reject time (pHddCtx->last_scan_reject_timestamp) and __wlan_hdd_cfg80211_scan trigger SSR in case of scan rejection. Fix is to Use jiffiy directly instead of using jiffies_to_msecs() while updating scan reject time(pHddCtx->last_scan_reject_timestamp). Change-Id: Ib86830456fdc48143bf282779216ab94aed11923 CRs-Fixed: 2293268
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 73b984cc678d..eeb54d26db3f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -22554,17 +22554,20 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
!pHddCtx->last_scan_reject_timestamp) {
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) + SCAN_REJECT_THRESHOLD_TIME;
+ pHddCtx->last_scan_reject_timestamp = jiffies +
+ msecs_to_jiffies(SCAN_REJECT_THRESHOLD_TIME);
pHddCtx->scan_reject_cnt = 0;
} else {
pHddCtx->scan_reject_cnt++;
if ((pHddCtx->scan_reject_cnt >=
SCAN_REJECT_THRESHOLD) &&
- vos_system_time_after(jiffies_to_msecs(jiffies),
+ vos_system_time_after(jiffies,
pHddCtx->last_scan_reject_timestamp)) {
- hddLog(LOGE, FL("scan reject threshold reached Session %d reason %d reject cnt %d"),
- curr_session_id, curr_reason, pHddCtx->scan_reject_cnt);
+ hddLog(LOGE, FL("scan reject threshold reached Session %d reason %d reject cnt %d reject times tamp %lu jiffies %lu"),
+ curr_session_id, curr_reason,
+ pHddCtx->scan_reject_cnt,
+ pHddCtx->last_scan_reject_timestamp,
+ jiffies);
pHddCtx->last_scan_reject_timestamp = 0;
pHddCtx->scan_reject_cnt = 0;
if (pHddCtx->cfg_ini->enable_fatal_event) {