aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-02-15 11:59:18 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-17 17:16:35 -0500
commite83d360d9a7e5d71d55c13e96b19109a2ea23bf0 (patch)
tree04e4971ad73ade44eb86671851d568e494abe6e4 /include/linux/netdevice.h
parentda8ac86c4a56a14bf8deea7d2f92d0a453c67f91 (diff)
net: introduce NETIF_F_RXCSUM
Introduce NETIF_F_RXCSUM to replace device-private flags for RX checksum offload. Integrate it with ndo_fix_features. ethtool_op_get_rx_csum() is removed altogether as nothing in-tree uses it. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 85f67e225f60..ffe56c16df8a 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -977,6 +977,7 @@ struct net_device {
977#define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/ 977#define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/
978#define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ 978#define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */
979#define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ 979#define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */
980#define NETIF_F_RXCSUM (1 << 29) /* Receive checksumming offload */
980 981
981 /* Segmentation offload features */ 982 /* Segmentation offload features */
982#define NETIF_F_GSO_SHIFT 16 983#define NETIF_F_GSO_SHIFT 16
@@ -992,7 +993,7 @@ struct net_device {
992 /* = all defined minus driver/device-class-related */ 993 /* = all defined minus driver/device-class-related */
993#define NETIF_F_NEVER_CHANGE (NETIF_F_HIGHDMA | NETIF_F_VLAN_CHALLENGED | \ 994#define NETIF_F_NEVER_CHANGE (NETIF_F_HIGHDMA | NETIF_F_VLAN_CHALLENGED | \
994 NETIF_F_LLTX | NETIF_F_NETNS_LOCAL) 995 NETIF_F_LLTX | NETIF_F_NETNS_LOCAL)
995#define NETIF_F_ETHTOOL_BITS (0x1f3fffff & ~NETIF_F_NEVER_CHANGE) 996#define NETIF_F_ETHTOOL_BITS (0x3f3fffff & ~NETIF_F_NEVER_CHANGE)
996 997
997 /* List of features with software fallbacks. */ 998 /* List of features with software fallbacks. */
998#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | \ 999#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | \
@@ -2510,6 +2511,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev,
2510 2511
2511static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) 2512static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev)
2512{ 2513{
2514 if (dev->hw_features & NETIF_F_RXCSUM)
2515 return !!(dev->features & NETIF_F_RXCSUM);
2513 if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) 2516 if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum)
2514 return 0; 2517 return 0;
2515 return dev->ethtool_ops->get_rx_csum(dev); 2518 return dev->ethtool_ops->get_rx_csum(dev);