aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_ether.h1
-rw-r--r--include/linux/netdevice.h11
-rw-r--r--include/net/dsa.h2
3 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index 2140aacb633..32b9dcda68c 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -101,6 +101,7 @@
101#define ETH_P_ECONET 0x0018 /* Acorn Econet */ 101#define ETH_P_ECONET 0x0018 /* Acorn Econet */
102#define ETH_P_HDLC 0x0019 /* HDLC frames */ 102#define ETH_P_HDLC 0x0019 /* HDLC frames */
103#define ETH_P_ARCNET 0x001A /* 1A for ArcNet :-) */ 103#define ETH_P_ARCNET 0x001A /* 1A for ArcNet :-) */
104#define ETH_P_DSA 0x001B /* Distributed Switch Arch. */
104#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ 105#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */
105 106
106/* 107/*
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 794eeb4b346..97f0c64c152 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -42,6 +42,7 @@
42#include <linux/workqueue.h> 42#include <linux/workqueue.h>
43 43
44#include <net/net_namespace.h> 44#include <net/net_namespace.h>
45#include <net/dsa.h>
45 46
46struct vlan_group; 47struct vlan_group;
47struct ethtool_ops; 48struct ethtool_ops;
@@ -801,6 +802,16 @@ void dev_net_set(struct net_device *dev, struct net *net)
801#endif 802#endif
802} 803}
803 804
805static inline bool netdev_uses_dsa_tags(struct net_device *dev)
806{
807#ifdef CONFIG_NET_DSA_TAG_DSA
808 if (dev->dsa_ptr != NULL)
809 return dsa_uses_dsa_tags(dev->dsa_ptr);
810#endif
811
812 return 0;
813}
814
804/** 815/**
805 * netdev_priv - access network device private data 816 * netdev_priv - access network device private data
806 * @dev: network device 817 * @dev: network device
diff --git a/include/net/dsa.h b/include/net/dsa.h
index dc4784f5452..72e509b6a12 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -30,5 +30,7 @@ struct dsa_platform_data {
30 char *port_names[DSA_MAX_PORTS]; 30 char *port_names[DSA_MAX_PORTS];
31}; 31};
32 32
33extern bool dsa_uses_dsa_tags(void *dsa_ptr);
34
33 35
34#endif 36#endif