summaryrefslogtreecommitdiff
path: root/gsupplicant
diff options
context:
space:
mode:
authorMohamed Abbas <mohamed.abbas@intel.com>2011-09-13 06:55:16 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2011-09-13 08:53:59 (GMT)
commit52d434cfb17d810cce031e9e2916decac49e99df (patch)
treeef3bd5ebca2aa307fbe874ab7105632fbb37822d /gsupplicant
parentf251712760f3741a00458b652c5571c5ba39a700 (diff)
downloadconnman-52d434cfb17d810cce031e9e2916decac49e99df.zip
connman-52d434cfb17d810cce031e9e2916decac49e99df.tar.gz
connman-52d434cfb17d810cce031e9e2916decac49e99df.tar.bz2
gsupplicant: Get the number of scan ssids from supplicant
Diffstat (limited to 'gsupplicant')
-rw-r--r--gsupplicant/gsupplicant.h2
-rw-r--r--gsupplicant/supplicant.c18
2 files changed, 19 insertions, 1 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index 8262ad0..a68bba0 100644
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -181,6 +181,8 @@ 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);
+unsigned int g_supplicant_interface_get_max_scan_ssids(
+ GSupplicantInterface *interface);
/* Network API */
struct _GSupplicantNetwork;
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index dda2c92..599abd2 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -153,6 +153,7 @@ struct _GSupplicantInterface {
unsigned int pairwise_capa;
unsigned int scan_capa;
unsigned int mode_capa;
+ unsigned int max_scan_ssids;
dbus_bool_t ready;
GSupplicantState state;
dbus_bool_t scanning;
@@ -624,7 +625,13 @@ static void interface_capability(const char *key, DBusMessageIter *iter,
else if (g_strcmp0(key, "Modes") == 0)
supplicant_dbus_array_foreach(iter,
interface_capability_mode, interface);
- else
+ else if (g_strcmp0(key, "MaxScanSSID") == 0) {
+ dbus_int32_t max_scan_ssid;
+
+ dbus_message_iter_get_basic(iter, &max_scan_ssid);
+ interface->max_scan_ssids = max_scan_ssid;
+
+ } else
SUPPLICANT_DBG("key %s type %c",
key, dbus_message_iter_get_arg_type(iter));
}
@@ -727,6 +734,15 @@ unsigned int g_supplicant_interface_get_mode(GSupplicantInterface *interface)
return interface->mode_capa;
}
+unsigned int g_supplicant_interface_get_max_scan_ssids(
+ GSupplicantInterface *interface)
+{
+ if (interface == NULL)
+ return 0;
+
+ return interface->max_scan_ssids;
+}
+
GSupplicantInterface *g_supplicant_network_get_interface(
GSupplicantNetwork *network)
{