Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6d391eb authored by gaurank kathpalia's avatar gaurank kathpalia Committed by Gerrit - the friendly Code Review server
Browse files

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 variable j for the loop.

Change-Id: I6f64fb45d1007621b03fe93cd29da7d4c827a23f
CRs-Fixed: 2476402
parent 46605a09
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1270,6 +1270,7 @@ static void dfs_apply_rules(struct wlan_dfs *dfs,
	uint16_t flag_no_5g_chan  = 0;
	int i;
	bool found = false;
	uint8_t j;

	dfs_debug(dfs, WLAN_DEBUG_DFS_RANDOM_CHAN, "flags %d", flags);
	flag_no_weather = (dfs_region == DFS_ETSI_REGION_VAL) ?
@@ -1308,8 +1309,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;