This can be used to retry bringing up a wireless device after receiving a
hotplug event
Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct blob_attr *val;
blobmsg_parse(&retry_policy, 1, &val, blobmsg_data(data), blobmsg_data_len(data));
- if (!val)
- return UBUS_STATUS_INVALID_ARGUMENT;
-
- wdev->retry = blobmsg_get_u32(val);
+ if (val)
+ wdev->retry = blobmsg_get_u32(val);
+ else
+ wdev->retry = WIRELESS_SETUP_RETRY;
+ __wireless_device_set_up(wdev, 0);
netifd_log_message(L_NOTICE, "Wireless device '%s' set retry=%d\n", wdev->name, wdev->retry);
return 0;
}