Commit 25a79c41 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

usbnet: convert to netdev_tx_t

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8b62ff2d
...@@ -411,7 +411,8 @@ static void catc_tx_done(struct urb *urb) ...@@ -411,7 +411,8 @@ static void catc_tx_done(struct urb *urb)
spin_unlock_irqrestore(&catc->tx_lock, flags); spin_unlock_irqrestore(&catc->tx_lock, flags);
} }
static int catc_start_xmit(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t catc_start_xmit(struct sk_buff *skb,
struct net_device *netdev)
{ {
struct catc *catc = netdev_priv(netdev); struct catc *catc = netdev_priv(netdev);
unsigned long flags; unsigned long flags;
......
...@@ -55,7 +55,7 @@ static void rx_complete(struct urb *req); ...@@ -55,7 +55,7 @@ static void rx_complete(struct urb *req);
/* /*
* Network device callbacks * Network device callbacks
*/ */
static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t usbpn_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct usbpn_dev *pnd = netdev_priv(dev); struct usbpn_dev *pnd = netdev_priv(dev);
struct urb *req = NULL; struct urb *req = NULL;
...@@ -82,12 +82,12 @@ static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -82,12 +82,12 @@ static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev)
if (pnd->tx_queue >= dev->tx_queue_len) if (pnd->tx_queue >= dev->tx_queue_len)
netif_stop_queue(dev); netif_stop_queue(dev);
spin_unlock_irqrestore(&pnd->tx_lock, flags); spin_unlock_irqrestore(&pnd->tx_lock, flags);
return 0; return NETDEV_TX_OK;
drop: drop:
dev_kfree_skb(skb); dev_kfree_skb(skb);
dev->stats.tx_dropped++; dev->stats.tx_dropped++;
return 0; return NETDEV_TX_OK;
} }
static void tx_complete(struct urb *req) static void tx_complete(struct urb *req)
......
...@@ -771,7 +771,8 @@ static void write_bulk_callback(struct urb *urb) ...@@ -771,7 +771,8 @@ static void write_bulk_callback(struct urb *urb)
} }
/* called by kernel when we need to transmit a packet */ /* called by kernel when we need to transmit a packet */
static int hso_net_start_xmit(struct sk_buff *skb, struct net_device *net) static netdev_tx_t hso_net_start_xmit(struct sk_buff *skb,
struct net_device *net)
{ {
struct hso_net *odev = netdev_priv(net); struct hso_net *odev = netdev_priv(net);
int result; int result;
......
...@@ -803,7 +803,8 @@ static void kaweth_usb_transmit_complete(struct urb *urb) ...@@ -803,7 +803,8 @@ static void kaweth_usb_transmit_complete(struct urb *urb)
/**************************************************************** /****************************************************************
* kaweth_start_xmit * kaweth_start_xmit
****************************************************************/ ****************************************************************/
static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net) static netdev_tx_t kaweth_start_xmit(struct sk_buff *skb,
struct net_device *net)
{ {
struct kaweth_device *kaweth = netdev_priv(net); struct kaweth_device *kaweth = netdev_priv(net);
__le16 *private_header; __le16 *private_header;
......
...@@ -876,7 +876,8 @@ static void pegasus_tx_timeout(struct net_device *net) ...@@ -876,7 +876,8 @@ static void pegasus_tx_timeout(struct net_device *net)
pegasus->stats.tx_errors++; pegasus->stats.tx_errors++;
} }
static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net) static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb,
struct net_device *net)
{ {
pegasus_t *pegasus = netdev_priv(net); pegasus_t *pegasus = netdev_priv(net);
int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3; int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3;
......
...@@ -727,7 +727,8 @@ static void rtl8150_set_multicast(struct net_device *netdev) ...@@ -727,7 +727,8 @@ static void rtl8150_set_multicast(struct net_device *netdev)
netif_wake_queue(netdev); netif_wake_queue(netdev);
} }
static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,
struct net_device *netdev)
{ {
rtl8150_t *dev = netdev_priv(netdev); rtl8150_t *dev = netdev_priv(netdev);
int count, res; int count, res;
......
...@@ -1007,15 +1007,16 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout); ...@@ -1007,15 +1007,16 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
struct net_device *net)
{ {
struct usbnet *dev = netdev_priv(net); struct usbnet *dev = netdev_priv(net);
int length; int length;
int retval = NET_XMIT_SUCCESS;
struct urb *urb = NULL; struct urb *urb = NULL;
struct skb_data *entry; struct skb_data *entry;
struct driver_info *info = dev->driver_info; struct driver_info *info = dev->driver_info;
unsigned long flags; unsigned long flags;
int retval;
// some devices want funky USB-level framing, for // some devices want funky USB-level framing, for
// win32 driver (usually) and/or hardware quirks // win32 driver (usually) and/or hardware quirks
...@@ -1079,7 +1080,6 @@ int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) ...@@ -1079,7 +1080,6 @@ int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
if (netif_msg_tx_err (dev)) if (netif_msg_tx_err (dev))
devdbg (dev, "drop, code %d", retval); devdbg (dev, "drop, code %d", retval);
drop: drop:
retval = NET_XMIT_SUCCESS;
dev->net->stats.tx_dropped++; dev->net->stats.tx_dropped++;
if (skb) if (skb)
dev_kfree_skb_any (skb); dev_kfree_skb_any (skb);
...@@ -1088,7 +1088,7 @@ int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) ...@@ -1088,7 +1088,7 @@ int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
devdbg (dev, "> tx, len %d, type 0x%x", devdbg (dev, "> tx, len %d, type 0x%x",
length, skb->protocol); length, skb->protocol);
} }
return retval; return NETDEV_TX_OK;
} }
EXPORT_SYMBOL_GPL(usbnet_start_xmit); EXPORT_SYMBOL_GPL(usbnet_start_xmit);
......
...@@ -465,7 +465,8 @@ static inline int is_promisc(u16 cdc_filter) ...@@ -465,7 +465,8 @@ static inline int is_promisc(u16 cdc_filter)
return cdc_filter & USB_CDC_PACKET_TYPE_PROMISCUOUS; return cdc_filter & USB_CDC_PACKET_TYPE_PROMISCUOUS;
} }
static int eth_start_xmit(struct sk_buff *skb, struct net_device *net) static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
struct net_device *net)
{ {
struct eth_dev *dev = netdev_priv(net); struct eth_dev *dev = netdev_priv(net);
int length = skb->len; int length = skb->len;
......
...@@ -182,7 +182,8 @@ struct skb_data { /* skb->cb is one of these */ ...@@ -182,7 +182,8 @@ struct skb_data { /* skb->cb is one of these */
extern int usbnet_open (struct net_device *net); extern int usbnet_open (struct net_device *net);
extern int usbnet_stop (struct net_device *net); extern int usbnet_stop (struct net_device *net);
extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net); extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
struct net_device *net);
extern void usbnet_tx_timeout (struct net_device *net); extern void usbnet_tx_timeout (struct net_device *net);
extern int usbnet_change_mtu (struct net_device *net, int new_mtu); extern int usbnet_change_mtu (struct net_device *net, int new_mtu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment