The goal is to reduce the time of no radio while the DFS scanning is in effect from 60 sec to 2 sec.
Not being a programmer, I was playing around with the source for hostapd
after grepping for some key words. I found what I thought might accomplish this in src/ap/dfs.c
and edited it as shown in the below patch. This did not have the effect of waiting 2 sec; it still took 60 sec. Any thoughts or suggestions?
From 036dbd9177aa1e79ad0137e6952a8cfecaf63b35 Mon Sep 17 00:00:00 2001
Date: Tue, 8 Nov 2022 09:59:43 -0500
Subject: [PATCH] hack: make default DFS time 2 sec not 60 sec
---
...ke-default-DFS-time-2-sec-not-60-sec.patch | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 package/network/services/hostapd/patches/0001-hack-make-default-DFS-time-2-sec-not-60-sec.patch
diff --git a/package/network/services/hostapd/patches/0001-hack-make-default-DFS-time-2-sec-not-60-sec.patch b/package/network/services/hostapd/patches/0001-hack-make-default-DFS-time-2-sec-not-60-sec.patch
new file mode 100644
index 0000000000..acfab2f462
--- /dev/null
+++ b/package/network/services/hostapd/patches/0001-hack-make-default-DFS-time-2-sec-not-60-sec.patch
@@ -0,0 +1,21 @@
+From 000f26e91a986c7354ec43a88ce04801ac5a5d1e Mon Sep 17 00:00:00 2001
+Date: Tue, 8 Nov 2022 09:21:39 -0500
+Subject: [PATCH] hack: make default DFS time 2 sec not 60 sec
+
+---
+ src/ap/dfs.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -1537,7 +1537,8 @@ int hostapd_dfs_start_cac(struct hostapd
+ iface->cac_started = 1;
+ }
+ /* TODO: How to check CAC time for ETSI weather channels? */
+- iface->dfs_cac_ms = 60000;
++ /* change the default of 60000 ms to 2000 ms */
++ iface->dfs_cac_ms = 2000;
+ wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_CAC_START
+ "freq=%d chan=%d chan_offset=%d width=%d seg0=%d "
+ "seg1=%d cac_time=%ds%s",
--
2.38.1