aboutsummaryrefslogtreecommitdiff
path: root/package/network/services/hostapd/files/hostapd.uc
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/services/hostapd/files/hostapd.uc')
-rw-r--r--package/network/services/hostapd/files/hostapd.uc8
1 files changed, 5 insertions, 3 deletions
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index 9bb8f8d29d..401f7c9266 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -66,10 +66,12 @@ function iface_restart(phy, config, old_config)
if (err)
hostapd.printf(`Failed to create ${bss.ifname} on phy ${phy}: ${err}`);
let config_inline = iface_gen_config(phy, config);
- if (hostapd.add_iface(`bss_config=${bss.ifname}:${config_inline}`) < 0) {
+
+ let ubus = hostapd.data.ubus;
+ ubus.call("wpa_supplicant", "phy_set_state", { phy: phy, stop: true });
+ if (hostapd.add_iface(`bss_config=${bss.ifname}:${config_inline}`) < 0)
hostapd.printf(`hostapd.add_iface failed for phy ${phy} ifname=${bss.ifname}`);
- return;
- }
+ ubus.call("wpa_supplicant", "phy_set_state", { phy: phy, stop: false });
}
function array_to_obj(arr, key, start)