summaryrefslogtreecommitdiff
path: root/drivers/staging/gdm72xx
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-07-08 06:47:47 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 18:57:16 (GMT)
commitb92274e78a587dde4e4cf87228c4dc4d1ad5039d (patch)
treee86c825cb3f7c6f23586013d6a1adc024b5524c7 /drivers/staging/gdm72xx
parent10ebe37884b84bb5f05be1adb7eed4520df22e39 (diff)
downloadlinux-b92274e78a587dde4e4cf87228c4dc4d1ad5039d.tar.xz
staging: gdm72xx: Use net_device_stats from struct net_device
Instead of using an own copy of struct net_device_stats in struct nic, use stats from struct net_device. Also remove the thus unnecessary .ndo_get_stats function, as it would now just return netdev->stats, which is the default in dev_get_stats(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm72xx')
-rw-r--r--drivers/staging/gdm72xx/gdm_wimax.c17
-rw-r--r--drivers/staging/gdm72xx/gdm_wimax.h1
2 files changed, 4 insertions, 14 deletions
diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
index ad3d6bc..f96f1d0 100644
--- a/drivers/staging/gdm72xx/gdm_wimax.c
+++ b/drivers/staging/gdm72xx/gdm_wimax.c
@@ -360,8 +360,8 @@ int gdm_wimax_send_tx(struct sk_buff *skb, struct net_device *dev)
return ret;
}
- nic->stats.tx_packets++;
- nic->stats.tx_bytes += skb->len - HCI_HEADER_SIZE;
+ dev->stats.tx_packets++;
+ dev->stats.tx_bytes += skb->len - HCI_HEADER_SIZE;
kfree_skb(skb);
return ret;
}
@@ -433,13 +433,6 @@ static int gdm_wimax_set_mac_addr(struct net_device *dev, void *p)
return 0;
}
-static struct net_device_stats *gdm_wimax_stats(struct net_device *dev)
-{
- struct nic *nic = netdev_priv(dev);
-
- return &nic->stats;
-}
-
static int gdm_wimax_open(struct net_device *dev)
{
struct nic *nic = netdev_priv(dev);
@@ -696,7 +689,6 @@ static int gdm_wimax_get_prepared_info(struct net_device *dev, char *buf,
static void gdm_wimax_netif_rx(struct net_device *dev, char *buf, int len)
{
- struct nic *nic = netdev_priv(dev);
struct sk_buff *skb;
int ret;
@@ -709,8 +701,8 @@ static void gdm_wimax_netif_rx(struct net_device *dev, char *buf, int len)
}
skb_reserve(skb, 2);
- nic->stats.rx_packets++;
- nic->stats.rx_bytes += len;
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += len;
memcpy(skb_put(skb, len), buf, len);
@@ -866,7 +858,6 @@ static struct net_device_ops gdm_netdev_ops = {
.ndo_stop = gdm_wimax_close,
.ndo_set_config = gdm_wimax_set_config,
.ndo_start_xmit = gdm_wimax_tx,
- .ndo_get_stats = gdm_wimax_stats,
.ndo_set_mac_address = gdm_wimax_set_mac_addr,
.ndo_do_ioctl = gdm_wimax_ioctl,
};
diff --git a/drivers/staging/gdm72xx/gdm_wimax.h b/drivers/staging/gdm72xx/gdm_wimax.h
index ae852dd..3330cd79 100644
--- a/drivers/staging/gdm72xx/gdm_wimax.h
+++ b/drivers/staging/gdm72xx/gdm_wimax.h
@@ -36,7 +36,6 @@ struct phy_dev {
struct nic {
struct net_device *netdev;
struct phy_dev *phy_dev;
- struct net_device_stats stats;
struct data_s sdk_data[SIOC_DATA_MAX];
#if defined(CONFIG_WIMAX_GDM72XX_QOS)
struct qos_cb_s qos;