+static void
+wdev_check_network_enabled(struct wireless_device *wdev)
+{
+ struct wireless_interface *vif;
+ struct interface *iface;
+ struct blob_attr *cur;
+ int rem;
+
+ vlist_for_each_element(&wdev->interfaces, vif, node) {
+ int enabled = -1;
+
+ blobmsg_for_each_attr(cur, vif->network, rem) {
+ iface = vlist_find(&interfaces, blobmsg_get_string(cur), iface, node);
+ if (!iface)
+ continue;
+
+ if (iface->autostart) {
+ enabled = 1;
+ break;
+ }
+ if (enabled != 1)
+ enabled = 0;
+ }
+
+ if (vif->disabled == !enabled)
+ continue;
+
+ vif->disabled = !enabled;
+ wdev->config_update = true;
+ }
+}
+
+static void
+__wireless_start_pending(struct uloop_timeout *t)