Browse Source

qcacmn: Enable 149 to 177 HT160 channels in random channel selection

During random channel selection after radar, channels 149 to 177 are
not considered as a potential random HT160 channel after the
introduction of the 5.9G channels. This is because, the last 80MHz
band (165, 169, 173, 177) are not added to the list of 80MHz band
list that is used to find the next random channel.

Update the 80MHz band list with 165-177 and update the band count.

Change-Id: Id881adaa07dab07400435d559940f4bdf837eb75
Vignesh Mohan 3 years ago
parent
commit
6d3d7d5f11
2 changed files with 17 additions and 16 deletions
  1. 2 2
      umac/dfs/core/src/dfs_random_chan_sel.h
  2. 15 14
      umac/dfs/core/src/misc/dfs_random_chan_sel.c

+ 2 - 2
umac/dfs/core/src/dfs_random_chan_sel.h

@@ -67,10 +67,10 @@
 
 #ifdef CONFIG_BAND_6GHZ
 /* Number of 80MHz channels in 5GHz and 6GHz band */
-#define DFS_MAX_80MHZ_BANDS                     (6 + 14)
+#define DFS_MAX_80MHZ_BANDS                     (7 + 14)
 #else
 /* Number of 80MHz channels in 5GHz band */
-#define DFS_MAX_80MHZ_BANDS                     6
+#define DFS_MAX_80MHZ_BANDS                     7
 #endif
 
 /* Start channel and center channel diff in 80Mhz */

+ 15 - 14
umac/dfs/core/src/misc/dfs_random_chan_sel.c

@@ -1065,20 +1065,20 @@ dfs_random_channel_sel_set_bitmap_for_freq(struct wlan_dfs *dfs,
  */
 static void dfs_assign_6g_channels(struct  chan_bonding_bitmap *ch_map)
 {
-	ch_map->chan_bonding_set[6].start_chan_freq = 5955;
-	ch_map->chan_bonding_set[7].start_chan_freq = 6035;
-	ch_map->chan_bonding_set[8].start_chan_freq = 6115;
-	ch_map->chan_bonding_set[9].start_chan_freq = 6195;
-	ch_map->chan_bonding_set[10].start_chan_freq = 6275;
-	ch_map->chan_bonding_set[11].start_chan_freq = 6355;
-	ch_map->chan_bonding_set[12].start_chan_freq = 6435;
-	ch_map->chan_bonding_set[13].start_chan_freq = 6515;
-	ch_map->chan_bonding_set[14].start_chan_freq = 6595;
-	ch_map->chan_bonding_set[15].start_chan_freq = 6675;
-	ch_map->chan_bonding_set[16].start_chan_freq = 6755;
-	ch_map->chan_bonding_set[17].start_chan_freq = 6835;
-	ch_map->chan_bonding_set[18].start_chan_freq = 6915;
-	ch_map->chan_bonding_set[19].start_chan_freq = 6995;
+	ch_map->chan_bonding_set[7].start_chan_freq = 5955;
+	ch_map->chan_bonding_set[8].start_chan_freq = 6035;
+	ch_map->chan_bonding_set[9].start_chan_freq = 6115;
+	ch_map->chan_bonding_set[10].start_chan_freq = 6195;
+	ch_map->chan_bonding_set[11].start_chan_freq = 6275;
+	ch_map->chan_bonding_set[12].start_chan_freq = 6355;
+	ch_map->chan_bonding_set[13].start_chan_freq = 6435;
+	ch_map->chan_bonding_set[14].start_chan_freq = 6515;
+	ch_map->chan_bonding_set[15].start_chan_freq = 6595;
+	ch_map->chan_bonding_set[16].start_chan_freq = 6675;
+	ch_map->chan_bonding_set[17].start_chan_freq = 6755;
+	ch_map->chan_bonding_set[18].start_chan_freq = 6835;
+	ch_map->chan_bonding_set[19].start_chan_freq = 6915;
+	ch_map->chan_bonding_set[20].start_chan_freq = 6995;
 }
 #else
 static inline void dfs_assign_6g_channels(struct  chan_bonding_bitmap *ch_map)
@@ -1121,6 +1121,7 @@ static uint16_t dfs_find_ch_with_fallback_for_freq(struct wlan_dfs *dfs,
 	ch_map.chan_bonding_set[3].start_chan_freq = 5580;
 	ch_map.chan_bonding_set[4].start_chan_freq = 5660;
 	ch_map.chan_bonding_set[5].start_chan_freq = 5745;
+	ch_map.chan_bonding_set[6].start_chan_freq = 5825;
 
 	dfs_assign_6g_channels(&ch_map);
 	for (i = 0; i < num_chan; i++) {