wdev_handle_config_change(wdev);
}
-static void
-wireless_device_mark_up(struct wireless_device *wdev)
-{
- struct wireless_interface *vif;
-
- D(WIRELESS, "Wireless device '%s' is now up\n", wdev->name);
- wdev->state = IFS_UP;
- vlist_for_each_element(&wdev->interfaces, vif, node)
- wireless_interface_handle_link(vif, true);
-}
-
static void
wireless_device_setup_timeout(struct uloop_timeout *timeout)
{
wireless_device_run_handler(wdev, false);
}
+static void
+wireless_device_mark_up(struct wireless_device *wdev)
+{
+ struct wireless_interface *vif;
+
+ if (wdev->cancel) {
+ wdev->cancel = false;
+ __wireless_device_set_down(wdev);
+ return;
+ }
+
+ D(WIRELESS, "Wireless device '%s' is now up\n", wdev->name);
+ wdev->state = IFS_UP;
+ vlist_for_each_element(&wdev->interfaces, vif, node)
+ wireless_interface_handle_link(vif, true);
+}
+
static void
wireless_device_retry_setup(struct wireless_device *wdev)
{
if (wdev->state != IFS_SETUP)
return UBUS_STATUS_PERMISSION_DENIED;
- if (wdev->cancel)
- return 0;
-
wireless_device_mark_up(wdev);
break;
case NOTIFY_CMD_SET_DATA: