Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae439286 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

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: default avatarAndrew Lunn <andrew@lunn.ch>
cc: alexander.h.duyck@intel.com
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f89b7755
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;