Hi, On Thu, Apr 7, 2022 at 4:06 AM Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote: > > Hi Alexander, > > alex.aring@xxxxxxxxx wrote on Wed, 6 Apr 2022 17:58:59 -0400: > > > Hi, > > > > On Wed, Apr 6, 2022 at 11:34 AM Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote: > > > > > > ieee802154_xmit_error() is the right helper to call when a transmission > > > has failed. Let's use it instead of open-coding it. > > > > > > Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> > > > --- > > > drivers/net/ieee802154/atusb.c | 5 ++--- > > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/net/ieee802154/atusb.c b/drivers/net/ieee802154/atusb.c > > > index f27a5f535808..d04db4d07a64 100644 > > > --- a/drivers/net/ieee802154/atusb.c > > > +++ b/drivers/net/ieee802154/atusb.c > > > @@ -271,9 +271,8 @@ static void atusb_tx_done(struct atusb *atusb, u8 seq) > > > * unlikely case now that seq == expect is then true, but can > > > * happen and fail with a tx_skb = NULL; > > > */ > > > - ieee802154_wake_queue(atusb->hw); > > > - if (atusb->tx_skb) > > > - dev_kfree_skb_irq(atusb->tx_skb); > > > + ieee802154_xmit_error(atusb->hw, atusb->tx_skb, > > > + IEEE802154_SYSTEM_ERROR); > > > > That should then call the xmit_error for ANY other reason which is not > > 802.15.4 specific which is the bus_error() function? > > I'll drop the bus error function so we can stick to a regular > _xmit_error() call. > Okay, this error is only hardware related. > Besides, we do not have any trac information nor any easy access to > what failed exactly, so it's probably best anyway. This is correct, Somebody needs to write support for it for atusb firmware. [0] However some transceivers can't yet or will never (because lack of functionality?) report such errors back... they will act a little bit weird. However, this return value is a BIG step moving into the right direction that other drivers can follow. I think for MLME ops we can definitely handle some transmit errors now and retry so that we don't wait for anything when we know the transceiver was never submitting. - Alex [0] http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb/fw