qcacmn: Use freq instead of channel number to avoid collision

To avoid IEEE channel number space collision,
use freq in structure dfs_acs_info.

Change-Id: I48813d12819f03495f196e634e9fcb422105f304
CRs-Fixed: 2555897
This commit is contained in:
gaurank kathpalia
2019-10-30 15:19:47 +05:30
committed by nshrivas
parent 367c36003b
commit d68b2f4f19
2 changed files with 8 additions and 8 deletions

View File

@@ -1804,8 +1804,8 @@ static void dfs_apply_rules(struct wlan_dfs *dfs,
if (acs_info && acs_info->acs_mode) {
for (j = 0; j < acs_info->num_of_channel; j++) {
if (acs_info->channel_list[j] ==
chan->dfs_ch_ieee) {
if (acs_info->chan_freq_list[j] ==
wlan_chan_to_freq(chan->dfs_ch_ieee)) {
found = true;
break;
}
@@ -1957,8 +1957,8 @@ static void dfs_apply_rules_for_freq(struct wlan_dfs *dfs,
}
if (acs_info && acs_info->acs_mode) {
for (j = 0; j < acs_info->num_of_channel; j++) {
if (acs_info->channel_list[j] ==
chan->dfs_ch_ieee) {
if (acs_info->chan_freq_list[j] ==
chan->dfs_ch_freq) {
found = true;
break;
}
@@ -1966,8 +1966,8 @@ static void dfs_apply_rules_for_freq(struct wlan_dfs *dfs,
if (!found) {
dfs_debug(dfs, WLAN_DEBUG_DFS_RANDOM_CHAN,
"skip ch %d not in acs range",
chan->dfs_ch_ieee);
"skip ch freq %d not in acs range",
chan->dfs_ch_freq);
continue;
}
found = false;

View File

@@ -56,12 +56,12 @@ struct radar_found_info {
/**
* struct dfs_acs_info - acs info, ch range
* @acs_mode: to enable/disable acs 1/0.
* @channel_list: channel list in acs config
* @chan_freq_list: channel frequency list
* @num_of_channel: number of channel in ACS channel list
*/
struct dfs_acs_info {
uint8_t acs_mode;
uint8_t *channel_list;
uint32_t *chan_freq_list;
uint8_t num_of_channel;
};