From: Larry Finger <Larry.Finger@lwfinger.net>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Johannes Berg <johannes@sipsolutions.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>,
Kalle Valo <kvalo@codeaurora.org>,
David Miller <davem@davemloft.net>,
Linux Wireless List <linux-wireless@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>
Subject: Re: WARNING at net/mac80211/rate.c:513 ieee80211_get_tx_rates [mac80211]
Date: Thu, 28 Jan 2016 19:54:52 -0600 [thread overview]
Message-ID: <56AAC66C.1080800@lwfinger.net> (raw)
In-Reply-To: <CA+55aFxjpdepHYD_6uU48kW38Z9bmf2wwA8yPZt4ibhkofmfQA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2288 bytes --]
On 01/28/2016 05:01 PM, Linus Torvalds wrote:
> On Thu, Jan 28, 2016 at 2:12 PM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
>>
>> Your best workaround may just be to ignore VHT for now - clearly it's
>> broken so using "just" HT (which is likely not that much of a penalty
>> anyway since you're apparently not using 80 MHz) will be much better.
>>
>> Go into
>>
>> _rtl_init_hw_vht_capab()
>>
>> and just remove or stub out the entire contents of that (or you could
>> just remove the "vht_supported=true" if you feel like it.)
>>
>> That should get it to HT only, which is likely tested and working
>> better.
>
> Bingo. That indeed gets me working wireless. It's not super-fast, but
> I don't think it ever has been..
>
> If somebody has a suggested patch to actually *fix* VHT on this
> chipset, that would obviously be better. And maybe it works on some
> other chipsets, but not on mine. I'll happily test patches now that
> the merge window is over and I have some time again (and I can also
> make my AP do 80MHz channels if that matters, although as Johannes
> noted it's not enabled by default).
>
> For the realtek driver people, here is what lspci says:
>
> 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE
> 802.11ac PCIe Wireless Network Adapter
> Subsystem: AzureWave Device 2161
> Kernel driver in use: rtl8821ae
>
> (Numeric PCI ID: 10ec:8821, subsystem 1a3b:2161)
>
> Thanks,
Linus,
I have been running an RTL8821AE since kernel 3.18 without hitting this problem
using a TRENDnet AC1750 dual-band AP. The UniFi may be doing something that the
driver is not expecting.
There have also been some problems with the regdom in some models of these chips
that I also fail to see. It appears that some vendors are not coding the EEPROM
correctly. That should not affect your system.
Attached is a minimal patch that comments out the "vht_cap->vht_supported =
true;" statement for both RTL8821AE and RTL8812AE in _rtl_init_hw_vht_capab().
Does that allow your system to work? The patch also logs some information
regarding the channelplan and the country code. Please let me know the values
for those.
I apparently missed a previous complaint about this issue. If you still have the
reference, please send it to me.
Larry
[-- Attachment #2: rtl8821ae_test.patch --]
[-- Type: text/x-patch, Size: 1723 bytes --]
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index 0517a4f..2464d41 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -248,7 +248,7 @@ static void _rtl_init_hw_vht_capab(struct ieee80211_hw *hw,
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) {
u16 mcs_map;
- vht_cap->vht_supported = true;
+ /* vht_cap->vht_supported = true; */
vht_cap->cap =
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 |
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
@@ -282,7 +282,7 @@ static void _rtl_init_hw_vht_capab(struct ieee80211_hw *hw,
} else if (rtlhal->hw_type == HARDWARE_TYPE_RTL8821AE) {
u16 mcs_map;
- vht_cap->vht_supported = true;
+ /* vht_cap->vht_supported = true; */
vht_cap->cap =
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 |
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
diff --git a/drivers/net/wireless/realtek/rtlwifi/regd.c b/drivers/net/wireless/realtek/rtlwifi/regd.c
index 5be3411..38f464e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/regd.c
+++ b/drivers/net/wireless/realtek/rtlwifi/regd.c
@@ -340,6 +340,7 @@ static int _rtl_reg_notifier_apply(struct wiphy *wiphy,
static const struct ieee80211_regdomain *_rtl_regdomain_select(
struct rtl_regulatory *reg)
{
+ pr_info("**** country code %d\n", reg->country_code);
switch (reg->country_code) {
case COUNTRY_CODE_FCC:
return &rtl_regdom_no_midband;
@@ -400,6 +401,7 @@ static struct country_code_to_enum_rd *_rtl_regd_find_country(u16 countrycode)
static u8 channel_plan_to_country_code(u8 channelplan)
{
+ pr_info("**** channelplan %d\n", channelplan);
switch (channelplan) {
case 0x20:
case 0x21:
next prev parent reply other threads:[~2016-01-29 1:54 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
2016-01-28 12:13 ` Johannes Berg
2016-01-28 19:01 ` Linus Torvalds
2016-01-28 20:40 ` Johannes Berg
2016-01-28 21:44 ` Linus Torvalds
2016-01-28 22:04 ` Linus Torvalds
2016-01-28 22:12 ` Johannes Berg
2016-01-28 23:01 ` Linus Torvalds
2016-01-29 1:54 ` Larry Finger [this message]
2016-01-29 4:19 ` Linus Torvalds
2016-01-29 8:33 ` Johannes Berg
[not found] ` <CAP71bdVZzUUNwP3py_m1pwU21qMKth=0BmMfLuUb7=B-1840zg@mail.gmail.com>
2016-01-29 16:15 ` Johannes Berg
2016-01-29 16:54 ` Larry Finger
2016-01-29 17:54 ` Larry Finger
2016-01-29 18:39 ` Linus Torvalds
2016-01-29 19:42 ` Larry Finger
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=56AAC66C.1080800@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.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).