瀏覽代碼

qca-wifi: Check for proper channel width during Agile CAC

While picking a channel to start Agile CAC on, the current channel
width enum is checked if it is non zero and only then a channel is picked.

However, the channel width value of 0 indicates the width is 20MHz.
Check if the channel width value is not CH_WIDTH_INVALID and only then
start Agile CAC.

Change-Id: Id024631fc7b034fe87f2070d150da64cf07c49ae
CRs-Fixed: 2491517
Vignesh Mohan 6 年之前
父節點
當前提交
2ec51b254e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      umac/dfs/core/src/misc/dfs_zero_cac.c

+ 2 - 2
umac/dfs/core/src/misc/dfs_zero_cac.c

@@ -2137,7 +2137,7 @@ dfs_find_agile_width(struct wlan_dfs *dfs, enum phy_ch_width chwidth)
 		return CH_WIDTH_80MHZ;
 	default:
 		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "Invalid chwidth enum!");
-		return 0;
+		return CH_WIDTH_INVALID;
 	}
 }
 
@@ -2159,7 +2159,7 @@ void dfs_get_ieeechan_for_agilecac(struct wlan_dfs *dfs,
 	 */
 	dfs_find_chwidth_and_center_chan(dfs, &chwidth, NULL, NULL);
 	dfs->dfs_precac_chwidth = dfs_find_agile_width(dfs, chwidth);
-	if (!dfs->dfs_precac_chwidth) {
+	if (dfs->dfs_precac_chwidth == CH_WIDTH_INVALID) {
 		dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "cannot start agile CAC!");
 		return;
 	}