From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: Linux Wireless List
<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Network Development
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: WARNING at net/mac80211/rate.c:513 ieee80211_get_tx_rates [mac80211]
Date: Thu, 28 Jan 2016 13:13:05 +0100 [thread overview]
Message-ID: <1453983185.2217.12.camel@sipsolutions.net> (raw)
In-Reply-To: <CA+55aFxe22iWok6UojY=hCoG2k1wNpJ9CfQ0b+STSxq67tb86Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> (sfid-20160128_063527_929413_6B184FD5)
On Wed, 2016-01-27 at 21:34 -0800, Linus Torvalds wrote:
> .. except now I upgraded the nearest access point, and now wireless
> on that machine no longer works.
Can you describe the upgrade a bit more, just for background?
> Or rather, it actually *does* work in the sense that it
> authenticates, it associates, and it actually gets a DHCP lease etc.
> So the darn thing has an IP address and everything, but then nothing
> else seems to go through after that. Very odd. My guess is that the
> auth/assoc/dhcp thign happens at low rates, then it starts trying to
> up the rates, and things go to hell.
That's usually the case, yes. Auth/assoc/etc. management frames use low
rates anyway, and the first few data frames usually also do until it
scales up.
The code involved is drivers/net/wireless/realtek/rtlwifi/rc.c
> I do note that that rate_fixup_ratelist() function is a bit odd wrt
> those rate indexes: it has code to make sure that there are no valid
> rates following an invalid one:
>
> /*
> * make sure there's no valid rate following
> * an invalid one, just in case drivers don't
> * take the API seriously to stop at -1.
> */
> if (inval) {
> rates[i].idx = -1;
> continue;
> }
> if (rates[i].idx < 0) {
> inval = true;
> continue;
> }
>
> but then that "RC is busted" case that generates a warning will add
> one of those invalid rates in the middle anyway. So I get the feeling
> that if that warning ever triggers, it will basically be screwing up
> that whole rate table. I dunno.
This should be OK, it's more of a sanity check. The driver is supposed
to stop transmission attempts at the first -1 it seems, but the rate
control algorithm shouldn't generate useless attempts that will never
really get used, since that indicates a bug in the rate scaling.
> Is there anything sane I can do to help debug this case?
Could you print out the entire table there when the warning happens? Or
at least, it'd help to figure out at which index the invalid actually
happens. It seems that if that perhaps happens on the very first index,
the driver might get completely confused and perhaps not even send the
frame, which would lead to symptoms like the one you describe.
It seems plausible that there's a path somewhere in the rate scaling
code that forgets to set IEEE80211_TX_RC_MCS or so.
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-28 12:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 5:34 WARNING at net/mac80211/rate.c:513 ieee80211_get_tx_rates [mac80211] Linus Torvalds
[not found] ` <CA+55aFxe22iWok6UojY=hCoG2k1wNpJ9CfQ0b+STSxq67tb86Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-28 12:13 ` Johannes Berg [this message]
[not found] ` <1453983185.2217.12.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-01-28 19:01 ` Linus Torvalds
2016-01-28 20:40 ` Johannes Berg
[not found] ` <1454013625.2332.9.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-01-28 21:44 ` Linus Torvalds
2016-01-28 22:04 ` Linus Torvalds
[not found] ` <CA+55aFzF0gWfvmE+6ZcHmjnO4xp-oVAQ5SWxYJhOzns2ocgCsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-28 22:12 ` Johannes Berg
2016-01-28 23:01 ` Linus Torvalds
2016-01-29 1:54 ` Larry Finger
[not found] ` <56AAC66C.1080800-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2016-01-29 4:19 ` Linus Torvalds
2016-01-29 8:33 ` Johannes Berg
[not found] ` <CAP71bdVZzUUNwP3py_m1pwU21qMKth=0BmMfLuUb7=B-1840zg@mail.gmail.com>
[not found] ` <CAP71bdVZzUUNwP3py_m1pwU21qMKth=0BmMfLuUb7=B-1840zg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-29 16:15 ` Johannes Berg
2016-01-29 16:54 ` Larry Finger
[not found] ` <1454084146.2800.0.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2016-01-29 17:54 ` Larry Finger
[not found] ` <56ABA73C.1060504-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2016-01-29 18:39 ` Linus Torvalds
[not found] ` <CA+55aFysqqp-BCZs1ue6_1tE=h9SOUZTH_o7TwGbsaBnaFvXGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-29 19:42 ` Larry Finger
[not found] ` <56ABC0BC.9010202-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2016-01-29 20:04 ` Linus Torvalds
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=1453983185.2217.12.camel@sipsolutions.net \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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).