[openwrt/openwrt] wpa_supplicant: report interface events and support querying interface status

LEDE Commits lede-commits at lists.infradead.org
Wed Oct 1 01:09:08 PDT 2025


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d32e051b69e855f0e4e6dbb50175bdd536d6113f

commit d32e051b69e855f0e4e6dbb50175bdd536d6113f
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Oct 1 06:06:43 2025 +0200

    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 at nbd.name>
---
 package/network/services/hostapd/files/wpa_supplicant.uc | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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




More information about the lede-commits mailing list