device: Remove caching of offlinemode in device structure
authorAlok Barsode <alok.barsode@linux.intel.com>
Wed, 24 Aug 2011 13:44:19 +0000 (16:44 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 25 Aug 2011 09:14:23 +0000 (11:14 +0200)
src/device.c

index 5932123..6ccd477 100644 (file)
@@ -43,7 +43,6 @@ struct connman_device {
        enum connman_device_type type;
        enum connman_pending_type powered_pending;      /* Indicates a pending
                                                        enable/disable request */
-       connman_bool_t offlinemode;
        connman_bool_t powered;
        connman_bool_t powered_persistent;
        connman_bool_t scanning;
@@ -672,9 +671,6 @@ int connman_device_set_powered(struct connman_device *device,
        device->pending_timeout = 0;
        device->powered_pending = PENDING_NONE;
 
-       if (device->offlinemode == TRUE && powered == TRUE)
-               return __connman_device_disable(device);
-
        device->powered = powered;
 
        type = __connman_device_get_service_type(device);
@@ -1140,8 +1136,6 @@ int connman_device_register(struct connman_device *device)
 {
        __connman_storage_load_device(device);
 
-       device->offlinemode = __connman_profile_get_offlinemode();
-
        return device_probe(device);
 }