aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mv643xx_eth.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-02-12 09:07:56 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-16 02:43:56 -0500
commitd888b3738eba7ebc5844d5977c30e290dfbe435b (patch)
tree2f5c2c0b1b57ba0f9b4975b9010d76a1a3094f11 /drivers/net/mv643xx_eth.c
parente7d2f4dbd9224ba50d6d5331bb0538d2ce9027f8 (diff)
mv643xx_eth: export rx csum get/set methods via ethtool
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r--drivers/net/mv643xx_eth.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 89eaf3b3c760..3bbbd9410c9c 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1528,6 +1528,24 @@ mv643xx_eth_set_ringparam(struct net_device *dev, struct ethtool_ringparam *er)
1528 return 0; 1528 return 0;
1529} 1529}
1530 1530
1531static u32
1532mv643xx_eth_get_rx_csum(struct net_device *dev)
1533{
1534 struct mv643xx_eth_private *mp = netdev_priv(dev);
1535
1536 return !!(rdlp(mp, PORT_CONFIG) & 0x02000000);
1537}
1538
1539static int
1540mv643xx_eth_set_rx_csum(struct net_device *dev, u32 rx_csum)
1541{
1542 struct mv643xx_eth_private *mp = netdev_priv(dev);
1543
1544 wrlp(mp, PORT_CONFIG, rx_csum ? 0x02000000 : 0x00000000);
1545
1546 return 0;
1547}
1548
1531static void mv643xx_eth_get_strings(struct net_device *dev, 1549static void mv643xx_eth_get_strings(struct net_device *dev,
1532 uint32_t stringset, uint8_t *data) 1550 uint32_t stringset, uint8_t *data)
1533{ 1551{
@@ -1586,6 +1604,8 @@ static const struct ethtool_ops mv643xx_eth_ethtool_ops = {
1586 .set_coalesce = mv643xx_eth_set_coalesce, 1604 .set_coalesce = mv643xx_eth_set_coalesce,
1587 .get_ringparam = mv643xx_eth_get_ringparam, 1605 .get_ringparam = mv643xx_eth_get_ringparam,
1588 .set_ringparam = mv643xx_eth_set_ringparam, 1606 .set_ringparam = mv643xx_eth_set_ringparam,
1607 .get_rx_csum = mv643xx_eth_get_rx_csum,
1608 .set_rx_csum = mv643xx_eth_set_rx_csum,
1589 .set_sg = ethtool_op_set_sg, 1609 .set_sg = ethtool_op_set_sg,
1590 .get_strings = mv643xx_eth_get_strings, 1610 .get_strings = mv643xx_eth_get_strings,
1591 .get_ethtool_stats = mv643xx_eth_get_ethtool_stats, 1611 .get_ethtool_stats = mv643xx_eth_get_ethtool_stats,