diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-11-30 16:49:04 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-11-30 16:49:04 +0100 |
commit | e6cbe75a9a7cb424ca256c2769f3c7bb59332813 (patch) | |
tree | de9df7e1539d94afba9a2284fa3c356321060d97 /wireless.c | |
parent | 19112eb78a7878767d4ab3190f676ce3c1757614 (diff) |
wireless: show the virtual interface section name in wireless status
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'wireless.c')
-rw-r--r-- | wireless.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -505,6 +505,7 @@ vif_update(struct vlist_tree *tree, struct vlist_node *node_new, 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); @@ -604,7 +605,7 @@ wireless_device_create(struct wireless_driver *drv, const char *name, struct blo 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]; @@ -624,6 +625,7 @@ void wireless_interface_create(struct wireless_device *wdev, struct blob_attr *d vif->name = strcpy(name_buf, name); vif->wdev = wdev; vif->config = data; + vif->section = section; vlist_add(&wdev->interfaces, &vif->node, vif->name); } @@ -633,6 +635,8 @@ wireless_interface_status(struct wireless_interface *iface, struct blob_buf *b) 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) |