Skip to content

Commit

Permalink
net: ieee802154: at86rf230: Call _xmit_hw_error() when failing to off…
Browse files Browse the repository at this point in the history
…load frames

If we end up at this location, it means that there was likely a hardware
issue (either a bus error when asynchronously offloading the packet to
the transceiver, or the transceiver took too long for some state
change). In this case it was decided to return IEEE802154_SYSTEM_ERROR
through the ieee802154_xmit_hw_error() helper dedicated to non
IEEE802.15.4 specific errors.

Let's use this helper instead of (almost) open-coding it.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20220407100903.1695973-7-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
  • Loading branch information
Miquel Raynal authored and Stefan Schmidt committed Apr 25, 2022
1 parent 5a1b57c commit 2b1c9db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ieee802154/at86rf230.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ at86rf230_async_error_recover_complete(void *context)

if (lp->was_tx) {
lp->was_tx = 0;
dev_kfree_skb_any(lp->tx_skb);
ieee802154_wake_queue(lp->hw);
ieee802154_xmit_hw_error(lp->hw, lp->tx_skb);
}
}

Expand Down

0 comments on commit 2b1c9db

Please sign in to comment.