Commit 57d435d4 authored by Jeff Garzik's avatar Jeff Garzik

[NET] move ethtool_op_set_tx_csum from 8139cp drvr to net/core/ethtool.c,

where it belongs.
parent 139e83e5
...@@ -1405,17 +1405,6 @@ static int cp_set_rx_csum(struct net_device *dev, u32 data) ...@@ -1405,17 +1405,6 @@ static int cp_set_rx_csum(struct net_device *dev, u32 data)
return 0; return 0;
} }
/* move this to net/core/ethtool.c */
static int ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
{
if (data)
dev->features |= NETIF_F_IP_CSUM;
else
dev->features &= ~NETIF_F_IP_CSUM;
return 0;
}
static void cp_get_regs(struct net_device *dev, struct ethtool_regs *regs, static void cp_get_regs(struct net_device *dev, struct ethtool_regs *regs,
void *p) void *p)
{ {
......
...@@ -255,6 +255,7 @@ struct net_device; ...@@ -255,6 +255,7 @@ struct net_device;
/* Some generic methods drivers may use in their ethtool_ops */ /* Some generic methods drivers may use in their ethtool_ops */
u32 ethtool_op_get_link(struct net_device *dev); u32 ethtool_op_get_link(struct net_device *dev);
u32 ethtool_op_get_tx_csum(struct net_device *dev); u32 ethtool_op_get_tx_csum(struct net_device *dev);
int ethtool_op_set_tx_csum(struct net_device *dev, u32 data);
u32 ethtool_op_get_sg(struct net_device *dev); u32 ethtool_op_get_sg(struct net_device *dev);
int ethtool_op_set_sg(struct net_device *dev, u32 data); int ethtool_op_set_sg(struct net_device *dev, u32 data);
u32 ethtool_op_get_tso(struct net_device *dev); u32 ethtool_op_get_tso(struct net_device *dev);
......
...@@ -31,6 +31,16 @@ u32 ethtool_op_get_tx_csum(struct net_device *dev) ...@@ -31,6 +31,16 @@ u32 ethtool_op_get_tx_csum(struct net_device *dev)
return (dev->features & NETIF_F_IP_CSUM) != 0; return (dev->features & NETIF_F_IP_CSUM) != 0;
} }
int ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
{
if (data)
dev->features |= NETIF_F_IP_CSUM;
else
dev->features &= ~NETIF_F_IP_CSUM;
return 0;
}
u32 ethtool_op_get_sg(struct net_device *dev) u32 ethtool_op_get_sg(struct net_device *dev)
{ {
return (dev->features & NETIF_F_SG) != 0; return (dev->features & NETIF_F_SG) != 0;
......
...@@ -631,6 +631,7 @@ EXPORT_SYMBOL(linkwatch_fire_event); ...@@ -631,6 +631,7 @@ EXPORT_SYMBOL(linkwatch_fire_event);
/* ethtool.c */ /* ethtool.c */
EXPORT_SYMBOL(ethtool_op_get_link); EXPORT_SYMBOL(ethtool_op_get_link);
EXPORT_SYMBOL(ethtool_op_get_tx_csum); EXPORT_SYMBOL(ethtool_op_get_tx_csum);
EXPORT_SYMBOL(ethtool_op_set_tx_csum);
EXPORT_SYMBOL(ethtool_op_get_sg); EXPORT_SYMBOL(ethtool_op_get_sg);
EXPORT_SYMBOL(ethtool_op_set_sg); EXPORT_SYMBOL(ethtool_op_set_sg);
EXPORT_SYMBOL(ethtool_op_get_tso); EXPORT_SYMBOL(ethtool_op_get_tso);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment