r8152: replace tp->netdev with netdev

Replace some tp->netdev with netdev.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
hayeswang 2014-03-06 15:07:17 +08:00 committed by David S. Miller
parent db8515eff3
commit d104eafa64

View File

@ -1037,6 +1037,7 @@ static void read_bulk_callback(struct urb *urb)
static void write_bulk_callback(struct urb *urb) static void write_bulk_callback(struct urb *urb)
{ {
struct net_device_stats *stats; struct net_device_stats *stats;
struct net_device *netdev;
unsigned long flags; unsigned long flags;
struct tx_agg *agg; struct tx_agg *agg;
struct r8152 *tp; struct r8152 *tp;
@ -1050,10 +1051,11 @@ static void write_bulk_callback(struct urb *urb)
if (!tp) if (!tp)
return; return;
stats = rtl8152_get_stats(tp->netdev); netdev = tp->netdev;
stats = rtl8152_get_stats(netdev);
if (status) { if (status) {
if (net_ratelimit()) if (net_ratelimit())
netdev_warn(tp->netdev, "Tx status %d\n", status); netdev_warn(netdev, "Tx status %d\n", status);
stats->tx_errors += agg->skb_num; stats->tx_errors += agg->skb_num;
} else { } else {
stats->tx_packets += agg->skb_num; stats->tx_packets += agg->skb_num;
@ -1066,7 +1068,7 @@ static void write_bulk_callback(struct urb *urb)
usb_autopm_put_interface_async(tp->intf); usb_autopm_put_interface_async(tp->intf);
if (!netif_carrier_ok(tp->netdev)) if (!netif_carrier_ok(netdev))
return; return;
if (!test_bit(WORK_ENABLE, &tp->flags)) if (!test_bit(WORK_ENABLE, &tp->flags))