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>
This commit is contained in:

committed by
David S. Miller

parent
1ae292a245
commit
7b314362a2
@@ -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,
|
||||
|
Reference in New Issue
Block a user