Jelajahi Sumber

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
gaurank kathpalia 5 tahun lalu
induk
melakukan
d68b2f4f19

+ 6 - 6
umac/dfs/core/src/misc/dfs_random_chan_sel.c

@@ -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;

+ 2 - 2
umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h

@@ -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;
 };