aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2012-02-11 10:39:30 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-02-24 04:37:35 -0500
commit3bdc0eba0b8b47797f4a76e377dd8360f317450f (patch)
treeda6bd907f599402bc8db0a2484997fd4d3e06f7b /include/linux/netdevice.h
parent0184039a4b6727d6efd545919c773ef141090ae7 (diff)
net: Add framework to allow sending packets with customized CRC.
This is useful for testing RX handling of frames with bad CRCs. Requires driver support to actually put the packet on the wire properly. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0eac07c95255..f1b7d037c2c5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1082,7 +1082,8 @@ struct net_device {
1082 const struct header_ops *header_ops; 1082 const struct header_ops *header_ops;
1083 1083
1084 unsigned int flags; /* interface flags (a la BSD) */ 1084 unsigned int flags; /* interface flags (a la BSD) */
1085 unsigned int priv_flags; /* Like 'flags' but invisible to userspace. */ 1085 unsigned int priv_flags; /* Like 'flags' but invisible to userspace.
1086 * See if.h for definitions. */
1086 unsigned short gflags; 1087 unsigned short gflags;
1087 unsigned short padded; /* How much padding added by alloc_netdev() */ 1088 unsigned short padded; /* How much padding added by alloc_netdev() */
1088 1089
@@ -2650,6 +2651,11 @@ static inline int netif_is_bond_slave(struct net_device *dev)
2650 return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING; 2651 return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING;
2651} 2652}
2652 2653
2654static inline bool netif_supports_nofcs(struct net_device *dev)
2655{
2656 return dev->priv_flags & IFF_SUPP_NOFCS;
2657}
2658
2653extern struct pernet_operations __net_initdata loopback_net_ops; 2659extern struct pernet_operations __net_initdata loopback_net_ops;
2654 2660
2655/* Logging, debugging and troubleshooting/diagnostic helpers. */ 2661/* Logging, debugging and troubleshooting/diagnostic helpers. */