diff options
author | Patrick McHardy <kaber@trash.net> | 2009-06-12 02:22:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-13 04:18:50 -0400 |
commit | 5b548140225c6bbbbd560551dd1048b2c0ce58be (patch) | |
tree | 9306a37dbca0095ca6d88e0b0ab297bcb2dc5ae8 /drivers/net/wireless | |
parent | 5b2c4b972c0226406361f83b747eb5cdab51e68e (diff) |
net: use symbolic values for ndo_start_xmit() return codes
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/airo.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/arlan-main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/atmel.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211_tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/strip.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan.c | 6 |
8 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index dfb30b9c4267..c70604f0329e 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -1935,7 +1935,7 @@ static int mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) { | |||
1935 | netif_stop_queue (dev); | 1935 | netif_stop_queue (dev); |
1936 | if (npacks > MAXTXQ) { | 1936 | if (npacks > MAXTXQ) { |
1937 | dev->stats.tx_fifo_errors++; | 1937 | dev->stats.tx_fifo_errors++; |
1938 | return 1; | 1938 | return NETDEV_TX_BUSY; |
1939 | } | 1939 | } |
1940 | skb_queue_tail (&ai->txq, skb); | 1940 | skb_queue_tail (&ai->txq, skb); |
1941 | return 0; | 1941 | return 0; |
@@ -2139,7 +2139,7 @@ static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) { | |||
2139 | 2139 | ||
2140 | if (i == MAX_FIDS / 2) { | 2140 | if (i == MAX_FIDS / 2) { |
2141 | dev->stats.tx_fifo_errors++; | 2141 | dev->stats.tx_fifo_errors++; |
2142 | return 1; | 2142 | return NETDEV_TX_BUSY; |
2143 | } | 2143 | } |
2144 | } | 2144 | } |
2145 | /* check min length*/ | 2145 | /* check min length*/ |
@@ -2211,7 +2211,7 @@ static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) { | |||
2211 | 2211 | ||
2212 | if (i == MAX_FIDS) { | 2212 | if (i == MAX_FIDS) { |
2213 | dev->stats.tx_fifo_errors++; | 2213 | dev->stats.tx_fifo_errors++; |
2214 | return 1; | 2214 | return NETDEV_TX_BUSY; |
2215 | } | 2215 | } |
2216 | } | 2216 | } |
2217 | /* check min length*/ | 2217 | /* check min length*/ |
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index a54a67c425c8..d84caf198a23 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -1199,7 +1199,7 @@ bad_end: | |||
1199 | arlan_process_interrupt(dev); | 1199 | arlan_process_interrupt(dev); |
1200 | netif_stop_queue (dev); | 1200 | netif_stop_queue (dev); |
1201 | ARLAN_DEBUG_EXIT("arlan_tx"); | 1201 | ARLAN_DEBUG_EXIT("arlan_tx"); |
1202 | return 1; | 1202 | return NETDEV_TX_BUSY; |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | 1205 | ||
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 27eef8fb7107..291a94bd46fd 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -818,7 +818,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) | |||
818 | spin_unlock_irqrestore(&priv->irqlock, flags); | 818 | spin_unlock_irqrestore(&priv->irqlock, flags); |
819 | spin_unlock_bh(&priv->timerlock); | 819 | spin_unlock_bh(&priv->timerlock); |
820 | netif_stop_queue(dev); | 820 | netif_stop_queue(dev); |
821 | return 1; | 821 | return NETDEV_TX_BUSY; |
822 | } | 822 | } |
823 | 823 | ||
824 | frame_ctl = IEEE80211_FTYPE_DATA; | 824 | frame_ctl = IEEE80211_FTYPE_DATA; |
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 6693423f63fe..d313b005114e 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -377,7 +377,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
377 | { | 377 | { |
378 | struct hostap_interface *iface; | 378 | struct hostap_interface *iface; |
379 | local_info_t *local; | 379 | local_info_t *local; |
380 | int ret = 1; | 380 | int ret = NETDEV_TX_BUSY; |
381 | u16 fc; | 381 | u16 fc; |
382 | struct hostap_tx_data tx; | 382 | struct hostap_tx_data tx; |
383 | ap_tx_ret tx_ret; | 383 | ap_tx_ret tx_ret; |
diff --git a/drivers/net/wireless/ipw2x00/libipw_tx.c b/drivers/net/wireless/ipw2x00/libipw_tx.c index 65a8195b3d90..da2ad5437ce5 100644 --- a/drivers/net/wireless/ipw2x00/libipw_tx.c +++ b/drivers/net/wireless/ipw2x00/libipw_tx.c | |||
@@ -539,7 +539,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
539 | spin_unlock_irqrestore(&ieee->lock, flags); | 539 | spin_unlock_irqrestore(&ieee->lock, flags); |
540 | netif_stop_queue(dev); | 540 | netif_stop_queue(dev); |
541 | dev->stats.tx_errors++; | 541 | dev->stats.tx_errors++; |
542 | return 1; | 542 | return NETDEV_TX_BUSY; |
543 | } | 543 | } |
544 | EXPORT_SYMBOL(ieee80211_xmit); | 544 | EXPORT_SYMBOL(ieee80211_xmit); |
545 | 545 | ||
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 22e71856aa24..b10b0383dfa5 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -923,7 +923,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
923 | 923 | ||
924 | if (!(pcmcia_dev_present(link))) { | 924 | if (!(pcmcia_dev_present(link))) { |
925 | DEBUG(2, "ray_dev_start_xmit - device not present\n"); | 925 | DEBUG(2, "ray_dev_start_xmit - device not present\n"); |
926 | return -1; | 926 | return NETDEV_TX_LOCKED; |
927 | } | 927 | } |
928 | DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev); | 928 | DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev); |
929 | if (local->authentication_state == NEED_TO_AUTH) { | 929 | 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) | |||
931 | if (!build_auth_frame(local, local->auth_id, OPEN_AUTH_REQUEST)) { | 931 | if (!build_auth_frame(local, local->auth_id, OPEN_AUTH_REQUEST)) { |
932 | local->authentication_state = AUTHENTICATED; | 932 | local->authentication_state = AUTHENTICATED; |
933 | netif_stop_queue(dev); | 933 | netif_stop_queue(dev); |
934 | return 1; | 934 | return NETDEV_TX_BUSY; |
935 | } | 935 | } |
936 | } | 936 | } |
937 | 937 | ||
@@ -944,7 +944,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
944 | case XMIT_NO_CCS: | 944 | case XMIT_NO_CCS: |
945 | case XMIT_NEED_AUTH: | 945 | case XMIT_NEED_AUTH: |
946 | netif_stop_queue(dev); | 946 | netif_stop_queue(dev); |
947 | return 1; | 947 | return NETDEV_TX_BUSY; |
948 | case XMIT_NO_INTR: | 948 | case XMIT_NO_INTR: |
949 | case XMIT_MSG_BAD: | 949 | case XMIT_MSG_BAD: |
950 | case XMIT_OK: | 950 | case XMIT_OK: |
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index b7b0c46adb46..38366a56b71f 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c | |||
@@ -1540,7 +1540,7 @@ static int strip_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1540 | if (!netif_running(dev)) { | 1540 | if (!netif_running(dev)) { |
1541 | printk(KERN_ERR "%s: xmit call when iface is down\n", | 1541 | printk(KERN_ERR "%s: xmit call when iface is down\n", |
1542 | dev->name); | 1542 | dev->name); |
1543 | return (1); | 1543 | return NETDEV_TX_BUSY; |
1544 | } | 1544 | } |
1545 | 1545 | ||
1546 | netif_stop_queue(dev); | 1546 | netif_stop_queue(dev); |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index 25d27b64f528..ab7fc5c0c8b4 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -2867,7 +2867,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) | |||
2867 | spin_unlock_irqrestore(&lp->spinlock, flags); | 2867 | spin_unlock_irqrestore(&lp->spinlock, flags); |
2868 | /* Check that we can continue */ | 2868 | /* Check that we can continue */ |
2869 | if (lp->tx_n_in_use == (NTXBLOCKS - 1)) | 2869 | if (lp->tx_n_in_use == (NTXBLOCKS - 1)) |
2870 | return 1; | 2870 | return NETDEV_TX_BUSY; |
2871 | } | 2871 | } |
2872 | 2872 | ||
2873 | /* Do we need some padding? */ | 2873 | /* Do we need some padding? */ |
@@ -2880,10 +2880,10 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) | |||
2880 | skb_copy_from_linear_data(skb, data, skb->len); | 2880 | skb_copy_from_linear_data(skb, data, skb->len); |
2881 | /* Write packet on the card */ | 2881 | /* Write packet on the card */ |
2882 | if(wv_packet_write(dev, data, ETH_ZLEN)) | 2882 | if(wv_packet_write(dev, data, ETH_ZLEN)) |
2883 | return 1; /* We failed */ | 2883 | return NETDEV_TX_BUSY; /* We failed */ |
2884 | } | 2884 | } |
2885 | else if(wv_packet_write(dev, skb->data, skb->len)) | 2885 | else if(wv_packet_write(dev, skb->data, skb->len)) |
2886 | return 1; /* We failed */ | 2886 | return NETDEV_TX_BUSY; /* We failed */ |
2887 | 2887 | ||
2888 | 2888 | ||
2889 | dev_kfree_skb(skb); | 2889 | dev_kfree_skb(skb); |