[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1235688271-22346-1-git-send-email-jirislaby@gmail.com>
Date: Thu, 26 Feb 2009 23:44:31 +0100
From: Jiri Slaby <jirislaby@...il.com>
To: "John W. Linville" <linville@...driver.com>
Cc: linux-wireless@...r.kernel.org, ath5k-devel@...ema.h4ckr.net,
linux-kernel@...r.kernel.org, Jiri Slaby <jirislaby@...il.com>,
Nick Kossifidis <mickflemm@...il.com>,
"Luis R. Rodriguez" <lrodriguez@...eros.com>,
Bob Copeland <me@...copeland.com>
Subject: [PATCH 1/1] ath5k: fix hw rate index condition
Make sure we print out a warning when the index is out of bounds,
i.e. even on hw_rix == AR5K_MAX_RATES.
Also change to WARN and print text with the reported hw_rix.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Cc: Nick Kossifidis <mickflemm@...il.com>
Cc: Luis R. Rodriguez <lrodriguez@...eros.com>
Cc: Bob Copeland <me@...copeland.com>
---
drivers/net/wireless/ath5k/base.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index c06d1cc..08d691d 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1100,7 +1100,8 @@ ath5k_mode_setup(struct ath5k_softc *sc)
static inline int
ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix)
{
- WARN_ON(hw_rix < 0 || hw_rix > AR5K_MAX_RATES);
+ WARN(hw_rix < 0 || hw_rix >= AR5K_MAX_RATES,
+ "hw_rix out of bounds: %x\n", hw_rix);
return sc->rate_idx[sc->curband->band][hw_rix];
}
--
1.6.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists