提交 fc52eea4 编写于 作者: A Alan Ott 提交者: David S. Miller

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: NAlan Ott <alan@signal11.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e937f583
...@@ -1139,10 +1139,10 @@ static netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1139,10 +1139,10 @@ static netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev)
error: error:
dev_kfree_skb(skb); dev_kfree_skb(skb);
out: out:
if (err < 0) if (err)
pr_debug("ERROR: xmit failed\n"); 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) static struct wpan_phy *lowpan_get_phy(const struct net_device *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册