mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacmn: Add filter logic according to timestamp in scan
Currently the driver does not have any mechanism to filter out the scan results according to the age. Add a logic in the scan filter API, to filter out the scan result according to the age threshold, so that APs which are older than a particular value are filtered out. Change-Id: If3f4b372b28a0f75b1d70915df4e3e1a7e518931 CRs-Fixed: 2447988
This commit is contained in:
parent
16ad475315
commit
c2dac1c92b
5 changed files with 11 additions and 7 deletions
|
|
@ -312,11 +312,11 @@ scm_get_next_node(struct scan_dbs *scan_db,
|
|||
*/
|
||||
static void scm_check_and_age_out(struct scan_dbs *scan_db,
|
||||
struct scan_cache_node *node,
|
||||
uint32_t scan_aging_time)
|
||||
qdf_time_t scan_aging_time)
|
||||
{
|
||||
if (util_scan_entry_age(node->entry) >=
|
||||
scan_aging_time) {
|
||||
scm_debug("Aging out BSSID: %pM with age %d ms",
|
||||
scm_debug("Aging out BSSID: %pM with age %lu ms",
|
||||
node->entry->bssid.bytes,
|
||||
util_scan_entry_age(node->entry));
|
||||
qdf_spin_lock_bh(&scan_db->scan_db_lock);
|
||||
|
|
@ -401,7 +401,7 @@ static QDF_STATUS scm_flush_oldest_entry(struct scan_dbs *scan_db)
|
|||
}
|
||||
|
||||
if (oldest_node) {
|
||||
scm_debug("Flush oldest BSSID: %pM with age %d ms",
|
||||
scm_debug("Flush oldest BSSID: %pM with age %lu ms",
|
||||
oldest_node->entry->bssid.bytes,
|
||||
util_scan_entry_age(oldest_node->entry));
|
||||
/* Release ref_cnt taken for oldest_node and delete it */
|
||||
|
|
|
|||
|
|
@ -1150,6 +1150,10 @@ bool scm_filter_match(struct wlan_objmgr_psoc *psoc,
|
|||
|
||||
roam_params = &def_param->roam_params;
|
||||
|
||||
if (filter->age_threshold && filter->age_threshold <
|
||||
util_scan_entry_age(db_entry))
|
||||
return false;
|
||||
|
||||
if (filter->p2p_results && !db_entry->is_p2p)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ struct scan_default_params {
|
|||
uint32_t burst_duration;
|
||||
uint32_t max_scan_time;
|
||||
uint32_t num_probes;
|
||||
uint32_t scan_cache_aging_time;
|
||||
qdf_time_t scan_cache_aging_time;
|
||||
uint32_t select_5ghz_margin;
|
||||
bool enable_mac_spoofing;
|
||||
bool is_bssid_hint_priority;
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ struct fils_filter_info {
|
|||
struct scan_filter {
|
||||
bool bss_scoring_required;
|
||||
bool enable_adaptive_11r;
|
||||
uint32_t age_threshold;
|
||||
qdf_time_t age_threshold;
|
||||
uint32_t p2p_results;
|
||||
uint32_t rrm_measurement_filter;
|
||||
uint32_t num_of_bssid;
|
||||
|
|
|
|||
|
|
@ -1140,10 +1140,10 @@ util_scan_entry_wmeparam(struct scan_cache_entry *scan_entry)
|
|||
*
|
||||
* Return: age in ms
|
||||
*/
|
||||
static inline uint32_t
|
||||
static inline qdf_time_t
|
||||
util_scan_entry_age(struct scan_cache_entry *scan_entry)
|
||||
{
|
||||
unsigned long ts = scan_entry->scan_entry_time;
|
||||
qdf_time_t ts = scan_entry->scan_entry_time;
|
||||
|
||||
return qdf_mc_timer_get_system_time() - ts;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue