aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-07-05 22:23:38 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-05 22:23:38 -0400
commitec634fe328182a1a098585bfc7b69e5042bdb08d (patch)
tree02883aaee743af10d78d6d8fe9181944b4dd4529 /drivers
parenta73e76e23c20c05cb8c0b7ba8bc9daa04b05c80f (diff)
net: convert remaining non-symbolic return values in ndo_start_xmit() functions
This patch converts the remaining occurences of raw return values to their symbolic counterparts in ndo_start_xmit() functions that were missed by the previous automatic conversion. Additionally code that assumed the symbolic value of NETDEV_TX_OK to be zero is changed to explicitly use NETDEV_TX_OK. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/isdn/hysdn/hysdn_net.c2
-rw-r--r--drivers/isdn/i4l/isdn_net.c4
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c6
-rw-r--r--drivers/net/3c501.c2
-rw-r--r--drivers/net/7990.c2
-rw-r--r--drivers/net/a2065.c4
-rw-r--r--drivers/net/bonding/bond_3ad.c2
-rw-r--r--drivers/net/bonding/bond_alb.c2
-rw-r--r--drivers/net/bonding/bond_main.c8
-rw-r--r--drivers/net/defxx.c6
-rw-r--r--drivers/net/depca.c2
-rw-r--r--drivers/net/ibm_newemac/core.c2
-rw-r--r--drivers/net/ifb.c2
-rw-r--r--drivers/net/irda/ali-ircc.c4
-rw-r--r--drivers/net/irda/donauboe.c2
-rw-r--r--drivers/net/irda/nsc-ircc.c2
-rw-r--r--drivers/net/irda/sir_dev.c2
-rw-r--r--drivers/net/irda/smsc-ircc2.c16
-rw-r--r--drivers/net/irda/via-ircc.c2
-rw-r--r--drivers/net/lib8390.c2
-rw-r--r--drivers/net/mlx4/en_tx.c2
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
-rw-r--r--drivers/net/ni52.c4
-rw-r--r--drivers/net/skfp/skfddi.c2
-rw-r--r--drivers/net/sonic.c4
-rw-r--r--drivers/net/tokenring/smctr.c2
-rw-r--r--drivers/net/tokenring/tms380tr.c2
-rw-r--r--drivers/net/tulip/dmfe.c4
-rw-r--r--drivers/net/wan/dlci.c4
-rw-r--r--drivers/net/wan/dscc4.c2
-rw-r--r--drivers/net/wan/farsync.c8
-rw-r--r--drivers/net/wan/lmc/lmc_main.c2
-rw-r--r--drivers/net/wan/wanxl.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_tx.c42
-rw-r--r--drivers/net/wireless/ipw2x00/libipw_tx.c4
-rw-r--r--drivers/net/wireless/prism54/islpci_eth.c2
-rw-r--r--drivers/net/wireless/wavelan.c2
-rw-r--r--drivers/net/wireless/wavelan_cs.c4
-rw-r--r--drivers/net/wireless/wl3501_cs.c3
-rw-r--r--drivers/s390/net/claw.c2
-rw-r--r--drivers/s390/net/lcs.c8
-rw-r--r--drivers/s390/net/netiucv.c6
-rw-r--r--drivers/s390/net/qeth_l2_main.c1
-rw-r--r--drivers/s390/net/qeth_l3_main.c1
-rw-r--r--drivers/staging/rt2860/rt_main_dev.c6
-rw-r--r--drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c4
-rw-r--r--drivers/staging/rtl8187se/r8180_core.c4
-rw-r--r--drivers/staging/wlan-ng/p80211netdev.c2
48 files changed, 105 insertions, 102 deletions
diff --git a/drivers/isdn/hysdn/hysdn_net.c b/drivers/isdn/hysdn/hysdn_net.c
index 579974cf4c9..c73004b3b2a 100644
--- a/drivers/isdn/hysdn/hysdn_net.c
+++ b/drivers/isdn/hysdn/hysdn_net.c
@@ -148,7 +148,7 @@ net_send_packet(struct sk_buff *skb, struct net_device *dev)
148 if (lp->sk_count <= 3) { 148 if (lp->sk_count <= 3) {
149 schedule_work(&((hysdn_card *) dev->ml_priv)->irq_queue); 149 schedule_work(&((hysdn_card *) dev->ml_priv)->irq_queue);
150 } 150 }
151 return (0); /* success */ 151 return NETDEV_TX_OK; /* success */
152} /* net_send_packet */ 152} /* net_send_packet */
153 153
154 154
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index 8209ed6c6d2..57bf4bf5027 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -1051,12 +1051,12 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
1051 isdn_net_dev *nd; 1051 isdn_net_dev *nd;
1052 isdn_net_local *slp; 1052 isdn_net_local *slp;
1053 isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); 1053 isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev);
1054 int retv = 0; 1054 int retv = NETDEV_TX_OK;
1055 1055
1056 if (((isdn_net_local *) netdev_priv(ndev))->master) { 1056 if (((isdn_net_local *) netdev_priv(ndev))->master) {
1057 printk("isdn BUG at %s:%d!\n", __FILE__, __LINE__); 1057 printk("isdn BUG at %s:%d!\n", __FILE__, __LINE__);
1058 dev_kfree_skb(skb); 1058 dev_kfree_skb(skb);
1059 return 0; 1059 return NETDEV_TX_OK;
1060 } 1060 }
1061 1061
1062 /* For the other encaps the header has already been built */ 1062 /* For the other encaps the header has already been built */
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index aa30b5cb351..2d14b64202a 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -1223,7 +1223,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
1223 isdn_net_dev *nd; 1223 isdn_net_dev *nd;
1224 unsigned int proto = PPP_IP; /* 0x21 */ 1224 unsigned int proto = PPP_IP; /* 0x21 */
1225 struct ippp_struct *ipt,*ipts; 1225 struct ippp_struct *ipt,*ipts;
1226 int slot, retval = 0; 1226 int slot, retval = NETDEV_TX_OK;
1227 1227
1228 mlp = (isdn_net_local *) netdev_priv(netdev); 1228 mlp = (isdn_net_local *) netdev_priv(netdev);
1229 nd = mlp->netdev; /* get master lp */ 1229 nd = mlp->netdev; /* get master lp */
@@ -1240,7 +1240,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
1240 if (!(ipts->pppcfg & SC_ENABLE_IP)) { /* PPP connected ? */ 1240 if (!(ipts->pppcfg & SC_ENABLE_IP)) { /* PPP connected ? */
1241 if (ipts->debug & 0x1) 1241 if (ipts->debug & 0x1)
1242 printk(KERN_INFO "%s: IP frame delayed.\n", netdev->name); 1242 printk(KERN_INFO "%s: IP frame delayed.\n", netdev->name);
1243 retval = 1; 1243 retval = NETDEV_TX_BUSY;
1244 goto out; 1244 goto out;
1245 } 1245 }
1246 1246
@@ -1261,7 +1261,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
1261 lp = isdn_net_get_locked_lp(nd); 1261 lp = isdn_net_get_locked_lp(nd);
1262 if (!lp) { 1262 if (!lp) {
1263 printk(KERN_WARNING "%s: all channels busy - requeuing!\n", netdev->name); 1263 printk(KERN_WARNING "%s: all channels busy - requeuing!\n", netdev->name);
1264 retval = 1; 1264 retval = NETDEV_TX_BUSY;
1265 goto out; 1265 goto out;
1266 } 1266 }
1267 /* we have our lp locked from now on */ 1267 /* we have our lp locked from now on */
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c
index 367bec63620..e29fb1a4a61 100644
--- a/drivers/net/3c501.c
+++ b/drivers/net/3c501.c
@@ -485,7 +485,7 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
485 if (el_debug > 2) 485 if (el_debug > 2)
486 pr_debug(" queued xmit.\n"); 486 pr_debug(" queued xmit.\n");
487 dev_kfree_skb(skb); 487 dev_kfree_skb(skb);
488 return 0; 488 return NETDEV_TX_OK;
489 } 489 }
490 /* A receive upset our load, despite our best efforts */ 490 /* A receive upset our load, despite our best efforts */
491 if (el_debug > 2) 491 if (el_debug > 2)
diff --git a/drivers/net/7990.c b/drivers/net/7990.c
index 69f5b7d298a..b1e5764628c 100644
--- a/drivers/net/7990.c
+++ b/drivers/net/7990.c
@@ -585,7 +585,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
585 lp->tx_full = 1; 585 lp->tx_full = 1;
586 spin_unlock_irqrestore (&lp->devlock, flags); 586 spin_unlock_irqrestore (&lp->devlock, flags);
587 587
588 return 0; 588 return NETDEV_TX_OK;
589} 589}
590EXPORT_SYMBOL_GPL(lance_start_xmit); 590EXPORT_SYMBOL_GPL(lance_start_xmit);
591 591
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
index 85a18175730..7302e4385bc 100644
--- a/drivers/net/a2065.c
+++ b/drivers/net/a2065.c
@@ -553,11 +553,11 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
553 volatile struct lance_regs *ll = lp->ll; 553 volatile struct lance_regs *ll = lp->ll;
554 volatile struct lance_init_block *ib = lp->init_block; 554 volatile struct lance_init_block *ib = lp->init_block;
555 int entry, skblen; 555 int entry, skblen;
556 int status = 0; 556 int status = NETDEV_TX_OK;
557 unsigned long flags; 557 unsigned long flags;
558 558
559 if (skb_padto(skb, ETH_ZLEN)) 559 if (skb_padto(skb, ETH_ZLEN))
560 return 0; 560 return NETDEV_TX_OK;
561 skblen = max_t(unsigned, skb->len, ETH_ZLEN); 561 skblen = max_t(unsigned, skb->len, ETH_ZLEN);
562 562
563 local_irq_save(flags); 563 local_irq_save(flags);
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index d4b570886c6..0e7dfe0981d 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2431,7 +2431,7 @@ out:
2431 dev_kfree_skb(skb); 2431 dev_kfree_skb(skb);
2432 } 2432 }
2433 read_unlock(&bond->lock); 2433 read_unlock(&bond->lock);
2434 return 0; 2434 return NETDEV_TX_OK;
2435} 2435}
2436 2436
2437int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev) 2437int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 46d312bedfb..bf45d200292 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1413,7 +1413,7 @@ out:
1413 } 1413 }
1414 read_unlock(&bond->curr_slave_lock); 1414 read_unlock(&bond->curr_slave_lock);
1415 read_unlock(&bond->lock); 1415 read_unlock(&bond->lock);
1416 return 0; 1416 return NETDEV_TX_OK;
1417} 1417}
1418 1418
1419void bond_alb_monitor(struct work_struct *work) 1419void bond_alb_monitor(struct work_struct *work)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d927f71af8a..66596d80b50 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4277,7 +4277,7 @@ out:
4277 dev_kfree_skb(skb); 4277 dev_kfree_skb(skb);
4278 } 4278 }
4279 read_unlock(&bond->lock); 4279 read_unlock(&bond->lock);
4280 return 0; 4280 return NETDEV_TX_OK;
4281} 4281}
4282 4282
4283 4283
@@ -4308,7 +4308,7 @@ out:
4308 4308
4309 read_unlock(&bond->curr_slave_lock); 4309 read_unlock(&bond->curr_slave_lock);
4310 read_unlock(&bond->lock); 4310 read_unlock(&bond->lock);
4311 return 0; 4311 return NETDEV_TX_OK;
4312} 4312}
4313 4313
4314/* 4314/*
@@ -4354,7 +4354,7 @@ out:
4354 dev_kfree_skb(skb); 4354 dev_kfree_skb(skb);
4355 } 4355 }
4356 read_unlock(&bond->lock); 4356 read_unlock(&bond->lock);
4357 return 0; 4357 return NETDEV_TX_OK;
4358} 4358}
4359 4359
4360/* 4360/*
@@ -4414,7 +4414,7 @@ out:
4414 4414
4415 /* frame sent to all suitable interfaces */ 4415 /* frame sent to all suitable interfaces */
4416 read_unlock(&bond->lock); 4416 read_unlock(&bond->lock);
4417 return 0; 4417 return NETDEV_TX_OK;
4418} 4418}
4419 4419
4420/*------------------------- Device initialization ---------------------------*/ 4420/*------------------------- Device initialization ---------------------------*/
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c
index 102b8d43971..b2e0a8fc21d 100644
--- a/drivers/net/defxx.c
+++ b/drivers/net/defxx.c
@@ -3218,7 +3218,7 @@ static int dfx_xmt_queue_pkt(
3218 bp->xmt_length_errors++; /* bump error counter */ 3218 bp->xmt_length_errors++; /* bump error counter */
3219 netif_wake_queue(dev); 3219 netif_wake_queue(dev);
3220 dev_kfree_skb(skb); 3220 dev_kfree_skb(skb);
3221 return(0); /* return "success" */ 3221 return NETDEV_TX_OK; /* return "success" */
3222 } 3222 }
3223 /* 3223 /*
3224 * See if adapter link is available, if not, free buffer 3224 * See if adapter link is available, if not, free buffer
@@ -3241,7 +3241,7 @@ static int dfx_xmt_queue_pkt(
3241 bp->xmt_discards++; /* bump error counter */ 3241 bp->xmt_discards++; /* bump error counter */
3242 dev_kfree_skb(skb); /* free sk_buff now */ 3242 dev_kfree_skb(skb); /* free sk_buff now */
3243 netif_wake_queue(dev); 3243 netif_wake_queue(dev);
3244 return(0); /* return "success" */ 3244 return NETDEV_TX_OK; /* return "success" */
3245 } 3245 }
3246 } 3246 }
3247 3247
@@ -3345,7 +3345,7 @@ static int dfx_xmt_queue_pkt(
3345 dfx_port_write_long(bp, PI_PDQ_K_REG_TYPE_2_PROD, bp->rcv_xmt_reg.lword); 3345 dfx_port_write_long(bp, PI_PDQ_K_REG_TYPE_2_PROD, bp->rcv_xmt_reg.lword);
3346 spin_unlock_irqrestore(&bp->lock, flags); 3346 spin_unlock_irqrestore(&bp->lock, flags);
3347 netif_wake_queue(dev); 3347 netif_wake_queue(dev);
3348 return(0); /* packet queued to adapter */ 3348 return NETDEV_TX_OK; /* packet queued to adapter */
3349 } 3349 }
3350 3350
3351 3351
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 97ea2d6d3fe..adb997c5bb5 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -1793,7 +1793,7 @@ static int __init get_hw_addr(struct net_device *dev)
1793static int load_packet(struct net_device *dev, struct sk_buff *skb) 1793static int load_packet(struct net_device *dev, struct sk_buff *skb)
1794{ 1794{
1795 struct depca_private *lp = netdev_priv(dev); 1795 struct depca_private *lp = netdev_priv(dev);
1796 int i, entry, end, len, status = 0; 1796 int i, entry, end, len, status = NETDEV_TX_OK;
1797 1797
1798 entry = lp->tx_new; /* Ring around buffer number. */ 1798 entry = lp->tx_new; /* Ring around buffer number. */
1799 end = (entry + (skb->len - 1) / TX_BUFF_SZ) & lp->txRingMask; 1799 end = (entry + (skb->len - 1) / TX_BUFF_SZ) & lp->txRingMask;
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index beb84213b67..5443558c439 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -1342,7 +1342,7 @@ static inline int emac_xmit_finish(struct emac_instance *dev, int len)
1342 ++dev->stats.tx_packets; 1342 ++dev->stats.tx_packets;
1343 dev->stats.tx_bytes += len; 1343 dev->stats.tx_bytes += len;
1344 1344
1345 return 0; 1345 return NETDEV_TX_OK;
1346} 1346}
1347 1347
1348/* Tx lock BH */ 1348/* Tx lock BH */
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 96713ef0629..0a79b451780 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -164,7 +164,7 @@ static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
164{ 164{
165 struct ifb_private *dp = netdev_priv(dev); 165 struct ifb_private *dp = netdev_priv(dev);
166 struct net_device_stats *stats = &dev->stats; 166 struct net_device_stats *stats = &dev->stats;
167 int ret = 0; 167 int ret = NETDEV_TX_OK;
168 u32 from = G_TC_FROM(skb->tc_verd); 168 u32 from = G_TC_FROM(skb->tc_verd);
169 169
170 stats->rx_packets++; 170 stats->rx_packets++;
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index 70983578244..f0d0cea6e32 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -1966,10 +1966,10 @@ static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
1966 1966
1967 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ ); 1967 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ );
1968 1968
1969 IRDA_ASSERT(dev != NULL, return 0;); 1969 IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;);
1970 1970
1971 self = netdev_priv(dev); 1971 self = netdev_priv(dev);
1972 IRDA_ASSERT(self != NULL, return 0;); 1972 IRDA_ASSERT(self != NULL, return NETDEV_TX_OK;);
1973 1973
1974 iobase = self->io.sir_base; 1974 iobase = self->io.sir_base;
1975 1975
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index 1484c76becf..e4e905698dc 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -981,7 +981,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
981 981
982 self = netdev_priv(dev); 982 self = netdev_priv(dev);
983 983
984 IRDA_ASSERT (self != NULL, return 0; ); 984 IRDA_ASSERT (self != NULL, return NETDEV_TX_OK; );
985 985
986 IRDA_DEBUG (1, "%s.tx:%x(%x)%x\n", __func__ 986 IRDA_DEBUG (1, "%s.tx:%x(%x)%x\n", __func__
987 ,skb->len,self->txpending,INB (OBOE_ENABLEH)); 987 ,skb->len,self->txpending,INB (OBOE_ENABLEH));
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index 05bfc987b34..51ca89c9a0b 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -1365,7 +1365,7 @@ static int nsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
1365 1365
1366 self = netdev_priv(dev); 1366 self = netdev_priv(dev);
1367 1367
1368 IRDA_ASSERT(self != NULL, return 0;); 1368 IRDA_ASSERT(self != NULL, return NETDEV_TX_OK;);
1369 1369
1370 iobase = self->io.fir_base; 1370 iobase = self->io.fir_base;
1371 1371
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c
index bde004f0a7a..71dce20e62b 100644
--- a/drivers/net/irda/sir_dev.c
+++ b/drivers/net/irda/sir_dev.c
@@ -590,7 +590,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
590 int err; 590 int err;
591 s32 speed; 591 s32 speed;
592 592
593 IRDA_ASSERT(dev != NULL, return 0;); 593 IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;);
594 594
595 netif_stop_queue(ndev); 595 netif_stop_queue(ndev);
596 596
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index d0797adb5f8..15f8a7f8160 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -886,10 +886,10 @@ static int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
886 886
887 IRDA_DEBUG(1, "%s\n", __func__); 887 IRDA_DEBUG(1, "%s\n", __func__);
888 888
889 IRDA_ASSERT(dev != NULL, return 0;); 889 IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;);
890 890
891 self = netdev_priv(dev); 891 self = netdev_priv(dev);
892 IRDA_ASSERT(self != NULL, return 0;); 892 IRDA_ASSERT(self != NULL, return NETDEV_TX_OK;);
893 893
894 netif_stop_queue(dev); 894 netif_stop_queue(dev);
895 895
@@ -914,7 +914,7 @@ static int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
914 smsc_ircc_change_speed(self, speed); 914 smsc_ircc_change_speed(self, speed);
915 spin_unlock_irqrestore(&self->lock, flags); 915 spin_unlock_irqrestore(&self->lock, flags);
916 dev_kfree_skb(skb); 916 dev_kfree_skb(skb);
917 return 0; 917 return NETDEV_TX_OK;
918 } 918 }
919 self->new_speed = speed; 919 self->new_speed = speed;
920 } 920 }
@@ -935,7 +935,7 @@ static int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
935 935
936 dev_kfree_skb(skb); 936 dev_kfree_skb(skb);
937 937
938 return 0; 938 return NETDEV_TX_OK;
939} 939}
940 940
941/* 941/*
@@ -1190,9 +1190,9 @@ static int smsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev)
1190 s32 speed; 1190 s32 speed;
1191 int mtt; 1191 int mtt;
1192 1192
1193 IRDA_ASSERT(dev != NULL, return 0;); 1193 IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;);
1194 self = netdev_priv(dev); 1194 self = netdev_priv(dev);
1195 IRDA_ASSERT(self != NULL, return 0;); 1195 IRDA_ASSERT(self != NULL, return NETDEV_TX_OK;);
1196 1196
1197 netif_stop_queue(dev); 1197 netif_stop_queue(dev);
1198 1198
@@ -1210,7 +1210,7 @@ static int smsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev)
1210 smsc_ircc_change_speed(self, speed); 1210 smsc_ircc_change_speed(self, speed);
1211 spin_unlock_irqrestore(&self->lock, flags); 1211 spin_unlock_irqrestore(&self->lock, flags);
1212 dev_kfree_skb(skb); 1212 dev_kfree_skb(skb);
1213 return 0; 1213 return NETDEV_TX_OK;
1214 } 1214 }
1215 1215
1216 self->new_speed = speed; 1216 self->new_speed = speed;
@@ -1242,7 +1242,7 @@ static int smsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev)
1242 spin_unlock_irqrestore(&self->lock, flags); 1242 spin_unlock_irqrestore(&self->lock, flags);
1243 dev_kfree_skb(skb); 1243 dev_kfree_skb(skb);
1244 1244
1245 return 0; 1245 return NETDEV_TX_OK;
1246} 1246}
1247 1247
1248/* 1248/*
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index 62ba94ba7c9..36a60748447 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -832,7 +832,7 @@ static int via_ircc_hard_xmit_sir(struct sk_buff *skb,
832 __u32 speed; 832 __u32 speed;
833 833
834 self = netdev_priv(dev); 834 self = netdev_priv(dev);
835 IRDA_ASSERT(self != NULL, return 0;); 835 IRDA_ASSERT(self != NULL, return NETDEV_TX_OK;);
836 iobase = self->io.fir_base; 836 iobase = self->io.fir_base;
837 837
838 netif_stop_queue(dev); 838 netif_stop_queue(dev);
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index f28c2334300..d6be36000c5 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -414,7 +414,7 @@ static int __ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
414 dev_kfree_skb (skb); 414 dev_kfree_skb (skb);
415 dev->stats.tx_bytes += send_length; 415 dev->stats.tx_bytes += send_length;
416 416
417 return 0; 417 return NETDEV_TX_OK;
418} 418}
419 419
420/** 420/**
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
index 08c43f2ae72..d5c18c67425 100644
--- a/drivers/net/mlx4/en_tx.c
+++ b/drivers/net/mlx4/en_tx.c
@@ -764,7 +764,7 @@ int mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
764 /* Poll CQ here */ 764 /* Poll CQ here */
765 mlx4_en_xmit_poll(priv, tx_ind); 765 mlx4_en_xmit_poll(priv, tx_ind);
766 766
767 return 0; 767 return NETDEV_TX_OK;
768 768
769tx_drop: 769tx_drop:
770 dev_kfree_skb_any(skb); 770 dev_kfree_skb_any(skb);
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 05cd24d0d0c..1a34f7e11d9 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -2968,13 +2968,13 @@ static int myri10ge_sw_tso(struct sk_buff *skb, struct net_device *dev)
2968 } 2968 }
2969 } 2969 }
2970 dev_kfree_skb_any(skb); 2970 dev_kfree_skb_any(skb);
2971 return 0; 2971 return NETDEV_TX_OK;
2972 2972
2973drop: 2973drop:
2974 ss = &mgp->ss[skb_get_queue_mapping(skb)]; 2974 ss = &mgp->ss[skb_get_queue_mapping(skb)];
2975 dev_kfree_skb_any(skb); 2975 dev_kfree_skb_any(skb);
2976 ss->stats.tx_dropped += 1; 2976 ss->stats.tx_dropped += 1;
2977 return 0; 2977 return NETDEV_TX_OK;
2978} 2978}
2979 2979
2980static struct net_device_stats *myri10ge_get_stats(struct net_device *dev) 2980static struct net_device_stats *myri10ge_get_stats(struct net_device *dev)
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c
index 77d44a06170..a0ac5d4f27d 100644
--- a/drivers/net/ni52.c
+++ b/drivers/net/ni52.c
@@ -1183,7 +1183,7 @@ static int ni52_send_packet(struct sk_buff *skb, struct net_device *dev)
1183 1183
1184 if (skb->len > XMIT_BUFF_SIZE) { 1184 if (skb->len > XMIT_BUFF_SIZE) {
1185 printk(KERN_ERR "%s: Sorry, max. framelength is %d bytes. The length of your frame is %d bytes.\n", dev->name, XMIT_BUFF_SIZE, skb->len); 1185 printk(KERN_ERR "%s: Sorry, max. framelength is %d bytes. The length of your frame is %d bytes.\n", dev->name, XMIT_BUFF_SIZE, skb->len);
1186 return 0; 1186 return NETDEV_TX_OK;
1187 } 1187 }
1188 1188
1189 netif_stop_queue(dev); 1189 netif_stop_queue(dev);
@@ -1267,7 +1267,7 @@ static int ni52_send_packet(struct sk_buff *skb, struct net_device *dev)
1267 } 1267 }
1268 dev_kfree_skb(skb); 1268 dev_kfree_skb(skb);
1269#endif 1269#endif
1270 return 0; 1270 return NETDEV_TX_OK;
1271} 1271}
1272 1272
1273/******************************************* 1273/*******************************************
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index 0c31272cf54..888a14a045e 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -1077,7 +1077,7 @@ static int skfp_send_pkt(struct sk_buff *skb, struct net_device *dev)
1077 // dequeue packets from xmt queue and send them 1077 // dequeue packets from xmt queue and send them
1078 netif_start_queue(dev); 1078 netif_start_queue(dev);
1079 dev_kfree_skb(skb); 1079 dev_kfree_skb(skb);
1080 return (0); /* return "success" */ 1080 return NETDEV_TX_OK; /* return "success" */
1081 } 1081 }
1082 if (bp->QueueSkb == 0) { // return with tbusy set: queue full 1082 if (bp->QueueSkb == 0) { // return with tbusy set: queue full
1083 1083
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c
index 753a1fba460..9599ce77ef8 100644
--- a/drivers/net/sonic.c
+++ b/drivers/net/sonic.c
@@ -211,7 +211,7 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
211 length = skb->len; 211 length = skb->len;
212 if (length < ETH_ZLEN) { 212 if (length < ETH_ZLEN) {
213 if (skb_padto(skb, ETH_ZLEN)) 213 if (skb_padto(skb, ETH_ZLEN))
214 return 0; 214 return NETDEV_TX_OK;
215 length = ETH_ZLEN; 215 length = ETH_ZLEN;
216 } 216 }
217 217
@@ -265,7 +265,7 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
265 265
266 dev->trans_start = jiffies; 266 dev->trans_start = jiffies;
267 267
268 return 0; 268 return NETDEV_TX_OK;
269} 269}
270 270
271/* 271/*
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 54ad4ed0337..6515894c83f 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -4609,7 +4609,7 @@ static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev)
4609 if(tp->QueueSkb > 0) 4609 if(tp->QueueSkb > 0)
4610 netif_wake_queue(dev); 4610 netif_wake_queue(dev);
4611 4611
4612 return (0); 4612 return NETDEV_TX_OK;
4613} 4613}
4614 4614
4615static int smctr_send_lobe_media_test(struct net_device *dev) 4615static int smctr_send_lobe_media_test(struct net_device *dev)
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c
index a2eab72b507..07f6dfd3ba0 100644
--- a/drivers/net/tokenring/tms380tr.c
+++ b/drivers/net/tokenring/tms380tr.c
@@ -682,7 +682,7 @@ static int tms380tr_hardware_send_packet(struct sk_buff *skb, struct net_device
682 tms380tr_exec_sifcmd(dev, CMD_TX_VALID); 682 tms380tr_exec_sifcmd(dev, CMD_TX_VALID);
683 spin_unlock_irqrestore(&tp->lock, flags); 683 spin_unlock_irqrestore(&tp->lock, flags);
684 684
685 return 0; 685 return NETDEV_TX_OK;
686} 686}
687 687
688/* 688/*
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index 8e78f003f08..5e15fab58c1 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -676,7 +676,7 @@ static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev)
676 if (skb->len > MAX_PACKET_SIZE) { 676 if (skb->len > MAX_PACKET_SIZE) {
677 printk(KERN_ERR DRV_NAME ": big packet = %d\n", (u16)skb->len); 677 printk(KERN_ERR DRV_NAME ": big packet = %d\n", (u16)skb->len);
678 dev_kfree_skb(skb); 678 dev_kfree_skb(skb);
679 return 0; 679 return NETDEV_TX_OK;
680 } 680 }
681 681
682 spin_lock_irqsave(&db->lock, flags); 682 spin_lock_irqsave(&db->lock, flags);
@@ -722,7 +722,7 @@ static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev)
722 /* free this SKB */ 722 /* free this SKB */
723 dev_kfree_skb(skb); 723 dev_kfree_skb(skb);
724 724
725 return 0; 725 return NETDEV_TX_OK;
726} 726}
727 727
728 728
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index 2fa275a58f9..8526b6d1ee4 100644
--- a/drivers/net/wan/dlci.c
+++ b/drivers/net/wan/dlci.c
@@ -194,7 +194,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
194 ret = 0; 194 ret = 0;
195 195
196 if (!skb || !dev) 196 if (!skb || !dev)
197 return(0); 197 return NETDEV_TX_OK;
198 198
199 dlp = netdev_priv(dev); 199 dlp = netdev_priv(dev);
200 200
@@ -219,7 +219,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
219 /* Alan Cox recommends always returning 0, and always freeing the packet */ 219 /* Alan Cox recommends always returning 0, and always freeing the packet */
220 /* experience suggest a slightly more conservative approach */ 220 /* experience suggest a slightly more conservative approach */
221 221
222 if (!ret) 222 if (ret == NETDEV_TX_OK)
223 { 223 {
224 dev_kfree_skb(skb); 224 dev_kfree_skb(skb);
225 netif_wake_queue(dev); 225 netif_wake_queue(dev);
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 8face5db8f3..e81946d9854 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -1182,7 +1182,7 @@ static int dscc4_start_xmit(struct sk_buff *skb, struct net_device *dev)
1182 if (dscc4_tx_quiescent(dpriv, dev)) 1182 if (dscc4_tx_quiescent(dpriv, dev))
1183 dscc4_do_tx(dpriv, dev); 1183 dscc4_do_tx(dpriv, dev);
1184 1184
1185 return 0; 1185 return NETDEV_TX_OK;
1186} 1186}
1187 1187
1188static int dscc4_close(struct net_device *dev) 1188static int dscc4_close(struct net_device *dev)
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 90c0a317d9d..20a1237a3d7 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -2294,7 +2294,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev)
2294 dbg(DBG_ASS, 2294 dbg(DBG_ASS,
2295 "Tried to transmit but no carrier on card %d port %d\n", 2295 "Tried to transmit but no carrier on card %d port %d\n",
2296 card->card_no, port->index); 2296 card->card_no, port->index);
2297 return 0; 2297 return NETDEV_TX_OK;
2298 } 2298 }
2299 2299
2300 /* Drop it if it's too big! MTU failure ? */ 2300 /* Drop it if it's too big! MTU failure ? */
@@ -2303,7 +2303,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev)
2303 LEN_TX_BUFFER); 2303 LEN_TX_BUFFER);
2304 dev_kfree_skb(skb); 2304 dev_kfree_skb(skb);
2305 dev->stats.tx_errors++; 2305 dev->stats.tx_errors++;
2306 return 0; 2306 return NETDEV_TX_OK;
2307 } 2307 }
2308 2308
2309 /* 2309 /*
@@ -2337,7 +2337,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev)
2337 dev->stats.tx_errors++; 2337 dev->stats.tx_errors++;
2338 dbg(DBG_ASS, "Tx queue overflow card %d port %d\n", 2338 dbg(DBG_ASS, "Tx queue overflow card %d port %d\n",
2339 card->card_no, port->index); 2339 card->card_no, port->index);
2340 return 0; 2340 return NETDEV_TX_OK;
2341 } 2341 }
2342 2342
2343 /* 2343 /*
@@ -2354,7 +2354,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev)
2354 fst_q_work_item(&fst_work_txq, card->card_no); 2354 fst_q_work_item(&fst_work_txq, card->card_no);
2355 tasklet_schedule(&fst_tx_task); 2355 tasklet_schedule(&fst_tx_task);
2356 2356
2357 return 0; 2357 return NETDEV_TX_OK;
2358} 2358}
2359 2359
2360/* 2360/*
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 45b1822c962..d1492ae5d30 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -1428,7 +1428,7 @@ static int lmc_start_xmit(struct sk_buff *skb, struct net_device *dev)
1428 lmc_softc_t *sc = dev_to_sc(dev); 1428 lmc_softc_t *sc = dev_to_sc(dev);
1429 u32 flag; 1429 u32 flag;
1430 int entry; 1430 int entry;
1431 int ret = 0; 1431 int ret = NETDEV_TX_OK;
1432 unsigned long flags; 1432 unsigned long flags;
1433 1433
1434 lmc_trace(dev, "lmc_start_xmit in"); 1434 lmc_trace(dev, "lmc_start_xmit in");
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
index e4ad7b6b52e..03b76adbe5f 100644
--- a/drivers/net/wan/wanxl.c
+++ b/drivers/net/wan/wanxl.c
@@ -310,7 +310,7 @@ static int wanxl_xmit(struct sk_buff *skb, struct net_device *dev)
310 } 310 }
311 311
312 spin_unlock(&port->lock); 312 spin_unlock(&port->lock);
313 return 0; 313 return NETDEV_TX_OK;
314} 314}
315 315
316 316
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c
index d313b005114..1fe1bbabb90 100644
--- a/drivers/net/wireless/hostap/hostap_80211_tx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_tx.c
@@ -75,7 +75,7 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev)
75 printk(KERN_DEBUG "%s: hostap_data_start_xmit: short skb " 75 printk(KERN_DEBUG "%s: hostap_data_start_xmit: short skb "
76 "(len=%d)\n", dev->name, skb->len); 76 "(len=%d)\n", dev->name, skb->len);
77 kfree_skb(skb); 77 kfree_skb(skb);
78 return 0; 78 return NETDEV_TX_OK;
79 } 79 }
80 80
81 if (local->ddev != dev) { 81 if (local->ddev != dev) {
@@ -89,14 +89,14 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev)
89 printk(KERN_DEBUG "%s: prism2_tx: trying to use " 89 printk(KERN_DEBUG "%s: prism2_tx: trying to use "
90 "AP device with Ethernet net dev\n", dev->name); 90 "AP device with Ethernet net dev\n", dev->name);
91 kfree_skb(skb); 91 kfree_skb(skb);
92 return 0; 92 return NETDEV_TX_OK;
93 } 93 }
94 } else { 94 } else {
95 if (local->iw_mode == IW_MODE_REPEAT) { 95 if (local->iw_mode == IW_MODE_REPEAT) {
96 printk(KERN_DEBUG "%s: prism2_tx: trying to use " 96 printk(KERN_DEBUG "%s: prism2_tx: trying to use "
97 "non-WDS link in Repeater mode\n", dev->name); 97 "non-WDS link in Repeater mode\n", dev->name);
98 kfree_skb(skb); 98 kfree_skb(skb);
99 return 0; 99 return NETDEV_TX_OK;
100 } else if (local->iw_mode == IW_MODE_INFRA && 100 } else if (local->iw_mode == IW_MODE_INFRA &&
101 (local->wds_type & HOSTAP_WDS_AP_CLIENT) && 101 (local->wds_type & HOSTAP_WDS_AP_CLIENT) &&
102 memcmp(skb->data + ETH_ALEN, dev->dev_addr, 102 memcmp(skb->data + ETH_ALEN, dev->dev_addr,
@@ -210,13 +210,13 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev)
210 skb = skb_unshare(skb, GFP_ATOMIC); 210 skb = skb_unshare(skb, GFP_ATOMIC);
211 if (skb == NULL) { 211 if (skb == NULL) {
212 iface->stats.tx_dropped++; 212 iface->stats.tx_dropped++;
213 return 0; 213 return NETDEV_TX_OK;
214 } 214 }
215 if (pskb_expand_head(skb, need_headroom, need_tailroom, 215 if (pskb_expand_head(skb, need_headroom, need_tailroom,
216 GFP_ATOMIC)) { 216 GFP_ATOMIC)) {
217 kfree_skb(skb); 217 kfree_skb(skb);
218 iface->stats.tx_dropped++; 218 iface->stats.tx_dropped++;
219 return 0; 219 return NETDEV_TX_OK;
220 } 220 }
221 } else if (skb_headroom(skb) < need_headroom) { 221 } else if (skb_headroom(skb) < need_headroom) {
222 struct sk_buff *tmp = skb; 222 struct sk_buff *tmp = skb;
@@ -224,13 +224,13 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev)
224 kfree_skb(tmp); 224 kfree_skb(tmp);
225 if (skb == NULL) { 225 if (skb == NULL) {
226 iface->stats.tx_dropped++; 226 iface->stats.tx_dropped++;
227 return 0; 227 return NETDEV_TX_OK;
228 } 228 }
229 } else { 229 } else {
230 skb = skb_unshare(skb, GFP_ATOMIC); 230 skb = skb_unshare(skb, GFP_ATOMIC);
231 if (skb == NULL) { 231 if (skb == NULL) {
232 iface->stats.tx_dropped++; 232 iface->stats.tx_dropped++;
233 return 0; 233 return NETDEV_TX_OK;
234 } 234 }
235 } 235 }
236 236
@@ -256,7 +256,7 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev)
256 /* Send IEEE 802.11 encapsulated frame using the master radio device */ 256 /* Send IEEE 802.11 encapsulated frame using the master radio device */
257 skb->dev = local->dev; 257 skb->dev = local->dev;
258 dev_queue_xmit(skb); 258 dev_queue_xmit(skb);
259 return 0; 259 return NETDEV_TX_OK;
260} 260}
261 261
262 262
@@ -276,7 +276,7 @@ int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev)
276 printk(KERN_DEBUG "%s: hostap_mgmt_start_xmit: short skb " 276 printk(KERN_DEBUG "%s: hostap_mgmt_start_xmit: short skb "
277 "(len=%d)\n", dev->name, skb->len); 277 "(len=%d)\n", dev->name, skb->len);
278 kfree_skb(skb); 278 kfree_skb(skb);
279 return 0; 279 return NETDEV_TX_OK;
280 } 280 }
281 281
282 iface->stats.tx_packets++; 282 iface->stats.tx_packets++;
@@ -301,7 +301,7 @@ int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev)
301 /* Send IEEE 802.11 encapsulated frame using the master radio device */ 301 /* Send IEEE 802.11 encapsulated frame using the master radio device */
302 skb->dev = local->dev; 302 skb->dev = local->dev;
303 dev_queue_xmit(skb); 303 dev_queue_xmit(skb);
304 return 0; 304 return NETDEV_TX_OK;
305} 305}
306 306
307 307
@@ -396,7 +396,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
396 printk(KERN_DEBUG "%s: invalid skb->cb magic (0x%08x, " 396 printk(KERN_DEBUG "%s: invalid skb->cb magic (0x%08x, "
397 "expected 0x%08x)\n", 397 "expected 0x%08x)\n",
398 dev->name, meta->magic, HOSTAP_SKB_TX_DATA_MAGIC); 398 dev->name, meta->magic, HOSTAP_SKB_TX_DATA_MAGIC);
399 ret = 0; 399 ret = NETDEV_TX_OK;
400 iface->stats.tx_dropped++; 400 iface->stats.tx_dropped++;
401 goto fail; 401 goto fail;
402 } 402 }
@@ -414,7 +414,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
414 if (skb->len < 24) { 414 if (skb->len < 24) {
415 printk(KERN_DEBUG "%s: hostap_master_start_xmit: short skb " 415 printk(KERN_DEBUG "%s: hostap_master_start_xmit: short skb "
416 "(len=%d)\n", dev->name, skb->len); 416 "(len=%d)\n", dev->name, skb->len);
417 ret = 0; 417 ret = NETDEV_TX_OK;
418 iface->stats.tx_dropped++; 418 iface->stats.tx_dropped++;
419 goto fail; 419 goto fail;
420 } 420 }
@@ -441,13 +441,13 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
441 dev->name, meta->ethertype); 441 dev->name, meta->ethertype);
442 hostap_dump_tx_80211(dev->name, skb); 442 hostap_dump_tx_80211(dev->name, skb);
443 443
444 ret = 0; /* drop packet */ 444 ret = NETDEV_TX_OK; /* drop packet */
445 iface->stats.tx_dropped++; 445 iface->stats.tx_dropped++;
446 goto fail; 446 goto fail;
447 } 447 }
448 break; 448 break;
449 case AP_TX_DROP: 449 case AP_TX_DROP:
450 ret = 0; /* drop packet */ 450 ret = NETDEV_TX_OK; /* drop packet */
451 iface->stats.tx_dropped++; 451 iface->stats.tx_dropped++;
452 goto fail; 452 goto fail;
453 case AP_TX_RETRY: 453 case AP_TX_RETRY:
@@ -455,7 +455,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
455 case AP_TX_BUFFERED: 455 case AP_TX_BUFFERED:
456 /* do not free skb here, it will be freed when the 456 /* do not free skb here, it will be freed when the
457 * buffered frame is sent/timed out */ 457 * buffered frame is sent/timed out */
458 ret = 0; 458 ret = NETDEV_TX_OK;
459 goto tx_exit; 459 goto tx_exit;
460 } 460 }
461 461
@@ -501,7 +501,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
501 "frame (drop_unencrypted=1)\n", dev->name); 501 "frame (drop_unencrypted=1)\n", dev->name);
502 } 502 }
503 iface->stats.tx_dropped++; 503 iface->stats.tx_dropped++;
504 ret = 0; 504 ret = NETDEV_TX_OK;
505 goto fail; 505 goto fail;
506 } 506 }
507 507
@@ -510,7 +510,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
510 if (skb == NULL) { 510 if (skb == NULL) {
511 printk(KERN_DEBUG "%s: TX - encryption failed\n", 511 printk(KERN_DEBUG "%s: TX - encryption failed\n",
512 dev->name); 512 dev->name);
513 ret = 0; 513 ret = NETDEV_TX_OK;
514 goto fail; 514 goto fail;
515 } 515 }
516 meta = (struct hostap_skb_tx_data *) skb->cb; 516 meta = (struct hostap_skb_tx_data *) skb->cb;
@@ -519,23 +519,23 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
519 "expected 0x%08x) after hostap_tx_encrypt\n", 519 "expected 0x%08x) after hostap_tx_encrypt\n",
520 dev->name, meta->magic, 520 dev->name, meta->magic,
521 HOSTAP_SKB_TX_DATA_MAGIC); 521 HOSTAP_SKB_TX_DATA_MAGIC);
522 ret = 0; 522 ret = NETDEV_TX_OK;
523 iface->stats.tx_dropped++; 523 iface->stats.tx_dropped++;
524 goto fail; 524 goto fail;
525 } 525 }
526 } 526 }
527 527
528 if (local->func->tx == NULL || local->func->tx(skb, dev)) { 528 if (local->func->tx == NULL || local->func->tx(skb, dev)) {
529 ret = 0; 529 ret = NETDEV_TX_OK;
530 iface->stats.tx_dropped++; 530 iface->stats.tx_dropped++;
531 } else { 531 } else {
532 ret = 0; 532 ret = NETDEV_TX_OK;
533 iface->stats.tx_packets++; 533 iface->stats.tx_packets++;
534 iface->stats.tx_bytes += skb->len; 534 iface->stats.tx_bytes += skb->len;
535 } 535 }
536 536
537 fail: 537 fail:
538 if (!ret && skb) 538 if (ret == NETDEV_TX_OK && skb)
539 dev_kfree_skb(skb); 539 dev_kfree_skb(skb);
540 tx_exit: 540 tx_exit:
541 if (tx.sta_ptr) 541 if (tx.sta_ptr)
diff --git a/drivers/net/wireless/ipw2x00/libipw_tx.c b/drivers/net/wireless/ipw2x00/libipw_tx.c
index da2ad5437ce..2e8f84fb29f 100644
--- a/drivers/net/wireless/ipw2x00/libipw_tx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_tx.c
@@ -527,13 +527,13 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
527 if (ret == 0) { 527 if (ret == 0) {
528 dev->stats.tx_packets++; 528 dev->stats.tx_packets++;
529 dev->stats.tx_bytes += txb->payload_size; 529 dev->stats.tx_bytes += txb->payload_size;
530 return 0; 530 return NETDEV_TX_OK;
531 } 531 }
532 532
533 ieee80211_txb_free(txb); 533 ieee80211_txb_free(txb);
534 } 534 }
535 535
536 return 0; 536 return NETDEV_TX_OK;
537 537
538 failed: 538 failed:
539 spin_unlock_irqrestore(&ieee->lock, flags); 539 spin_unlock_irqrestore(&ieee->lock, flags);
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c
index 8f621099344..c255d9c6a5f 100644
--- a/drivers/net/wireless/prism54/islpci_eth.c
+++ b/drivers/net/wireless/prism54/islpci_eth.c
@@ -234,7 +234,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
234 /* unlock the driver code */ 234 /* unlock the driver code */
235 spin_unlock_irqrestore(&priv->slock, flags); 235 spin_unlock_irqrestore(&priv->slock, flags);
236 236
237 return 0; 237 return NETDEV_TX_OK;
238 238
239 drop_free: 239 drop_free:
240 ndev->stats.tx_dropped++; 240 ndev->stats.tx_dropped++;
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index ab7fc5c0c8b..5cb5329a20d 100644
--- a/drivers/net/wireless/wavelan.c
+++ b/drivers/net/wireless/wavelan.c
@@ -2891,7 +2891,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
2891#ifdef DEBUG_TX_TRACE 2891#ifdef DEBUG_TX_TRACE
2892 printk(KERN_DEBUG "%s: <-wavelan_packet_xmit()\n", dev->name); 2892 printk(KERN_DEBUG "%s: <-wavelan_packet_xmit()\n", dev->name);
2893#endif 2893#endif
2894 return 0; 2894 return NETDEV_TX_OK;
2895} 2895}
2896 2896
2897/*********************** HARDWARE CONFIGURATION ***********************/ 2897/*********************** HARDWARE CONFIGURATION ***********************/
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 6af706408ac..9dd241adc37 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3113,7 +3113,7 @@ wavelan_packet_xmit(struct sk_buff * skb,
3113 * able to detect collisions, therefore in theory we don't really 3113 * able to detect collisions, therefore in theory we don't really
3114 * need to pad. Jean II */ 3114 * need to pad. Jean II */
3115 if (skb_padto(skb, ETH_ZLEN)) 3115 if (skb_padto(skb, ETH_ZLEN))
3116 return 0; 3116 return NETDEV_TX_OK;
3117 3117
3118 wv_packet_write(dev, skb->data, skb->len); 3118 wv_packet_write(dev, skb->data, skb->len);
3119 3119
@@ -3122,7 +3122,7 @@ wavelan_packet_xmit(struct sk_buff * skb,
3122#ifdef DEBUG_TX_TRACE 3122#ifdef DEBUG_TX_TRACE
3123 printk(KERN_DEBUG "%s: <-wavelan_packet_xmit()\n", dev->name); 3123 printk(KERN_DEBUG "%s: <-wavelan_packet_xmit()\n", dev->name);
3124#endif 3124#endif
3125 return(0); 3125 return NETDEV_TX_OK;
3126} 3126}
3127 3127
3128/********************** HARDWARE CONFIGURATION **********************/ 3128/********************** HARDWARE CONFIGURATION **********************/
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index e3e96bb2c24..a83a5621ec4 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1348,7 +1348,6 @@ static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
1348 if (rc) { 1348 if (rc) {
1349 ++dev->stats.tx_dropped; 1349 ++dev->stats.tx_dropped;
1350 netif_stop_queue(dev); 1350 netif_stop_queue(dev);
1351 rc = NETDEV_TX_OK;
1352 } else { 1351 } else {
1353 ++dev->stats.tx_packets; 1352 ++dev->stats.tx_packets;
1354 dev->stats.tx_bytes += skb->len; 1353 dev->stats.tx_bytes += skb->len;
@@ -1358,7 +1357,7 @@ static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
1358 netif_stop_queue(dev); 1357 netif_stop_queue(dev);
1359 } 1358 }
1360 spin_unlock_irqrestore(&this->lock, flags); 1359 spin_unlock_irqrestore(&this->lock, flags);
1361 return rc; 1360 return NETDEV_TX_OK;
1362} 1361}
1363 1362
1364static int wl3501_open(struct net_device *dev) 1363static int wl3501_open(struct net_device *dev)
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
index f370f8d460a..c63babefb69 100644
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -350,6 +350,8 @@ claw_tx(struct sk_buff *skb, struct net_device *dev)
350 CLAW_DBF_TEXT_(4, trace, "clawtx%d", rc); 350 CLAW_DBF_TEXT_(4, trace, "clawtx%d", rc);
351 if (rc) 351 if (rc)
352 rc = NETDEV_TX_BUSY; 352 rc = NETDEV_TX_BUSY;
353 else
354 rc = NETDEV_TX_OK;
353 return rc; 355 return rc;
354} /* end of claw_tx */ 356} /* end of claw_tx */
355 357
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 8c675905448..a70de9b4bf2 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -1553,24 +1553,24 @@ __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb,
1553 struct net_device *dev) 1553 struct net_device *dev)
1554{ 1554{
1555 struct lcs_header *header; 1555 struct lcs_header *header;
1556 int rc = 0; 1556 int rc = NETDEV_TX_OK;
1557 1557
1558 LCS_DBF_TEXT(5, trace, "hardxmit"); 1558 LCS_DBF_TEXT(5, trace, "hardxmit");
1559 if (skb == NULL) { 1559 if (skb == NULL) {
1560 card->stats.tx_dropped++; 1560 card->stats.tx_dropped++;
1561 card->stats.tx_errors++; 1561 card->stats.tx_errors++;
1562 return 0; 1562 return NETDEV_TX_OK;
1563 } 1563 }
1564 if (card->state != DEV_STATE_UP) { 1564 if (card->state != DEV_STATE_UP) {
1565 dev_kfree_skb(skb); 1565 dev_kfree_skb(skb);
1566 card->stats.tx_dropped++; 1566 card->stats.tx_dropped++;
1567 card->stats.tx_errors++; 1567 card->stats.tx_errors++;
1568 card->stats.tx_carrier_errors++; 1568 card->stats.tx_carrier_errors++;
1569 return 0; 1569 return NETDEV_TX_OK;
1570 } 1570 }
1571 if (skb->protocol == htons(ETH_P_IPV6)) { 1571 if (skb->protocol == htons(ETH_P_IPV6)) {
1572 dev_kfree_skb(skb); 1572 dev_kfree_skb(skb);
1573 return 0; 1573 return NETDEV_TX_OK;
1574 } 1574 }
1575 netif_stop_queue(card->dev); 1575 netif_stop_queue(card->dev);
1576 spin_lock(&card->lock); 1576 spin_lock(&card->lock);
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 8c36eafcfbf..bb1183a2ed6 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -1376,14 +1376,14 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev)
1376 if (skb == NULL) { 1376 if (skb == NULL) {
1377 IUCV_DBF_TEXT(data, 2, "netiucv_tx: skb is NULL\n"); 1377 IUCV_DBF_TEXT(data, 2, "netiucv_tx: skb is NULL\n");
1378 privptr->stats.tx_dropped++; 1378 privptr->stats.tx_dropped++;
1379 return 0; 1379 return NETDEV_TX_OK;
1380 } 1380 }
1381 if (skb_headroom(skb) < NETIUCV_HDRLEN) { 1381 if (skb_headroom(skb) < NETIUCV_HDRLEN) {
1382 IUCV_DBF_TEXT(data, 2, 1382 IUCV_DBF_TEXT(data, 2,
1383 "netiucv_tx: skb_headroom < NETIUCV_HDRLEN\n"); 1383 "netiucv_tx: skb_headroom < NETIUCV_HDRLEN\n");
1384 dev_kfree_skb(skb); 1384 dev_kfree_skb(skb);
1385 privptr->stats.tx_dropped++; 1385 privptr->stats.tx_dropped++;
1386 return 0; 1386 return NETDEV_TX_OK;
1387 } 1387 }
1388 1388
1389 /** 1389 /**
@@ -1395,7 +1395,7 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev)
1395 privptr->stats.tx_dropped++; 1395 privptr->stats.tx_dropped++;
1396 privptr->stats.tx_errors++; 1396 privptr->stats.tx_errors++;
1397 privptr->stats.tx_carrier_errors++; 1397 privptr->stats.tx_carrier_errors++;
1398 return 0; 1398 return NETDEV_TX_OK;
1399 } 1399 }
1400 1400
1401 if (netiucv_test_and_set_busy(dev)) { 1401 if (netiucv_test_and_set_busy(dev)) {
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 691cecd03b8..2cfc338c462 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -744,6 +744,7 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
744 card->stats.tx_bytes += tx_bytes; 744 card->stats.tx_bytes += tx_bytes;
745 if (new_skb != skb) 745 if (new_skb != skb)
746 dev_kfree_skb_any(skb); 746 dev_kfree_skb_any(skb);
747 rc = NETDEV_TX_OK;
747 } else { 748 } else {
748 if (data_offset >= 0) 749 if (data_offset >= 0)
749 kmem_cache_free(qeth_core_header_cache, hdr); 750 kmem_cache_free(qeth_core_header_cache, hdr);
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 54872406864..048defaea81 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2793,6 +2793,7 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
2793 card->perf_stats.sg_frags_sent += nr_frags + 1; 2793 card->perf_stats.sg_frags_sent += nr_frags + 1;
2794 } 2794 }
2795 } 2795 }
2796 rc = NETDEV_TX_OK;
2796 } else { 2797 } else {
2797 if (data_offset >= 0) 2798 if (data_offset >= 0)
2798 kmem_cache_free(qeth_core_header_cache, hdr); 2799 kmem_cache_free(qeth_core_header_cache, hdr);
diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c
index f298b9bcec3..35c59d5aa99 100644
--- a/drivers/staging/rt2860/rt_main_dev.c
+++ b/drivers/staging/rt2860/rt_main_dev.c
@@ -862,7 +862,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
862{ 862{
863 struct net_device *net_dev = skb->dev; 863 struct net_device *net_dev = skb->dev;
864 PRTMP_ADAPTER pAd = net_dev->ml_priv; 864 PRTMP_ADAPTER pAd = net_dev->ml_priv;
865 int status = 0; 865 int status = NETDEV_TX_OK;
866 PNDIS_PACKET pPacket = (PNDIS_PACKET) skb; 866 PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
867 867
868 { 868 {
@@ -892,7 +892,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
892 892
893 STASendPackets((NDIS_HANDLE)pAd, (PPNDIS_PACKET) &pPacket, 1); 893 STASendPackets((NDIS_HANDLE)pAd, (PPNDIS_PACKET) &pPacket, 1);
894 894
895 status = 0; 895 status = NETDEV_TX_OK;
896done: 896done:
897 897
898 return status; 898 return status;
@@ -923,7 +923,7 @@ INT rt28xx_send_packets(
923 if (!(net_dev->flags & IFF_UP)) 923 if (!(net_dev->flags & IFF_UP))
924 { 924 {
925 RELEASE_NDIS_PACKET(pAd, (PNDIS_PACKET)skb_p, NDIS_STATUS_FAILURE); 925 RELEASE_NDIS_PACKET(pAd, (PNDIS_PACKET)skb_p, NDIS_STATUS_FAILURE);
926 return 0; 926 return NETDEV_TX_OK;
927 } 927 }
928 928
929 NdisZeroMemory((PUCHAR)&skb_p->cb[CB_OFF], 15); 929 NdisZeroMemory((PUCHAR)&skb_p->cb[CB_OFF], 15);
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
index 1294e05fcf1..1b774601b4a 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
@@ -802,13 +802,13 @@ int ieee80211_xmit(struct sk_buff *skb,
802 if ((*ieee->hard_start_xmit)(txb, dev) == 0) { 802 if ((*ieee->hard_start_xmit)(txb, dev) == 0) {
803 stats->tx_packets++; 803 stats->tx_packets++;
804 stats->tx_bytes += txb->payload_size; 804 stats->tx_bytes += txb->payload_size;
805 return 0; 805 return NETDEV_TX_OK;
806 } 806 }
807 ieee80211_txb_free(txb); 807 ieee80211_txb_free(txb);
808 } 808 }
809 } 809 }
810 810
811 return 0; 811 return NETDEV_TX_OK;
812 812
813 failed: 813 failed:
814 spin_unlock_irqrestore(&ieee->lock, flags); 814 spin_unlock_irqrestore(&ieee->lock, flags);
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 7e2fecae813..26a59118d34 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -3040,7 +3040,7 @@ int rtl8180_hard_start_xmit(struct sk_buff *skb,struct net_device *dev)
3040 spin_unlock_irqrestore(&priv->tx_lock,flags); 3040 spin_unlock_irqrestore(&priv->tx_lock,flags);
3041 3041
3042 dev_kfree_skb_any(skb); 3042 dev_kfree_skb_any(skb);
3043 return 0; 3043 return NETDEV_TX_OK;
3044 } 3044 }
3045 3045
3046 rtl8180_tx(dev, skb->data, skb->len, priority, 3046 rtl8180_tx(dev, skb->data, skb->len, priority,
@@ -3051,7 +3051,7 @@ int rtl8180_hard_start_xmit(struct sk_buff *skb,struct net_device *dev)
3051 spin_unlock_irqrestore(&priv->tx_lock,flags); 3051 spin_unlock_irqrestore(&priv->tx_lock,flags);
3052 3052
3053 dev_kfree_skb_any(skb); 3053 dev_kfree_skb_any(skb);
3054 return 0; 3054 return NETDEV_TX_OK;
3055} 3055}
3056 3056
3057// longpre 144+48 shortpre 72+24 3057// longpre 144+48 shortpre 72+24
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 90f499e00dc..c273c034a83 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -354,7 +354,7 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
354 p80211_metawep_t p80211_wep; 354 p80211_metawep_t p80211_wep;
355 355
356 if (skb == NULL) 356 if (skb == NULL)
357 return 0; 357 return NETDEV_TX_OK;
358 358
359 if (wlandev->state != WLAN_DEVICE_OPEN) { 359 if (wlandev->state != WLAN_DEVICE_OPEN) {
360 result = 1; 360 result = 1;