When devices are brought up and down externally (e.g. with ifconfig),
connman_device_set_powered() needs to enable or disable them. If it doesnt,
the device associated networks are kept alive and we're still showing them
while the device is actually down.
if (device->powered == powered)
return -EALREADY;
+ if (powered == TRUE)
+ __connman_device_enable(device);
+ else
+ __connman_device_disable(device);
+
device->powered = powered;
device->powered_pending = powered;