net: use symbolic values for ndo_start_xmit() return codes
authorPatrick McHardy <kaber@trash.net>
Fri, 12 Jun 2009 06:22:29 +0000 (06:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Jun 2009 08:18:50 +0000 (01:18 -0700)
Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively.

0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases
where its in direct proximity to one of the other values.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
81 files changed:
drivers/isdn/i4l/isdn_net.c
drivers/message/fusion/mptlan.c
drivers/net/3c505.c
drivers/net/3c515.c
drivers/net/3c527.c
drivers/net/3c59x.c
drivers/net/7990.c
drivers/net/8139cp.c
drivers/net/a2065.c
drivers/net/arm/at91_ether.c
drivers/net/arm/ether3.c
drivers/net/au1000_eth.c
drivers/net/cassini.c
drivers/net/cs89x0.c
drivers/net/de600.c
drivers/net/de620.c
drivers/net/defxx.c
drivers/net/depca.c
drivers/net/dm9000.c
drivers/net/e100.c
drivers/net/ewrk3.c
drivers/net/fec.c
drivers/net/hamachi.c
drivers/net/hamradio/baycom_epp.c
drivers/net/hamradio/hdlcdrv.c
drivers/net/hamradio/mkiss.c
drivers/net/ibm_newemac/core.c
drivers/net/irda/au1k_ir.c
drivers/net/irda/sir_dev.c
drivers/net/lib8390.c
drivers/net/mac89x0.c
drivers/net/macb.c
drivers/net/mace.c
drivers/net/myri10ge/myri10ge.c
drivers/net/myri_sbus.c
drivers/net/ni65.c
drivers/net/ns83820.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/plip.c
drivers/net/sb1250-mac.c
drivers/net/sh_eth.c
drivers/net/sis900.c
drivers/net/skfp/skfddi.c
drivers/net/smc9194.c
drivers/net/sonic.c
drivers/net/starfire.c
drivers/net/sun3_82586.c
drivers/net/sun3lance.c
drivers/net/sunhme.c
drivers/net/tlan.c
drivers/net/tokenring/3c359.c
drivers/net/tokenring/lanstreamer.c
drivers/net/tokenring/olympic.c
drivers/net/tokenring/smctr.c
drivers/net/tokenring/tms380tr.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/de4x5.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/uli526x.c
drivers/net/wan/dlci.c
drivers/net/wan/sbni.c
drivers/net/wan/wanxl.c
drivers/net/wireless/airo.c
drivers/net/wireless/arlan-main.c
drivers/net/wireless/atmel.c
drivers/net/wireless/hostap/hostap_80211_tx.c
drivers/net/wireless/ipw2x00/libipw_tx.c
drivers/net/wireless/ray_cs.c
drivers/net/wireless/strip.c
drivers/net/wireless/wavelan.c
drivers/s390/net/netiucv.c
drivers/staging/et131x/et131x_netdev.c
drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
drivers/staging/wlan-ng/p80211netdev.c
drivers/usb/gadget/u_ether.c
net/mac80211/tx.c
net/rose/rose_dev.c
net/sched/sch_teql.c

index cb8943da4f122f8c3fdf2703d405160ddad309b5..34d54e7281fd13aabf5b72cbf4a471a6e433ddb8 100644 (file)
@@ -1069,7 +1069,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
        lp = isdn_net_get_locked_lp(nd);
        if (!lp) {
                printk(KERN_WARNING "%s: all channels busy - requeuing!\n", ndev->name);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        /* we have our lp locked from now on */
 
@@ -1273,14 +1273,14 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
                                        spin_unlock_irqrestore(&dev->lock, flags);
                                        isdn_net_dial();        /* Initiate dialing */
                                        netif_stop_queue(ndev);
-                                       return 1;       /* let upper layer requeue skb packet */
+                                       return NETDEV_TX_BUSY;  /* let upper layer requeue skb packet */
                                }
 #endif
                                /* Initiate dialing */
                                spin_unlock_irqrestore(&dev->lock, flags);
                                isdn_net_dial();
                                isdn_net_device_stop_queue(lp);
-                               return 1;
+                               return NETDEV_TX_BUSY;
                        } else {
                                isdn_net_unreachable(ndev, skb,
                                                     "No phone number");
index c2804f26cb44256a56a1dbb54213bd9d45eaca60..a9e48e28b1dc79fdd0d04b24a30a9bbbe258edfb 100644 (file)
@@ -703,7 +703,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
 
                printk (KERN_ERR "%s: no tx context available: %u\n",
                        __func__, priv->mpt_txfidx_tail);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        mf = mpt_get_msg_frame(LanCtx, mpt_dev);
@@ -713,7 +713,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
 
                printk (KERN_ERR "%s: Unable to alloc request frame\n",
                        __func__);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        ctx = priv->mpt_txfidx[priv->mpt_txfidx_tail--];
index b28499459cd6c4d0110dc1f4d1e25bd4d0866eb8..f71b3540275540bb927446d6958265d642e7f8bf 100644 (file)
@@ -1088,7 +1088,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        pr_debug("%s: failed to transmit packet\n", dev->name);
                }
                spin_unlock_irqrestore(&adapter->lock, flags);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        if (elp_debug >= 3)
                pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len);
index 7fd0ff743757feb01dcde1486d285b72fc02e10b..3e00fa8ea65f106544c7a5f67a4c6535d499c690 100644 (file)
@@ -1014,7 +1014,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,
                int i;
 
                if (vp->tx_full)        /* No room to transmit with */
-                       return 1;
+                       return NETDEV_TX_BUSY;
                if (vp->cur_tx != 0)
                        prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE];
                else
index c10ca30458f65ed30b6ccbdee43c975bc5835a2d..aaa8a9f405d4f9877c4b68b41672390f48ac6193 100644 (file)
@@ -1030,7 +1030,7 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
        netif_stop_queue(dev);
 
        if(atomic_read(&lp->tx_count)==0) {
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        if (skb_padto(skb, ETH_ZLEN)) {
index a6e8a2da3bcd1d0781b9f3409d12edea74836d5b..c34aee91250b031176b3028563498ae62e0c0d1a 100644 (file)
@@ -2107,7 +2107,7 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        pr_warning("%s: BUG! Tx Ring full, refusing to send buffer.\n",
                                   dev->name);
                netif_stop_queue(dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        vp->tx_skbuff[entry] = skb;
index 7a331acc34add0b755b92c1c4379f4292c5b14e8..69f5b7d298a60b722dfe0b773713aca508d110d4 100644 (file)
@@ -541,7 +541,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
        unsigned long flags;
 
         if (!TX_BUFFS_AVAIL)
-                return -1;
+                return NETDEV_TX_LOCKED;
 
        netif_stop_queue (dev);
 
index c9fc0ff14a4d7db87ba7a0ef0d1927ce31846155..50efde11ea6c8790e8f0e679d9faaeb15e40f6f6 100644 (file)
@@ -756,7 +756,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
                spin_unlock_irqrestore(&cp->lock, intr_flags);
                pr_err(PFX "%s: BUG! Tx Ring full when queue awake!\n",
                       dev->name);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
 #if CP_VLAN_TAG_USED
index 02f64d57864163d05c6e5714e694d635e4373070..85a18175730ba249ab36c5985a654e34df1eb05c 100644 (file)
@@ -564,7 +564,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
        if (!TX_BUFFS_AVAIL){
                local_irq_restore(flags);
-               return -1;
+               return NETDEV_TX_LOCKED;
        }
 
 #ifdef DEBUG_DRIVER
index 7f4bc8ae5462190f777951c1eec6cf1e35dbd679..2e7419a6119181b29538720114e59b74bf15c578 100644 (file)
@@ -829,7 +829,7 @@ static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
                dev->trans_start = jiffies;
        } else {
                printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n");
-               return 1;       /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb)
+               return NETDEV_TX_BUSY;  /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb)
                                on this skb, he also reports -ENETDOWN and printk's, so either
                                we free and return(0) or don't free and return 1 */
        }
index ec8a1ae1e887dbb1cce9c4e771b4c74d3e406b9e..455037134aa339b075c9d1967cc322717fb32412 100644 (file)
@@ -526,7 +526,7 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev)
 
        if (priv(dev)->tx_tail == next_ptr) {
                local_irq_restore(flags);
-               return 1;       /* unable to queue */
+               return NETDEV_TX_BUSY;  /* unable to queue */
        }
 
        dev->trans_start = jiffies;
index d58c105fc77939491f432e95648e3108f508ca24..d3c734f4d679956e3fb16d88473ebeee35568606 100644 (file)
@@ -957,7 +957,7 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
                /* We've wrapped around and the transmitter is still busy */
                netif_stop_queue(dev);
                aup->tx_full = 1;
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        else if (buff_stat & TX_T_DONE) {
                update_tx_stats(dev, ptxd->status);
index f5222764061c4677b8e9ac2f2661d3f5b7eb0107..eb066673c2a0513e225f2633ffce24e5b0e9a808 100644 (file)
@@ -2934,7 +2934,7 @@ static int cas_start_xmit(struct sk_buff *skb, struct net_device *dev)
         *      individual queues.
         */
        if (cas_xmit_tx_ringN(cp, ring++ & N_TX_RINGS_MASK, skb))
-               return 1;
+               return NETDEV_TX_BUSY;
        dev->trans_start = jiffies;
        return 0;
 }
index 7433b88eed7e958f0666d02bafac62657add0bc0..3eee666a9cd26773fa4712704cf7066ec7f0cbc5 100644 (file)
@@ -1551,7 +1551,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
 
                spin_unlock_irq(&lp->lock);
                if (net_debug) printk("cs89x0: Tx buffer not free!\n");
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        /* Write the contents of the packet */
        writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1);
index c866ca99a068932ecb61c6d85f97a61e5f217bd8..e1af089064bc8eb17e08dddf03022bc184b306de 100644 (file)
@@ -168,14 +168,14 @@ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev)
        if (free_tx_pages <= 0) {       /* Do timeouts, to avoid hangs. */
                tickssofar = jiffies - dev->trans_start;
                if (tickssofar < 5)
-                       return 1;
+                       return NETDEV_TX_BUSY;
                /* else */
                printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem");
                /* Restart the adapter. */
                spin_lock_irqsave(&de600_lock, flags);
                if (adapter_init(dev)) {
                        spin_unlock_irqrestore(&de600_lock, flags);
-                       return 1;
+                       return NETDEV_TX_BUSY;
                }
                spin_unlock_irqrestore(&de600_lock, flags);
        }
@@ -199,7 +199,7 @@ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev)
                if (was_down || (de600_read_byte(READ_DATA, dev) != 0xde)) {
                        if (adapter_init(dev)) {
                                spin_unlock_irqrestore(&de600_lock, flags);
-                               return 1;
+                               return NETDEV_TX_BUSY;
                        }
                }
        }
index 039bc1acadd3e0fa7b8035b200bbc400715e50d3..55d2bb67cffa66c9ecefcf7762bbad050c9727dd 100644 (file)
@@ -531,7 +531,7 @@ static int de620_start_xmit(struct sk_buff *skb, struct net_device *dev)
        case (TXBF0 | TXBF1): /* NONE!!! */
                printk(KERN_WARNING "%s: No tx-buffer available!\n", dev->name);
                spin_unlock_irqrestore(&de620_lock, flags);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        de620_write_block(dev, buffer, skb->len, len-skb->len);
 
index 4ec055dc7174ceed6f17302d132a484151ab7671..102b8d4397144bf624ae4ab752fb4f45ab3b3002 100644 (file)
@@ -3318,7 +3318,7 @@ static int dfx_xmt_queue_pkt(
        {
                skb_pull(skb,3);
                spin_unlock_irqrestore(&bp->lock, flags);
-               return(1);                      /* requeue packet for later */
+               return NETDEV_TX_BUSY;  /* requeue packet for later */
        }
 
        /*
index 9301eb28d9e2e04ba2c9cdade16b2b98844c2c61..97ea2d6d3fe16cc5ac72d68739633d9da8bae637 100644 (file)
@@ -957,7 +957,7 @@ static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev)
                if (TX_BUFFS_AVAIL)
                        netif_start_queue(dev);
        } else
-               status = -1;
+               status = NETDEV_TX_LOCKED;
 
       out:
        return status;
@@ -1839,7 +1839,7 @@ static int load_packet(struct net_device *dev, struct sk_buff *skb)
 
                lp->tx_new = (++end) & lp->txRingMask;  /* update current pointers */
        } else {
-               status = -1;
+               status = NETDEV_TX_LOCKED;
        }
 
        return status;
index e402e91bf1884f8e5e1cbd3ea8121cfa5aac7362..dd771dea6ae62f6e1292f4bf674abcfe961b6aaf 100644 (file)
@@ -756,7 +756,7 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
        dm9000_dbg(db, 3, "%s:\n", __func__);
 
        if (db->tx_pkt_cnt > 1)
-               return 1;
+               return NETDEV_TX_BUSY;
 
        spin_lock_irqsave(&db->lock, flags);
 
index 119dc5300f9d089f2910895f4df17628513538f0..e52a2018e91e3e59db5088cd8a91f70045893a86 100644 (file)
@@ -1716,7 +1716,7 @@ static int e100_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
                /* This is a hard error - log it. */
                DPRINTK(TX_ERR, DEBUG, "Out of Tx resources, returning skb\n");
                netif_stop_queue(netdev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        netdev->trans_start = jiffies;
index 1a685a04d4b28212518c2bdc052fffc01e22553d..1e9723281405b6c5e52b15a29652efab8214b243 100644 (file)
@@ -873,7 +873,7 @@ static int ewrk3_queue_pkt (struct sk_buff *skb, struct net_device *dev)
 err_out:
        ENABLE_IRQs;
        spin_unlock_irq (&lp->hw_lock);
-       return 1;
+       return NETDEV_TX_BUSY;
 }
 
 /*
index 28db6919c5262ba6b7007dbede97983d0697cbd6..0f19b743749bdf8b52783793276c36a247f3f928 100644 (file)
@@ -290,7 +290,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        if (!fep->link) {
                /* Link is down or autonegotiation is in progress. */
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        spin_lock_irqsave(&fep->hw_lock, flags);
@@ -305,7 +305,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
                 */
                printk("%s: tx queue full!.\n", dev->name);
                spin_unlock_irqrestore(&fep->hw_lock, flags);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        /* Clear all of the status flags */
index 26151fa35df5891b43fe46a86b0149efcbc9e6c1..9d5b62cb30f790de7f198b4d67e7e619b82d7878 100644 (file)
@@ -1280,7 +1280,7 @@ static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev)
                status=readw(hmp->base + TxStatus);
                if( !(status & 0x0001) || (status & 0x0002))
                        writew(0x0001, hmp->base + TxCmd);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        /* Caution: the write order is important here, set the field
index bb78c11559cd2cd9cb0876cbe2630816b539aea3..5e4b7afd068395b343f5ad267673eed7090e197a 100644 (file)
@@ -777,7 +777,7 @@ static int baycom_send_packet(struct sk_buff *skb, struct net_device *dev)
                return 0;
        }
        if (bc->skb)
-               return -1;
+               return NETDEV_TX_LOCKED;
        /* strip KISS byte */
        if (skb->len >= HDLCDRV_MAXFLEN+1 || skb->len < 3) {
                dev_kfree_skb(skb);
index 61de56e45eedb509bc33bca2ed120b4868ab5c7f..d034f8ca63cb9a3b1b5aa18aefd9892e4abd9f1e 100644 (file)
@@ -409,7 +409,7 @@ static int hdlcdrv_send_packet(struct sk_buff *skb, struct net_device *dev)
                return 0;
        }
        if (sm->skb)
-               return -1;
+               return NETDEV_TX_LOCKED;
        netif_stop_queue(dev);
        sm->skb = skb;
        return 0;
