If reload triggers while the wdev is up, and reconf is set to 1, run the
setup handler immediately, otherwise the change will not be applied.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (wdev->config_state != IFC_NORMAL)
return;
+ if (s == IFC_RELOAD && wdev->reconf && wdev->state == IFS_UP) {
+ wireless_device_reconf(wdev);
+ return;
+ }
+
wdev->config_state = s;
if (wdev->state == IFS_DOWN)
wdev_handle_config_change(wdev);
- else if (!wdev->reconf || wdev->state != IFS_UP)
+ else
__wireless_device_set_down(wdev);
}