Commit f481ec71 authored by Andy Kling's avatar Andy Kling Committed by Lubomir Rintel

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.
parent 3ef3733c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment