From patchwork Thu Jan 21 03:58:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 8077311 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8A52A9F744 for ; Thu, 21 Jan 2016 03:58:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD57620386 for ; Thu, 21 Jan 2016 03:58:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADC6520531 for ; Thu, 21 Jan 2016 03:58:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755071AbcAUD6x (ORCPT ); Wed, 20 Jan 2016 22:58:53 -0500 Received: from mail-oi0-f53.google.com ([209.85.218.53]:36646 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752622AbcAUD6v (ORCPT ); Wed, 20 Jan 2016 22:58:51 -0500 Received: by mail-oi0-f53.google.com with SMTP id o124so19000129oia.3; Wed, 20 Jan 2016 19:58:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=nsVw6NvumlK4CN0NPx+Xk2VwaCDTmrpKV/3oZ3UHRds=; b=hWgXXOPBsVn11P8YI77eJ7oSCBZggnuWwC0a4yGTDpVySjxq6FmYxPs+Ypi51HCHy2 exZxG+Q0/aBH8Pp5P5W5kNr+AKpTRYuXqPY+WmD/fL4j0PXDYHoQHg0i45OzYdnrrihP 6LwaO83rF9g4IGWE5ZCJHKh0BPxGnkRUsD2Z2RmNg/1n34EwY/xpED6tnotd2HMhzn1r yjERmEHulwm8wuhLO/NdDnW69zp1awb1N/Bvaikp2tuO+NHnBouC2JjGx7g6kHJwiUhN 78AN3HwY6lb+2Sf2UawRzEjLPnzl6S1k1KKhTbq3sr/lXAGaYB8UUE8C9MJwwG7msNFW +aig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=nsVw6NvumlK4CN0NPx+Xk2VwaCDTmrpKV/3oZ3UHRds=; b=mot9PsmGN9/sh3gVXXR6kSdqIW7zed6lX8A0BkYpt/w6IR37HZGl7BdsbGVry+yM6C mzLEd++p5lltg1CXBFh+qxo9jmnHjUYKkSgBlIBS1+x84hoENbwBCSfN62JWry9LrW0+ 8HKo1xuF/vkXp7Rsz1eDxv5oyYq+UeJ27u0h4+C7OeWhNcYOJYkwE/hWT69Di6YhCye8 B3ERuECadr6PyEG0PdrnOhFIICMAvbTKU6+IS59T/Lr6d173KPUOBHAvZWKEzQQ3xcTU COOGtTOlP+SDs+Z2Gj6vH0U2+yntHSUbxnZBmZgU2XWX7MN7aOuDnjorH6WBKfID/dzN NRfQ== X-Gm-Message-State: AG10YOQkqHA1ZzZHRlbLIRdFwYn+0FweuV2j0J4h8GFq/j85KWEnnapVSEVEQzej4rvg1Q== X-Received: by 10.202.90.134 with SMTP id o128mr14605132oib.15.1453348730616; Wed, 20 Jan 2016 19:58:50 -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 gx2sm19690127obc.18.2016.01.20.19.58.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Jan 2016 19:58:49 -0800 (PST) From: Larry Finger To: kvalo@codeaurora.org Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, Larry Finger , littlesmartguy@gmail.com, gabe@codehaus.org, Stable Subject: [PATCH] rtlwifi: rtl8821ae: Fix 5G failure when EEPROM is incorrectly encoded Date: Wed, 20 Jan 2016 21:58:39 -0600 Message-Id: <1453348719-5546-1-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY, URIBL_BLACK 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 Recently, it has been reported that D-Link DWA-582 cards, which use an RTL8812AE chip are not able to scan for 5G networks. The problems started with kernel 4.2, which is the first version that had commit d10101a60372 ("rtlwifi: rtl8821ae: Fix problem with regulatory information"). With this patch, the driver went from setting a default channel plan to using the value derived from EEPROM. Bug reports at https://bugzilla.kernel.org/show_bug.cgi?id=111031 and https://bugzilla.redhat.com/show_bug.cgi?id=1279653 are examples of this problem. The problem was solved once I learned that the internal country code was resulting in a regulatory set with only 2.4 GHz channels. With the RTL8821AE chips available to me, the country code was such that both 2.4 and 5 GHz channels are allowed. The fix is to allow both bands even when the EEPROM is incorrectly encoded. Fixes: d10101a60372 ("rtlwifi: rtl8821ae: Fix problem with regulatory information") Signed-off-by: Larry Finger Cc: littlesmartguy@gmail.com Cc: gabe@codehaus.org Cc: Stable [v4.2+] --- drivers/net/wireless/realtek/rtlwifi/regd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/regd.c b/drivers/net/wireless/realtek/rtlwifi/regd.c index a62bf0a..5be3411 100644 --- a/drivers/net/wireless/realtek/rtlwifi/regd.c +++ b/drivers/net/wireless/realtek/rtlwifi/regd.c @@ -351,7 +351,6 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select( case COUNTRY_CODE_SPAIN: case COUNTRY_CODE_FRANCE: case COUNTRY_CODE_ISRAEL: - case COUNTRY_CODE_WORLD_WIDE_13: return &rtl_regdom_12_13; case COUNTRY_CODE_MKK: case COUNTRY_CODE_MKK1: @@ -360,6 +359,7 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select( return &rtl_regdom_14_60_64; case COUNTRY_CODE_GLOBAL_DOMAIN: return &rtl_regdom_14; + case COUNTRY_CODE_WORLD_WIDE_13: case COUNTRY_CODE_WORLD_WIDE_13_5G_ALL: return &rtl_regdom_12_13_5g_all; default: