Browse Source

qca-wifi-oss: Adapt Agile DFS for Wideband (5G-6G)

In case of a current channel being a 5GHz DFS channel, a channel change
may be triggered by a radar detection. The next channel is automatically
selected by a random channel selection algorithm in this case. However,
if the current channel is a 6GHz channel and we need to switch to a 5GHz
channel then 5GHz channel should be provided a user or another channel
selection algorithm. At the time, when the device is starting its
operation on a 6GHz channel , the next 5GHz channel that a user
(or another another channel selection algorithm) is going to select
is unknown. Therefore, the probability that the next channel selected
by a user (or another channel selection algorithm) will match the RCAC
channel returned by random channel selection, is very low. Therefore,
do not select a random channel for RCAC if the current operating channel
is a 6G channel for now.

Change-Id: I9aef64cea1d442fc31b2314da08baba7769650f2 has the following
change :
The macro WLAN_IS_CHAN_MODE_x(_c) checked if mode is 'x' as well as if
the channel was a 5G channel. However with wideband changes this macro
will return true if mode is 'x' for both 5G and 6G channels. Hence adding
a separate 5G check for functions where the channel must be a 5G channel.

With WLAN_IS_CHAN_MODE_x(_c) now a 6G channel will pass
the checks in dfs_is_precac_done which would cause regression. Hence a
5G check has been added to prevent this.

Change-Id: Iee5e965f0bc99565cb5ea77d88998d5530f24153
Ananya Barat 5 years ago
parent
commit
20960a62c4
1 changed files with 13 additions and 0 deletions
  1. 13 0
      umac/dfs/core/src/misc/dfs_zero_cac.c

+ 13 - 0
umac/dfs/core/src/misc/dfs_zero_cac.c

@@ -514,6 +514,13 @@ bool dfs_is_precac_done(struct wlan_dfs *dfs, struct dfs_channel *chan)
 	bool ret_val = 0;
 	uint16_t cfreq;
 
+	if (!WLAN_IS_CHAN_5GHZ(chan)) {
+		dfs_debug(dfs, WLAN_DEBUG_DFS,
+			  "Channel %d not a 5GHz channel",
+			  chan->dfs_ch_ieee);
+		return 0;
+	}
+
 	if (WLAN_IS_CHAN_MODE_160(chan))
 		cfreq = chan->dfs_ch_mhz_freq_seg2;
 	else if (WLAN_IS_CHAN_MODE_165(dfs, chan))
@@ -3542,6 +3549,12 @@ static qdf_freq_t dfs_find_rcac_chan(struct wlan_dfs *dfs,
 		if (WLAN_IS_CHAN_MODE_165(dfs, dfs->dfs_curchan))
 			flags |= DFS_RANDOM_CH_FLAG_RESTRICTED_80P80_ENABLED;
 
+		if (!WLAN_IS_CHAN_5GHZ(dfs->dfs_curchan)) {
+			dfs_debug(dfs, WLAN_DEBUG_DFS_AGILE,
+				  "Current operating channel not a 5G channel");
+			goto exit;
+		}
+
 		dfs_fill_des_rcac_chan_params(dfs,
 					      &nxt_chan_params,
 					      curchan_chwidth);