提交 ae439286 编写于 作者: A Andrew Lunn 提交者: David S. Miller

net: dsa: Error out on tagging protocol mismatches

If there is a mismatch between enabled tagging protocols and the
protocol the switch supports, error out, rather than continue with a
situation which is unlikely to work.
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
cc: alexander.h.duyck@intel.com
Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f89b7755
......@@ -174,8 +174,11 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
dst->rcv = brcm_netdev_ops.rcv;
break;
#endif
default:
case DSA_TAG_PROTO_NONE:
break;
default:
ret = -ENOPROTOOPT;
goto out;
}
dst->tag_protocol = drv->tag_protocol;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册