summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-08-27 23:07:18 -0700
committerDavid S. Miller <davem@davemloft.net>2014-08-27 23:07:18 -0700
commit0ce4866f1e4697d45011bd1a01f33036660abffc (patch)
tree899ead67da7a4a5c5d5eecf7940802e15c7b4a96 /include/linux/netdevice.h
parentabc4da4503bf6cb1864454b464c52959241239bd (diff)
parent879bd83d5916ea0cff444c4b0655a997c40692b7 (diff)
Merge branch 'sf2'
Florian Fainelli says: ==================== dsa: Broadcom Starfighter 2 switch support This patch series adds support for the Broadcom Starfighter 2 (Roboswitch successor) using the existing DSA infrastructure. This integrated switch is heavily used in Set Top Box, Cable gateways and DSL gateways products from Broadcom, and to a larger extent the new ARM-based Wi-Fi routers although slightly differently. Changes in v5 are the introduction of ETH_P_XDSA as suggested by Alexander to help capture applications see this is a multiplexed DSA approach now. Changes in v4 are the introducing of an indirection level for DSA switch tag protocols receive and transmit functions. I intentionnaly did not address one comment from Alexander who suggested to move port_names and port_dn in a separate structure since that involves touching arch/arm/ and arch/blackfin/ code which I am not yet comfortable doing. Notable changes in v3 is the preliminary patch that reworks the skb->protocol override helpers for non-Ethertype switch tags, based on feedback from Alexander Duyck. The biggest changes from v1 of this patch series are: - use the new fixed PHY helpers - improved the switch driver with more complete features (interrupts, (RG)MII configuration, memory arrays power down/up, port disabling/enable VLAN separation Future work will focus on bringing the upstream driver in feature parity with the current downstream driver, including: - adding Wake-on-LAN support to the switch - adding suspend/resume callbacks for S2/S3 Power Management modes - extending the switch register interface to cover BCM5310X SoCs ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 039b23786c2..429801370d0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1781,24 +1781,13 @@ void dev_net_set(struct net_device *dev, struct net *net)
#endif
}
-static inline bool netdev_uses_dsa_tags(struct net_device *dev)
+static inline bool netdev_uses_dsa(struct net_device *dev)
{
-#ifdef CONFIG_NET_DSA_TAG_DSA
+#ifdef CONFIG_NET_DSA
if (dev->dsa_ptr != NULL)
- return dsa_uses_dsa_tags(dev->dsa_ptr);
+ return dsa_uses_tagged_protocol(dev->dsa_ptr);
#endif
-
- return 0;
-}
-
-static inline bool netdev_uses_trailer_tags(struct net_device *dev)
-{
-#ifdef CONFIG_NET_DSA_TAG_TRAILER
- if (dev->dsa_ptr != NULL)
- return dsa_uses_trailer_tags(dev->dsa_ptr);
-#endif
-
- return 0;
+ return false;
}
/**
@@ -1933,6 +1922,13 @@ struct udp_offload {
struct offload_callbacks callbacks;
};
+struct dsa_device_ops {
+ netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev);
+ int (*rcv)(struct sk_buff *skb, struct net_device *dev,
+ struct packet_type *pt, struct net_device *orig_dev);
+};
+
+
/* often modified stats are per cpu, other are shared (netdev->stats) */
struct pcpu_sw_netstats {
u64 rx_packets;