diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-04-07 12:08:57 +0200 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2022-04-25 20:51:12 +0200 |
commit | 30ca44eb2480ede838c7c8c131a7d25589a98f0a (patch) | |
tree | 9cd09f050073f0b5ecb27a9218db3e7351f8fbba /include/net/mac802154.h | |
parent | net: mac802154: Save a global error code on transmissions (diff) | |
download | linux-30ca44eb2480ede838c7c8c131a7d25589a98f0a.tar.xz linux-30ca44eb2480ede838c7c8c131a7d25589a98f0a.zip |
net: mac802154: Create an offloaded transmission error helper
So far there is only a helper for successful transmissions, which led
device drivers to implement their own handling in case of
error. Unfortunately, we really need all the drivers to give the hand
back to the core once they are done in order to be able to build a
proper synchronous API. So let's create a _xmit_error() helper and take
this opportunity to fill the new device-global field storing Tx
statuses.
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-5-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'include/net/mac802154.h')
-rw-r--r-- | include/net/mac802154.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/mac802154.h b/include/net/mac802154.h index 2c3bbc6645ba..29f289d58720 100644 --- a/include/net/mac802154.h +++ b/include/net/mac802154.h @@ -498,4 +498,14 @@ void ieee802154_stop_queue(struct ieee802154_hw *hw); void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, bool ifs_handling); +/** + * ieee802154_xmit_error - offloaded frame transmission failed + * + * @hw: pointer as obtained from ieee802154_alloc_hw(). + * @skb: buffer for transmission + * @reason: error code + */ +void ieee802154_xmit_error(struct ieee802154_hw *hw, struct sk_buff *skb, + int reason); + #endif /* NET_MAC802154_H */ |