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>
This commit is contained in:
Felix Fietkau 2025-10-01 06:06:43 +02:00
parent f6fd18eb60
commit d32e051b69

View File

@ -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);