From patchwork Thu Apr 7 10:08:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 12804961 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 10268C433EF for ; Thu, 7 Apr 2022 10:09:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244141AbiDGKL1 (ORCPT ); Thu, 7 Apr 2022 06:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244125AbiDGKLR (ORCPT ); Thu, 7 Apr 2022 06:11:17 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D04EF236935; Thu, 7 Apr 2022 03:09:16 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 173DA60017; Thu, 7 Apr 2022 10:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1649326155; 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=bmvANx7WYepho7DZQ0HsozEsj0y66stBZ846jh1dlsw=; b=JGIer4PErvzE+JPm14rWlbBiF3pDVleODB49CriLOZAClO9SCKY1jLSXhAjU95F7lg0iDF mbiLhzlHnOxBwednrFP9QwYqc++QWi41amEC/QZDb2AxLXSTR2KAdcxpeIlaeEkLonyVnc 6zT06nQdZZHaVSfqsi/E5OM9ZrQBp0TcraY29kYO+tWYs3RaUAH50BwTlmtmYErdOO+QF/ C92xmrTbxelP3IKUymt5qxTs9kbtpciWRbLl7+dY/0qp+wufZ6hk6MUubMR/8ahebMCFdN DgZ4ncmoUghUJ2z74sHHiBacD6PIp2cM6jEHb0DhA66t/CkvWMacNooZXwlH1A== 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 v6 06/10] net: ieee802154: at86rf230: Call _xmit_hw_error() when failing to offload frames Date: Thu, 7 Apr 2022 12:08:59 +0200 Message-Id: <20220407100903.1695973-7-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220407100903.1695973-1-miquel.raynal@bootlin.com> References: <20220407100903.1695973-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org 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 --- drivers/net/ieee802154/at86rf230.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 563031ce76f0..0536ccd55e70 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -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); } }