From patchwork Wed Apr 6 15:34:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 12803893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B207BC43217 for ; Wed, 6 Apr 2022 17:29:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238949AbiDFRbj (ORCPT ); Wed, 6 Apr 2022 13:31:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239175AbiDFRb2 (ORCPT ); Wed, 6 Apr 2022 13:31:28 -0400 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [IPv6:2001:4b98:dc4:8::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D384B23702F; Wed, 6 Apr 2022 08:34:56 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 04A97200005; Wed, 6 Apr 2022 15:34:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1649259295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yj2cFOYKpa/ZpdUu3gbCTqoDBIoPudwTCp0bpdE6Mrk=; b=b5E7BiXPmdyPIlLZiJpsgEOk9ocvIT4pRiJw5PxAS2R7bmUk5QCfJqdX85/4Okm3uaGUgm RZJ6nuacAhiNWGjiHlhw8POQcfce/+O4pDI9vw63OR0rR70x5/ZJIZa72y8/ZMPswUZRIj j/DTXgI2rAPZKzUhFbeTU5WuiHIayLhOyrKl1BTmydTk5KF7HSBvcRdtQOuY6dYiLBl62I dwI9sYrIFhBuod/w5ywtt78gsKj8cvy0exl0ql8B3fiSg4Rp9ERvyCQrehmGwCLIAtJXwg tpHni0CuSqnL0GLHTmaNco75s7pWBifX7dNi/s3PS1aoeqPf50Z6lvU8hFd2YA== From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Thomas Petazzoni , Miquel Raynal Subject: [PATCH v5 09/11] net: ieee802154: atusb: Call _xmit_error() when a transmission fails Date: Wed, 6 Apr 2022 17:34:39 +0200 Message-Id: <20220406153441.1667375-10-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220406153441.1667375-1-miquel.raynal@bootlin.com> References: <20220406153441.1667375-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org 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 --- 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); } }