diff options
Diffstat (limited to 'drivers/net/wan/dlci.c')
-rw-r--r-- | drivers/net/wan/dlci.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 2fa275a58f9d..69d269d32b5b 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c @@ -186,20 +186,21 @@ 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(0); + return NETDEV_TX_OK; dlp = netdev_priv(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; @@ -219,7 +220,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev) /* Alan Cox recommends always returning 0, and always freeing the packet */ /* experience suggest a slightly more conservative approach */ - if (!ret) + if (ret == NETDEV_TX_OK) { dev_kfree_skb(skb); netif_wake_queue(dev); |