Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134570
b: refs/heads/master
c: d888b37
h: refs/heads/master
v: v3
  • Loading branch information
Lennert Buytenhek authored and David S. Miller committed Feb 16, 2009
1 parent f904fd3 commit 1d723a1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7d2f4dbd9224ba50d6d5331bb0538d2ce9027f8
refs/heads/master: d888b3738eba7ebc5844d5977c30e290dfbe435b
20 changes: 20 additions & 0 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,24 @@ mv643xx_eth_set_ringparam(struct net_device *dev, struct ethtool_ringparam *er)
return 0;
}

static u32
mv643xx_eth_get_rx_csum(struct net_device *dev)
{
struct mv643xx_eth_private *mp = netdev_priv(dev);

return !!(rdlp(mp, PORT_CONFIG) & 0x02000000);
}

static int
mv643xx_eth_set_rx_csum(struct net_device *dev, u32 rx_csum)
{
struct mv643xx_eth_private *mp = netdev_priv(dev);

wrlp(mp, PORT_CONFIG, rx_csum ? 0x02000000 : 0x00000000);

return 0;
}

static void mv643xx_eth_get_strings(struct net_device *dev,
uint32_t stringset, uint8_t *data)
{
Expand Down Expand Up @@ -1586,6 +1604,8 @@ static const struct ethtool_ops mv643xx_eth_ethtool_ops = {
.set_coalesce = mv643xx_eth_set_coalesce,
.get_ringparam = mv643xx_eth_get_ringparam,
.set_ringparam = mv643xx_eth_set_ringparam,
.get_rx_csum = mv643xx_eth_get_rx_csum,
.set_rx_csum = mv643xx_eth_set_rx_csum,
.set_sg = ethtool_op_set_sg,
.get_strings = mv643xx_eth_get_strings,
.get_ethtool_stats = mv643xx_eth_get_ethtool_stats,
Expand Down

0 comments on commit 1d723a1

Please sign in to comment.