if (dev->type != &bridge_device_type)
return;
+ if (dev->hotplug_ops && dev->hotplug_ops->prepare)
+ dev->hotplug_ops->prepare(dev);
+
blobmsg_add_string(buf, "bridge", dev->ifname);
}
static void
wireless_device_retry_setup(struct wireless_device *wdev)
{
+ if (wdev->state == IFS_TEARDOWN || wdev->state == IFS_DOWN || wdev->cancel)
+ return;
+
if (--wdev->retry < 0)
wdev->autostart = false;
{
void *i;
- i = blobmsg_open_table(b, iface->name);
+ i = blobmsg_open_table(b, NULL);
if (iface->section)
blobmsg_add_string(b, "section", iface->section);
if (iface->ifname)
blobmsg_add_u8(b, "up", wdev->state == IFS_UP);
blobmsg_add_u8(b, "pending", wdev->state == IFS_SETUP || wdev->state == IFS_TEARDOWN);
blobmsg_add_u8(b, "autostart", wdev->autostart);
- i = blobmsg_open_table(b, "interfaces");
+ i = blobmsg_open_array(b, "interfaces");
vlist_for_each_element(&wdev->interfaces, iface, node)
wireless_interface_status(iface, b);
- blobmsg_close_table(b, i);
+ blobmsg_close_array(b, i);
blobmsg_close_table(b, c);
}