qcacmn: Replace chan list with freq list in struct scan_filter

To support 6G, replace chan id with frequency.
Replace channel_list and pcl_channel_list with
chan_freq_list and pcl_freq_list in struct scan_filter.
Change API scm_get_pcl_weight_of_channel to use freq.

Change-Id: I6e880986fb2dcb1fa7aa4f40d2e3f849e7e3af64
CRs-Fixed: 2561234
Este commit está contenido en:
Jianmin Zhu
2019-11-07 19:48:16 +08:00
cometido por nshrivas
padre 9c0ec6c2d8
commit 69560e37c6
Se han modificado 5 ficheros con 19 adiciones y 42 borrados

Ver fichero

@@ -851,10 +851,10 @@ int scm_calculate_bss_score(struct wlan_objmgr_psoc *psoc,
return score;
}
bool scm_get_pcl_weight_of_channel(int channel_id,
struct scan_filter *filter,
int *pcl_chan_weight,
uint8_t *weight_list)
bool scm_get_pcl_weight_of_channel(uint32_t chan_freq,
struct scan_filter *filter,
int *pcl_chan_weight,
uint8_t *weight_list)
{
int i;
bool found = false;
@@ -863,7 +863,7 @@ bool scm_get_pcl_weight_of_channel(int channel_id,
return found;
for (i = 0; i < filter->num_of_pcl_channels; i++) {
if (filter->pcl_channel_list[i] == channel_id) {
if (filter->pcl_freq_list[i] == chan_freq) {
*pcl_chan_weight = filter->pcl_weight_list[i];
found = true;
break;

Ver fichero

@@ -910,27 +910,16 @@ static void scm_list_insert_sorted(struct wlan_objmgr_psoc *psoc,
qdf_list_node_t *cur_lst = NULL, *next_lst = NULL;
struct scan_default_params *params;
int pcl_chan_weight = 0;
struct wlan_objmgr_pdev *pdev = NULL;
params = wlan_scan_psoc_get_def_params(psoc);
if (!params) {
scm_err("wlan_scan_psoc_get_def_params failed");
return;
}
pdev = wlan_objmgr_get_pdev_by_id(psoc, scan_node->entry->pdev_id,
WLAN_SCAN_ID);
if (!pdev) {
scm_err("pdev is NULL");
return;
}
if (filter->num_of_pcl_channels > 0 &&
(scan_node->entry->rssi_raw > SCM_PCL_RSSI_THRESHOLD)) {
if (scm_get_pcl_weight_of_channel(
wlan_reg_freq_to_chan(
pdev,
scan_node->entry->channel.chan_freq),
scan_node->entry->channel.chan_freq,
filter, &pcl_chan_weight,
filter->pcl_weight_list)) {
scm_debug("pcl freq %d pcl_chan_weight %d",
@@ -938,8 +927,6 @@ static void scm_list_insert_sorted(struct wlan_objmgr_psoc *psoc,
pcl_chan_weight);
}
}
wlan_objmgr_pdev_release_ref(pdev, WLAN_SCAN_ID);
if (params->is_bssid_hint_priority &&
!qdf_mem_cmp(filter->bssid_hint.bytes,
scan_node->entry->bssid.bytes,

Ver fichero

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2017, 2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -117,7 +117,7 @@ wlan_pdev_get_scan_db(struct wlan_objmgr_psoc *psoc,
/**
* scm_get_pcl_weight_of_channel() - Get PCL weight if channel is present in pcl
* @channel_id: channel of bss
* @chan_freq: channel frequency of bss, unit: MHz
* @filter: filter
* @pcl_chan_weight: Get PCL weight for corresponding channel
* @weight_list: Weight list for all the pcl channels.
@@ -126,8 +126,8 @@ wlan_pdev_get_scan_db(struct wlan_objmgr_psoc *psoc,
*
* Return: true or false
*/
bool scm_get_pcl_weight_of_channel(int channel_id,
struct scan_filter *filter,
int *pcl_chan_weight,
uint8_t *weight_list);
bool scm_get_pcl_weight_of_channel(uint32_t chan_freq,
struct scan_filter *filter,
int *pcl_chan_weight,
uint8_t *weight_list);
#endif

Ver fichero

@@ -1142,7 +1142,6 @@ bool scm_filter_match(struct wlan_objmgr_psoc *psoc,
bool match = false;
struct scan_default_params *def_param;
struct wlan_country_ie *cc_ie;
struct wlan_objmgr_pdev *pdev = NULL;
def_param = wlan_scan_psoc_get_def_params(psoc);
if (!def_param)
@@ -1193,24 +1192,15 @@ bool scm_filter_match(struct wlan_objmgr_psoc *psoc,
if (!match && filter->num_of_bssid)
return false;
pdev = wlan_objmgr_get_pdev_by_id(psoc, db_entry->pdev_id,
WLAN_SCAN_ID);
if (!pdev) {
scm_err("pdev is NULL");
return false;
}
match = false;
for (i = 0; i < filter->num_of_channels; i++) {
if (!filter->channel_list[i] || (
(filter->channel_list[i] ==
wlan_reg_freq_to_chan(pdev,
db_entry->channel.chan_freq)))) {
if (!filter->chan_freq_list[i] ||
filter->chan_freq_list[i] ==
db_entry->channel.chan_freq) {
match = true;
break;
}
}
wlan_objmgr_pdev_release_ref(pdev, WLAN_SCAN_ID);
if (!match && filter->num_of_channels)
return false;

Ver fichero

@@ -627,11 +627,11 @@ struct fils_filter_info {
* @country[3]: Ap with specific country code
* @bssid_list: bssid list
* @ssid_list: ssid list
* @channel_list: channel list
* @chan_freq_list: channel frequency list, frequency unit: MHz
* @auth_type: auth type list
* @enc_type: unicast enc type list
* @mc_enc_type: multicast cast enc type list
* @pcl_channel_list: PCL channel list
* @pcl_freq_list: PCL channel frequency list, frequency unit: MHz
* @fils_scan_filter: FILS info
* @pcl_weight_list: PCL Weight list
* @bssid_hint: Mac address of bssid_hint
@@ -662,11 +662,11 @@ struct scan_filter {
uint8_t country[3];
struct qdf_mac_addr bssid_list[WLAN_SCAN_FILTER_NUM_BSSID];
struct wlan_ssid ssid_list[WLAN_SCAN_FILTER_NUM_SSID];
uint8_t channel_list[QDF_MAX_NUM_CHAN];
uint32_t chan_freq_list[QDF_MAX_NUM_CHAN];
enum wlan_auth_type auth_type[WLAN_NUM_OF_SUPPORT_AUTH_TYPE];
enum wlan_enc_type enc_type[WLAN_NUM_OF_ENCRYPT_TYPE];
enum wlan_enc_type mc_enc_type[WLAN_NUM_OF_ENCRYPT_TYPE];
uint8_t pcl_channel_list[QDF_MAX_NUM_CHAN];
uint32_t pcl_freq_list[QDF_MAX_NUM_CHAN];
struct fils_filter_info fils_scan_filter;
uint8_t pcl_weight_list[QDF_MAX_NUM_CHAN];
struct qdf_mac_addr bssid_hint;