mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacmn: Add custom filter function to scan filter
Add change to support custom filter function to the scan filter. Change-Id: If312d7627d11e8938a4f8444e1f930a8fcc25aa8 CRs-Fixed: 2746158
This commit is contained in:
parent
857c046886
commit
a729bdd857
2 changed files with 31 additions and 1 deletions
|
|
@ -665,13 +665,29 @@ bool scm_filter_match(struct wlan_objmgr_psoc *psoc,
|
|||
if (filter->rrm_measurement_filter)
|
||||
return true;
|
||||
|
||||
if (!filter->ignore_auth_enc_type &&
|
||||
if (!filter->ignore_auth_enc_type && !filter->match_security_func &&
|
||||
!scm_is_security_match(filter, db_entry, security)) {
|
||||
scm_debug("%pM : Ignore as security profile didn't match",
|
||||
db_entry->bssid.bytes);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (filter->match_security_func &&
|
||||
!filter->match_security_func(filter->match_security_func_arg,
|
||||
db_entry)) {
|
||||
scm_debug("%pM : Ignore as custom security match failed",
|
||||
db_entry->bssid.bytes);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (filter->ccx_validate_bss &&
|
||||
!filter->ccx_validate_bss(filter->ccx_validate_bss_arg,
|
||||
db_entry, 0)) {
|
||||
scm_debug("%pM : Ignore as CCX validateion failed",
|
||||
db_entry->bssid.bytes);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Match realm */
|
||||
if (!scm_is_fils_config_match(filter, db_entry)) {
|
||||
scm_debug("%pM :Ignore as fils config didn't match",
|
||||
|
|
|
|||
|
|
@ -467,6 +467,12 @@ struct fils_filter_info {
|
|||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* struct filter_arg: Opaque pointer for the filter arguments
|
||||
*/
|
||||
struct filter_arg;
|
||||
typedef struct filter_arg *bss_filter_arg_t;
|
||||
|
||||
/**
|
||||
* struct scan_filter: scan filter
|
||||
* @enable_adaptive_11r: flag to check if adaptive 11r ini is enabled
|
||||
|
|
@ -497,6 +503,10 @@ struct fils_filter_info {
|
|||
* @bssid_list: bssid list
|
||||
* @ssid_list: ssid list
|
||||
* @chan_freq_list: channel frequency list, frequency unit: MHz
|
||||
* @match_security_func: Function pointer to custom security filter
|
||||
* @match_security_func_arg: Function argument to custom security filter
|
||||
* @ccx_validate_bss: Function pointer to custom bssid filter
|
||||
* @ccx_validate_bss_arg: Function argument to custom bssid filter
|
||||
*/
|
||||
struct scan_filter {
|
||||
uint8_t enable_adaptive_11r:1,
|
||||
|
|
@ -526,6 +536,10 @@ struct scan_filter {
|
|||
struct qdf_mac_addr bssid_list[WLAN_SCAN_FILTER_NUM_BSSID];
|
||||
struct wlan_ssid ssid_list[WLAN_SCAN_FILTER_NUM_SSID];
|
||||
qdf_freq_t chan_freq_list[NUM_CHANNELS];
|
||||
bool (*match_security_func)(void *, struct scan_cache_entry *);
|
||||
bss_filter_arg_t match_security_func_arg;
|
||||
bool (*ccx_validate_bss)(void *, struct scan_cache_entry *, int);
|
||||
bss_filter_arg_t ccx_validate_bss_arg;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue