summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhinav Kumar <abhikuma@codeaurora.org>2018-08-02 15:49:39 +0530
committernshrivas <nshrivas@codeaurora.org>2018-08-03 23:01:46 -0700
commit80872c23a0f9cbe6fd0d8145cf5590bebc1282c7 (patch)
treed8cac260e92627826bafdc8af93f7c2cc32a05a4
parent268dbde23669cfb501611d1b0f0f6d5359f8647c (diff)
qcacld-3.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: 2289992
-rw-r--r--core/hdd/src/wlan_hdd_scan.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index 98d7ac6451d4..bca41d89111b 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -2173,19 +2173,20 @@ static 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) &&
- qdf_system_time_after(jiffies_to_msecs(jiffies),
+ qdf_system_time_after(jiffies,
pHddCtx->last_scan_reject_timestamp)) {
- hdd_err("scan reject threshold reached Session %d Reason %d count %d",
+ hdd_err("scan reject threshold reached Session %d Reason %d count %d reject timestamp %lu jiffies %lu",
curr_session_id, curr_reason,
- pHddCtx->scan_reject_cnt);
+ pHddCtx->scan_reject_cnt,
+ pHddCtx->last_scan_reject_timestamp,
+ jiffies);
pHddCtx->last_scan_reject_timestamp = 0;
pHddCtx->scan_reject_cnt = 0;
if (pHddCtx->config->enable_fatal_event) {