linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: fix print on warning on ath5k_hw_to_driver_rix()
@ 2009-08-25 18:25 Luis R. Rodriguez
  2009-08-25 18:45 ` Bob Copeland
  0 siblings, 1 reply; 10+ messages in thread
From: Luis R. Rodriguez @ 2009-08-25 18:25 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

This was printing the wrong value on the warning. While at it
lets expand this warning to provide a little more useful
information for debugging such as the band and hardware rate
index when possible and clarify what the warning is actually
printing.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---

I hit this warning and found it would be more useful with this.
I can't reproduce this right now, but I believe what I did was
suspend at home and resume at the office. Anyway this should
help clear things up.

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

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 5056410..a4e69c5 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1136,11 +1136,15 @@ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix)
 
 	/* return base rate on errors */
 	if (WARN(hw_rix < 0 || hw_rix >= AR5K_MAX_RATES,
-			"hw_rix out of bounds: %x\n", hw_rix))
+		 "hardware rate index out of bounds: %x"
+		 "(band: %s)\n", hw_rix,
+		 sc->curband->band ? "5 GHz" : "2.4 GHz"))
 		return 0;
 
 	rix = sc->rate_idx[sc->curband->band][hw_rix];
-	if (WARN(rix < 0, "invalid hw_rix: %x\n", hw_rix))
+	if (WARN(rix < 0, "invalid driver rate index: %x "
+		 "(hw_rix: %x band: %s)\n", rix, hw_rix,
+		 sc->curband->band ? "5 GHz" : "2.4 GHz"))
 		rix = 0;
 
 	return rix;
-- 
1.6.3.3


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

end of thread, other threads:[~2009-08-26 20:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 18:25 [PATCH] ath5k: fix print on warning on ath5k_hw_to_driver_rix() Luis R. Rodriguez
2009-08-25 18:45 ` Bob Copeland
2009-08-25 18:58   ` Luis R. Rodriguez
2009-08-25 19:22     ` Bob Copeland
2009-08-25 23:38       ` Luis R. Rodriguez
2009-08-25 23:52         ` Luis R. Rodriguez
2009-08-26 14:08         ` Bob Copeland
2009-08-26 16:29           ` Luis R. Rodriguez
2009-08-26 17:03             ` Bob Copeland
2009-08-26 20:20               ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).