提交 b34b867e 编写于 作者: P Pavel Roskin 提交者: John W. Linville

[PATCH] orinoco: orinoco_xmit() should only return valid symbolic constants

Don't ever return -errno from orinoco_xmit() - the network layer doesn't
expect it.
Signed-off-by: NPavel Roskin <proski@gnu.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 30c2d3b4
...@@ -430,19 +430,19 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -430,19 +430,19 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
if (! netif_running(dev)) { if (! netif_running(dev)) {
printk(KERN_ERR "%s: Tx on stopped device!\n", printk(KERN_ERR "%s: Tx on stopped device!\n",
dev->name); dev->name);
return 1; return NETDEV_TX_BUSY;
} }
if (netif_queue_stopped(dev)) { if (netif_queue_stopped(dev)) {
printk(KERN_DEBUG "%s: Tx while transmitter busy!\n", printk(KERN_DEBUG "%s: Tx while transmitter busy!\n",
dev->name); dev->name);
return 1; return NETDEV_TX_BUSY;
} }
if (orinoco_lock(priv, &flags) != 0) { if (orinoco_lock(priv, &flags) != 0) {
printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n", printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n",
dev->name); dev->name);
return 1; return NETDEV_TX_BUSY;
} }
if (! netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) { if (! netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) {
...@@ -452,7 +452,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -452,7 +452,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
stats->tx_errors++; stats->tx_errors++;
orinoco_unlock(priv, &flags); orinoco_unlock(priv, &flags);
dev_kfree_skb(skb); dev_kfree_skb(skb);
return 0; return NETDEV_TX_OK;
} }
/* Length of the packet body */ /* Length of the packet body */
...@@ -551,11 +551,11 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -551,11 +551,11 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
dev_kfree_skb(skb); dev_kfree_skb(skb);
return 0; return NETDEV_TX_OK;
fail: fail:
orinoco_unlock(priv, &flags); orinoco_unlock(priv, &flags);
return err; return NETDEV_TX_BUSY;
} }
static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw) static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册