hostapd: improve acs_exclude_dfs support

Fixes: WIFI-6933
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2022-02-15 17:06:22 +01:00
parent d33447709e
commit b4d1d58fc9
2 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
Index: hostapd-2021-02-20-59e9794c/src/ap/acs.c
===================================================================
--- hostapd-2021-02-20-59e9794c.orig/src/ap/acs.c
+++ hostapd-2021-02-20-59e9794c/src/ap/acs.c
@@ -672,6 +672,10 @@ acs_find_ideal_chan_mode(struct hostapd_
continue;
}
+ if (iface->conf->acs_exclude_dfs &&
+ (chan->flag & HOSTAPD_CHAN_RADAR))
+ continue;
+
/* HT40 on 5 GHz has a limited set of primary channels as per
* 11n Annex J */
if (mode->mode == HOSTAPD_MODE_IEEE80211A &&

View File

@@ -0,0 +1,35 @@
From adaea813b53d2f3cbbaefb9dffa19faf58d670a2 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 15 Feb 2022 17:05:18 +0100
Subject: [PATCH] hostapd: add acs_exclude_dfs support for SW ACS
Signed-off-by: John Crispin <john@phrozen.org>
---
.../hostapd/patches/760-acs_exclude_dfs.patch | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 package/network/services/hostapd/patches/760-acs_exclude_dfs.patch
diff --git a/package/network/services/hostapd/patches/760-acs_exclude_dfs.patch b/package/network/services/hostapd/patches/760-acs_exclude_dfs.patch
new file mode 100644
index 0000000000..52d63c5ff9
--- /dev/null
+++ b/package/network/services/hostapd/patches/760-acs_exclude_dfs.patch
@@ -0,0 +1,15 @@
+Index: hostapd-2021-02-20-59e9794c/src/ap/acs.c
+===================================================================
+--- hostapd-2021-02-20-59e9794c.orig/src/ap/acs.c
++++ hostapd-2021-02-20-59e9794c/src/ap/acs.c
+@@ -672,6 +672,10 @@ acs_find_ideal_chan_mode(struct hostapd_
+ continue;
+ }
+
++ if (iface->conf->acs_exclude_dfs &&
++ (chan->flag & HOSTAPD_CHAN_RADAR))
++ continue;
++
+ /* HT40 on 5 GHz has a limited set of primary channels as per
+ * 11n Annex J */
+ if (mode->mode == HOSTAPD_MODE_IEEE80211A &&
--
2.25.1