diff options
author | Mohamed Abbas <mohamed.abbas@intel.com> | 2011-09-13 09:55:16 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-09-13 10:53:59 +0200 |
commit | 52d434cfb17d810cce031e9e2916decac49e99df (patch) | |
tree | ef3bd5ebca2aa307fbe874ab7105632fbb37822d | |
parent | f251712760f3741a00458b652c5571c5ba39a700 (diff) | |
download | connman-52d434cfb17d810cce031e9e2916decac49e99df.tar.gz connman-52d434cfb17d810cce031e9e2916decac49e99df.tar.bz2 connman-52d434cfb17d810cce031e9e2916decac49e99df.zip |
gsupplicant: Get the number of scan ssids from supplicant
-rw-r--r-- | gsupplicant/gsupplicant.h | 2 | ||||
-rw-r--r-- | gsupplicant/supplicant.c | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h index 8262ad05..a68bba0a 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 dda2c923..599abd23 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) { |