mwifiex: transmit packet stats incorrect.
authorMarty Faltesek <mfaltesek@google.com>
Wed, 20 Apr 2016 04:22:01 +0000 (00:22 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 27 Apr 2016 13:51:17 +0000 (16:51 +0300)
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>
drivers/net/wireless/marvell/mwifiex/txrx.c

index bf6182b646a5436ad083623fa2c2980ce8019f28..abdd0cf710bf6df2440595dfbe879debf208be9a 100644 (file)
@@ -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;
This page took 0.030886 seconds and 5 git commands to generate.