1 From cefc52e6b93731c713f1bba1cb5e7e92105b758b Mon Sep 17 00:00:00 2001
2 From: David Bauer <mail@david-bauer.net>
3 Date: Fri, 3 Jul 2020 23:00:34 +0200
4 Subject: [PATCH] dfs: enter DFS state if no available channel is found
6 Previously hostapd would not stop transmitting when a DFS event was
7 detected and no available channel to switch to was available.
9 Disable and re-enable the interface to enter DFS state. This way, TX
10 does not happen until the kernel notifies hostapd about the NOP
13 Signed-off-by: David Bauer <mail@david-bauer.net>
15 src/ap/dfs.c | 11 +++++++++--
16 1 file changed, 9 insertions(+), 2 deletions(-)
20 @@ -1066,8 +1066,15 @@ static int hostapd_dfs_start_channel_swi
21 &oper_centr_freq_seg0_idx,
22 &oper_centr_freq_seg1_idx,
28 + * Toggle interface state to enter DFS state
29 + * until NOP is finished.
31 + hostapd_disable_iface(iface);
32 + hostapd_enable_iface(iface);
36 iface->freq = channel->freq;
37 iface->conf->channel = channel->chan;