Commit 15411c27 authored by Bob Copeland's avatar Bob Copeland Committed by John W. Linville

ath5k: fix error handling in ath5k_hw_dma_stop

Review spotted a problem with the error handling in ath5k_hw_dma_stop:
a successful return from ath5k_hw_stop_tx_dma will be treated as
an error, so we always bail out of the loop after processing a single
active queue.  As a result, we may not actually stop some queues during
reset.
Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
Acked-by: default avatarBruno Randolf <br1@einfach.org>
Acked-by: default avatarNick Kossifidis <mickflemm@gmail.com>
Reviewed-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bc5892c9
...@@ -838,9 +838,9 @@ int ath5k_hw_dma_stop(struct ath5k_hw *ah) ...@@ -838,9 +838,9 @@ int ath5k_hw_dma_stop(struct ath5k_hw *ah)
for (i = 0; i < qmax; i++) { for (i = 0; i < qmax; i++) {
err = ath5k_hw_stop_tx_dma(ah, i); err = ath5k_hw_stop_tx_dma(ah, i);
/* -EINVAL -> queue inactive */ /* -EINVAL -> queue inactive */
if (err != -EINVAL) if (err && err != -EINVAL)
return err; return err;
} }
return err; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment