diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-08-31 15:50:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-01 04:13:22 -0400 |
commit | 25a79c41ce0ce88a4288adf278e9b0e00f228383 (patch) | |
tree | 4b1c76c704c3956478e76b51d34643a1caf80368 /drivers/net/usb | |
parent | 8b62ff2dbc3d6c13997b9d440dfd0ed00e6df96d (diff) |
usbnet: convert to netdev_tx_t
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/catc.c | 3 | ||||
-rw-r--r-- | drivers/net/usb/cdc-phonet.c | 6 | ||||
-rw-r--r-- | drivers/net/usb/hso.c | 3 | ||||
-rw-r--r-- | drivers/net/usb/kaweth.c | 3 | ||||
-rw-r--r-- | drivers/net/usb/pegasus.c | 3 | ||||
-rw-r--r-- | drivers/net/usb/rtl8150.c | 3 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 8 |
7 files changed, 17 insertions, 12 deletions
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 7abdc4abbe07..0ffc0c6d03be 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c | |||
@@ -411,7 +411,8 @@ static void catc_tx_done(struct urb *urb) | |||
411 | spin_unlock_irqrestore(&catc->tx_lock, flags); | 411 | spin_unlock_irqrestore(&catc->tx_lock, flags); |
412 | } | 412 | } |
413 | 413 | ||
414 | static int catc_start_xmit(struct sk_buff *skb, struct net_device *netdev) | 414 | static netdev_tx_t catc_start_xmit(struct sk_buff *skb, |
415 | struct net_device *netdev) | ||
415 | { | 416 | { |
416 | struct catc *catc = netdev_priv(netdev); | 417 | struct catc *catc = netdev_priv(netdev); |
417 | unsigned long flags; | 418 | unsigned long flags; |
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index 792af72da8ac..0ca5916ca8df 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c | |||
@@ -55,7 +55,7 @@ static void rx_complete(struct urb *req); | |||
55 | /* | 55 | /* |
56 | * Network device callbacks | 56 | * Network device callbacks |
57 | */ | 57 | */ |
58 | static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev) | 58 | static netdev_tx_t usbpn_xmit(struct sk_buff *skb, struct net_device *dev) |
59 | { | 59 | { |
60 | struct usbpn_dev *pnd = netdev_priv(dev); | 60 | struct usbpn_dev *pnd = netdev_priv(dev); |
61 | struct urb *req = NULL; | 61 | struct urb *req = NULL; |
@@ -82,12 +82,12 @@ static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev) | |||
82 | if (pnd->tx_queue >= dev->tx_queue_len) | 82 | if (pnd->tx_queue >= dev->tx_queue_len) |
83 | netif_stop_queue(dev); | 83 | netif_stop_queue(dev); |
84 | spin_unlock_irqrestore(&pnd->tx_lock, flags); | 84 | spin_unlock_irqrestore(&pnd->tx_lock, flags); |
85 | return 0; | 85 | return NETDEV_TX_OK; |
86 | 86 | ||
87 | drop: | 87 | drop: |
88 | dev_kfree_skb(skb); | 88 | dev_kfree_skb(skb); |
89 | dev->stats.tx_dropped++; | 89 | dev->stats.tx_dropped++; |
90 | return 0; | 90 | return NETDEV_TX_OK; |
91 | } | 91 | } |
92 | 92 | ||
93 | static void tx_complete(struct urb *req) | 93 | static void tx_complete(struct urb *req) |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index ffe410635735..123f9b84dd29 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -771,7 +771,8 @@ static void write_bulk_callback(struct urb *urb) | |||
771 | } | 771 | } |
772 | 772 | ||
773 | /* called by kernel when we need to transmit a packet */ | 773 | /* called by kernel when we need to transmit a packet */ |
774 | static int hso_net_start_xmit(struct sk_buff *skb, struct net_device *net) | 774 | static netdev_tx_t hso_net_start_xmit(struct sk_buff *skb, |
775 | struct net_device *net) | ||
775 | { | 776 | { |
776 | struct hso_net *odev = netdev_priv(net); | 777 | struct hso_net *odev = netdev_priv(net); |
777 | int result; | 778 | int result; |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 200fe3d525ca..7f397365b437 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -803,7 +803,8 @@ static void kaweth_usb_transmit_complete(struct urb *urb) | |||
803 | /**************************************************************** | 803 | /**************************************************************** |
804 | * kaweth_start_xmit | 804 | * kaweth_start_xmit |
805 | ****************************************************************/ | 805 | ****************************************************************/ |
806 | static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net) | 806 | static netdev_tx_t kaweth_start_xmit(struct sk_buff *skb, |
807 | struct net_device *net) | ||
807 | { | 808 | { |
808 | struct kaweth_device *kaweth = netdev_priv(net); | 809 | struct kaweth_device *kaweth = netdev_priv(net); |
809 | __le16 *private_header; | 810 | __le16 *private_header; |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 69d2df95ac86..7b935b846424 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -876,7 +876,8 @@ static void pegasus_tx_timeout(struct net_device *net) | |||
876 | pegasus->stats.tx_errors++; | 876 | pegasus->stats.tx_errors++; |
877 | } | 877 | } |
878 | 878 | ||
879 | static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net) | 879 | static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb, |
880 | struct net_device *net) | ||
880 | { | 881 | { |
881 | pegasus_t *pegasus = netdev_priv(net); | 882 | pegasus_t *pegasus = netdev_priv(net); |
882 | int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3; | 883 | int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3; |
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index bac8b77fb25e..d9f84f22fbc7 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c | |||
@@ -727,7 +727,8 @@ static void rtl8150_set_multicast(struct net_device *netdev) | |||
727 | netif_wake_queue(netdev); | 727 | netif_wake_queue(netdev); |
728 | } | 728 | } |
729 | 729 | ||
730 | static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev) | 730 | static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb, |
731 | struct net_device *netdev) | ||
731 | { | 732 | { |
732 | rtl8150_t *dev = netdev_priv(netdev); | 733 | rtl8150_t *dev = netdev_priv(netdev); |
733 | int count, res; | 734 | int count, res; |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 7d471fca2743..d166e3385c64 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1007,15 +1007,16 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout); | |||
1007 | 1007 | ||
1008 | /*-------------------------------------------------------------------------*/ | 1008 | /*-------------------------------------------------------------------------*/ |
1009 | 1009 | ||
1010 | int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) | 1010 | netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, |
1011 | struct net_device *net) | ||
1011 | { | 1012 | { |
1012 | struct usbnet *dev = netdev_priv(net); | 1013 | struct usbnet *dev = netdev_priv(net); |
1013 | int length; | 1014 | int length; |
1014 | int retval = NET_XMIT_SUCCESS; | ||
1015 | struct urb *urb = NULL; | 1015 | struct urb *urb = NULL; |
1016 | struct skb_data *entry; | 1016 | struct skb_data *entry; |
1017 | struct driver_info *info = dev->driver_info; | 1017 | struct driver_info *info = dev->driver_info; |
1018 | unsigned long flags; | 1018 | unsigned long flags; |
1019 | int retval; | ||
1019 | 1020 | ||
1020 | // some devices want funky USB-level framing, for | 1021 | // some devices want funky USB-level framing, for |
1021 | // win32 driver (usually) and/or hardware quirks | 1022 | // win32 driver (usually) and/or hardware quirks |
@@ -1079,7 +1080,6 @@ int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) | |||
1079 | if (netif_msg_tx_err (dev)) | 1080 | if (netif_msg_tx_err (dev)) |
1080 | devdbg (dev, "drop, code %d", retval); | 1081 | devdbg (dev, "drop, code %d", retval); |
1081 | drop: | 1082 | drop: |
1082 | retval = NET_XMIT_SUCCESS; | ||
1083 | dev->net->stats.tx_dropped++; | 1083 | dev->net->stats.tx_dropped++; |
1084 | if (skb) | 1084 | if (skb) |
1085 | dev_kfree_skb_any (skb); | 1085 | dev_kfree_skb_any (skb); |
@@ -1088,7 +1088,7 @@ drop: | |||
1088 | devdbg (dev, "> tx, len %d, type 0x%x", | 1088 | devdbg (dev, "> tx, len %d, type 0x%x", |
1089 | length, skb->protocol); | 1089 | length, skb->protocol); |
1090 | } | 1090 | } |
1091 | return retval; | 1091 | return NETDEV_TX_OK; |
1092 | } | 1092 | } |
1093 | EXPORT_SYMBOL_GPL(usbnet_start_xmit); | 1093 | EXPORT_SYMBOL_GPL(usbnet_start_xmit); |
1094 | 1094 | ||