summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2014-10-29 03:03:47 (GMT)
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-10-29 03:03:47 (GMT)
commitbcae74da8fa2958b3fec9153fc33e41f0e0317bf (patch)
tree06a00f6457307467fee4f6580dce4a1a857751c1 /src/device.c
parent1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7 (diff)
downloadconnman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.zip
connman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.tar.gz
connman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.tar.bz2
Imported Upstream version 1.26upstream/1.26
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index a97d790..c0683ab 100644
--- a/src/device.c
+++ b/src/device.c
@@ -185,6 +185,12 @@ int __connman_device_enable(struct connman_device *device)
if (device->powered_pending == PENDING_NONE && device->powered)
return -EALREADY;
+ if (device->index > 0) {
+ err = connman_inet_ifup(device->index);
+ if (err < 0 && err != -EALREADY)
+ return err;
+ }
+
device->powered_pending = PENDING_ENABLE;
err = device->driver->enable(device);