aboutsummaryrefslogtreecommitdiffstats
path: root/net
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 /net
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 'net')
-rw-r--r--net/atm/mpc.c2
-rw-r--r--net/core/dev.c6
-rw-r--r--net/mac80211/tx.c12
3 files changed, 10 insertions, 10 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index e5bf11453a18..1ac4b94bf626 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -554,7 +554,7 @@ static int mpc_send_packet(struct sk_buff *skb, struct net_device *dev)
554 while (i < mpc->number_of_mps_macs) { 554 while (i < mpc->number_of_mps_macs) {
555 if (!compare_ether_addr(eth->h_dest, (mpc->mps_macs + i*ETH_ALEN))) 555 if (!compare_ether_addr(eth->h_dest, (mpc->mps_macs + i*ETH_ALEN)))
556 if ( send_via_shortcut(skb, mpc) == 0 ) /* try shortcut */ 556 if ( send_via_shortcut(skb, mpc) == 0 ) /* try shortcut */
557 return 0; /* success! */ 557 return NETDEV_TX_OK; /* success! */
558 i++; 558 i++;
559 } 559 }
560 560
diff --git a/net/core/dev.c b/net/core/dev.c
index 70c27e0c7c32..dca8b5000d3b 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1704,7 +1704,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
1704 skb_dst_drop(skb); 1704 skb_dst_drop(skb);
1705 1705
1706 rc = ops->ndo_start_xmit(skb, dev); 1706 rc = ops->ndo_start_xmit(skb, dev);
1707 if (rc == 0) 1707 if (rc == NETDEV_TX_OK)
1708 txq_trans_update(txq); 1708 txq_trans_update(txq);
1709 /* 1709 /*
1710 * TODO: if skb_orphan() was called by 1710 * TODO: if skb_orphan() was called by
@@ -1730,7 +1730,7 @@ gso:
1730 skb->next = nskb->next; 1730 skb->next = nskb->next;
1731 nskb->next = NULL; 1731 nskb->next = NULL;
1732 rc = ops->ndo_start_xmit(nskb, dev); 1732 rc = ops->ndo_start_xmit(nskb, dev);
1733 if (unlikely(rc)) { 1733 if (unlikely(rc != NETDEV_TX_OK)) {
1734 nskb->next = skb->next; 1734 nskb->next = skb->next;
1735 skb->next = nskb; 1735 skb->next = nskb;
1736 return rc; 1736 return rc;
@@ -1744,7 +1744,7 @@ gso:
1744 1744
1745out_kfree_skb: 1745out_kfree_skb:
1746 kfree_skb(skb); 1746 kfree_skb(skb);
1747 return 0; 1747 return NETDEV_TX_OK;
1748} 1748}
1749 1749
1750static u32 skb_tx_hashrnd; 1750static u32 skb_tx_hashrnd;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d238a8939a09..2ffb35d3f566 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1627,7 +1627,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1627 u32 sta_flags = 0; 1627 u32 sta_flags = 0;
1628 1628
1629 if (unlikely(skb->len < ETH_HLEN)) { 1629 if (unlikely(skb->len < ETH_HLEN)) {
1630 ret = 0; 1630 ret = NETDEV_TX_OK;
1631 goto fail; 1631 goto fail;
1632 } 1632 }
1633 1633
@@ -1664,7 +1664,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1664 if (!sdata->u.mesh.mshcfg.dot11MeshTTL) { 1664 if (!sdata->u.mesh.mshcfg.dot11MeshTTL) {
1665 /* Do not send frames with mesh_ttl == 0 */ 1665 /* Do not send frames with mesh_ttl == 0 */
1666 sdata->u.mesh.mshstats.dropped_frames_ttl++; 1666 sdata->u.mesh.mshstats.dropped_frames_ttl++;
1667 ret = 0; 1667 ret = NETDEV_TX_OK;
1668 goto fail; 1668 goto fail;
1669 } 1669 }
1670 memset(&mesh_hdr, 0, sizeof(mesh_hdr)); 1670 memset(&mesh_hdr, 0, sizeof(mesh_hdr));
@@ -1724,7 +1724,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1724 hdrlen = 24; 1724 hdrlen = 24;
1725 break; 1725 break;
1726 default: 1726 default:
1727 ret = 0; 1727 ret = NETDEV_TX_OK;
1728 goto fail; 1728 goto fail;
1729 } 1729 }
1730 1730
@@ -1766,7 +1766,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1766 1766
1767 I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); 1767 I802_DEBUG_INC(local->tx_handlers_drop_unauth_port);
1768 1768
1769 ret = 0; 1769 ret = NETDEV_TX_OK;
1770 goto fail; 1770 goto fail;
1771 } 1771 }
1772 1772
@@ -1858,10 +1858,10 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1858 dev->trans_start = jiffies; 1858 dev->trans_start = jiffies;
1859 dev_queue_xmit(skb); 1859 dev_queue_xmit(skb);
1860 1860
1861 return 0; 1861 return NETDEV_TX_OK;
1862 1862
1863 fail: 1863 fail:
1864 if (!ret) 1864 if (ret == NETDEV_TX_OK)
1865 dev_kfree_skb(skb); 1865 dev_kfree_skb(skb);
1866 1866
1867 return ret; 1867 return ret;