aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-31 15:50:45 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 04:13:22 -0400
commit25a79c41ce0ce88a4288adf278e9b0e00f228383 (patch)
tree4b1c76c704c3956478e76b51d34643a1caf80368 /drivers
parent8b62ff2dbc3d6c13997b9d440dfd0ed00e6df96d (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')
-rw-r--r--drivers/net/usb/catc.c3
-rw-r--r--drivers/net/usb/cdc-phonet.c6
-rw-r--r--drivers/net/usb/hso.c3
-rw-r--r--drivers/net/usb/kaweth.c3
-rw-r--r--drivers/net/usb/pegasus.c3
-rw-r--r--drivers/net/usb/rtl8150.c3
-rw-r--r--drivers/net/usb/usbnet.c8
-rw-r--r--drivers/usb/gadget/u_ether.c3
8 files changed, 19 insertions, 13 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
414static int catc_start_xmit(struct sk_buff *skb, struct net_device *netdev) 414static 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 */
58static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev) 58static 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
87drop: 87drop:
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
93static void tx_complete(struct urb *req) 93static 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 */
774static int hso_net_start_xmit(struct sk_buff *skb, struct net_device *net) 774static 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 ****************************************************************/
806static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net) 806static 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
879static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net) 879static 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
730static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev) 730static 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
1010int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) 1010netdev_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);
1081drop: 1082drop:
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}
1093EXPORT_SYMBOL_GPL(usbnet_start_xmit); 1093EXPORT_SYMBOL_GPL(usbnet_start_xmit);
1094 1094
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index aac69b591aeb..dc3ebd1e68ca 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -465,7 +465,8 @@ static inline int is_promisc(u16 cdc_filter)
465 return cdc_filter & USB_CDC_PACKET_TYPE_PROMISCUOUS; 465 return cdc_filter & USB_CDC_PACKET_TYPE_PROMISCUOUS;
466} 466}
467 467
468static int eth_start_xmit(struct sk_buff *skb, struct net_device *net) 468static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
469 struct net_device *net)
469{ 470{
470 struct eth_dev *dev = netdev_priv(net); 471 struct eth_dev *dev = netdev_priv(net);
471 int length = skb->len; 472 int length = skb->len;