index 032c0db4c410b0d516f04f951ba1ed4d48fa5f35..fda2fc83e9a124c66c3f7d3754e8312a36b172f8 100644 (file)
@@ -531,7 +531,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev)
 
        if (!netif_running(dev))  {
                printk(KERN_ERR "mkiss: %s: xmit call when iface is down\n", dev->name);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        if (netif_queue_stopped(dev)) {
@@ -541,7 +541,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev)
                 */
                if (time_before(jiffies, dev->trans_start + 20 * HZ)) {
                        /* 20 sec timeout not reached */
-                       return 1;
+                       return NETDEV_TX_BUSY;
                }
 
                printk(KERN_ERR "mkiss: %s: transmit timed out, %s?\n", dev->name,
index 806533c831c7e8ecc43fecf607d81c5342900064..beb84213b6719ba614641e56af5862dd5581ad9e 100644 (file)
@@ -1484,7 +1484,7 @@ static int emac_start_xmit_sg(struct sk_buff *skb, struct net_device *ndev)
  stop_queue:
        netif_stop_queue(ndev);
        DBG2(dev, "stopped TX queue" NL);
-       return 1;
+       return NETDEV_TX_BUSY;
 }
 
 /* Tx lock BHs */
index 269153eedd264697effa27bb618442db3e0a55cd..c4361d466597c50963c9a0dc594c6cd3b3e41b7e 100644 (file)
@@ -512,13 +512,13 @@ static int au1k_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev)
                printk(KERN_DEBUG "%s: tx_full\n", dev->name);
                netif_stop_queue(dev);
                aup->tx_full = 1;
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        else if (((aup->tx_head + 1) & (NUM_IR_DESC - 1)) == aup->tx_tail) {
                printk(KERN_DEBUG "%s: tx_full\n", dev->name);
                netif_stop_queue(dev);
                aup->tx_full = 1;
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        pDB = aup->tx_db_inuse[aup->tx_head];
index d940809762eca2bafa6c2966e4fc1b717b863d20..fd0796c3db3cf7889a21ff72d8ffc49b38b919d1 100644 (file)
@@ -607,7 +607,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
                                 * stopped so the network layer will retry after the
                                 * fsm completes and wakes the queue.
                                 */
-                                return 1;
+                                return NETDEV_TX_BUSY;
                        }
                        else if (unlikely(err)) {
                                /* other fatal error - forget the speed change and
index 789b6cb744b284ee08d4c749ab9fa210dc34170e..f28c23343009f26869bcaa8f13f1a0dc85ad54b7 100644 (file)
@@ -370,7 +370,7 @@ static int __ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
                spin_unlock(&ei_local->page_lock);
                enable_irq_lockdep_irqrestore(dev->irq, &flags);
                dev->stats.tx_errors++;
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        /*
index e24175a39460c0d90cb39784880b3b02891b588d..dab45339d3a876eee8fd0a326f6b2dca9350d868 100644 (file)
@@ -400,7 +400,7 @@ net_send_packet(struct sk_buff *skb, struct net_device *dev)
                /* Gasp!  It hasn't.  But that shouldn't happen since
                   we're waiting for TxOk, so return 1 and requeue this packet. */
                local_irq_restore(flags);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        /* Write the contents of the packet */
index 722265920da8c6341916a777a68b2cdaec33c222..5b5c25368d1e559e9f2dbbb71013f13efa293ce7 100644 (file)
@@ -645,7 +645,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        "BUG! Tx Ring full when queue awake!\n");
                dev_dbg(&bp->pdev->dev, "tx_head = %u, tx_tail = %u\n",
                        bp->tx_head, bp->tx_tail);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        entry = bp->tx_head;
index 1ad740bc887817ecc399b3f39a814b454b5a3a70..1427755c224d982c0c26807da94a04baa20f4478 100644 (file)
@@ -547,7 +547,7 @@ static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev)
        netif_stop_queue(dev);
        mp->tx_fullup = 1;
        spin_unlock_irqrestore(&mp->lock, flags);
-       return 1;               /* can't take it at the moment */
+       return NETDEV_TX_BUSY;          /* can't take it at the moment */
     }
     spin_unlock_irqrestore(&mp->lock, flags);
 
index c9a30d3a66fb3c2a40ff4a0a39b93a4e7d4363a8..1f6e36ea669edad675f99a01f3e1678525ae984e 100644 (file)
@@ -2687,7 +2687,7 @@ again:
                /* we are out of transmit resources */
                tx->stop_queue++;
                netif_tx_stop_queue(netdev_queue);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        /* Setup checksum offloading, if needed */
index 9a802adba9a328e5047843fc8ba8e5ca31abe9a8..5f0758bda6b3ea0572aaed03454dfb2b8ce0d117 100644 (file)
@@ -640,7 +640,7 @@ static int myri_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        if (!TX_BUFFS_AVAIL(head, tail)) {
                DTX(("no buffs available, returning 1\n"));
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        spin_lock_irqsave(&mp->irq_lock, flags);
index 6474f02bf78391c758445bd6f24a1f10e3f85fc0..1f10ed603e20bc4ee7943346020b557d3415229a 100644 (file)
@@ -1165,7 +1165,7 @@ static int ni65_send_packet(struct sk_buff *skb, struct net_device *dev)
 
        if (test_and_set_bit(0, (void*)&p->lock)) {
                printk(KERN_ERR "%s: Queue was locked.\n", dev->name);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        {
index 940962ae8f230fe865acfa6cad4dc9a5f10697e0..1576ac07216ec9bb7a65576336945804a4353168 100644 (file)
@@ -1097,7 +1097,7 @@ again:
        if (unlikely(dev->CFG_cache & CFG_LNKSTS)) {
                netif_stop_queue(ndev);
                if (unlikely(dev->CFG_cache & CFG_LNKSTS))
-                       return 1;
+                       return NETDEV_TX_BUSY;
                netif_start_queue(ndev);
        }
 
@@ -1115,7 +1115,7 @@ again:
                        netif_start_queue(ndev);
                        goto again;
                }
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        if (free_idx == dev->tx_intr_idx) {
index 15b8fe61695bed13cfdcadd3d38cae59d420b9b5..0e38d80fd25594768f9b9412c453c376a8310b4f 100644 (file)
@@ -1130,7 +1130,7 @@ static int axnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
                outb_p(ENISR_ALL, e8390_base + EN0_IMR);
                spin_unlock_irqrestore(&ei_local->page_lock, flags);
                dev->stats.tx_errors++;
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        /*
index 81e6660a433ad9dcd892d3aebf5d3a885ce5e334..479d5b4943713ad376b847f9872d06f2b0f7f2e0 100644 (file)
@@ -877,7 +877,7 @@ static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev)
        if (length > ETH_FRAME_LEN) {
            printk(KERN_NOTICE "%s: Attempting to send a large packet"
                   " (%d bytes).\n", dev->name, length);
-           return 1;
+           return NETDEV_TX_BUSY;
        }
 
        DEBUG(4, "%s: Transmitting a packet of length %lu.\n",
index 48dbb35747d8aefa4f04ee098e1f8dd37b022ed7..37e05d3ab893b7c8c74478b01bc2e7e0bf4053f1 100644 (file)
@@ -1388,7 +1388,7 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
        dev->stats.tx_aborted_errors++;
        printk(KERN_DEBUG "%s: Internal error -- sent packet while busy.\n",
               dev->name);
-       return 1;
+       return NETDEV_TX_BUSY;
     }
     smc->saved_skb = skb;
 
index a3685c0d22fc3a2fd26a072019386395862586f5..ef37d22c7e1d4dcaf264ee09a96b333d6334ee5f 100644 (file)
@@ -1399,7 +1399,7 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev)
     DEBUG(2 + (okay ? 2 : 0), "%s: avail. tx space=%u%s\n",
          dev->name, freespace, okay ? " (okay)":" (not enough)");
     if (!okay) { /* not enough space */
-       return 1;  /* upper layer may decide to requeue this packet */
+       return NETDEV_TX_BUSY;  /* upper layer may decide to requeue this packet */
     }
     /* send the packet */
     PutWord(XIRCREG_EDP, (u_short)pktlen);
index 0be0f0b164f3cf6833701ecbf26369293d07fe3e..7a62f781fef2b83fdfe55dc0cad944cb5a2d7c8b 100644 (file)
@@ -955,12 +955,12 @@ plip_tx_packet(struct sk_buff *skb, struct net_device *dev)
        struct plip_local *snd = &nl->snd_data;
 
        if (netif_queue_stopped(dev))
-               return 1;
+               return NETDEV_TX_BUSY;
 
        /* We may need to grab the bus */
        if (!nl->port_owner) {
                if (parport_claim(nl->pardev))
-                       return 1;
+                       return NETDEV_TX_BUSY;
                nl->port_owner = 1;
        }
 
@@ -969,7 +969,7 @@ plip_tx_packet(struct sk_buff *skb, struct net_device *dev)
        if (skb->len > dev->mtu + dev->hard_header_len) {
                printk(KERN_WARNING "%s: packet too big, %d.\n", dev->name, (int)skb->len);
                netif_start_queue (dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        if (net_debug > 2)
index 7a4b9fbddbaffdb5857222b64980b5a0b4521f72..d8c9cf1b901d7f8c5780ffff4b61490fcfd65c54 100644 (file)
@@ -2084,7 +2084,7 @@ static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
                netif_stop_queue(dev);
                spin_unlock_irqrestore(&sc->sbm_lock, flags);
 
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        dev->trans_start = jiffies;
index 0709b7512467d3bf3d731931ffb1137c82f88d8a..341882f959f3c9eb12de2cb5afa4b422062c5636 100644 (file)
@@ -1108,7 +1108,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
                if (!sh_eth_txfree(ndev)) {
                        netif_stop_queue(ndev);
                        spin_unlock_irqrestore(&mdp->lock, flags);
-                       return 1;
+                       return NETDEV_TX_BUSY;
                }
        }
        spin_unlock_irqrestore(&mdp->lock, flags);
index 2d4617b3e2087c9a7bcc9bf33a83f3e00bbf77cb..a9a897bb42d57f0342a7ee0405c06d005b51046d 100644 (file)
@@ -1584,7 +1584,7 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
        /* Don't transmit data before the complete of auto-negotiation */
        if(!sis_priv->autong_complete){
                netif_stop_queue(net_dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        spin_lock_irqsave(&sis_priv->lock, flags);
index 19d343c42a21ab856e68cbcf67d759c2bc4fddfe..088fe26484e70a681818bc01c163d27d5638639d 100644 (file)
@@ -1082,7 +1082,7 @@ static int skfp_send_pkt(struct sk_buff *skb, struct net_device *dev)
        if (bp->QueueSkb == 0) {        // return with tbusy set: queue full
 
                netif_stop_queue(dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        bp->QueueSkb--;
        skb_queue_tail(&bp->SendSkbQueue, skb);
index 9a7973a541168b0f675080cd5a44feb7a2bacbe5..e02471b2f2b5c483e9238b2e2c783e843edefa74 100644 (file)
@@ -503,7 +503,7 @@ static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device * de
                /* THIS SHOULD NEVER HAPPEN. */
                dev->stats.tx_aborted_errors++;
                printk(CARDNAME": Bad Craziness - sent packet while busy.\n" );
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        lp->saved_skb = skb;
 
index 211e805c122350a2707e90858321d8a8fd4a5a60..e4255d82938063dd73dfb7521064fe2d4e920892 100644 (file)
@@ -223,7 +223,7 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
        if (!laddr) {
                printk(KERN_ERR "%s: failed to map tx DMA buffer.\n", dev->name);
                dev_kfree_skb(skb);
-               return 1;
+               return NETDEV_TX_BUSY
        }
 
        sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0);       /* clear status */
index fcb943fca4f128716312257bbbb6e26a1cebc40e..838cce8b8fff3969286408536ad92b06f36e6063 100644 (file)
@@ -1236,7 +1236,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
         */
        if ((np->cur_tx - np->dirty_tx) + skb_num_frags(skb) * 2 > TX_RING_SIZE) {
                netif_stop_queue(dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
 #if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE)
index a39c0b9ba8b6e57fa3f0efc279eff04e3f6a1e17..7bb27426dbd669e7d43e770e00885937861aaa86 100644 (file)
@@ -1023,7 +1023,7 @@ static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev)
 #if(NUM_XMIT_BUFFS > 1)
        if(test_and_set_bit(0,(void *) &p->lock)) {
                printk("%s: Queue was locked\n",dev->name);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        else
 #endif
index 9bd9dadb8534bf4b1c2f240b34a0435e1db4923d..534dfe3eef6ffdeabd173a1dbd00d0c20ae01a9f 100644 (file)
@@ -526,7 +526,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
        if (netif_queue_stopped(dev)) {
                int tickssofar = jiffies - dev->trans_start;
                if (tickssofar < 20)
-                       return( 1 );
+                       return NETDEV_TX_BUSY;
 
                DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n",
                                          dev->name, DREG ));
@@ -577,7 +577,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
        if (test_and_set_bit( 0, (void*)&lp->lock ) != 0) {
                printk( "%s: tx queue lock!.\n", dev->name);
                /* don't clear dev->tbusy flag. */
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        AREG = CSR0;
index 4e9bd380a5c2ea2b50661627e439da2a9bc2712e..4ef729198e10b6630692fef18b2a47cb88bc10b6 100644 (file)
@@ -2275,7 +2275,7 @@ static int happy_meal_start_xmit(struct sk_buff *skb, struct net_device *dev)
                spin_unlock_irq(&hp->happy_lock);
                printk(KERN_ERR "%s: BUG! Tx Ring full when queue awake!\n",
                       dev->name);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        entry = hp->tx_new;
index aa6964922d5e20b54be7d5c6238b2ca72312a8f3..384cb5e28397924536bdbf79fa43ffbf8bb30b55 100644 (file)
@@ -1111,7 +1111,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
                          dev->name, priv->txHead, priv->txTail );
                netif_stop_queue(dev);
                priv->txBusyCount++;
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        tail_list->forward = 0;
index 534c0f38483c3ea97cb47097182f817deab369db..13dbc59bfe42f0f81785446499fe4568d52a79db 100644 (file)
@@ -1243,7 +1243,7 @@ static int xl_xmit(struct sk_buff *skb, struct net_device *dev)
                return 0;
        } else {
                spin_unlock_irqrestore(&xl_priv->xl_lock,flags) ; 
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
 }
index 2e70ee8f1459981089a73fd4a75b722cc112c46d..b358bbbce33aba450c7741d834706d871de54dec 100644 (file)
@@ -1187,7 +1187,7 @@ static int streamer_xmit(struct sk_buff *skb, struct net_device *dev)
        } else {
                netif_stop_queue(dev);
                spin_unlock_irqrestore(&streamer_priv->streamer_lock,flags);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 }
 
index d068a9d36883028d350eaf248d35a6332f722bef..c36974925c1544cc4fbc7d88ef59bef00a290ae5 100644 (file)
@@ -1055,7 +1055,7 @@ static int olympic_xmit(struct sk_buff *skb, struct net_device *dev)
                return 0;
        } else {
                spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags);
-               return 1;
+               return NETDEV_TX_BUSY;
        } 
 
 }
index a91d9c55d78e94b28718c8dfdc83b62521d2a0d6..54ad4ed0337406d9ef46ed3e8a2a4397c8449db0 100644 (file)
@@ -4601,7 +4601,7 @@ static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev)
         netif_stop_queue(dev);
 
         if(tp->QueueSkb == 0)
-                return (1);     /* Return with tbusy set: queue full */
+                return NETDEV_TX_BUSY;     /* Return with tbusy set: queue full */
 
         tp->QueueSkb--;
         skb_queue_tail(&tp->SendSkbQueue, skb);
index b11bb72dc7abae085326c605351cd92f52c6f70d..a2eab72b507a6473c4d72d43c2bdc8f3e68bf3a8 100644 (file)
@@ -633,7 +633,7 @@ static int tms380tr_hardware_send_packet(struct sk_buff *skb, struct net_device
                if (tms380tr_debug > 0)
                        printk(KERN_DEBUG "%s: No free TPL\n", dev->name);
                spin_unlock_irqrestore(&tp->lock, flags);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        dmabuf = 0;
index e7609a05032d1a09e19c0148bad06398167d7812..81f054dbb88ddb2712bc6d60921f857c3920a05e 100644 (file)
@@ -612,7 +612,7 @@ static int de_start_xmit (struct sk_buff *skb, struct net_device *dev)
        if (tx_free == 0) {
                netif_stop_queue(dev);
                spin_unlock_irq(&de->lock);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        tx_free--;
 
index 32256179a20518ea433409e8e16a23b7ad6c05de..eb72d2e9ab3d1366f2347969d35ba31efc16630b 100644 (file)
@@ -1461,12 +1461,12 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev)
 {
     struct de4x5_private *lp = netdev_priv(dev);
     u_long iobase = dev->base_addr;
-    int status = 0;
+    int status = NETDEV_TX_OK;
     u_long flags = 0;
 
     netif_stop_queue(dev);
     if (!lp->tx_enable) {                   /* Cannot send for now */
-       return -1;
+       return NETDEV_TX_LOCKED;
     }
 
     /*
@@ -1480,7 +1480,7 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev)
 
     /* Test if cache is already locked - requeue skb if so */
     if (test_and_set_bit(0, (void *)&lp->cache.lock) && !lp->interrupt)
-       return -1;
+       return NETDEV_TX_LOCKED;
 
     /* Transmit descriptor ring full or stale skb */
     if (netif_queue_stopped(dev) || (u_long) lp->tx_skb[lp->tx_new] > 1) {
index f2e669974c787e0270a403f85235e0e4375dc0b4..8e78f003f08f6c559f8d1ce12493ef4b9095b58c 100644 (file)
@@ -686,7 +686,7 @@ static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev)
                spin_unlock_irqrestore(&db->lock, flags);
                printk(KERN_ERR DRV_NAME ": No Tx resource %ld\n",
                       db->tx_queue_cnt);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        /* Disable NIC interrupt */
index 8761a5a5bd79bdc620d3af577202a9b6e688239e..9277ce8febe4c60deb659b25add3385800975fe4 100644 (file)
@@ -591,7 +591,7 @@ static int uli526x_start_xmit(struct sk_buff *skb, struct net_device *dev)
        if (db->tx_packet_cnt >= TX_FREE_DESC_CNT) {
                spin_unlock_irqrestore(&db->lock, flags);
                printk(KERN_ERR DRV_NAME ": No Tx resource %ld\n", db->tx_packet_cnt);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        /* Disable NIC interrupt */
index e8d155c3e59f5bdf53bc6a2f3e426d99bac6c407..2fa275a58f9d7f618b8a7d0e5398cda3c38c51c6 100644 (file)
@@ -205,15 +205,15 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
        {
                case DLCI_RET_OK:
                        dev->stats.tx_packets++;
-                       ret = 0;
+                       ret = NETDEV_TX_OK;
                        break;
                        case DLCI_RET_ERR:
                        dev->stats.tx_errors++;
-                       ret = 0;
+                       ret = NETDEV_TX_OK;
                        break;
                        case DLCI_RET_DROP:
                        dev->stats.tx_dropped++;
-                       ret = 1;
+                       ret = NETDEV_TX_BUSY;
                        break;
        }
        /* Alan Cox recommends always returning 0, and always freeing the packet */
index f4211fe0f445138af27ebe3fbf8f2dc7ef6c2371..3fb9dbc88a1aaa277ba631f4c09a19026cdce11d 100644 (file)
@@ -469,7 +469,7 @@ sbni_start_xmit( struct sk_buff  *skb,  struct net_device  *dev )
                }
        }
 
-       return  1;
+       return NETDEV_TX_BUSY;
 }
 
 #else  /* CONFIG_SBNI_MULTILINE */
index 8130b79a8a996594209188f79c19512011fa0d08..e4ad7b6b52eb2077d5f8e3c30b6c4d98ee253407 100644 (file)
@@ -283,7 +283,7 @@ static int wanxl_xmit(struct sk_buff *skb, struct net_device *dev)
 #endif
                netif_stop_queue(dev);
                spin_unlock_irq(&port->lock);
-               return 1;       /* request packet to be queued */
+               return NETDEV_TX_BUSY;       /* request packet to be queued */
        }
 
 #ifdef DEBUG_PKT
