Explorar o código

qca-wifi: Change the current-channel-width to agile-channel-width mapping

For Pine, the agile channel width needs to be 160MHz when the current
channel width is 160MHz or restricted 80+80MHz.

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

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

@@ -4243,8 +4243,12 @@ dfs_find_agile_width(struct wlan_dfs *dfs, enum phy_ch_width chwidth)
 	case CH_WIDTH_40MHZ:
 		return CH_WIDTH_40MHZ;
 	case CH_WIDTH_80MHZ:
+		return CH_WIDTH_80MHZ;
 	case CH_WIDTH_80P80MHZ:
 	case CH_WIDTH_160MHZ:
+		if (dfs_is_true_160mhz_supported(dfs) ||
+		    dfs_is_restricted_80p80mhz_supported(dfs))
+			return CH_WIDTH_160MHZ;
 		return CH_WIDTH_80MHZ;
 	default:
 		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "Invalid chwidth enum!");
@@ -4360,6 +4364,13 @@ void dfs_get_ieeechan_for_agilecac_for_freq(struct wlan_dfs *dfs,
 	else
 		dfs->dfs_agile_precac_freq_mhz = 0;
 
+	/* It was assumed that the bandwidth of the restricted 80p80 channel is
+	 * 160MHz to build the precac tree. But when configuring Agile the
+	 * channel width should be given as 80p80.
+	 */
+	if (ieee_chan_freq == RESTRICTED_80P80_CHAN_CENTER_FREQ)
+		dfs->dfs_precac_chwidth = CH_WIDTH_80P80MHZ;
+
 	*ch_freq = dfs->dfs_agile_precac_freq_mhz;
 }
 #endif