Skip to content

Commit

Permalink
iph: use default get_stats
Browse files Browse the repository at this point in the history
This driver keeps stats in net_device stats therefore it
does not need to define it's own get_stats hook.

Also, use standard format for net_device_ops (without &).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Jun 9, 2011
1 parent bff5527 commit 8ef207d
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions drivers/net/usb/ipheth.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,6 @@ static void ipheth_tx_timeout(struct net_device *net)
usb_unlink_urb(dev->tx_urb);
}

static struct net_device_stats *ipheth_stats(struct net_device *net)
{
struct ipheth_device *dev = netdev_priv(net);
return &dev->net->stats;
}

static u32 ipheth_ethtool_op_get_link(struct net_device *net)
{
struct ipheth_device *dev = netdev_priv(net);
Expand All @@ -426,11 +420,10 @@ static struct ethtool_ops ops = {
};

static const struct net_device_ops ipheth_netdev_ops = {
.ndo_open = &ipheth_open,
.ndo_stop = &ipheth_close,
.ndo_start_xmit = &ipheth_tx,
.ndo_tx_timeout = &ipheth_tx_timeout,
.ndo_get_stats = &ipheth_stats,
.ndo_open = ipheth_open,
.ndo_stop = ipheth_close,
.ndo_start_xmit = ipheth_tx,
.ndo_tx_timeout = ipheth_tx_timeout,
};

static int ipheth_probe(struct usb_interface *intf,
Expand Down

0 comments on commit 8ef207d

Please sign in to comment.