From: Pavel Roskin <proski@gnu.org>
To: linux-wireless@vger.kernel.org
Cc: ath5k-devel@lists.ath5k.org
Subject: ath5k: scanning while transmitting causes oops on 802.11a capable card
Date: Wed, 06 May 2009 12:14:46 -0400 [thread overview]
Message-ID: <1241626486.30590.13.camel@mj> (raw)
Hello!
If I scan by "iw dev wlan0 scan" while sending data through the
interface, I get a BUG in net/mac80211/tx.c:
/* RC is busted */
if (WARN_ON_ONCE(info->control.rates[i].idx >=
sband->n_bitrates)) {
info->control.rates[i].idx = -1;
continue;
}
I added this statement inside the condition:
printk("idx = %d, bitrates = %d, i = %d\n", info->control.rates[i].idx,
sband->n_bitrates, i);
The result is:
idx = 9, bitrates = 8, i = 0
idx = 10, bitrates = 8, i = 1
idx = 9, bitrates = 8, i = 2
The card is 802.11a capable. My interpretation is that scanning
switches to the 802.11a band temporarily, but doesn't stop transmission.
When transmitting, the rate indices for 2.4 GHz band are checked against
the number of rates in the 5 GHz band, which is indeed 8. There are 12
rates in the 2.4 GHz band.
ath5k 0000:0b:00.0: PCI INT A disabled
ath5k 0000:0b:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
ath5k 0000:0b:00.0: setting latency timer to 64
ath5k 0000:0b:00.0: registered as 'phy2'
ath: Country alpha2 being used: US
ath: Regpair detected: 0x3a
phy2: Selected rate control algorithm 'minstrel'
ath5k phy2: Atheros AR5414 chip found (MAC: 0xa3, PHY: 0x61)
I actually had to patch the kernel, or the oops would escalate to a
panic. Perhaps it's a good idea to have that check:
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1246,6 +1246,8 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
PCI_DMA_TODEVICE);
rate = ieee80211_get_tx_rate(sc->hw, info);
+ if (!rate)
+ return -EIO;
if (info->flags & IEEE80211_TX_CTL_NO_ACK)
flags |= AR5K_TXDESC_NOACK;
--
Regards,
Pavel Roskin
next reply other threads:[~2009-05-06 16:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 16:14 Pavel Roskin [this message]
2009-05-06 16:19 ` ath5k: scanning while transmitting causes oops on 802.11a capable card Johannes Berg
2009-05-06 16:36 ` [ath5k-devel] " Bob Copeland
2009-05-06 17:25 ` John W. Linville
2009-05-06 20:12 ` Pavel Roskin
2009-05-06 20:26 ` Johannes Berg
2009-05-06 21:29 ` Pavel Roskin
2009-05-07 6:01 ` Johannes Berg
2009-05-07 8:56 ` Bob Copeland
2009-05-07 14:04 ` 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=1241626486.30590.13.camel@mj \
--to=proski@gnu.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-wireless@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox