From 53931f03dddc32d8aa398d57c855387baca9d3b6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 27 Mar 2026 19:44:02 +0000 Subject: [PATCH] wpa_supplicant: include ctrl-event on the DPP channel Simplifies managing state Signed-off-by: Felix Fietkau --- .../services/hostapd/files/wpa_supplicant.uc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/package/network/services/hostapd/files/wpa_supplicant.uc b/package/network/services/hostapd/files/wpa_supplicant.uc index f3beba8186..8cb9df24ab 100644 --- a/package/network/services/hostapd/files/wpa_supplicant.uc +++ b/package/network/services/hostapd/files/wpa_supplicant.uc @@ -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)