wpa_supplicant: include ctrl-event on the DPP channel

Simplifies managing state

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2026-03-27 19:44:02 +00:00
parent 14145abcb2
commit 53931f03dd
@@ -499,16 +499,24 @@ function dpp_channel_handle_disconnect(channel)
}
}
function dpp_rx_via_channel(ifname, method, data)
function dpp_rx_via_channel(ifname, method, data, no_reply)
{
let hook = wpas.data.dpp_hooks[ifname];
if (!hook)
return null;
let response = hook.channel.request({
let req = {
method: method,
data: data,
});
};
if (no_reply) {
req.return = "ignore";
hook.channel.request(req);
return null;
}
let response = hook.channel.request(req);
if (hook.channel.error(true) == libubus.STATUS_TIMEOUT) {
hook.timeout_count++;
if (hook.timeout_count >= 3) {
@@ -939,11 +947,14 @@ function iface_ubus_remove(ifname)
function iface_ubus_notify(ifname, event)
{
event = { ifname, event };
dpp_rx_via_channel(ifname, "ctrl-event", event, true);
let obj = wpas.data.iface_ubus[ifname];
if (!obj)
return;
obj.notify('ctrl-event', { ifname, event }, null, null, null, -1);
obj.notify('ctrl-event', event, null, null, null, -1);
}
function iface_ubus_add(ifname)