提交 22ca6fde 编写于 作者: F Felix Fietkau

hostapd: fix bringing up AP+STA when the new channel is on a DFS channel

If a CAC is needed because the channel is not available yet, a full AP
interface restart is needed
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
上级 12f53724
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "beacon.h" #include "beacon.h"
#include "hw_features.h" #include "hw_features.h"
#include "ap_drv_ops.h" #include "ap_drv_ops.h"
#include "dfs.h"
#include <libubox/uloop.h> #include <libubox/uloop.h>
static uc_resource_type_t *global_type, *bss_type, *iface_type; static uc_resource_type_t *global_type, *bss_type, *iface_type;
...@@ -367,6 +368,13 @@ out: ...@@ -367,6 +368,13 @@ out:
if (conf->channel) if (conf->channel)
iface->freq = hostapd_hw_get_freq(iface->bss[0], conf->channel); iface->freq = hostapd_hw_get_freq(iface->bss[0], conf->channel);
if (hostapd_is_dfs_required(iface) && !hostapd_is_dfs_chan_available(iface)) {
wpa_printf(MSG_INFO, "DFS CAC required on new channel, restart interface");
hostapd_disable_iface(iface);
hostapd_enable_iface(iface);
return ucv_boolean_new(true);
}
for (i = 0; i < iface->num_bss; i++) { for (i = 0; i < iface->num_bss; i++) {
struct hostapd_data *hapd = iface->bss[i]; struct hostapd_data *hapd = iface->bss[i];
int ret; int ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册