Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3148cc5 authored by Erik Stromdahl's avatar Erik Stromdahl Committed by Kalle Valo
Browse files

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: default avatarErik Stromdahl <erik.stromdahl@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 469bd5ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)