summaryrefslogtreecommitdiff
path: root/drivers/net/wan/dlci.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-31 23:50:47 +0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 12:13:28 +0400
commitd71a674922e7519edb477ecb585e7d29d69c7aa7 (patch)
tree816f6936957d5dbe2670079f64bdbd1f52cec00d /drivers/net/wan/dlci.c
parent61a84108547c1c017683f15311ccbede249fc6fa (diff)
downloadlinux-d71a674922e7519edb477ecb585e7d29d69c7aa7.tar.xz
wan: convert drivers 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/wan/dlci.c')
-rw-r--r--drivers/net/wan/dlci.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index 8526b6d1ee4d..69d269d32b5b 100644
--- a/drivers/net/wan/dlci.c
+++ b/drivers/net/wan/dlci.c
@@ -186,12 +186,11 @@ static void dlci_receive(struct sk_buff *skb, struct net_device *dev)
dev_kfree_skb(skb);
}
-static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t dlci_transmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct dlci_local *dlp;
- int ret;
-
- ret = 0;
+ netdev_tx_t ret;
if (!skb || !dev)
return NETDEV_TX_OK;
@@ -200,6 +199,8 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue(dev);
+ /* This is hackish, overloads driver specific return values
+ on top of normal transmit return! */
ret = dlp->slave->netdev_ops->ndo_start_xmit(skb, dlp->slave);
switch (ret)
{
@@ -207,11 +208,11 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_packets++;
ret = NETDEV_TX_OK;
break;
- case DLCI_RET_ERR:
+ case DLCI_RET_ERR:
dev->stats.tx_errors++;
ret = NETDEV_TX_OK;
break;
- case DLCI_RET_DROP:
+ case DLCI_RET_DROP:
dev->stats.tx_dropped++;
ret = NETDEV_TX_BUSY;
break;