summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorErik Stromdahl <erik.stromdahl@gmail.com>2018-05-06 15:25:00 +0200
committerKalle Valo <kvalo@codeaurora.org>2018-05-12 11:03:08 +0200
commite3148cc5fecf60dcbd07e5c9cae987976d25cb17 (patch)
treeed0f7884929fe2a73bc81f1001d00a2d485c626a /drivers/net
parentath10k: snoc: Remove owner assignment from platform_driver (diff)
downloadlinux-e3148cc5fecf60dcbd07e5c9cae987976d25cb17.tar.xz
linux-e3148cc5fecf60dcbd07e5c9cae987976d25cb17.zip
ath10k: fix return value check in wake_tx_q op
ath10k_mac_tx_push_txq returns either a postive integer (length) on success or a negative error code on error. The "if (ret) break;" statement will thus always break out of the loop immediately after ath10k_mac_tx_push_txq has returned (making the loop pointless). A side effect of this fix is that we will iterate the queue until ath10k_mac_tx_push_txq returns -ENOENT. This will make sure the queue is not added back to ar->txqs when it is empty. This could potentially improve performance somewhat (I have seen a small improvement with SDIO devices). Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 3d7119ad7c7a..487a7a7380fd 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4290,7 +4290,7 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
while (ath10k_mac_tx_can_push(hw, f_txq) && max--) {
ret = ath10k_mac_tx_push_txq(hw, f_txq);
- if (ret)
+ if (ret < 0)
break;
}
if (ret != -ENOENT)