gsupplicant: Add interface mode capability getter
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 31 Jan 2011 15:38:48 +0000 (16:38 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 2 Feb 2011 17:45:36 +0000 (18:45 +0100)
gsupplicant/gsupplicant.h
gsupplicant/supplicant.c

index c2462f4..2ed8af6 100644 (file)
@@ -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;
index 2e17868..48a176a 100644 (file)
@@ -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)
 {