summaryrefslogtreecommitdiff
path: root/net/dsa/dsa_priv.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-06-04 21:17:03 +0200
committerDavid S. Miller <davem@davemloft.net>2016-06-04 14:29:54 -0700
commit39a7f2a4eb496c0c68cc93fcb403190b48605168 (patch)
tree4c9edb3b66b95a2a6215e2844c131ac618424b8b /net/dsa/dsa_priv.h
parent5377b802fc9fde9442dcaba571edefcb73765056 (diff)
net: dsa: Refactor selection of tag ops into a function
Replace the two switch statements with an array lookup, and store the result in the dsa tree structure. The drivers no longer need to know the selected tag protocol, so remove it from the dsa switch structure. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa_priv.h')
-rw-r--r--net/dsa/dsa_priv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index dbea5d9e7f75..72f7b8989cfb 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -53,6 +53,7 @@ extern char dsa_driver_version[];
int dsa_cpu_dsa_setup(struct dsa_switch *ds, struct device *dev,
struct device_node *port_dn, int port);
void dsa_cpu_dsa_destroy(struct device_node *port_dn);
+const struct dsa_device_ops *dsa_resolve_tag_protocol(int tag_protocol);
/* slave.c */
extern const struct dsa_device_ops notag_netdev_ops;