aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-08-22 10:01:01 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-23 00:08:08 -0400
commit7b314362a2344feaafbdf6aa8f3d57077728e37a (patch)
tree348a762b9bcfb4bb4adc2d0648dcd44e3d04865c /include/net
parent1ae292a2457cd692828da2be87cb967260993ad0 (diff)
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 'include/net')
-rw-r--r--include/net/dsa.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index d00c392bc9f8..8ca2684c5358 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -239,14 +239,15 @@ struct switchdev_obj_port_vlan;
239struct dsa_switch_driver { 239struct dsa_switch_driver {
240 struct list_head list; 240 struct list_head list;
241 241
242 enum dsa_tag_protocol tag_protocol;
243
244 /* 242 /*
245 * Probing and setup. 243 * Probing and setup.
246 */ 244 */
247 const char *(*probe)(struct device *dsa_dev, 245 const char *(*probe)(struct device *dsa_dev,
248 struct device *host_dev, int sw_addr, 246 struct device *host_dev, int sw_addr,
249 void **priv); 247 void **priv);
248
249 enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds);
250
250 int (*setup)(struct dsa_switch *ds); 251 int (*setup)(struct dsa_switch *ds);
251 int (*set_addr)(struct dsa_switch *ds, u8 *addr); 252 int (*set_addr)(struct dsa_switch *ds, u8 *addr);
252 u32 (*get_phy_flags)(struct dsa_switch *ds, int port); 253 u32 (*get_phy_flags)(struct dsa_switch *ds, int port);