diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-07-08 08:37:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-09 11:59:51 -0700 |
commit | 9630f6b97a5918c7a14803954ae2ff5ff3f9fb3c (patch) | |
tree | 83f36275bf423ebd9f7e4e2747dbd6961087c5aa /drivers/staging/wlan-ng/hfa384x_usb.c | |
parent | cd687a4073d58b5763ed085b942302714f0fa73d (diff) |
staging: wlan-ng: Use net_device_stats from struct net_device
Instead of using an own copy of struct net_device_stats in struct
wlandevice, 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().
Furthermore, convert prefix increment of stats counters to the more
common postfix increment idiom.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng/hfa384x_usb.c')
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x_usb.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 07cee5637276..2f63e0c6d445 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -3158,8 +3158,8 @@ static void hfa384x_usbin_callback(struct urb *urb) /* Check for short packet */ if (urb->actual_length == 0) { - ++(wlandev->linux_stats.rx_errors); - ++(wlandev->linux_stats.rx_length_errors); + wlandev->netdev->stats.rx_errors++; + wlandev->netdev->stats.rx_length_errors++; action = RESUBMIT; } break; @@ -3169,7 +3169,7 @@ static void hfa384x_usbin_callback(struct urb *urb) wlandev->netdev->name); if (!test_and_set_bit(WORK_RX_HALT, &hw->usb_flags)) schedule_work(&hw->usb_work); - ++(wlandev->linux_stats.rx_errors); + wlandev->netdev->stats.rx_errors++; action = ABORT; break; @@ -3180,12 +3180,12 @@ static void hfa384x_usbin_callback(struct urb *urb) !timer_pending(&hw->throttle)) { mod_timer(&hw->throttle, jiffies + THROTTLE_JIFFIES); } - ++(wlandev->linux_stats.rx_errors); + wlandev->netdev->stats.rx_errors++; action = ABORT; break; case -EOVERFLOW: - ++(wlandev->linux_stats.rx_over_errors); + wlandev->netdev->stats.rx_over_errors++; action = RESUBMIT; break; @@ -3204,7 +3204,7 @@ static void hfa384x_usbin_callback(struct urb *urb) default: pr_debug("urb status=%d, transfer flags=0x%x\n", urb->status, urb->transfer_flags); - ++(wlandev->linux_stats.rx_errors); + wlandev->netdev->stats.rx_errors++; action = RESUBMIT; break; } @@ -3712,7 +3712,7 @@ static void hfa384x_usbout_callback(struct urb *urb) if (!test_and_set_bit (WORK_TX_HALT, &hw->usb_flags)) schedule_work(&hw->usb_work); - ++(wlandev->linux_stats.tx_errors); + wlandev->netdev->stats.tx_errors++; break; } @@ -3728,7 +3728,7 @@ static void hfa384x_usbout_callback(struct urb *urb) mod_timer(&hw->throttle, jiffies + THROTTLE_JIFFIES); } - ++(wlandev->linux_stats.tx_errors); + wlandev->netdev->stats.tx_errors++; netif_stop_queue(wlandev->netdev); break; } @@ -3741,7 +3741,7 @@ static void hfa384x_usbout_callback(struct urb *urb) default: netdev_info(wlandev->netdev, "unknown urb->status=%d\n", urb->status); - ++(wlandev->linux_stats.tx_errors); + wlandev->netdev->stats.tx_errors++; break; } /* switch */ } |