diff options
author | Masashi Honma <masashi.honma@gmail.com> | 2018-01-16 06:28:37 +0900 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-01-16 15:01:59 +0100 |
commit | 0109615c4eecaea74450b3a97aae42626b648de3 (patch) | |
tree | 69fb5d9f52677d77e7f90ad5512394ff1170ec57 /src/supplicant/nm-supplicant-interface.c | |
parent | 7711d7c87bbd19aca4c3a74c1de8762b947bc6cf (diff) |
supplicant: enable FILS only when wpa_supplicant supports it
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'src/supplicant/nm-supplicant-interface.c')
-rw-r--r-- | src/supplicant/nm-supplicant-interface.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index 5d3362866..7f251bfff 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -93,6 +93,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMSupplicantInterface, PROP_FAST_SUPPORT, PROP_AP_SUPPORT, PROP_PMF_SUPPORT, + PROP_FILS_SUPPORT, ); typedef struct { @@ -102,6 +103,7 @@ typedef struct { NMSupplicantFeature fast_support; NMSupplicantFeature ap_support; /* Lightweight AP mode support */ NMSupplicantFeature pmf_support; + NMSupplicantFeature fils_support; guint32 max_scan_ssids; guint32 ready_count; @@ -565,6 +567,12 @@ nm_supplicant_interface_get_pmf_support (NMSupplicantInterface *self) return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->pmf_support; } +NMSupplicantFeature +nm_supplicant_interface_get_fils_support (NMSupplicantInterface *self) +{ + return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->fils_support; +} + void nm_supplicant_interface_set_ap_support (NMSupplicantInterface *self, NMSupplicantFeature ap_support) @@ -596,6 +604,15 @@ nm_supplicant_interface_set_pmf_support (NMSupplicantInterface *self, priv->pmf_support = pmf_support; } +void +nm_supplicant_interface_set_fils_support (NMSupplicantInterface *self, + NMSupplicantFeature fils_support) +{ + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + + priv->fils_support = fils_support; +} + /*****************************************************************************/ static void @@ -1898,6 +1915,10 @@ set_property (GObject *object, /* construct-only */ priv->pmf_support = g_value_get_int (value); break; + case PROP_FILS_SUPPORT: + /* construct-only */ + priv->fils_support = g_value_get_int (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1918,7 +1939,8 @@ nm_supplicant_interface_new (const char *ifname, NMSupplicantDriver driver, NMSupplicantFeature fast_support, NMSupplicantFeature ap_support, - NMSupplicantFeature pmf_support) + NMSupplicantFeature pmf_support, + NMSupplicantFeature fils_support) { g_return_val_if_fail (ifname != NULL, NULL); @@ -1928,6 +1950,7 @@ nm_supplicant_interface_new (const char *ifname, NM_SUPPLICANT_INTERFACE_FAST_SUPPORT, (int) fast_support, NM_SUPPLICANT_INTERFACE_AP_SUPPORT, (int) ap_support, NM_SUPPLICANT_INTERFACE_PMF_SUPPORT, (int) pmf_support, + NM_SUPPLICANT_INTERFACE_FILS_SUPPORT, (int) fils_support, NULL); } @@ -2027,6 +2050,14 @@ nm_supplicant_interface_class_init (NMSupplicantInterfaceClass *klass) G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); + obj_properties[PROP_FILS_SUPPORT] = + g_param_spec_int (NM_SUPPLICANT_INTERFACE_FILS_SUPPORT, "", "", + NM_SUPPLICANT_FEATURE_UNKNOWN, + NM_SUPPLICANT_FEATURE_YES, + NM_SUPPLICANT_FEATURE_UNKNOWN, + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); |