index dfb30b9c4267176beb20eb5340f7c6cd8ff23715..c70604f0329edf19e8577d1c4342e5655f020b69 100644 (file)
@@ -1935,7 +1935,7 @@ static int mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) {
                netif_stop_queue (dev);
                if (npacks > MAXTXQ) {
                        dev->stats.tx_fifo_errors++;
-                       return 1;
+                       return NETDEV_TX_BUSY;
                }
                skb_queue_tail (&ai->txq, skb);
                return 0;
@@ -2139,7 +2139,7 @@ static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) {
 
                if (i == MAX_FIDS / 2) {
                        dev->stats.tx_fifo_errors++;
-                       return 1;
+                       return NETDEV_TX_BUSY;
                }
        }
        /* check min length*/
@@ -2211,7 +2211,7 @@ static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) {
 
                if (i == MAX_FIDS) {
                        dev->stats.tx_fifo_errors++;
-                       return 1;
+                       return NETDEV_TX_BUSY;
                }
        }
        /* check min length*/
index a54a67c425c8f7e02e401b255fb2d2ef3123846f..d84caf198a23ed0f2d4057f6bab603915fbed586 100644 (file)
@@ -1199,7 +1199,7 @@ bad_end:
        arlan_process_interrupt(dev);
        netif_stop_queue (dev);
        ARLAN_DEBUG_EXIT("arlan_tx");
