if (wdev->disabled)
return;
+ if (wdev->retry_setup_failed)
+ return;
+
+ if (!wdev->autostart)
+ return;
+
if (wdev->state != IFS_DOWN || config_init)
return;
switch(state) {
case IFC_NORMAL:
case IFC_RELOAD:
+ __wireless_device_set_up(wdev);
+
wdev->config_state = IFC_NORMAL;
- if (wdev->autostart)
- __wireless_device_set_up(wdev);
break;
case IFC_REMOVE:
wireless_device_free(wdev);
return;
if (--wdev->retry < 0)
- wdev->autostart = false;
+ wdev->retry_setup_failed = true;
__wireless_device_set_down(wdev);
}
void
wireless_device_set_down(struct wireless_device *wdev)
{
+ wdev->retry_setup_failed = false;
wdev->autostart = false;
__wireless_device_set_down(wdev);
}
free(wdev->config);
wdev->config = blob_memdup(new_config);
wdev->disabled = disabled;
+ wdev->retry_setup_failed = false;
wdev_set_config_state(wdev, IFC_RELOAD);
}
wdev->config_state = IFC_NORMAL;
wdev->name = strcpy(name_buf, name);
wdev->config = data;
+ wdev->retry_setup_failed = false;
wdev->config_autostart = true;
wdev->autostart = wdev->config_autostart;
INIT_LIST_HEAD(&wdev->script_proc);
struct wireless_device *wdev;
vlist_for_each_element(&wireless_devices, wdev, node)
- if (wdev->autostart)
- __wireless_device_set_up(wdev);
+ __wireless_device_set_up(wdev);
}