ath9k: fix the return value of ath_stoprecv
authorFelix Fietkau <nbd@openwrt.org>
Thu, 14 Apr 2011 22:41:43 +0000 (00:41 +0200)
committerSteve Conklin <sconklin@canonical.com>
Thu, 2 Jun 2011 19:23:15 +0000 (14:23 -0500)
BugLink: http://bugs.launchpad.net/bugs/780546

commit 2232d31bf18ba02f5cd632bbfc3466aeca394c75 upstream.

The patch 'ath9k_hw: fix stopping rx DMA during resets' added code to detect
a condition where rx DMA was stopped, but the MAC failed to enter the idle
state. This condition requires a hardware reset, however the return value
of ath_stoprecv was 'true' in that case, which allowed it to skip the reset
when issuing a fast channel change.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Paul Stewart <pstew@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

drivers/net/wireless/ath/ath9k/recv.c

index 89546bc..1e0c1e3 100644 (file)
@@ -533,7 +533,7 @@ bool ath_stoprecv(struct ath_softc *sc)
                        "confusing the DMA engine when we start RX up\n");
                ATH_DBG_WARN_ON_ONCE(!stopped);
        }
-       return stopped || reset;
+       return stopped && !reset;
 }
 
 void ath_flushrecv(struct ath_softc *sc)