diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-04-07 13:08:58 +0300 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2022-04-25 21:51:12 +0300 |
commit | 5a1b57c0dde9b93ba8261fa1c81f9aae2bac284a (patch) | |
tree | 2727624358f8d0b4ea17a076b5313ef320c8695e /net/mac802154 | |
parent | 30ca44eb2480ede838c7c8c131a7d25589a98f0a (diff) | |
download | linux-5a1b57c0dde9b93ba8261fa1c81f9aae2bac284a.tar.xz |
net: mac802154: Create an error helper for asynchronous offloading errors
A few drivers do the full transmit operation asynchronously, which means
that a bus error that happens when forwarding the packet to the
transmitter or a timeout happening when offloading the request to the
transmitter will not be reported immediately.
The solution in this case is to call this new helper to free the
necessary resources, restart the queue and always return the same
generic TRAC error code: IEEE802154_SYSTEM_ERROR.
Suggested-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20220407100903.1695973-6-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac802154/util.c b/net/mac802154/util.c index ec523335336c..9f024d85563b 100644 --- a/net/mac802154/util.c +++ b/net/mac802154/util.c @@ -102,6 +102,12 @@ void ieee802154_xmit_error(struct ieee802154_hw *hw, struct sk_buff *skb, } EXPORT_SYMBOL(ieee802154_xmit_error); +void ieee802154_xmit_hw_error(struct ieee802154_hw *hw, struct sk_buff *skb) +{ + ieee802154_xmit_error(hw, skb, IEEE802154_SYSTEM_ERROR); +} +EXPORT_SYMBOL(ieee802154_xmit_hw_error); + void ieee802154_stop_device(struct ieee802154_local *local) { flush_workqueue(local->workqueue); |