summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-08-03 14:28:46 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-03 15:32:14 (GMT)
commit55777f34e6e927406efdeff2e717d5d94796a2be (patch)
treef19b75fd5f751f054292f9ad2d50b6889ab80af5
parent15c81eff4ae3862dce1b14de4d666ecde2359b7b (diff)
downloadconnman-55777f34e6e927406efdeff2e717d5d94796a2be.zip
connman-55777f34e6e927406efdeff2e717d5d94796a2be.tar.gz
connman-55777f34e6e927406efdeff2e717d5d94796a2be.tar.bz2
Do not try to enable a device if it's rfkill blocked
-rw-r--r--src/device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index e3d4d04..87e3533 100644
--- a/src/device.c
+++ b/src/device.c
@@ -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)