From: Xinming Hu Date: Wed, 3 Jun 2015 11:29:47 +0000 (+0530) Subject: mwifiex: do not decrease tx_pending for AMSDU packet once more X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ec264a43029ff0754270864e5a93dcdaeea276d7;p=linux-beck.git mwifiex: do not decrease tx_pending for AMSDU packet once more Negative adapter->tx_pending is observed while running data traffic, because tx_pending is decreased once more for AMSDU packet. since tx_pending have been decreased for all the source MSDU packets, we don't need to update once more for AMSDU packet. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Avinash Patil Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c index c4c7d8d9e544..5ed9b794053e 100644 --- a/drivers/net/wireless/mwifiex/txrx.c +++ b/drivers/net/wireless/mwifiex/txrx.c @@ -319,11 +319,11 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter, priv->stats.tx_errors++; } - if (tx_info->flags & MWIFIEX_BUF_FLAG_BRIDGED_PKT) { + 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 (tx_info->flags & MWIFIEX_BUF_FLAG_AGGR_PKT) + goto done; if (aggr) /* For skb_aggr, do not wake up tx queue */