{
blob_buf_init(&b, 0);
uci_to_blob(&b, s, wdev->drv->interface.config);
- wireless_interface_create(wdev, b.head);
+ wireless_interface_create(wdev, b.head, s->e.name);
}
static void
vif_old->config = blob_memdup(vif_new->config);
wireless_interface_init_config(vif_old);
free(vif_new);
+ vif_old->section = vif_new->section;
} else if (vif_new) {
D(WIRELESS, "Create new wireless interface %s on device %s\n", vif_new->name, wdev->name);
vif_new->config = blob_memdup(vif_new->config);
wdev->script_check.cb = wireless_device_check_script_tasks;
}
-void wireless_interface_create(struct wireless_device *wdev, struct blob_attr *data)
+void wireless_interface_create(struct wireless_device *wdev, struct blob_attr *data, const char *section)
{
struct wireless_interface *vif;
struct blob_attr *tb[__VIF_ATTR_MAX];
vif->name = strcpy(name_buf, name);
vif->wdev = wdev;
vif->config = data;
+ vif->section = section;
vlist_add(&wdev->interfaces, &vif->node, vif->name);
}
void *i;
i = blobmsg_open_table(b, iface->name);
+ if (iface->section)
+ blobmsg_add_string(b, "section", iface->section);
if (iface->ifname)
blobmsg_add_string(b, "ifname", iface->ifname);
if (iface->data)
struct wireless_interface {
struct vlist_node node;
+ const char *section;
char *name;
struct wireless_device *wdev;
void wireless_device_set_up(struct wireless_device *wdev);
void wireless_device_set_down(struct wireless_device *wdev);
void wireless_device_status(struct wireless_device *wdev, struct blob_buf *b);
-void wireless_interface_create(struct wireless_device *wdev, struct blob_attr *data);
+void wireless_interface_create(struct wireless_device *wdev, struct blob_attr *data, const char *section);
int wireless_device_notify(struct wireless_device *wdev, struct blob_attr *data,
struct ubus_request_data *req);