aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/kaweth.c
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2008-12-19 02:00:59 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-19 02:00:59 -0500
commitc94cb314503a69492bf4455dce4f6d300cff0851 (patch)
treef049d27da8345fae393916c0ec5be0aed94b65a7 /drivers/net/usb/kaweth.c
parentab5024ab23b78c86a0a1425defcdde48710fe449 (diff)
net: prepare usb net drivers for addition of status as a parameter
USB is going to switch the signature of the callbacks to void callback(struct urb *urb, int status) This patch will ease the transition. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/kaweth.c')
-rw-r--r--drivers/net/usb/kaweth.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index fdbf3be24fda..2ee034f70d1c 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -516,8 +516,9 @@ static void int_callback(struct urb *u)
516{ 516{
517 struct kaweth_device *kaweth = u->context; 517 struct kaweth_device *kaweth = u->context;
518 int act_state; 518 int act_state;
519 int status = u->status;
519 520
520 switch (u->status) { 521 switch (status) {
521 case 0: /* success */ 522 case 0: /* success */
522 break; 523 break;
523 case -ECONNRESET: /* unlink */ 524 case -ECONNRESET: /* unlink */
@@ -598,6 +599,7 @@ static void kaweth_usb_receive(struct urb *urb)
598{ 599{
599 struct kaweth_device *kaweth = urb->context; 600 struct kaweth_device *kaweth = urb->context;
600 struct net_device *net = kaweth->net; 601 struct net_device *net = kaweth->net;
602 int status = urb->status;
601 603
602 int count = urb->actual_length; 604 int count = urb->actual_length;
603 int count2 = urb->transfer_buffer_length; 605 int count2 = urb->transfer_buffer_length;
@@ -606,7 +608,7 @@ static void kaweth_usb_receive(struct urb *urb)
606 608
607 struct sk_buff *skb; 609 struct sk_buff *skb;
608 610
609 if(unlikely(urb->status == -ECONNRESET || urb->status == -ESHUTDOWN)) 611 if(unlikely(status == -ECONNRESET || status == -ESHUTDOWN))
610 /* we are killed - set a flag and wake the disconnect handler */ 612 /* we are killed - set a flag and wake the disconnect handler */
611 { 613 {
612 kaweth->end = 1; 614 kaweth->end = 1;
@@ -621,10 +623,10 @@ static void kaweth_usb_receive(struct urb *urb)
621 } 623 }
622 spin_unlock(&kaweth->device_lock); 624 spin_unlock(&kaweth->device_lock);
623 625
624 if(urb->status && urb->status != -EREMOTEIO && count != 1) { 626 if(status && status != -EREMOTEIO && count != 1) {
625 err("%s RX status: %d count: %d packet_len: %d", 627 err("%s RX status: %d count: %d packet_len: %d",
626 net->name, 628 net->name,
627 urb->status, 629 status,
628 count, 630 count,
629 (int)pkt_len); 631 (int)pkt_len);
630 kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC); 632 kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
@@ -775,10 +777,11 @@ static void kaweth_usb_transmit_complete(struct urb *urb)
775{ 777{
776 struct kaweth_device *kaweth = urb->context; 778 struct kaweth_device *kaweth = urb->context;
777 struct sk_buff *skb = kaweth->tx_skb; 779 struct sk_buff *skb = kaweth->tx_skb;
780 int status = urb->status;
778 781
779 if (unlikely(urb->status != 0)) 782 if (unlikely(status != 0))
780 if (urb->status != -ENOENT) 783 if (status != -ENOENT)
781 dbg("%s: TX status %d.", kaweth->net->name, urb->status); 784 dbg("%s: TX status %d.", kaweth->net->name, status);
782 785
783 netif_wake_queue(kaweth->net); 786 netif_wake_queue(kaweth->net);
784 dev_kfree_skb_irq(skb); 787 dev_kfree_skb_irq(skb);