]> git.ipfire.org Git - thirdparty/hostap.git/commit
hostapd: Fix channel switch to a DFS channel
authorRajat Soni <quic_rajson@quicinc.com>
Thu, 4 Apr 2024 09:20:50 +0000 (14:50 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 15 Apr 2024 08:56:41 +0000 (11:56 +0300)
commit36bd75dfd25ea651c64d6884f612fafe75899a35
tree377e9879b985d4ee9dd9105d917b744bd4e69905
parentf4b84ecaf7980474d05a449c1b1f30b03ad62533
hostapd: Fix channel switch to a DFS channel

When we are configuring automatic channel selection, we are not able to
switch to a given DFS channel because when we are trying to move to a
DFS channel, the interface is disabled and enabled again. When the
interface is disabled and enabled we are setting iface's freq and
channel to 0 in setup_interface2() in case ACS is enabled, and now we
don't know to which channel we were trying to move. Now ACS will run and
the interface will be up in the channel that is suitable.

To fix this issue add a flag named is_ch_switch_dfs to check if the
channel switch request is for a DFS channel and we can use this in
setup_interface2() to decide whther we have to set iface's freq and
channel to 0 or not. This way iface's freq and channel will retain the
values while channel switching to a DFS channel when ACS is enabled.

Signed-off-by: Rajat Soni <quic_rajson@quicinc.com>
hostapd/ctrl_iface.c
src/ap/hostapd.c
src/ap/hostapd.h