Commit eb7b7211 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: dsa: Sort DSA tagging protocol drivers

With more tag protocols being added, regain some order by sorting the
entries in various places.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d9a5997
...@@ -27,13 +27,13 @@ struct fixed_phy_status; ...@@ -27,13 +27,13 @@ struct fixed_phy_status;
enum dsa_tag_protocol { enum dsa_tag_protocol {
DSA_TAG_PROTO_NONE = 0, DSA_TAG_PROTO_NONE = 0,
DSA_TAG_PROTO_BRCM,
DSA_TAG_PROTO_DSA, DSA_TAG_PROTO_DSA,
DSA_TAG_PROTO_TRAILER,
DSA_TAG_PROTO_EDSA, DSA_TAG_PROTO_EDSA,
DSA_TAG_PROTO_BRCM,
DSA_TAG_PROTO_QCA,
DSA_TAG_PROTO_MTK,
DSA_TAG_PROTO_LAN9303, DSA_TAG_PROTO_LAN9303,
DSA_TAG_PROTO_MTK,
DSA_TAG_PROTO_QCA,
DSA_TAG_PROTO_TRAILER,
DSA_TAG_LAST, /* MUST BE LAST */ DSA_TAG_LAST, /* MUST BE LAST */
}; };
......
...@@ -25,16 +25,16 @@ config NET_DSA_TAG_DSA ...@@ -25,16 +25,16 @@ config NET_DSA_TAG_DSA
config NET_DSA_TAG_EDSA config NET_DSA_TAG_EDSA
bool bool
config NET_DSA_TAG_TRAILER config NET_DSA_TAG_LAN9303
bool bool
config NET_DSA_TAG_QCA config NET_DSA_TAG_MTK
bool bool
config NET_DSA_TAG_MTK config NET_DSA_TAG_TRAILER
bool bool
config NET_DSA_TAG_LAN9303 config NET_DSA_TAG_QCA
bool bool
endif endif
...@@ -6,7 +6,7 @@ dsa_core-y += dsa.o slave.o dsa2.o switch.o legacy.o ...@@ -6,7 +6,7 @@ dsa_core-y += dsa.o slave.o dsa2.o switch.o legacy.o
dsa_core-$(CONFIG_NET_DSA_TAG_BRCM) += tag_brcm.o dsa_core-$(CONFIG_NET_DSA_TAG_BRCM) += tag_brcm.o
dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o
dsa_core-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o 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_QCA) += tag_qca.o
dsa_core-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o
dsa_core-$(CONFIG_NET_DSA_TAG_LAN9303) += tag_lan9303.o dsa_core-$(CONFIG_NET_DSA_TAG_LAN9303) += tag_lan9303.o
dsa_core-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o
dsa_core-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o
dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
...@@ -40,26 +40,26 @@ static const struct dsa_device_ops none_ops = { ...@@ -40,26 +40,26 @@ static const struct dsa_device_ops none_ops = {
}; };
const struct dsa_device_ops *dsa_device_ops[DSA_TAG_LAST] = { const struct dsa_device_ops *dsa_device_ops[DSA_TAG_LAST] = {
#ifdef CONFIG_NET_DSA_TAG_BRCM
[DSA_TAG_PROTO_BRCM] = &brcm_netdev_ops,
#endif
#ifdef CONFIG_NET_DSA_TAG_DSA #ifdef CONFIG_NET_DSA_TAG_DSA
[DSA_TAG_PROTO_DSA] = &dsa_netdev_ops, [DSA_TAG_PROTO_DSA] = &dsa_netdev_ops,
#endif #endif
#ifdef CONFIG_NET_DSA_TAG_EDSA #ifdef CONFIG_NET_DSA_TAG_EDSA
[DSA_TAG_PROTO_EDSA] = &edsa_netdev_ops, [DSA_TAG_PROTO_EDSA] = &edsa_netdev_ops,
#endif #endif
#ifdef CONFIG_NET_DSA_TAG_TRAILER #ifdef CONFIG_NET_DSA_TAG_LAN9303
[DSA_TAG_PROTO_TRAILER] = &trailer_netdev_ops, [DSA_TAG_PROTO_LAN9303] = &lan9303_netdev_ops,
#endif #endif
#ifdef CONFIG_NET_DSA_TAG_BRCM #ifdef CONFIG_NET_DSA_TAG_MTK
[DSA_TAG_PROTO_BRCM] = &brcm_netdev_ops, [DSA_TAG_PROTO_MTK] = &mtk_netdev_ops,
#endif #endif
#ifdef CONFIG_NET_DSA_TAG_QCA #ifdef CONFIG_NET_DSA_TAG_QCA
[DSA_TAG_PROTO_QCA] = &qca_netdev_ops, [DSA_TAG_PROTO_QCA] = &qca_netdev_ops,
#endif #endif
#ifdef CONFIG_NET_DSA_TAG_MTK #ifdef CONFIG_NET_DSA_TAG_TRAILER
[DSA_TAG_PROTO_MTK] = &mtk_netdev_ops, [DSA_TAG_PROTO_TRAILER] = &trailer_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,
}; };
......
...@@ -75,25 +75,25 @@ void dsa_slave_unregister_notifier(void); ...@@ -75,25 +75,25 @@ void dsa_slave_unregister_notifier(void);
int dsa_switch_register_notifier(struct dsa_switch *ds); int dsa_switch_register_notifier(struct dsa_switch *ds);
void dsa_switch_unregister_notifier(struct dsa_switch *ds); void dsa_switch_unregister_notifier(struct dsa_switch *ds);
/* tag_brcm.c */
extern const struct dsa_device_ops brcm_netdev_ops;
/* tag_dsa.c */ /* tag_dsa.c */
extern const struct dsa_device_ops dsa_netdev_ops; extern const struct dsa_device_ops dsa_netdev_ops;
/* tag_edsa.c */ /* tag_edsa.c */
extern const struct dsa_device_ops edsa_netdev_ops; extern const struct dsa_device_ops edsa_netdev_ops;
/* tag_trailer.c */ /* tag_lan9303.c */
extern const struct dsa_device_ops trailer_netdev_ops; extern const struct dsa_device_ops lan9303_netdev_ops;
/* tag_brcm.c */ /* tag_mtk.c */
extern const struct dsa_device_ops brcm_netdev_ops; extern const struct dsa_device_ops mtk_netdev_ops;
/* tag_qca.c */ /* tag_qca.c */
extern const struct dsa_device_ops qca_netdev_ops; extern const struct dsa_device_ops qca_netdev_ops;
/* tag_mtk.c */ /* tag_trailer.c */
extern const struct dsa_device_ops mtk_netdev_ops; extern const struct dsa_device_ops trailer_netdev_ops;
/* tag_lan9303.c */
extern const struct dsa_device_ops lan9303_netdev_ops;
#endif #endif
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