[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231336282-22283-1-git-send-email-jirislaby@gmail.com>
Date: Wed, 7 Jan 2009 14:51:22 +0100
From: Jiri Slaby <jirislaby@...il.com>
To: Dhaval Giani <dhaval@...ux.vnet.ibm.com>
Cc: linville@...driver.com, davem@...emloft.net,
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
Dhaval Giani wrote:
> I see this on current git. Not sure how to reproduce it, has happened on
> two random occasions. At both times, I was not connected to a wireless
> network, but to wired networks.
>
> ------------[ cut here ]------------
> WARNING: at net/mac80211/rx.c:2234 __ieee80211_rx+0x7f/0x559
> ...
> Call Trace:
> [<f80d4192>] __ieee80211_rx+0x7f/0x559 [mac80211]
> [<f80a19f4>] ath5k_tasklet_rx+0x4f7/0x53b [ath5k]
> ...
Hmm, maybe ath5k is culprit. Could you apply the attached patch and
use the kernel till the problem appears again?
--
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 4af2607..0e65e25 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1088,7 +1088,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.0.6
--
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