vpn: Export vpn_ipconfig_foreach as linker symbol
[platform/upstream/connman.git] / src / device.c
index ffec3f2..d0825ce 100755 (executable)
@@ -266,15 +266,22 @@ int __connman_device_enable(struct connman_device *device)
        if (err == -EALREADY) {
                /* If device is already powered, but connman is not updated */
                connman_device_set_powered(device, true);
+#ifdef TIZEN_EXT
+               if (device->type == CONNMAN_DEVICE_TYPE_WIFI) {
+                       device->driver->set_mac_policy(device, device->mac_policy);
+                       device->driver->set_preassoc_mac_policy(device, device->preassoc_mac_policy);
+                       device->driver->set_random_mac_lifetime(device, device->random_mac_lifetime);
+               }
+#endif /* TIZEN_EXT */
                goto done;
        }
        /*
         * if err == -EINPROGRESS, then the DBus call to the respective daemon
-        * was successful. We set a 4 sec timeout so if the daemon never
+        * was successful. We set a 10 sec timeout so if the daemon never
         * returns a reply, we would reset the pending request.
         */
        if (err == -EINPROGRESS)
-               device->pending_timeout = g_timeout_add_seconds(4,
+               device->pending_timeout = g_timeout_add_seconds(10,
                                        device_pending_reset, device);
 done:
        return err;
@@ -658,7 +665,7 @@ void connman_device_set_ident(struct connman_device *device,
                                                        const char *ident)
 {
 #ifdef TIZEN_EXT
-       if (device->ident)
+       if (device->ident && device->powered)
                return;
        else
 #endif
@@ -1105,7 +1112,7 @@ int connman_device_set_string(struct connman_device *device,
 
        if (g_str_equal(key, "Address")) {
 #ifdef TIZEN_EXT
-               if (device->address)
+               if (device->address && device->powered)
                        return 0;
                else
 #endif
@@ -1978,17 +1985,7 @@ struct connman_device *connman_device_create_from_index(int index)
        case CONNMAN_DEVICE_TYPE_ETHERNET:
        case CONNMAN_DEVICE_TYPE_GADGET:
        case CONNMAN_DEVICE_TYPE_WIFI:
-#if defined TIZEN_EXT
-               if (type == CONNMAN_DEVICE_TYPE_WIFI)
-                       name = _get_wifi_ident();
-               if (!name)
-#endif
                name = index2ident(index, "");
-#if defined TIZEN_EXT
-               if (type == CONNMAN_DEVICE_TYPE_WIFI)
-                       addr = _get_wifi_addr();
-               if (!addr)
-#endif
                addr = index2addr(index);
                break;
        case CONNMAN_DEVICE_TYPE_BLUETOOTH:
@@ -2013,10 +2010,6 @@ struct connman_device *connman_device_create_from_index(int index)
                ident = index2ident(index, NULL);
                break;
        case CONNMAN_DEVICE_TYPE_WIFI:
-#if defined TIZEN_EXT
-               ident = _get_wifi_ident();
-               if (!ident)
-#endif
                ident = index2ident(index, NULL);
                break;
        case CONNMAN_DEVICE_TYPE_BLUETOOTH: