diff options
Diffstat (limited to 'drivers/net/irda/ks959-sir.c')
-rw-r--r-- | drivers/net/irda/ks959-sir.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c index 600d96f9cdb..55322fb92cf 100644 --- a/drivers/net/irda/ks959-sir.c +++ b/drivers/net/irda/ks959-sir.c | |||
@@ -174,7 +174,7 @@ struct ks959_cb { | |||
174 | struct usb_device *usbdev; /* init: probe_irda */ | 174 | struct usb_device *usbdev; /* init: probe_irda */ |
175 | struct net_device *netdev; /* network layer */ | 175 | struct net_device *netdev; /* network layer */ |
176 | struct irlap_cb *irlap; /* The link layer we are binded to */ | 176 | struct irlap_cb *irlap; /* The link layer we are binded to */ |
177 | struct net_device_stats stats; /* network statistics */ | 177 | |
178 | struct qos_info qos; | 178 | struct qos_info qos; |
179 | 179 | ||
180 | struct usb_ctrlrequest *tx_setuprequest; | 180 | struct usb_ctrlrequest *tx_setuprequest; |
@@ -366,7 +366,7 @@ static void ks959_send_irq(struct urb *urb) | |||
366 | case -EPIPE: | 366 | case -EPIPE: |
367 | break; | 367 | break; |
368 | default: | 368 | default: |
369 | kingsun->stats.tx_errors++; | 369 | netdev->stats.tx_errors++; |
370 | netif_start_queue(netdev); | 370 | netif_start_queue(netdev); |
371 | } | 371 | } |
372 | } | 372 | } |
@@ -416,12 +416,12 @@ static int ks959_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
416 | case -EPIPE: | 416 | case -EPIPE: |
417 | break; | 417 | break; |
418 | default: | 418 | default: |
419 | kingsun->stats.tx_errors++; | 419 | netdev->stats.tx_errors++; |
420 | netif_start_queue(netdev); | 420 | netif_start_queue(netdev); |
421 | } | 421 | } |
422 | } else { | 422 | } else { |
423 | kingsun->stats.tx_packets++; | 423 | netdev->stats.tx_packets++; |
424 | kingsun->stats.tx_bytes += skb->len; | 424 | netdev->stats.tx_bytes += skb->len; |
425 | 425 | ||
426 | } | 426 | } |
427 | 427 | ||
@@ -469,7 +469,7 @@ static void ks959_rcv_irq(struct urb *urb) | |||
469 | */ | 469 | */ |
470 | if (kingsun->rx_variable_xormask != 0) { | 470 | if (kingsun->rx_variable_xormask != 0) { |
471 | async_unwrap_char(kingsun->netdev, | 471 | async_unwrap_char(kingsun->netdev, |
472 | &kingsun->stats, | 472 | &kingsun->netdev->stats, |
473 | &kingsun->rx_unwrap_buff, | 473 | &kingsun->rx_unwrap_buff, |
474 | bytes[i]); | 474 | bytes[i]); |
475 | } | 475 | } |
@@ -669,15 +669,6 @@ static int ks959_net_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) | |||
669 | } | 669 | } |
670 | 670 | ||
671 | /* | 671 | /* |
672 | * Get device stats (for /proc/net/dev and ifconfig) | ||
673 | */ | ||
674 | static struct net_device_stats *ks959_net_get_stats(struct net_device *netdev) | ||
675 | { | ||
676 | struct ks959_cb *kingsun = netdev_priv(netdev); | ||
677 | return &kingsun->stats; | ||
678 | } | ||
679 | |||
680 | /* | ||
681 | * This routine is called by the USB subsystem for each new device | 672 | * This routine is called by the USB subsystem for each new device |
682 | * in the system. We need to check if the device is ours, and in | 673 | * in the system. We need to check if the device is ours, and in |
683 | * this case start handling it. | 674 | * this case start handling it. |
@@ -792,7 +783,6 @@ static int ks959_probe(struct usb_interface *intf, | |||
792 | net->hard_start_xmit = ks959_hard_xmit; | 783 | net->hard_start_xmit = ks959_hard_xmit; |
793 | net->open = ks959_net_open; | 784 | net->open = ks959_net_open; |
794 | net->stop = ks959_net_close; | 785 | net->stop = ks959_net_close; |
795 | net->get_stats = ks959_net_get_stats; | ||
796 | net->do_ioctl = ks959_net_ioctl; | 786 | net->do_ioctl = ks959_net_ioctl; |
797 | 787 | ||
798 | ret = register_netdev(net); | 788 | ret = register_netdev(net); |