summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Kling <andreas.kling@peiker-cee.de>2019-02-20 10:08:27 +0100
committerLubomir Rintel <lkundrak@v3.sk>2019-07-29 11:00:24 +0200
commitf481ec71604b7d4113009c9363fe6064a2642dc2 (patch)
tree29f069a25117fc796ecbe3b0b7dd55cf1aeb4890
parent3ef3733c81395f3edd75e38aabeea74a52ce4d38 (diff)
downloadNetworkManager-f481ec71604b7d4113009c9363fe6064a2642dc2.tar.gz
wifi/ap: detect mesh mode
mark ap if supplicant reports bss property "Mode = 'mesh'". bss mode mesh is available since hostap_2_6-729-g213eb1885 check mesh connections are compatible with detected mode.
-rw-r--r--src/devices/wifi/nm-wifi-ap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c
index b94421a633..32bd98bb1e 100644
--- a/src/devices/wifi/nm-wifi-ap.c
+++ b/src/devices/wifi/nm-wifi-ap.c
@@ -817,6 +817,8 @@ nm_wifi_ap_update_from_properties (NMWifiAP *ap,
changed |= nm_wifi_ap_set_mode (ap, NM_802_11_MODE_INFRA);
else if (!g_strcmp0 (s, "ad-hoc"))
changed |= nm_wifi_ap_set_mode (ap, NM_802_11_MODE_ADHOC);
+ else if (!g_strcmp0 (s, "mesh"))
+ changed |= nm_wifi_ap_set_mode (ap, NM_802_11_MODE_MESH);
}
if (g_variant_lookup (properties, "Signal", "n", &i16))
@@ -1009,7 +1011,9 @@ nm_wifi_ap_to_string (const NMWifiAP *self,
? '#'
: (priv->fake
? 'f'
- : 'a'))),
+ : (priv->mode == NM_802_11_MODE_MESH
+ ? 'm'
+ : 'a')))),
chan,
priv->strength,
priv->flags & NM_802_11_AP_FLAGS_PRIVACY ? 'P' : '_',
@@ -1074,6 +1078,8 @@ nm_wifi_ap_check_compatible (NMWifiAP *self,
if ( !strcmp (mode, "ap")
&& (priv->mode != NM_802_11_MODE_INFRA || priv->hotspot != TRUE))
return FALSE;
+ if (!strcmp (mode, "mesh") && (priv->mode != NM_802_11_MODE_MESH))
+ return FALSE;
}
band = nm_setting_wireless_get_band (s_wireless);