diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-02-15 15:51:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-16 21:44:58 +0300 |
commit | 66812da3a689e3fea8a2e3899dd8b5f53aab2261 (patch) | |
tree | 6719c65ca8d03c0f3578c44b46401b54fc0cdd33 /drivers/staging/octeon/ethernet-tx.c | |
parent | 548d35062bc0550166cb7d6e55d969b83cd503f7 (diff) | |
download | linux-66812da3a689e3fea8a2e3899dd8b5f53aab2261.tar.xz |
staging: octeon: Use net_device_stats from struct net_device
Instead of using a private copy of struct net_device_stats in
struct octeon_ethernet, use stats from struct net_device. Also remove
the now unnecessary .ndo_get_stats function.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon/ethernet-tx.c')
-rw-r--r-- | drivers/staging/octeon/ethernet-tx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index 6b4c20872323..31a583e1385d 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -460,7 +460,7 @@ skip_xmit: case QUEUE_DROP: skb->next = to_free_list; to_free_list = skb; - priv->stats.tx_dropped++; + dev->stats.tx_dropped++; break; case QUEUE_HW: cvmx_fau_atomic_add32(FAU_NUM_PACKET_BUFFERS_TO_FREE, -1); @@ -535,7 +535,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev) if (unlikely(!work)) { printk_ratelimited("%s: Failed to allocate a work queue entry\n", dev->name); - priv->stats.tx_dropped++; + dev->stats.tx_dropped++; dev_kfree_skb_any(skb); return 0; } @@ -546,7 +546,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev) printk_ratelimited("%s: Failed to allocate a packet buffer\n", dev->name); cvmx_fpa_free(work, CVMX_FPA_WQE_POOL, 1); - priv->stats.tx_dropped++; + dev->stats.tx_dropped++; dev_kfree_skb_any(skb); return 0; } @@ -663,8 +663,8 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev) /* Submit the packet to the POW */ cvmx_pow_work_submit(work, work->word1.tag, work->word1.tag_type, cvmx_wqe_get_qos(work), cvmx_wqe_get_grp(work)); - priv->stats.tx_packets++; - priv->stats.tx_bytes += skb->len; + dev->stats.tx_packets++; + dev->stats.tx_bytes += skb->len; dev_consume_skb_any(skb); return 0; } |