All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ath5k: fix error handling in ath5k_hw_dma_stop
@ 2011-01-25  4:31 Bob Copeland
  2011-01-25  4:31 ` [PATCH 2/2] ath5k: correct endianness of frame duration Bob Copeland
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Bob Copeland @ 2011-01-25  4:31 UTC (permalink / raw)
  To: linville
  Cc: linux-wireless, mickflemm, Bruno Randolf, jirislaby, lrodriguez,
	Bob Copeland

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: Bob Copeland <me@bobcopeland.com>
---
These two patches fix some buglets I found when reviewing some old code.

 drivers/net/wireless/ath/ath5k/dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/dma.c b/drivers/net/wireless/ath/ath5k/dma.c
index 0064be7..e828b98 100644
--- a/drivers/net/wireless/ath/ath5k/dma.c
+++ b/drivers/net/wireless/ath/ath5k/dma.c
@@ -838,7 +838,7 @@ int ath5k_hw_dma_stop(struct ath5k_hw *ah)
 	for (i = 0; i < qmax; i++) {
 		err = ath5k_hw_stop_tx_dma(ah, i);
 		/* -EINVAL -> queue inactive */
-		if (err != -EINVAL)
+		if (err && err != -EINVAL)
 			return err;
 	}
 
-- 
1.7.1.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-01-26 19:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25  4:31 [PATCH 1/2] ath5k: fix error handling in ath5k_hw_dma_stop Bob Copeland
2011-01-25  4:31 ` [PATCH 2/2] ath5k: correct endianness of frame duration Bob Copeland
2011-01-25  5:23   ` Bruno Randolf
2011-01-25 10:38     ` Bob Copeland
2011-01-25 10:47       ` Bruno Randolf
2011-01-26 16:17         ` Bob Copeland
2011-01-25 12:26   ` Nick Kossifidis
2011-01-25  5:12 ` [PATCH 1/2] ath5k: fix error handling in ath5k_hw_dma_stop Bruno Randolf
2011-01-25 12:24 ` Nick Kossifidis
2011-01-25 13:52 ` Stanislaw Gruszka
2011-01-26  1:50   ` Bob Copeland
2011-01-26  7:05     ` Stanislaw Gruszka
2011-01-26 17:06     ` Nick Kossifidis
2011-01-26 19:28       ` Bob Copeland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.