summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/txrx.c
diff options
context:
space:
mode:
authorMarty Faltesek <mfaltesek@google.com>2016-04-20 00:22:01 -0400
committerKalle Valo <kvalo@codeaurora.org>2016-04-27 16:51:17 +0300
commit8d666302df95ab585f5cc7b2fb779991f8797eb5 (patch)
treebe8572855284a251f4a0456f44d37ac1c2ff7a78 /drivers/net/wireless/marvell/mwifiex/txrx.c
parentb977d305ad20e05212c0ded2a7ef90e411edc1b3 (diff)
mwifiex: transmit packet stats incorrect.
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> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/txrx.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/txrx.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/txrx.c b/drivers/net/wireless/marvell/mwifiex/txrx.c
index bf6182b646a5..abdd0cf710bf 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;