]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
hostapd: tweak ACS retry behavior
authorFelix Fietkau <nbd@nbd.name>
Thu, 22 May 2025 08:09:41 +0000 (10:09 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sat, 31 May 2025 14:22:48 +0000 (16:22 +0200)
When running ACS on multi-radio devices, ACS on one band can block another.
Increase the number of retries and prevent bouncing interfaces between AP
and STA mode during attempts.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/patches/360-acs_retry.patch [new file with mode: 0644]

diff --git a/package/network/services/hostapd/patches/360-acs_retry.patch b/package/network/services/hostapd/patches/360-acs_retry.patch
new file mode 100644 (file)
index 0000000..e858ac2
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/src/ap/acs.h
++++ b/src/ap/acs.h
+@@ -15,7 +15,7 @@
+ enum hostapd_chan_status acs_init(struct hostapd_iface *iface);
+ void acs_cleanup(struct hostapd_iface *iface);
+-#define ACS_SCAN_RETRY_MAX_COUNT      15
++#define ACS_SCAN_RETRY_MAX_COUNT      50
+ #define ACS_SCAN_RETRY_INTERVAL               5
+ #else /* CONFIG_ACS */
+--- a/src/drivers/driver_nl80211_scan.c
++++ b/src/drivers/driver_nl80211_scan.c
+@@ -455,6 +455,9 @@ int wpa_driver_nl80211_scan(struct i802_
+                       }
+ #endif /* CONFIG_IEEE80211BE */
++                      if (ret == -EBUSY)
++                              goto fail;
++
+                       /*
+                        * mac80211 does not allow scan requests in AP mode, so
+                        * try to do this in station mode.