Skip to content

Commit

Permalink
mwifiex: transmit packet stats incorrect.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marty Faltesek authored and Kalle Valo committed Apr 27, 2016
1 parent b977d30 commit 8d66630
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions drivers/net/wireless/marvell/mwifiex/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 8d66630

Please sign in to comment.