summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2025-10-01 04:06:43 +0000
committerFelix Fietkau2025-10-01 08:08:54 +0000
commitd32e051b69e855f0e4e6dbb50175bdd536d6113f (patch)
tree09ecbede938f042833a0c73ce79df0983c150453
parentf6fd18eb60447c163083eea89842b05f50877083 (diff)
downloadopenwrt-d32e051b69e855f0e4e6dbb50175bdd536d6113f.tar.gz
wpa_supplicant: report interface events and support querying interface status
Makes information like Multi-AP status (including VLAN ID) accessible Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/services/hostapd/files/wpa_supplicant.uc15
1 files changed, 15 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/wpa_supplicant.uc b/package/network/services/hostapd/files/wpa_supplicant.uc
index 062c4b088a..b2a61090f3 100644
--- a/package/network/services/hostapd/files/wpa_supplicant.uc
+++ b/package/network/services/hostapd/files/wpa_supplicant.uc
@@ -496,6 +496,18 @@ let main_obj = {
return libubus.STATUS_NOT_FOUND;
}
},
+ iface_status: {
+ args: {
+ name: ""
+ },
+ call: function(req) {
+ let iface = wpas.interfaces[req.args.name];
+ if (!iface)
+ return libubus.STATUS_NOT_FOUND;
+
+ return iface.status();
+ },
+ },
mld_set: {
args: {
config: {}
@@ -728,6 +740,9 @@ return {
iface_event("remove", name);
},
state: function(ifname, iface, state) {
+ let event_data = iface.status();
+ event_data.name = ifname;
+ iface_event("state", ifname, event_data);
try {
iface_hostapd_notify(ifname, iface, state);