Commit 96b0937c authored by Jonas Höglund's avatar Jonas Höglund

Remove unneeded ucmode.

parent ec5a7a7d
......@@ -1401,10 +1401,9 @@ int system_vlandev_add(struct device *vlandev, struct device *dev, struct vlande
snprintf(cmd, 256,
"/sbin/vlanconf create --name %s --ifname %s --type %s \
--vlan-id %d --priority %d --inner-vlan-id %d --inner-priority %d --dscp %d \
--unicast-mode %s --multicast-mode %s",
--multicast-mode %s",
vlandev->ifname, dev->ifname, proto,
cfg->vid, cfg->priority, cfg->inner_vid, cfg->inner_priority, cfg->dscp,
(cfg->ucmode == UNICAST_MODE_TRANS) ? "trans":"reg",
(cfg->mcmode == MULTICAST_MODE_ONT) ? "ont":"rg");
return system(cmd);
}
......
......@@ -162,13 +162,10 @@ enum vlan_proto {
enum iface_mode {
MULTICAST_MODE_RG,
MULTICAST_MODE_ONT,
UNICAST_MODE_TRANS,
UNICAST_MODE_REG,
};
struct vlandev_config {
enum vlan_proto proto;
enum iface_mode ucmode;
enum iface_mode mcmode;
uint16_t vid;
uint16_t priority;
......
......@@ -27,7 +27,6 @@ enum {
VLANDEV_ATTR_INNER_VID,
VLANDEV_ATTR_INNER_PRIORITY,
VLANDEV_ATTR_DSCP,
VLANDEV_ATTR_UCMODE,
VLANDEV_ATTR_MCMODE,
__VLANDEV_ATTR_MAX
};
......@@ -39,7 +38,6 @@ static const struct blobmsg_policy vlandev_attrs[__VLANDEV_ATTR_MAX] = {
[VLANDEV_ATTR_INNER_VID] = { "inner_vid", BLOBMSG_TYPE_INT32 },
[VLANDEV_ATTR_INNER_PRIORITY] = { "inner_priority", BLOBMSG_TYPE_INT32 },
[VLANDEV_ATTR_DSCP] = { "dscp", BLOBMSG_TYPE_INT32 },
[VLANDEV_ATTR_UCMODE] = { "ucmode", BLOBMSG_TYPE_STRING },
[VLANDEV_ATTR_MCMODE] = { "mcmode", BLOBMSG_TYPE_STRING },
};
......@@ -54,8 +52,6 @@ static const struct uci_blob_param_list vlandev_attr_list = {
static struct device_type vlan8021q_device_type;
static struct device_type vlanuntagged_device_type;
const char ucmode_trans[] = "trans";
const char ucmode_reg[] = "reg";
const char mcmode_rg[] = "rg";
const char mcmode_ont[] = "ont";
......@@ -190,15 +186,6 @@ vlandev_apply_settings(struct vlandev_device *mvdev, struct blob_attr **tb)
if ((cur = tb[VLANDEV_ATTR_DSCP]))
cfg->dscp = (uint16_t) blobmsg_get_u32(cur);
if ((cur = tb[VLANDEV_ATTR_UCMODE])) {
mode = blobmsg_get_string(tb[VLANDEV_ATTR_UCMODE]);
if (strncmp(mode, ucmode_trans, strlen(ucmode_trans)) == 0)
cfg->ucmode = UNICAST_MODE_TRANS;
else if (strncmp(mode, ucmode_reg, strlen(ucmode_reg)) == 0)
cfg->ucmode = UNICAST_MODE_REG;
}
if ((cur = tb[VLANDEV_ATTR_MCMODE])) {
mode = blobmsg_get_string(tb[VLANDEV_ATTR_MCMODE]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment