aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2024-01-13 16:11:41 +0100
committerFelix Fietkau <nbd@nbd.name>2024-01-13 16:12:34 +0100
commit912e5731279b046a9ab62e248d31e457a80c3e09 (patch)
tree183d68be46b557528311db10167384ab92aa16ed
parent12c8bba73123dce47c1f8d0eddebefb485341704 (diff)
hostapd: add back missing function for updating wpa_supplicant macaddr list
Make the call deferred instead of blocking to avoid deadlock issues Fixes: 3df9322771cc ("hostapd: make ubus calls to wpa_supplicant asynchronous") Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/services/hostapd/files/hostapd.uc8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index 5bffdff83f..dfddf8185b 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -123,6 +123,14 @@ function iface_config_macaddr_list(config)
return macaddr_list;
}
+function iface_update_supplicant_macaddr(phy, config)
+{
+ let macaddr_list = [];
+ for (let i = 0; i < length(config.bss); i++)
+ push(macaddr_list, config.bss[i].bssid);
+ ubus.defer("wpa_supplicant", "phy_set_macaddr_list", { phy: phy, macaddr: macaddr_list });
+}
+
function __iface_pending_next(pending, state, ret, data)
{
let config = pending.config;