diff options
author | David Bauer <mail@david-bauer.net> | 2020-07-20 15:08:19 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2020-07-20 15:08:19 +0200 |
commit | 93bbd998aa696a5e9cff51131854b78b30c0af34 (patch) | |
tree | a3471e218ecf09cc4c6bb3bfd1af56b8b6d2cc03 /package | |
parent | cfd2f3bf6f4825b66e9a4ca9cba7c65b93eb89c7 (diff) | |
download | upstream-93bbd998aa696a5e9cff51131854b78b30c0af34.tar.gz upstream-93bbd998aa696a5e9cff51131854b78b30c0af34.tar.bz2 upstream-93bbd998aa696a5e9cff51131854b78b30c0af34.zip |
hostapd: enter DFS state if no available channel is found
Previously hostapd would not stop transmitting when a DFS event was
detected and no available channel to switch to was available.
Disable and re-enable the interface to enter DFS state. This way, TX
does not happen until the kernel notifies hostapd about the NOP
expiring.
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'package')
-rw-r--r-- | package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch b/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch new file mode 100644 index 0000000000..e2db99eeed --- /dev/null +++ b/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch @@ -0,0 +1,37 @@ +From cefc52e6b93731c713f1bba1cb5e7e92105b758b Mon Sep 17 00:00:00 2001 +From: David Bauer <mail@david-bauer.net> +Date: Fri, 3 Jul 2020 23:00:34 +0200 +Subject: [PATCH] dfs: enter DFS state if no available channel is found + +Previously hostapd would not stop transmitting when a DFS event was +detected and no available channel to switch to was available. + +Disable and re-enable the interface to enter DFS state. This way, TX +does not happen until the kernel notifies hostapd about the NOP +expiring. + +Signed-off-by: David Bauer <mail@david-bauer.net> +--- + src/ap/dfs.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/src/ap/dfs.c ++++ b/src/ap/dfs.c +@@ -1066,8 +1066,15 @@ static int hostapd_dfs_start_channel_swi + &oper_centr_freq_seg0_idx, + &oper_centr_freq_seg1_idx, + &skip_radar); +- if (!channel) +- return err; ++ if (!channel) { ++ /* ++ * Toggle interface state to enter DFS state ++ * until NOP is finished. ++ */ ++ hostapd_disable_iface(iface); ++ hostapd_enable_iface(iface); ++ return 0; ++ } + if (!skip_radar) { + iface->freq = channel->freq; + iface->conf->channel = channel->chan; |