From 42e7bb35d48ff2921746945d72a2185cca9e9b33 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Thu, 26 Mar 2020 17:31:12 +0530 Subject: [PATCH] qcacmn: Introduce scan api to get scan entry ageout time The driver doesn't ageout connected BSS from rrm scan result after the scan default ageout time. This results in connected AP information sent in beacon report request in table mode always. Introduce scan api to get the scan age out time configured from scan module. This value will be used as the threshold in rrm scan filter. Change-Id: Ib3981538faf179cff53936770f705d41922dca66 CRs-Fixed: 2650914 --- umac/scan/dispatcher/inc/wlan_scan_api.h | 8 ++++++++ umac/scan/dispatcher/src/wlan_scan_api.c | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/umac/scan/dispatcher/inc/wlan_scan_api.h b/umac/scan/dispatcher/inc/wlan_scan_api.h index cda9789af20e..2f364debe680 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_api.h +++ b/umac/scan/dispatcher/inc/wlan_scan_api.h @@ -202,4 +202,12 @@ wlan_scan_process_bcn_probe_rx_sync(struct wlan_objmgr_psoc *psoc, struct mgmt_rx_event_params *rx_param, enum mgmt_frame_type frm_type); +/** + * wlan_scan_get_aging_time - Get the scan aging time config + * @psoc: psoc context + * + * Return: Scan aging time config + */ +qdf_time_t wlan_scan_get_aging_time(struct wlan_objmgr_psoc *psoc); + #endif diff --git a/umac/scan/dispatcher/src/wlan_scan_api.c b/umac/scan/dispatcher/src/wlan_scan_api.c index 648f5fba130e..01ddfaa3f970 100644 --- a/umac/scan/dispatcher/src/wlan_scan_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_api.c @@ -264,3 +264,14 @@ free: return status; } + +qdf_time_t wlan_scan_get_aging_time(struct wlan_objmgr_psoc *psoc) +{ + struct wlan_scan_obj *scan_obj; + + scan_obj = wlan_psoc_get_scan_obj(psoc); + if (!scan_obj) + return cfg_default(CFG_SCAN_AGING_TIME) * 1000; + + return scan_obj->scan_def.scan_cache_aging_time; +}