From: Alexander Aring Date: Tue, 7 Oct 2014 08:38:25 +0000 (+0200) Subject: at86rf230: fix errno on tx timeout handling X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=464f029915de6379c8fcd18d5dd49e5b3d1a2cc5;p=openwrt%2Fstaging%2Fblogic.git at86rf230: fix errno on tx timeout handling The rc variable is zero if we get a timeout. Instead of pass the rc variable to the async error handling function which try to recover the phy, we use a static -ETIMEDOUT errno. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index c9d2a752abd7..6857038111a0 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -995,7 +995,7 @@ at86rf230_xmit(struct ieee802154_dev *dev, struct sk_buff *skb) rc = wait_for_completion_interruptible_timeout(&lp->tx_complete, msecs_to_jiffies(lp->data->t_tx_timeout)); if (!rc) { - at86rf230_async_error(lp, ctx, rc); + at86rf230_async_error(lp, ctx, -ETIMEDOUT); return -ETIMEDOUT; }