diff options
author | Alan Ott <alan@signal11.us> | 2013-04-03 00:00:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-07 17:06:44 -0400 |
commit | fc52eea4c5f160d1b42fa1852fece38e5a0fc991 (patch) | |
tree | 7f9e5d634244531f1d76adb2aaeb9e501f085295 /net/ieee802154/6lowpan.c | |
parent | e937f583ec3a40cccd480b40d8c6d54751781587 (diff) |
6lowpan: handle dev_queue_xmit() error code properly
dev_queue_xmit() will return a positive value if the packet could not be
queued, often because the real network device (in our case the mac802154
wpan device) has its queue stopped. lowpan_xmit() should handle the
positive return code (for the debug statement) and return that value to
the higher layer so the higher layer will retry sending the packet.
Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154/6lowpan.c')
-rw-r--r-- | net/ieee802154/6lowpan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index e1b4580f78dd..55e1fd5b3e56 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c | |||
@@ -1139,10 +1139,10 @@ static netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1139 | error: | 1139 | error: |
1140 | dev_kfree_skb(skb); | 1140 | dev_kfree_skb(skb); |
1141 | out: | 1141 | out: |
1142 | if (err < 0) | 1142 | if (err) |
1143 | pr_debug("ERROR: xmit failed\n"); | 1143 | pr_debug("ERROR: xmit failed\n"); |
1144 | 1144 | ||
1145 | return (err < 0 ? NETDEV_TX_BUSY : NETDEV_TX_OK); | 1145 | return (err < 0) ? NET_XMIT_DROP : err; |
1146 | } | 1146 | } |
1147 | 1147 | ||
1148 | static struct wpan_phy *lowpan_get_phy(const struct net_device *dev) | 1148 | static struct wpan_phy *lowpan_get_phy(const struct net_device *dev) |