summaryrefslogtreecommitdiffstats
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-09-12 06:18:09 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-13 23:04:35 +0200
commitac7a04c33dd7f8e429df4b929ba3a3e8e729cc89 (patch)
tree5b1e76c258c08ef39fdcf5e469a05e0322ffb228 /net/dsa/slave.c
parentr8152: support VLAN (diff)
downloadlinux-ac7a04c33dd7f8e429df4b929ba3a3e8e729cc89.tar.xz
linux-ac7a04c33dd7f8e429df4b929ba3a3e8e729cc89.zip
net: dsa: change tag_protocol to an enum
Now that we introduced an additional multiplexing/demultiplexing layer with commit 3e8a72d1dae37 ("net: dsa: reduce number of protocol hooks") that lives within the DSA code, we no longer need to have a given switch driver tag_protocol be an actual ethertype value, instead, we can replace it with an enum: dsa_tag_protocol. Do this replacement in the drivers, which allows us to get rid of the cpu_to_be16()/htons() dance, and remove ETH_P_BRCMTAG since we do not need it anymore. Suggested-by: Alexander Duyck <alexander.duyck@gmail.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r--net/dsa/slave.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 7333a4aebb7d..809eeb13eb12 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -437,22 +437,22 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent,
switch (ds->dst->tag_protocol) {
#ifdef CONFIG_NET_DSA_TAG_DSA
- case htons(ETH_P_DSA):
+ case DSA_TAG_PROTO_DSA:
ds->dst->ops = &dsa_netdev_ops;
break;
#endif
#ifdef CONFIG_NET_DSA_TAG_EDSA
- case htons(ETH_P_EDSA):
+ case DSA_TAG_PROTO_EDSA:
ds->dst->ops = &edsa_netdev_ops;
break;
#endif
#ifdef CONFIG_NET_DSA_TAG_TRAILER
- case htons(ETH_P_TRAILER):
+ case DSA_TAG_PROTO_TRAILER:
ds->dst->ops = &trailer_netdev_ops;
break;
#endif
#ifdef CONFIG_NET_DSA_TAG_BRCM
- case htons(ETH_P_BRCMTAG):
+ case DSA_TAG_PROTO_BRCM:
ds->dst->ops = &brcm_netdev_ops;
break;
#endif