summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/txrx.c
diff options
context:
space:
mode:
authorMarc Yang <yangyang@marvell.com>2011-05-16 19:17:53 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-05-19 13:53:57 -0400
commit62a5b7dcee00c8e64e61ed98541c95fd38583116 (patch)
treef283462eb58ab6ddb9dd891f2a9f235421a0f3c4 /drivers/net/wireless/mwifiex/txrx.c
parent17e8cec87586c26b953c6541c8a045e906ea046c (diff)
mwifiex: adjust high/low water marks for tx_pending queue
This is to fix an issue that the throughput of the higher priority stream gets dropped when a lower priority stream is present. Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/txrx.c')
-rw-r--r--drivers/net/wireless/mwifiex/txrx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c
index 210120889dfe..aaa50c074196 100644
--- a/drivers/net/wireless/mwifiex/txrx.c
+++ b/drivers/net/wireless/mwifiex/txrx.c
@@ -140,7 +140,9 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
} else {
priv->stats.tx_errors++;
}
- atomic_dec(&adapter->tx_pending);
+
+ if (atomic_dec_return(&adapter->tx_pending) >= LOW_TX_PENDING)
+ goto done;
for (i = 0; i < adapter->priv_num; i++) {