summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/b53
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-08-22 17:01:01 +0300
committerDavid S. Miller <davem@davemloft.net>2016-08-23 07:08:08 +0300
commit7b314362a2344feaafbdf6aa8f3d57077728e37a (patch)
tree348a762b9bcfb4bb4adc2d0648dcd44e3d04865c /drivers/net/dsa/b53
parent1ae292a2457cd692828da2be87cb967260993ad0 (diff)
downloadlinux-7b314362a2344feaafbdf6aa8f3d57077728e37a.tar.xz
net: dsa: Allow the DSA driver to indicate the tag protocol
DSA drivers may drive different families of switches which need different tag protocol. Rather than hard code the tag protocol in the driver structure, have a callback for the DSA core to call. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/b53')
-rw-r--r--drivers/net/dsa/b53/b53_common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 38ee10de7884..65ecb51f99e5 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1373,8 +1373,13 @@ static void b53_br_set_stp_state(struct dsa_switch *ds, int port,
b53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(port), reg);
}
+static enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds)
+{
+ return DSA_TAG_PROTO_NONE;
+}
+
static struct dsa_switch_driver b53_switch_ops = {
- .tag_protocol = DSA_TAG_PROTO_NONE,
+ .get_tag_protocol = b53_get_tag_protocol,
.setup = b53_setup,
.set_addr = b53_set_addr,
.get_strings = b53_get_strings,