diff options
| author | Felix Fietkau | 2026-03-27 19:44:02 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2026-04-05 15:00:12 +0000 |
| commit | 53931f03dddc32d8aa398d57c855387baca9d3b6 (patch) | |
| tree | 8ba078a2fae32d0cd4cc2a0d3e1f6bcc74746745 | |
| parent | 14145abcb2d9a1399877d8751f3cbe4e04efbc9d (diff) | |
| download | openwrt-main.tar.gz | |
Simplifies managing state
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | package/network/services/hostapd/files/wpa_supplicant.uc | 19 |
1 files 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) |