summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2018-12-24 17:50:27 +0530
committerJaehyun Kim <jeik01.kim@samsung.com>2019-06-11 07:12:49 +0000
commit79b0d466b91dc6b5e0038d3ce5934912392be4b8 (patch)
treedf8ec92e7cafd35e2deabf4aed08ad85924f74ce
parent52770f14eb36bd8b4f587d67ae66a44a2d276921 (diff)
downloadconnman-79b0d466b91dc6b5e0038d3ce5934912392be4b8.tar.gz
connman-79b0d466b91dc6b5e0038d3ce5934912392be4b8.tar.bz2
connman-79b0d466b91dc6b5e0038d3ce5934912392be4b8.zip
Added support to get maximum scan SSIDs.
Added support to get Max number of SSIDs scan supported by wlan chipset. Change-Id: If4cbc07f6937718fab123600a962179b3adbc081 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
-rwxr-xr-xinclude/technology.h2
-rw-r--r--plugins/wifi.c3
-rw-r--r--src/connman.conf1
-rw-r--r--src/technology.c35
4 files changed, 41 insertions, 0 deletions
diff --git a/include/technology.h b/include/technology.h
index 29cdddf9..729d7aac 100755
--- a/include/technology.h
+++ b/include/technology.h
@@ -86,6 +86,8 @@ void connman_technology_driver_unregister(struct connman_technology_driver *driv
#if defined TIZEN_EXT
void connman_techonology_wifi_set_5ghz_supported(struct connman_technology *technology,
bool is_5_0_Ghz_supported);
+void connman_techonology_set_max_scan_ssids(struct connman_technology *technology,
+ int max_scan_ssids);
#endif
#ifdef __cplusplus
diff --git a/plugins/wifi.c b/plugins/wifi.c
index dfcff59c..f1766534 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -3633,6 +3633,9 @@ static void interface_added(GSupplicantInterface *interface)
connman_device_set_powered(wifi->device, true);
#if defined TIZEN_EXT
connman_techonology_wifi_set_5ghz_supported(wifi_technology, is_5_0_ghz_supported);
+ /* Max number of SSIDs supported by wlan chipset that can be scanned */
+ int max_scan_ssids = g_supplicant_interface_get_max_scan_ssids(interface);
+ connman_techonology_set_max_scan_ssids(wifi_technology, max_scan_ssids);
#endif
}
diff --git a/src/connman.conf b/src/connman.conf
index cd9eefb1..c1417ebc 100644
--- a/src/connman.conf
+++ b/src/connman.conf
@@ -15,6 +15,7 @@
<allow send_destination="net.connman" send_type="signal"/>
<allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="GetScanState" />
<allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="Get5GhzSupported" />
+ <allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="GetMaxScanSsid" />
<check send_destination="net.connman" send_interface="net.connman.Manager" send_member="GetTechnologies" privilege="http://tizen.org/privilege/network.get" />
<check send_destination="net.connman" send_interface="net.connman.Manager" send_member="GetProperties" privilege="http://tizen.org/privilege/network.get" />
diff --git a/src/technology.c b/src/technology.c
index 05ec0c0c..2f14d57d 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -100,6 +100,7 @@ struct connman_technology {
#endif
#if defined TIZEN_EXT
bool is_5_0_ghz_supported;
+ int max_scan_ssids;
#endif
};
@@ -1483,6 +1484,38 @@ static DBusMessage *get_scan_state(DBusConnection *conn, DBusMessage *msg, void
return reply;
}
+
+void connman_techonology_set_max_scan_ssids(struct connman_technology *technology,
+ int max_scan_ssids)
+{
+ DBG("");
+ technology->max_scan_ssids = max_scan_ssids;
+}
+
+static DBusMessage *get_max_scan_ssid(DBusConnection *conn, DBusMessage *msg, void *data)
+{
+ DBusMessage *reply;
+ DBusMessageIter iter, dict;
+ struct connman_technology *technology = data;
+ dbus_int32_t max_scan_ssids = technology->max_scan_ssids;
+
+ DBG("technology %p", technology);
+
+ reply = dbus_message_new_method_return(msg);
+ if (!reply)
+ return NULL;
+
+ dbus_message_iter_init_append(reply, &iter);
+
+ connman_dbus_dict_open(&iter, &dict);
+ connman_dbus_dict_append_basic(&dict, "MaxScanSSID",
+ DBUS_TYPE_INT32,
+ &max_scan_ssids);
+
+ connman_dbus_dict_close(&iter, &dict);
+
+ return reply;
+}
#endif
#if defined TIZEN_EXT_WIFI_MESH
@@ -1965,6 +1998,8 @@ static const GDBusMethodTable technology_methods[] = {
get_scan_state) },
{ GDBUS_METHOD("Get5GhzSupported", NULL, GDBUS_ARGS({ "supported", "a{sv}" }),
get_5ghz_supported) },
+ { GDBUS_METHOD("GetMaxScanSsid", NULL, GDBUS_ARGS({ "maxscanssid", "a{sv}" }),
+ get_max_scan_ssid) },
#endif
#if defined TIZEN_EXT_WIFI_MESH
{ GDBUS_ASYNC_METHOD("MeshCommands",