[][MAC80211][hostapd][Fix hostapd_dfs_start_cac log]

[Description]
Fix hostapd_dfs_start_cac log
1. seg0 should be channel instead of cf1
2. The type of chan_width in hostapd_dfs_start_cac is "enum chan_width"
However, the type of width in other functions are "enum oper_chan_width".
So, change it to real bandwidth size (in MHz) to avoid misleading log.

[Release-log]
N/A

Change-Id: I0c675481e526ef6d3d9454fae3e4b8bd5ec16c2b
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7715822
diff --git a/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch b/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
new file mode 100644
index 0000000..96522dd
--- /dev/null
+++ b/autobuild_mac80211_release/package/network/services/hostapd_new/patches/mtk-0034-hostapd-mtk-Fix-hostapd_dfs_start_cac-log.patch
@@ -0,0 +1,31 @@
+From fba1094daa7efaea9e2e3e9342b6eb6bd00ca174 Mon Sep 17 00:00:00 2001
+From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+Date: Wed, 5 Jul 2023 10:47:20 +0800
+Subject: [PATCH 34/34] hostapd: mtk: Fix hostapd_dfs_start_cac log
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ src/ap/dfs.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/ap/dfs.c b/src/ap/dfs.c
+index 6506d7a..c255978 100644
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -1655,9 +1655,11 @@ int hostapd_dfs_start_cac(struct hostapd_iface *iface, int freq,
+ 	/* TODO: How to check CAC time for ETSI weather channels? */
+ 	iface->dfs_cac_ms = 60000;
+ 	wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_CAC_START
+-		"freq=%d chan=%d chan_offset=%d width=%d seg0=%d "
++		"freq=%d chan=%d chan_offset=%d width=%s seg0=%d "
+ 		"seg1=%d cac_time=%ds%s",
+-		freq, (freq - 5000) / 5, chan_offset, chan_width, cf1, cf2,
++		freq, (freq - 5000) / 5, chan_offset,
++		channel_width_to_string(chan_width),
++		(cf1 - 5000) / 5, cf2 ? (cf2 - 5000) / 5 : 0,
+ 		iface->dfs_cac_ms / 1000,
+ 		hostapd_dfs_is_background_event(iface, freq) ?
+ 		" (background)" : "");
+-- 
+2.18.0
+