linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: linux-wireless@vger.kernel.org
Subject: ath9k WDS panic without CONFIG_ATH9K_RATE_CONTROL
Date: Wed, 15 Jun 2011 18:24:22 -0400	[thread overview]
Message-ID: <4DF93116.700@gnu.org> (raw)

Hello!

I'm trying to implement WDS support in ath5k, but I have found that the 
kernel would panic when I bring the interface up:

modprobe ath5k
iwconfig wlan0 mode repeater
iw dev wlan0 set peer 00:01:02:03:04:05
ifconfig wlan0 up

There are many stack traces, but the first one comes from WARN_ON in 
rate_lowest_index().  I think it should really be BUG_ON (patch 
submitted separately), as returning an invalid index will surely lead to 
memory corruption.

I tried WDS with ath9k and found that it doesn't crash the kernel if 
CONFIG_ATH9K_RATE_CONTROL is set.  However, if that setting is off in 
.config, I would get the same crash.

It appears that rate_control_rate_init() is called in 
ieee80211_do_open() too early.  I think there should be some set on the 
rates assumed to be available on the WDS link for the given channel.

Alternatively, the WDS interface should not be able to emit packets 
until either the rates are set manually with iw or they come from a 
beacon send by the peer.  The rate control algorithms should be able to 
deal with it.

-- 
Regards,
Pavel Roskin

             reply	other threads:[~2011-06-15 22:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 22:24 Pavel Roskin [this message]
2011-06-16  2:11 ` ath9k WDS panic without CONFIG_ATH9K_RATE_CONTROL Felix Fietkau
2011-06-16 21:54   ` Pavel Roskin
2011-06-16 23:11     ` Felix Fietkau
2011-06-17 18:35       ` Bill Jordan

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=4DF93116.700@gnu.org \
    --to=proski@gnu.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;
as well as URLs for NNTP newsgroup(s).