Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266895
b: refs/heads/master
c: 9eac2d4
h: refs/heads/master
i:
  266893: ba9db7f
  266891: 81787ac
  266887: fcf190f
  266879: da3d851
v: v3
  • Loading branch information
Ricardo authored and David S. Miller committed Oct 20, 2011
1 parent bbfcfe1 commit 9c93c63
Show file tree
Hide file tree
Showing 2 changed files with 28 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: 46a016985a442b499faa52dff7e74a79f6a22cef
refs/heads/master: 9eac2d4d5312d2ea05c0dbba8051b868fe9961a4
27 changes: 27 additions & 0 deletions trunk/drivers/net/ethernet/xilinx/ll_temac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,32 @@ static const struct attribute_group temac_attr_group = {
.attrs = temac_device_attrs,
};

/* ethtool support */
static int temac_get_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
{
struct temac_local *lp = netdev_priv(ndev);
return phy_ethtool_gset(lp->phy_dev, cmd);
}

static int temac_set_settings(struct net_device *ndev, struct ethtool_cmd *cmd)
{
struct temac_local *lp = netdev_priv(ndev);
return phy_ethtool_sset(lp->phy_dev, cmd);
}

static int temac_nway_reset(struct net_device *ndev)
{
struct temac_local *lp = netdev_priv(ndev);
return phy_start_aneg(lp->phy_dev);
}

static const struct ethtool_ops temac_ethtool_ops = {
.get_settings = temac_get_settings,
.set_settings = temac_set_settings,
.nway_reset = temac_nway_reset,
.get_link = ethtool_op_get_link,
};

static int __devinit temac_of_probe(struct platform_device *op)
{
struct device_node *np;
Expand All @@ -976,6 +1002,7 @@ static int __devinit temac_of_probe(struct platform_device *op)
ndev->flags &= ~IFF_MULTICAST; /* clear multicast */
ndev->features = NETIF_F_SG | NETIF_F_FRAGLIST;
ndev->netdev_ops = &temac_netdev_ops;
ndev->ethtool_ops = &temac_ethtool_ops;
#if 0
ndev->features |= NETIF_F_IP_CSUM; /* Can checksum TCP/UDP over IPv4. */
ndev->features |= NETIF_F_HW_CSUM; /* Can checksum all the packets. */
Expand Down

0 comments on commit 9c93c63

Please sign in to comment.