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 EE20AC433FE for ; Sat, 18 Dec 2021 23:55:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235402AbhLRXzB (ORCPT ); Sat, 18 Dec 2021 18:55:01 -0500 Received: from o1.ptr2625.egauge.net ([167.89.112.53]:25360 "EHLO o1.ptr2625.egauge.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234816AbhLRXyR (ORCPT ); Sat, 18 Dec 2021 18:54:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=egauge.net; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type; s=sgd; bh=xruF0/wdRiftakYKJKiX4VcckLBgAfUgvUqV7IHx2E4=; b=dvStbokSfDMpTQUXRJu+YAjUI9UwxMp2MHMiyY/9ALhBCn1Y2Peu1dDN5dADoF07cGGA DFqgjXTfrqNRIIlFGTHClbyjiQpTLlqt3o5ciPLWhYIR5PwfymNblYUN4DMdbVdMDFOfoY iSfRY/qTu/mZ1bjS9zysqfptkdjVDLXrQaaymQYk19rzyUAisp87w39OCNGy9QHi+cwPw4 z+bR5sIytIlsRVlW5S64VBkomFmB3fprqVpBJY5Gl2Us8JxiyJbYuXYbzSa8EFkpgfZ05f 38epAeVY373jOHwYvQdhrXQHk7MJypEu4fPA6RM5LxwYWW4bEm0eLTjO3g4FQg6w== Received: by filterdrecv-656998cfdd-gwqfx with SMTP id filterdrecv-656998cfdd-gwqfx-1-61BE74A8-1D 2021-12-18 23:54:16.730054846 +0000 UTC m=+7604790.136767512 Received: from pearl.egauge.net (unknown) by geopod-ismtpd-6-0 (SG) with ESMTP id cnPWmkt0R9uhsSnxU4r7cQ Sat, 18 Dec 2021 23:54:16.575 +0000 (UTC) Received: by pearl.egauge.net (Postfix, from userid 1000) id 93A9B700A10; Sat, 18 Dec 2021 16:54:15 -0700 (MST) From: David Mosberger-Tang Subject: [PATCH 06/23] wilc1000: move tx packet drop code into its own function Date: Sat, 18 Dec 2021 23:54:16 +0000 (UTC) Message-Id: <20211218235404.3963475-7-davidm@egauge.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211218235404.3963475-1-davidm@egauge.net> References: <20211218235404.3963475-1-davidm@egauge.net> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?+kMxBqj35EdRUKoy8diX1j4AXmPtd302oan+iXZuF8m2Nw4HRW2irNspffT=2Fkh?= =?us-ascii?Q?ET6RJF6+Prbl0h=2FEtF1rRLvHMIlWy+OoiMKxiCz?= =?us-ascii?Q?vO9KY39A4krq0DN1w2fLd3tpplREjmFMJN8N3lh?= =?us-ascii?Q?1YratNtlBhMv13mzJqt8RyMczEzAcbXayOO+U4C?= =?us-ascii?Q?KdIS5Q8j1nwCgthLgfkJ55H1IOUs60sscpchYvd?= =?us-ascii?Q?FE8qIhN05l6sefPPQHajE4vBWKjw19Lj7nhItgQ?= =?us-ascii?Q?qCGE=2F93824TWYHTopCtiw=3D=3D?= To: Ajay Singh Cc: Claudiu Beznea , Kalle Valo , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Mosberger-Tang X-Entity-ID: Xg4JGAcGrJFIz2kDG9eoaQ== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is just to improve code clarity. Signed-off-by: David Mosberger-Tang --- drivers/net/wireless/microchip/wilc1000/wlan.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index caaa03c8e5df8..a9bfd71b0e667 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -200,6 +200,14 @@ static void wilc_wlan_tx_packet_done(struct txq_entry_t *tqe, int status) kfree(tqe); } +static void wilc_wlan_txq_drop_net_pkt(struct txq_entry_t *tqe) +{ + struct wilc *wilc = tqe->vif->wilc; + + wilc_wlan_txq_remove(wilc, tqe->q_num, tqe); + wilc_wlan_tx_packet_done(tqe, 1); +} + static void wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) { struct wilc_vif *vif = netdev_priv(dev); @@ -228,10 +236,8 @@ static void wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) struct txq_entry_t *tqe; tqe = f->pending_acks[i].txqe; - if (tqe) { - wilc_wlan_txq_remove(wilc, tqe->q_num, tqe); - wilc_wlan_tx_packet_done(tqe, 1); - } + if (tqe) + wilc_wlan_txq_drop_net_pkt(tqe); } } f->pending_acks_idx = 0; -- 2.25.1