linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mwifiex: transmit packet stats incorrect.
@ 2016-04-20  4:22 Marty Faltesek
  2016-04-27 13:51 ` [v2] " Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Marty Faltesek @ 2016-04-20  4:22 UTC (permalink / raw)
  To: linux-wireless; +Cc: akarwar

tx_packets counter is incremented for aggregated packets, when it had
already been incremented for the aggregated packet's constituent
parts. Removing the extra count.

Signed-off-by: Marty Faltesek <mfaltesek@google.com>
---
 drivers/net/wireless/marvell/mwifiex/txrx.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/txrx.c b/drivers/net/wireless/marvell/mwifiex/txrx.c
index bf6182b..abdd0cf 100644
--- a/drivers/net/wireless/marvell/mwifiex/txrx.c
+++ b/drivers/net/wireless/marvell/mwifiex/txrx.c
@@ -297,6 +297,13 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
 		goto done;
 
 	mwifiex_set_trans_start(priv->netdev);
+
+	if (tx_info->flags & MWIFIEX_BUF_FLAG_BRIDGED_PKT)
+		atomic_dec_return(&adapter->pending_bridged_pkts);
+
+	if (tx_info->flags & MWIFIEX_BUF_FLAG_AGGR_PKT)
+		goto done;
+
 	if (!status) {
 		priv->stats.tx_packets++;
 		priv->stats.tx_bytes += tx_info->pkt_len;
@@ -306,12 +313,6 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
 		priv->stats.tx_errors++;
 	}
 
-	if (tx_info->flags & MWIFIEX_BUF_FLAG_BRIDGED_PKT)
-		atomic_dec_return(&adapter->pending_bridged_pkts);
-
-	if (tx_info->flags & MWIFIEX_BUF_FLAG_AGGR_PKT)
-		goto done;
-
 	if (aggr)
 		/* For skb_aggr, do not wake up tx queue */
 		goto done;
-- 
2.8.0.rc3.226.g39d4020


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [v2] mwifiex: transmit packet stats incorrect.
  2016-04-20  4:22 [PATCH v2] mwifiex: transmit packet stats incorrect Marty Faltesek
@ 2016-04-27 13:51 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-04-27 13:51 UTC (permalink / raw)
  To: Marty Faltesek; +Cc: linux-wireless, akarwar


> tx_packets counter is incremented for aggregated packets, when it had
> already been incremented for the aggregated packet's constituent
> parts. Removing the extra count.
> 
> Signed-off-by: Marty Faltesek <mfaltesek@google.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-27 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20  4:22 [PATCH v2] mwifiex: transmit packet stats incorrect Marty Faltesek
2016-04-27 13:51 ` [v2] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).