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

Commit e8fe177a authored by Juergen Beisert's avatar Juergen Beisert Committed by David S. Miller
Browse files

net: dsa: add support for the SMSC-LAN9303 tagging format



To define the outgoing port and to discover the incoming port a regular
VLAN tag is used by the LAN9303. But its VID meaning is 'special'.

This tag handler/filter depends on some hardware features which must be
enabled in the device to provide and make use of this special VLAN tag
to control the destination and the source of an ethernet packet.

Signed-off-by: default avatarJuergen Borleis <jbe@pengutronix.de>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8dc7d11f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@ enum dsa_tag_protocol {
	DSA_TAG_PROTO_BRCM,
	DSA_TAG_PROTO_BRCM,
	DSA_TAG_PROTO_QCA,
	DSA_TAG_PROTO_QCA,
	DSA_TAG_PROTO_MTK,
	DSA_TAG_PROTO_MTK,
	DSA_TAG_PROTO_LAN9303,
	DSA_TAG_LAST,		/* MUST BE LAST */
	DSA_TAG_LAST,		/* MUST BE LAST */
};
};


+4 −0
Original line number Original line Diff line number Diff line
@@ -33,4 +33,8 @@ config NET_DSA_TAG_QCA


config NET_DSA_TAG_MTK
config NET_DSA_TAG_MTK
	bool
	bool

config NET_DSA_TAG_LAN9303
	bool

endif
endif
+1 −0
Original line number Original line Diff line number Diff line
@@ -9,3 +9,4 @@ dsa_core-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
dsa_core-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o
dsa_core-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o
dsa_core-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o
dsa_core-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o
dsa_core-$(CONFIG_NET_DSA_TAG_LAN9303) += tag_lan9303.o
+3 −0
Original line number Original line Diff line number Diff line
@@ -57,6 +57,9 @@ const struct dsa_device_ops *dsa_device_ops[DSA_TAG_LAST] = {
#endif
#endif
#ifdef CONFIG_NET_DSA_TAG_MTK
#ifdef CONFIG_NET_DSA_TAG_MTK
	[DSA_TAG_PROTO_MTK] = &mtk_netdev_ops,
	[DSA_TAG_PROTO_MTK] = &mtk_netdev_ops,
#endif
#ifdef CONFIG_NET_DSA_TAG_LAN9303
	[DSA_TAG_PROTO_LAN9303] = &lan9303_netdev_ops,
#endif
#endif
	[DSA_TAG_PROTO_NONE] = &none_ops,
	[DSA_TAG_PROTO_NONE] = &none_ops,
};
};
+3 −0
Original line number Original line Diff line number Diff line
@@ -93,4 +93,7 @@ extern const struct dsa_device_ops qca_netdev_ops;
/* tag_mtk.c */
/* tag_mtk.c */
extern const struct dsa_device_ops mtk_netdev_ops;
extern const struct dsa_device_ops mtk_netdev_ops;


/* tag_lan9303.c */
extern const struct dsa_device_ops lan9303_netdev_ops;

#endif
#endif
Loading