[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211218235404.3963475-7-davidm@egauge.net>
Date: Sat, 18 Dec 2021 23:54:16 +0000 (UTC)
From: David Mosberger-Tang <davidm@...uge.net>
To: Ajay Singh <ajay.kathat@...rochip.com>
Cc: Claudiu Beznea <claudiu.beznea@...rochip.com>,
Kalle Valo <kvalo@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
David Mosberger-Tang <davidm@...uge.net>
Subject: [PATCH 06/23] wilc1000: move tx packet drop code into its own
function
This is just to improve code clarity.
Signed-off-by: David Mosberger-Tang <davidm@...uge.net>
---
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
Powered by blists - more mailing lists