-       return 1;
+       return NETDEV_TX_BUSY;
 }
 
 
index 27eef8fb7107b3e82b263caf0ea49423be9d2686..291a94bd46fdc8298b502b60fa7f5234e1c4a8cc 100644 (file)
@@ -818,7 +818,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
                spin_unlock_irqrestore(&priv->irqlock, flags);
                spin_unlock_bh(&priv->timerlock);
                netif_stop_queue(dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        frame_ctl = IEEE80211_FTYPE_DATA;
index 6693423f63feb3b032681276af06ed5666e89927..d313b005114e31b4db5496bd81c40865365c7306 100644 (file)
@@ -377,7 +377,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct hostap_interface *iface;
        local_info_t *local;
-       int ret = 1;
+       int ret = NETDEV_TX_BUSY;
        u16 fc;
        struct hostap_tx_data tx;
        ap_tx_ret tx_ret;
index 65a8195b3d90c89fb8c3ace8954827c9a7f5908d..da2ad5437ce5b3f74db5c8230ed8f92430262d31 100644 (file)
@@ -539,7 +539,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
        spin_unlock_irqrestore(&ieee->lock, flags);
        netif_stop_queue(dev);
        dev->stats.tx_errors++;
-       return 1;
+       return NETDEV_TX_BUSY;
 }
 EXPORT_SYMBOL(ieee80211_xmit);
 
index 22e71856aa24b7a9732eaf1acad72683b726d59d..b10b0383dfa5ecaa9b6970fc51f36e80bb0a57be 100644 (file)
@@ -923,7 +923,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        if (!(pcmcia_dev_present(link))) {
                DEBUG(2, "ray_dev_start_xmit - device not present\n");
-               return -1;
+               return NETDEV_TX_LOCKED;
        }
        DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev);
        if (local->authentication_state == NEED_TO_AUTH) {
@@ -931,7 +931,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
                if (!build_auth_frame(local, local->auth_id, OPEN_AUTH_REQUEST)) {
                        local->authentication_state = AUTHENTICATED;
                        netif_stop_queue(dev);
-                       return 1;
+                       return NETDEV_TX_BUSY;
                }
        }
 
