diff options
author | Pavel Roskin <proski@gnu.org> | 2006-04-07 04:10:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-04-24 16:15:50 -0400 |
commit | b34b867e944628418d587367276c9a82e03aba8c (patch) | |
tree | 5e2222980d25a95ab478cbe42bd8b84244cbfccf /drivers | |
parent | 30c2d3b48176279b1381b00ae86f3d01147d0915 (diff) |
[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: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/orinoco.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index ceea494ff5d0..173e9e4523c0 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -430,19 +430,19 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
430 | if (! netif_running(dev)) { | 430 | if (! netif_running(dev)) { |
431 | printk(KERN_ERR "%s: Tx on stopped device!\n", | 431 | printk(KERN_ERR "%s: Tx on stopped device!\n", |
432 | dev->name); | 432 | dev->name); |
433 | return 1; | 433 | return NETDEV_TX_BUSY; |
434 | } | 434 | } |
435 | 435 | ||
436 | if (netif_queue_stopped(dev)) { | 436 | if (netif_queue_stopped(dev)) { |
437 | printk(KERN_DEBUG "%s: Tx while transmitter busy!\n", | 437 | printk(KERN_DEBUG "%s: Tx while transmitter busy!\n", |
438 | dev->name); | 438 | dev->name); |
439 | return 1; | 439 | return NETDEV_TX_BUSY; |
440 | } | 440 | } |
441 | 441 | ||
442 | if (orinoco_lock(priv, &flags) != 0) { | 442 | if (orinoco_lock(priv, &flags) != 0) { |
443 | printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n", | 443 | printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n", |
444 | dev->name); | 444 | dev->name); |
445 | return 1; | 445 | return NETDEV_TX_BUSY; |
446 | } | 446 | } |
447 | 447 | ||
448 | if (! netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) { | 448 | 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 | stats->tx_errors++; | 452 | stats->tx_errors++; |
453 | orinoco_unlock(priv, &flags); | 453 | orinoco_unlock(priv, &flags); |
454 | dev_kfree_skb(skb); | 454 | dev_kfree_skb(skb); |
455 | return 0; | 455 | return NETDEV_TX_OK; |
456 | } | 456 | } |
457 | 457 | ||
458 | /* Length of the packet body */ | 458 | /* Length of the packet body */ |
@@ -551,11 +551,11 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
551 | 551 | ||
552 | dev_kfree_skb(skb); | 552 | dev_kfree_skb(skb); |
553 | 553 | ||
554 | return 0; | 554 | return NETDEV_TX_OK; |
555 | fail: | 555 | fail: |
556 | 556 | ||
557 | orinoco_unlock(priv, &flags); | 557 | orinoco_unlock(priv, &flags); |
558 | return err; | 558 | return NETDEV_TX_BUSY; |
559 | } | 559 | } |
560 | 560 | ||
561 | static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw) | 561 | static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw) |