Explorar o código

qca-wifi: Modify API to check precac on 160MHz channel

The API dfs_is_pcac_on_weather_channel_for_freq() which checks
whether PreCAC is being done on a weather radar  channel or not does not
consider the case of an input 160MHz channel.

Add a case to check if the 160MHz channel includes weather radar channels
or not.

Also take care of the 165MHz channel which will be treated as 80P80MHz
channel.

CRs-Fixed: 2651161
Change-Id: I7285c9095a184947b1c33c11d6bb3b2370b31401
Vignesh U %!s(int64=5) %!d(string=hai) anos
pai
achega
d755d585bb
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      umac/dfs/core/src/misc/dfs_zero_cac.c

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

@@ -3705,6 +3705,19 @@ static bool dfs_is_pcac_on_weather_channel_for_freq(struct wlan_dfs *dfs,
 		first_subch = precac_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
 		last_subch = precac_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
 		break;
+	case CH_WIDTH_160MHZ:
+		first_subch = precac_freq - DFS_5GHZ_4TH_CHAN_FREQ_OFFSET;
+		last_subch = precac_freq + DFS_5GHZ_4TH_CHAN_FREQ_OFFSET;
+		break;
+	case CH_WIDTH_80P80MHZ:
+		/* The restricted 80P80MHz channel or the 165MHz channel
+		 * does not include any of the weather radar channels.
+		 * Even though other 80P80 channels might include the weather
+		 * radar channels, it is not currently possible for Agile
+		 * detector to operate in a 80P80MHz channel except in the
+		 * restricted 80P80MHz channel.
+		 */
+		return false;
 	default:
 		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
 			"Precac channel width invalid!");