nl80211: attempt to query Mesh ID from ubus

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2018-07-24 16:41:47 +02:00
parent d991fe5481
commit 94b1366de3

View file

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