Do not try to enable a device if it's rfkill blocked
authorSamuel Ortiz <sameo@linux.intel.com>
Tue, 3 Aug 2010 14:28:46 +0000 (16:28 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 3 Aug 2010 15:32:14 +0000 (17:32 +0200)
src/device.c

index e3d4d04..87e3533 100644 (file)
@@ -206,6 +206,9 @@ int __connman_device_enable(struct connman_device *device)
        if (device->powered_pending == TRUE)
                return -EALREADY;
 
+       if (device->blocked == TRUE)
+               return -ENOLINK;
+
        err = device->driver->enable(device);
        if (err < 0) {
                if (err == -EINPROGRESS)