@@ -501,13 +501,13 @@ static void read_bulk_callback(struct urb *urb)
501
501
if (rx_status & 0x1e ) {
502
502
netif_dbg (pegasus , rx_err , net ,
503
503
"RX packet error %x\n" , rx_status );
504
- pegasus -> stats .rx_errors ++ ;
504
+ net -> stats .rx_errors ++ ;
505
505
if (rx_status & 0x06 ) /* long or runt */
506
- pegasus -> stats .rx_length_errors ++ ;
506
+ net -> stats .rx_length_errors ++ ;
507
507
if (rx_status & 0x08 )
508
- pegasus -> stats .rx_crc_errors ++ ;
508
+ net -> stats .rx_crc_errors ++ ;
509
509
if (rx_status & 0x10 ) /* extra bits */
510
- pegasus -> stats .rx_frame_errors ++ ;
510
+ net -> stats .rx_frame_errors ++ ;
511
511
goto goon ;
512
512
}
513
513
if (pegasus -> chip == 0x8513 ) {
@@ -535,8 +535,8 @@ static void read_bulk_callback(struct urb *urb)
535
535
skb_put (pegasus -> rx_skb , pkt_len );
536
536
pegasus -> rx_skb -> protocol = eth_type_trans (pegasus -> rx_skb , net );
537
537
netif_rx (pegasus -> rx_skb );
538
- pegasus -> stats .rx_packets ++ ;
539
- pegasus -> stats .rx_bytes += pkt_len ;
538
+ net -> stats .rx_packets ++ ;
539
+ net -> stats .rx_bytes += pkt_len ;
540
540
541
541
if (pegasus -> flags & PEGASUS_UNPLUG )
542
542
return ;
@@ -670,13 +670,13 @@ static void intr_callback(struct urb *urb)
670
670
/* byte 0 == tx_status1, reg 2B */
671
671
if (d [0 ] & (TX_UNDERRUN |EXCESSIVE_COL
672
672
|LATE_COL |JABBER_TIMEOUT )) {
673
- pegasus -> stats .tx_errors ++ ;
673
+ net -> stats .tx_errors ++ ;
674
674
if (d [0 ] & TX_UNDERRUN )
675
- pegasus -> stats .tx_fifo_errors ++ ;
675
+ net -> stats .tx_fifo_errors ++ ;
676
676
if (d [0 ] & (EXCESSIVE_COL | JABBER_TIMEOUT ))
677
- pegasus -> stats .tx_aborted_errors ++ ;
677
+ net -> stats .tx_aborted_errors ++ ;
678
678
if (d [0 ] & LATE_COL )
679
- pegasus -> stats .tx_window_errors ++ ;
679
+ net -> stats .tx_window_errors ++ ;
680
680
}
681
681
682
682
/* d[5].LINK_STATUS lies on some adapters.
@@ -685,7 +685,7 @@ static void intr_callback(struct urb *urb)
685
685
*/
686
686
687
687
/* bytes 3-4 == rx_lostpkt, reg 2E/2F */
688
- pegasus -> stats .rx_missed_errors += ((d [3 ] & 0x7f ) << 8 ) | d [4 ];
688
+ net -> stats .rx_missed_errors += ((d [3 ] & 0x7f ) << 8 ) | d [4 ];
689
689
}
690
690
691
691
res = usb_submit_urb (urb , GFP_ATOMIC );
@@ -701,7 +701,7 @@ static void pegasus_tx_timeout(struct net_device *net)
701
701
pegasus_t * pegasus = netdev_priv (net );
702
702
netif_warn (pegasus , timer , net , "tx timeout\n" );
703
703
usb_unlink_urb (pegasus -> tx_urb );
704
- pegasus -> stats .tx_errors ++ ;
704
+ net -> stats .tx_errors ++ ;
705
705
}
706
706
707
707
static netdev_tx_t pegasus_start_xmit (struct sk_buff * skb ,
@@ -731,23 +731,18 @@ static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb,
731
731
netif_device_detach (pegasus -> net );
732
732
break ;
733
733
default :
734
- pegasus -> stats .tx_errors ++ ;
734
+ net -> stats .tx_errors ++ ;
735
735
netif_start_queue (net );
736
736
}
737
737
} else {
738
- pegasus -> stats .tx_packets ++ ;
739
- pegasus -> stats .tx_bytes += skb -> len ;
738
+ net -> stats .tx_packets ++ ;
739
+ net -> stats .tx_bytes += skb -> len ;
740
740
}
741
741
dev_kfree_skb (skb );
742
742
743
743
return NETDEV_TX_OK ;
744
744
}
745
745
746
- static struct net_device_stats * pegasus_netdev_stats (struct net_device * dev )
747
- {
748
- return & ((pegasus_t * ) netdev_priv (dev ))-> stats ;
749
- }
750
-
751
746
static inline void disable_net_traffic (pegasus_t * pegasus )
752
747
{
753
748
__le16 tmp = cpu_to_le16 (0 );
@@ -1294,7 +1289,6 @@ static const struct net_device_ops pegasus_netdev_ops = {
1294
1289
.ndo_do_ioctl = pegasus_ioctl ,
1295
1290
.ndo_start_xmit = pegasus_start_xmit ,
1296
1291
.ndo_set_rx_mode = pegasus_set_multicast ,
1297
- .ndo_get_stats = pegasus_netdev_stats ,
1298
1292
.ndo_tx_timeout = pegasus_tx_timeout ,
1299
1293
.ndo_set_mac_address = eth_mac_addr ,
1300
1294
.ndo_validate_addr = eth_validate_addr ,
0 commit comments