From a09053f777d93ca82510f262a69f5b57e6fc24b6 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Tue, 3 Aug 2010 16:28:46 +0200 Subject: [PATCH 4/5] Do not try to enable a device if it's rfkill blocked --- src/device.c | 3 +++ 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) -- 1.7.1