qcacmn: Fix the dfs apply rule logic to filter acs channel list

Currently the driver uses i both in outer and inner loop
which would corrupt the value of i and the loop would
never end.

Fix is to use another varibale j for the loop.

Change-Id: I6f64fb45d1007621b03fe93cd29da7d4c827a23f
CRs-Fixed: 2476402
这个提交包含在:
gaurank kathpalia
2019-06-21 14:05:15 +05:30
提交者 nshrivas
父节点 5255c99b43
当前提交 5121951db6

查看文件

@@ -1262,6 +1262,7 @@ static void dfs_apply_rules(struct wlan_dfs *dfs,
bool flag_no_japan_w53 = 0;
int i;
bool found = false;
uint16_t j;
dfs_debug(dfs, WLAN_DEBUG_DFS_RANDOM_CHAN, "flags %d", flags);
flag_no_weather = (dfs_region == DFS_ETSI_REGION_VAL) ?
@@ -1299,8 +1300,8 @@ static void dfs_apply_rules(struct wlan_dfs *dfs,
}
if (acs_info && acs_info->acs_mode) {
for (i = 0; i < acs_info->num_of_channel; i++) {
if (acs_info->channel_list[i] ==
for (j = 0; j < acs_info->num_of_channel; j++) {
if (acs_info->channel_list[j] ==
chan->dfs_ch_ieee) {
found = true;
break;