From patchwork Thu Dec 23 01:14:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Mosberger-Tang X-Patchwork-Id: 527987 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 374FFC433FE for ; Thu, 23 Dec 2021 01:15:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346083AbhLWBPH (ORCPT ); Wed, 22 Dec 2021 20:15:07 -0500 Received: from o1.ptr2625.egauge.net ([167.89.112.53]:18028 "EHLO o1.ptr2625.egauge.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239866AbhLWBOK (ORCPT ); Wed, 22 Dec 2021 20:14:10 -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=+7AWGxcrq5YzxQh8YZpRRrdRupC/5aJM8GvitkVOgJc=; b=sgnljYTeOYohG3acZKV0iK0B/fvJScPcF/noXswvlzrshoSVIfHYus7hQF1N20wQ8OLi M+xlQUrF0Hh5pmmtHQwkpNj38pXSy6IBo+JrSKphjO/5Uc7u2mhZpyXXmzFlsPpARYwWyt 7cTNgnB1F91PHzjP2tHIDCBzL48Udq6LdKVQaqhlqO7t6no7RWB1I6KJAKYq+jrvnimXNU dqCKzgfnLUey0mZlNF9kVC5MLsh1wF+E5OqBkJLxb8+nki/EwDx1ltomVqHSuOqp+LWSNw 8XA7j4v+7jq8J9DPw5wN2Epwejb70xOhXt3gpWAJl98MB5YF7dSQCAelZuzsgxcQ== Received: by filterdrecv-75ff7b5ffb-7ssmw with SMTP id filterdrecv-75ff7b5ffb-7ssmw-1-61C3CD5E-11 2021-12-23 01:14:06.196346041 +0000 UTC m=+9687225.265879185 Received: from pearl.egauge.net (unknown) by geopod-ismtpd-3-0 (SG) with ESMTP id 6x-HI6p1SLWMDmAwRcjxkg Thu, 23 Dec 2021 01:14:06.029 +0000 (UTC) Received: by pearl.egauge.net (Postfix, from userid 1000) id EA6AC700D4D; Wed, 22 Dec 2021 18:14:04 -0700 (MST) From: David Mosberger-Tang Subject: [PATCH v2 07/50] wilc1000: increment tx_dropped stat counter on tx packet drop Date: Thu, 23 Dec 2021 01:14:06 +0000 (UTC) Message-Id: <20211223011358.4031459-8-davidm@egauge.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211223011358.4031459-1-davidm@egauge.net> References: <20211223011358.4031459-1-davidm@egauge.net> MIME-Version: 1.0 X-SG-EID: +kMxBqj35EdRUKoy8diX1j4AXmPtd302oan+iXZuF8m2Nw4HRW2irNspffT/khET6RJF6+Prbl0h/EtF1rRLvDKrArIMv0ekRFhsmfMLkKZAX5foC3EIyVvusbxrwy0G4rOImm0QqeNxD5K9LJ+WXaZDsNQsAFlQRJjojhhxrTyhUMjHuiBV8s8RQ/46enSKaA5bsuMxuYazZGW5nVWFhvcqsiZ/d2FSfk3SZOIWeOaTkDD+31tSqawxNGSS4OiDRuZX/3b+zqgN/4W9bgbwQA== 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== Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Packet drops are important events so we should remember to count them. Signed-off-by: David Mosberger-Tang --- drivers/net/wireless/microchip/wilc1000/wlan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index e4342631aae93..4e59d4c707ea5 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -202,7 +202,10 @@ static void wilc_wlan_tx_packet_done(struct txq_entry_t *tqe, int status) static void wilc_wlan_txq_drop_net_pkt(struct txq_entry_t *tqe) { - struct wilc *wilc = tqe->vif->wilc; + struct wilc_vif *vif = tqe->vif; + struct wilc *wilc = vif->wilc; + + vif->ndev->stats.tx_dropped++; wilc_wlan_txq_remove(wilc, tqe->q_num, tqe); wilc_wlan_tx_packet_done(tqe, 1);