@@ -944,7 +944,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
        case XMIT_NO_CCS:
        case XMIT_NEED_AUTH:
                netif_stop_queue(dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        case XMIT_NO_INTR:
        case XMIT_MSG_BAD:
        case XMIT_OK:
index b7b0c46adb4629e449cc14c357500e817f60fafc..38366a56b71fa6588d197ea79268d509c9a9629a 100644 (file)
@@ -1540,7 +1540,7 @@ static int strip_xmit(struct sk_buff *skb, struct net_device *dev)
        if (!netif_running(dev)) {
                printk(KERN_ERR "%s: xmit call when iface is down\n",
                       dev->name);
-               return (1);
+               return NETDEV_TX_BUSY;
        }
 
        netif_stop_queue(dev);
index 25d27b64f528820835495c583336c4f035003d9c..ab7fc5c0c8b4e46a64f71083ebdbffbe141593fc 100644 (file)
@@ -2867,7 +2867,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
                spin_unlock_irqrestore(&lp->spinlock, flags);
                /* Check that we can continue */
                if (lp->tx_n_in_use == (NTXBLOCKS - 1))
-                       return 1;
+                       return NETDEV_TX_BUSY;
        }
 
        /* Do we need some padding? */
@@ -2880,10 +2880,10 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
                skb_copy_from_linear_data(skb, data, skb->len);
                /* Write packet on the card */
                if(wv_packet_write(dev, data, ETH_ZLEN))
-                       return 1;       /* We failed */
+                       return NETDEV_TX_BUSY;  /* We failed */
        }
        else if(wv_packet_write(dev, skb->data, skb->len))
-               return 1;       /* We failed */
+               return NETDEV_TX_BUSY;  /* We failed */
 
 
        dev_kfree_skb(skb);
index be716e45f7acddcddae29f694252177a89c2eb9b..aec9e5d3cf4b72ef7830435fccf8c3c708df31b5 100644 (file)
@@ -1315,9 +1315,9 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev)
                return NETDEV_TX_BUSY;
        }
        dev->trans_start = jiffies;
-       rc = netiucv_transmit_skb(privptr->conn, skb) != 0;
+       rc = netiucv_transmit_skb(privptr->conn, skb);
        netiucv_clear_busy(dev);
-       return rc;
+       return rc ? NETDEV_TX_BUSY : NETDEV_TX_OK;
 }
 
 /**
index 951c73d5db20529e0ef23ceae53e249b4c310651..59e99cc7786b11daefe0e84c30bac3b09dce6bc3 100644 (file)
@@ -585,11 +585,11 @@ int et131x_tx(struct sk_buff *skb, struct net_device *netdev)
                         * available
                         */
                        netif_stop_queue(netdev);
-                       status = 1;
+                       status = NETDEV_TX_BUSY;
                } else {
                        DBG_WARNING(et131x_dbginfo,
                                    "Misc error; drop packet\n");
-                       status = 0;
+                       status = NETDEV_TX_OK;
                }
        }
 
index 33a0687252afa4973000226f388bff2b3d179e55..1294e05fcf1356670eef223e55fc8da94c025f8b 100644 (file)
@@ -814,7 +814,7 @@ int ieee80211_xmit(struct sk_buff *skb,
        spin_unlock_irqrestore(&ieee->lock, flags);
        netif_stop_queue(dev);
        stats->tx_errors++;
-       return 1;
+       return NETDEV_TX_BUSY;
 
 }
 
index 393e4df70dfd87522898a7f998d6a5d8b2290966..bc0d764d851a1375e588f177fe5a3c2f2a33eb41 100644 (file)
@@ -432,21 +432,21 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
                /* success and more buf */
                /* avail, re: hw_txdata */
                netif_wake_queue(wlandev->netdev);
-               result = 0;
+               result = NETDEV_TX_OK;
        } else if (txresult == 1) {
                /* success, no more avail */
                pr_debug("txframe success, no more bufs\n");
                /* netdev->tbusy = 1;  don't set here, irqhdlr */
                /*   may have already cleared it */
-               result = 0;
+               result = NETDEV_TX_OK;
        } else if (txresult == 2) {
                /* alloc failure, drop frame */
                pr_debug("txframe returned alloc_fail\n");
-               result = 1;
+               result = NETDEV_TX_BUSY;
        } else {
                /* buffer full or queue busy, drop frame. */
                pr_debug("txframe returned full or busy\n");
-               result = 1;
+               result = NETDEV_TX_BUSY;
        }
 
 failed:
index 4007770f7ed2230f52aded7917c7bae27d67a45d..016f63b39028abd2045dfd297285026d4801d6de 100644 (file)
@@ -520,7 +520,7 @@ static int eth_start_xmit(struct sk_buff *skb, struct net_device *net)
         */
        if (list_empty(&dev->tx_reqs)) {
                spin_unlock_irqrestore(&dev->req_lock, flags);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
 
        req = container_of(dev->tx_reqs.next, struct usb_request, list);
index 364222bfb10d8e31d7754a49648b71bdadb3aced..d238a8939a094de63e1f9782a68b908a4340b998 100644 (file)
@@ -1615,7 +1615,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
 {
        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
        struct ieee80211_local *local = sdata->local;
-       int ret = 1, head_need;
+       int ret = NETDEV_TX_BUSY, head_need;
        u16 ethertype, hdrlen,  meshhdrlen = 0;
        __le16 fc;
        struct ieee80211_hdr hdr;
index 7dcf2569613b612eb3a19f9777cbc71edaed902a..389d6e0d774070cd1e1d4d8b2290f3a343a7c989 100644 (file)
@@ -137,7 +137,7 @@ static int rose_xmit(struct sk_buff *skb, struct net_device *dev)
 
        if (!netif_running(dev)) {
                printk(KERN_ERR "ROSE: rose_xmit - called when iface is down\n");
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        dev_kfree_skb(skb);
        stats->tx_errors++;
index cb1cb1e76b9a44b0d1a474e95653bcbb7a957b39..9c002b6e0533a7e170027ddc6f9e8da7c3bfdc74 100644 (file)
@@ -338,7 +338,7 @@ restart:
 
        if (busy) {
                netif_stop_queue(dev);
-               return 1;
+               return NETDEV_TX_BUSY;
        }
        dev->stats.tx_errors++;