device: remove DEV_ATTR_IFNAME, it is unused
authorFelix Fietkau <nbd@openwrt.org>
Fri, 17 Apr 2015 19:24:29 +0000 (21:24 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 17 Apr 2015 19:26:39 +0000 (21:26 +0200)
Ensures that interfaces with only 'ifname' matching the device config
don't cause iface->device_config to be set

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
bridge.c
device.c
device.h

index c5e17a4..fd553dc 100644 (file)
--- a/bridge.c
+++ b/bridge.c
@@ -621,7 +621,7 @@ bridge_reload(struct device *dev, struct blob_attr *attr)
 
                diff = 0;
                uci_blob_diff(tb_dev, otb_dev, &device_attr_list, &diff);
-               if (diff & ~(1 << DEV_ATTR_IFNAME))
+               if (diff)
                    ret = DEV_CONFIG_RESTART;
 
                blobmsg_parse(bridge_attrs, __BRIDGE_ATTR_MAX, otb_br,
index 24c7fe3..092c2d9 100644 (file)
--- a/device.c
+++ b/device.c
@@ -32,7 +32,6 @@ static struct avl_tree devices;
 
 static const struct blobmsg_policy dev_attrs[__DEV_ATTR_MAX] = {
        [DEV_ATTR_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING },
-       [DEV_ATTR_IFNAME] = { .name = "ifname", .type = BLOBMSG_TYPE_ARRAY },
        [DEV_ATTR_MTU] = { .name = "mtu", .type = BLOBMSG_TYPE_INT32 },
        [DEV_ATTR_MACADDR] = { .name = "macaddr", .type = BLOBMSG_TYPE_STRING },
        [DEV_ATTR_TXQUEUELEN] = { .name = "txqueuelen", .type = BLOBMSG_TYPE_INT32 },
index 391b8c9..334a238 100644 (file)
--- a/device.h
+++ b/device.h
@@ -26,7 +26,6 @@ typedef int (*device_state_cb)(struct device *, bool up);
 
 enum {
        DEV_ATTR_TYPE,
-       DEV_ATTR_IFNAME,
        DEV_ATTR_MTU,
        DEV_ATTR_MACADDR,
        DEV_ATTR_TXQUEUELEN,