From 27724d297b0a11d12f46a121a1982617c9ccf7af Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Mon, 31 Jan 2011 16:38:48 +0100 Subject: [PATCH] gsupplicant: Add interface mode capability getter --- gsupplicant/gsupplicant.h | 1 + gsupplicant/supplicant.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h index c2462f4..2ed8af6 100644 --- a/gsupplicant/gsupplicant.h +++ b/gsupplicant/gsupplicant.h @@ -168,6 +168,7 @@ const char *g_supplicant_interface_get_wps_key(GSupplicantInterface *interface); const void *g_supplicant_interface_get_wps_ssid(GSupplicantInterface *interface, unsigned int *ssid_len); GSupplicantWpsState g_supplicant_interface_get_wps_state(GSupplicantInterface *interface); +unsigned int g_supplicant_interface_get_mode(GSupplicantInterface *interface); /* Network API */ struct _GSupplicantNetwork; diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 2e17868..48a176a 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -688,6 +688,14 @@ GSupplicantWpsState g_supplicant_interface_get_wps_state( return interface->wps_state; } +unsigned int g_supplicant_interface_get_mode(GSupplicantInterface *interface) +{ + if (interface == NULL) + return 0; + + return interface->mode_capa; +} + GSupplicantInterface *g_supplicant_network_get_interface( GSupplicantNetwork *network) { -- 2.7.4