wlan: Use time_after api to take care of jiffies wrap around

qcacld-2.0 to prima propagation

jiffies wrap around can cause the confusion that the threshold
time has has elapsed and thus raise false alarm for scan reject.

To fix this use time_after api to take care of jiffies wrap around.

Change-Id: I20c0abbcaab0bea8054c2f497f41e50572008a8c
CRs-Fixed: 2075451
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 5d505ab..2c94045 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -13430,22 +13430,23 @@
         {
             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->last_scan_reject_timestamp =
+              jiffies_to_msecs(jiffies) + SCAN_REJECT_THRESHOLD_TIME;
             pHddCtx->scan_reject_cnt = 0;
         }
         else
         {
             pHddCtx->scan_reject_cnt++;
 
-            hddLog(LOGE, FL("Reject cnt %d time delta %lu ms"), pHddCtx->scan_reject_cnt,
-               (jiffies_to_msecs(jiffies) -
+            hddLog(LOGE, FL("Session %d reason %d reject cnt %d threshold time has elapsed? %d"),
+               curr_session_id, curr_reason,  pHddCtx->scan_reject_cnt,
+               vos_system_time_after(jiffies_to_msecs(jiffies),
                pHddCtx->last_scan_reject_timestamp));
 
             if ((pHddCtx->scan_reject_cnt >=
                SCAN_REJECT_THRESHOLD) &&
-               (jiffies_to_msecs(jiffies) -
-               pHddCtx->last_scan_reject_timestamp) >=
-               SCAN_REJECT_THRESHOLD_TIME)
+               vos_system_time_after(jiffies_to_msecs(jiffies),
+               pHddCtx->last_scan_reject_timestamp))
             {
                 pHddCtx->last_scan_reject_timestamp = 0;
                 pHddCtx->scan_reject_cnt = 0;