From: Alan Ott Date: Wed, 3 Apr 2013 04:00:58 +0000 (+0000) Subject: 6lowpan: handle dev_queue_xmit() error code properly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fc52eea4c5f160d1b42fa1852fece38e5a0fc991;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: David S. Miller --- 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) error: dev_kfree_skb(skb); out: - if (err < 0) + if (err) pr_debug("ERROR: xmit failed\n"); - return (err < 0 ? NETDEV_TX_BUSY : NETDEV_TX_OK); + return (err < 0) ? NET_XMIT_DROP : err; } static struct wpan_phy *lowpan_get_phy(const struct net_device *dev)