From patchwork Fri Jan 29 01:54:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 8156771 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4EF6CBEEE5 for ; Fri, 29 Jan 2016 01:55:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7FD19202FE for ; Fri, 29 Jan 2016 01:55:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A9B0420138 for ; Fri, 29 Jan 2016 01:55:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755463AbcA2By7 (ORCPT ); Thu, 28 Jan 2016 20:54:59 -0500 Received: from mail-ob0-f194.google.com ([209.85.214.194]:36016 "EHLO mail-ob0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754127AbcA2By4 (ORCPT ); Thu, 28 Jan 2016 20:54:56 -0500 Received: by mail-ob0-f194.google.com with SMTP id wg8so3620256obc.3; Thu, 28 Jan 2016 17:54:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type; bh=a20WEPXZVBlu++0VZahzyN5FWprWjVC56BauI39GoTM=; b=A0IISvF1ibN/D9Zha0FZ0XEe/XMk8Hck09rIkjusSVOhSVYGp1Fm4R2j8VCNLOpcUL O3JAskbx9hDaOIjdO64ZKQLlMxDJCWy9E3SfRw8NMojFthwZsgUYavMX8rF7ygOiRcBE KTeYc7yoAZO//YlrGwjxxZ/TMqLwB/jfMFCBfOQVnW2ABwGUGKrIQWMWg3TBrJV88yFz UzDQW6EEJKx+Tbqsg6XSMikooPWF5L6sPdCx2TpkBtGEHMhcHmqVh0U4SR5bAfyIWYvK 0IiYZD+n49MP+S/z6Sp7ca0AbJYGfCcqHMOqB5MXbaTVIr9bBJr6vyqx9XPUEacgKR2x H9uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type; bh=a20WEPXZVBlu++0VZahzyN5FWprWjVC56BauI39GoTM=; b=lkUnsR/xb3N8pfg808IEZ1Ws1rSa+GvcEw2XVHh/rUbaADhjrIbXECCMYC/fXhaLuL 1dcV2JvHnwGXus2rpLTFOo66SWis4zmz7aksTd1NtT51ghyfB2zxNvdqAiqeHOm/HoiT trLLLbm9PL6qJ4uZHjsYHJqOmBuqQaGU4XZJiLj9ANOv/JmPGSZ4V9DJfbaGwTEtyQt+ 8QIes0OAdstEFz/GMYRJwUSftBKLtrGc1JWxIbFFO3Bm6RWJuz1Rpqm3VaYxrwnZ4mVx 2VMGeDL/q5bNPct1R6BrEYqovuV7eKTYj5cT12g20hjOpWvJSCw8JlqcyoXebyNyiQ3U /LgA== X-Gm-Message-State: AG10YOQm0XIFtJEHOAJu2R6uVPj3xT5ujbQFJE6149CYH3HYIcEwwsqqi1LodIifbsq1GQ== X-Received: by 10.182.112.201 with SMTP id is9mr4806606obb.2.1454032495450; Thu, 28 Jan 2016 17:54:55 -0800 (PST) Received: from linux.site (cpe-24-31-249-175.kc.res.rr.com. [24.31.249.175]) by smtp.gmail.com with ESMTPSA id d31sm1021849oic.12.2016.01.28.17.54.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 17:54:53 -0800 (PST) Subject: Re: WARNING at net/mac80211/rate.c:513 ieee80211_get_tx_rates [mac80211] To: Linus Torvalds , Johannes Berg References: <1453983185.2217.12.camel@sipsolutions.net> <1454013625.2332.9.camel@sipsolutions.net> <1454019155.2332.15.camel@sipsolutions.net> Cc: Chaoming Li , Kalle Valo , David Miller , Linux Wireless List , Network Development From: Larry Finger Message-ID: <56AAC66C.1080800@lwfinger.net> Date: Thu, 28 Jan 2016 19:54:52 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 01/28/2016 05:01 PM, Linus Torvalds wrote: > On Thu, Jan 28, 2016 at 2:12 PM, Johannes Berg > 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 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: