From: Jiri Slaby <jirislaby@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, ath5k-devel@venema.h4ckr.net,
linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>,
Nick Kossifidis <mickflemm@gmail.com>,
"Luis R. Rodriguez" <lrodriguez@atheros.com>,
Bob Copeland <me@bobcopeland.com>
Subject: [PATCH 1/1] ath5k: fix hw rate index condition
Date: Thu, 26 Feb 2009 23:44:31 +0100 [thread overview]
Message-ID: <1235688271-22346-1-git-send-email-jirislaby@gmail.com> (raw)
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@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Bob Copeland <me@bobcopeland.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
next reply other threads:[~2009-02-26 22:45 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-26 22:44 Jiri Slaby [this message]
2009-02-26 23:15 ` [PATCH 1/1] ath5k: fix hw rate index condition Bob Copeland
2009-02-26 23:19 ` Jiri Slaby
2009-02-26 23:28 ` [ath5k-devel] " Bob Copeland
2009-02-26 23:28 ` Bob Copeland
2009-02-26 23:32 ` Jiri Slaby
2009-02-27 2:27 ` Bob Copeland
2009-02-27 2:39 ` Luis R. Rodriguez
2009-02-27 3:06 ` Bob Copeland
2009-02-27 3:15 ` Luis R. Rodriguez
2009-03-01 5:21 ` Pavel Roskin
2009-03-03 3:46 ` Bob Copeland
2009-03-03 4:31 ` Nick Kossifidis
2009-03-03 4:31 ` Nick Kossifidis
2009-03-03 13:02 ` Bob Copeland
2009-03-23 3:04 ` Bob Copeland
2009-03-23 8:21 ` Nick Kossifidis
2009-03-23 19:53 ` John W. Linville
2009-03-24 3:38 ` Bob Copeland
2009-03-01 5:07 ` Pavel Roskin
2009-03-01 14:36 ` Bob Copeland
2009-03-01 14:36 ` Bob Copeland
-- strict thread matches above, loose matches on Subject: below --
2009-01-06 17:07 WARNING: at net/mac80211/rx.c:2234 __ieee80211_rx+0x7f/0x559 [mac80211]() Dhaval Giani
2009-01-07 13:51 ` [PATCH 1/1] ath5k: fix hw rate index condition Jiri Slaby
2009-01-07 14:36 ` Jiri Slaby
2009-01-07 15:22 ` Dhaval Giani
2009-01-07 15:30 ` Jiri Slaby
2009-02-02 7:57 ` Dhaval Giani
2009-02-15 13:47 ` Bob Copeland
2009-02-28 23:08 ` Jiri Slaby
2009-03-30 8:59 ` Dhaval Giani
2009-03-30 16:58 ` Bob Copeland
2009-03-30 17:59 ` Dhaval Giani
2009-03-30 18:13 ` Bob Copeland
2009-03-30 18:13 ` Bob Copeland
2009-03-31 3:51 ` Dhaval Giani
2009-03-31 3:51 ` Dhaval Giani
2009-03-31 12:23 ` Bob Copeland
2009-03-15 21:27 ` Stefan Lippers-Hollmann
2009-03-15 21:35 ` Michael Buesch
2009-03-23 0:45 ` Stefan Lippers-Hollmann
2009-03-23 0:45 ` Stefan Lippers-Hollmann
2009-03-23 2:31 ` Bob Copeland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1235688271-22346-1-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=ath5k-devel@venema.h4ckr.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
--cc=me@bobcopeland.com \
--cc=mickflemm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.