From 94b1366de313c4d1c0c1ea8f0b859bc44d0b231a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 24 Jul 2018 16:41:47 +0200 Subject: [PATCH] nl80211: attempt to query Mesh ID from ubus Signed-off-by: Jo-Philipp Wich --- iwinfo_nl80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index fe307ab..ca78742 100644 --- a/iwinfo_nl80211.c +++ b/iwinfo_nl80211.c @@ -1115,6 +1115,11 @@ static int nl80211_get_ssid(const char *ifname, char *buf) nl80211_hostapd_query(ifname, "ssid", sb.ssid, IWINFO_ESSID_MAX_SIZE + 1); + /* failed, try to obtain Mesh ID */ + if (sb.ssid[0] == 0) + iwinfo_ubus_query(res ? res : ifname, "mesh_id", + sb.ssid, IWINFO_ESSID_MAX_SIZE + 1); + return (sb.ssid[0] == 0) ? -1 : 0; } -- 2.25.1