Append bssid property to the add_network call to wpa_supplicant 00/87300/1
authorMilind Ramesh Murhekar <m.murhekar@samsung.com>
Wed, 7 Sep 2016 09:07:07 +0000 (14:37 +0530)
committerMilind Ramesh Murhekar <m.murhekar@samsung.com>
Wed, 7 Sep 2016 09:07:07 +0000 (14:37 +0530)
Description: This change supports the Strongest AP connection.
If there are multiple APs that have same SSID and security type
the Bssid property will help to ensure the correct connectivity
of the AP among them.

Change-Id: I600772fa2bea72f3917e24d677057b34b87c7f1e
Signed-off-by: Milind Ramesh Murhekar <m.murhekar@samsung.com>
gsupplicant/supplicant.c

index dc2232f..e9d6b9d 100755 (executable)
@@ -4930,6 +4930,19 @@ static void interface_add_network_params(DBusMessageIter *iter, void *user_data)
                                        DBUS_TYPE_INT32,
                                        &ssid->ignore_broadcast_ssid);
 
+#if defined TIZEN_EXT
+       if (ssid->bssid) {
+               char *bssid = NULL;
+               bssid = g_try_malloc0(18);
+               snprintf(bssid, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
+                                       ssid->bssid[0], ssid->bssid[1], ssid->bssid[2],
+                                       ssid->bssid[3], ssid->bssid[4], ssid->bssid[5]);
+               supplicant_dbus_dict_append_basic(&dict, "bssid",
+                                       DBUS_TYPE_STRING, &bssid);
+               g_free(bssid);
+       }
+#endif
+
        supplicant_dbus_dict_close(iter, &dict);
 }