Commit d7fd1b50 authored by Ben Greear's avatar Ben Greear Committed by John W. Linville

ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

This decreases spammage in the log.  A single line message
will still be printed, so users can be aware that problem
exists.
Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
Acked-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1435894d
...@@ -267,6 +267,7 @@ enum ATH_DEBUG { ...@@ -267,6 +267,7 @@ enum ATH_DEBUG {
rtn; \ rtn; \
}) })
#define ATH_DBG_WARN(foo, arg...) WARN(foo, arg) #define ATH_DBG_WARN(foo, arg...) WARN(foo, arg)
#define ATH_DBG_WARN_ON_ONCE(foo) WARN_ON_ONCE(foo)
#else #else
...@@ -277,6 +278,7 @@ ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, ...@@ -277,6 +278,7 @@ ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask,
return 0; return 0;
} }
#define ATH_DBG_WARN(foo, arg...) do {} while (0) #define ATH_DBG_WARN(foo, arg...) do {} while (0)
#define ATH_DBG_WARN_ON_ONCE(foo) do {} while (0)
#endif /* CONFIG_ATH_DEBUG */ #endif /* CONFIG_ATH_DEBUG */
......
...@@ -528,8 +528,12 @@ bool ath_stoprecv(struct ath_softc *sc) ...@@ -528,8 +528,12 @@ bool ath_stoprecv(struct ath_softc *sc)
sc->rx.rxlink = NULL; sc->rx.rxlink = NULL;
spin_unlock_bh(&sc->rx.rxbuflock); spin_unlock_bh(&sc->rx.rxbuflock);
ATH_DBG_WARN(!stopped, "Could not stop RX, we could be " if (unlikely(!stopped)) {
"confusing the DMA engine when we start RX up\n"); ath_err(ath9k_hw_common(sc->sc_ah),
"Could not stop RX, we could be "
"confusing the DMA engine when we start RX up\n");
ATH_DBG_WARN_ON_ONCE(!stopped);
}
return stopped; return stopped;
} }
......
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