From patchwork Sun Apr 19 17:38:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: ".wav" X-Patchwork-Id: 11497795 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9374A14B4 for ; Sun, 19 Apr 2020 17:39:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F16B421927 for ; Sun, 19 Apr 2020 17:39:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EQwV1eBH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="VgOZhpX5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F16B421927 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID: Subject:From:To:Date:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=W/zm+y5ef/QZwvZA6jV/m8spXiLUbXMQst3aZXCD8zI=; b=EQw V1eBH1Leki0u1K/D0GDAaOL3RdTycB1O1eGiKcws+1W4TFd28EhbNJJRC9GLT2uUQaEGI8MWrSIF4 zFnOnQ8rCZOxP5eBQSmj6UUGJ+jM67MiWtkZ2qo+jbOuTb+hnJtNeMEAgGH3VTdZG5tzB7LulNgMT bGRDWfAXPJAfG9XTx7I3hEEYBcQYw4Nau6f3vKmwFXsqMZGEE+9a4Ie1IpWU+8wN3FkFLYWcjMIQ9 xB0MORXsrazLv20kdSR76qBXw/SGeh9FMyPbCT4Vy98a5fgspmKlfe2Edew2j7I4nXbiDWTvXPSh2 JB4Pu8MlGPddZk7TZObdOukERL0J0AQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDuH-0008VP-8T; Sun, 19 Apr 2020 17:39:01 +0000 Received: from mail4.protonmail.ch ([185.70.40.27]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQDuD-0008Rd-Ii for ath10k@lists.infradead.org; Sun, 19 Apr 2020 17:38:59 +0000 Date: Sun, 19 Apr 2020 17:38:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1587317925; bh=pziYG+LuJkPTvQQPVaH8h1HsRHC2sZ89duyVz1jo0NQ=; h=Date:To:From:Reply-To:Subject:From; b=VgOZhpX54K3F+QY0qCefcSzItJHX5Zwd9DFqjLwHI5V1slfALvH+rj/ESAKWjlOaR fhcfW8PlZA8HMkbrbbM0jpOJHdUQ2y9cZTjJlqrGlLGmDtf0agwnMnsytuipPki7cF 5ilCktrIgfarWAbfvhY+yjZHcjpYJ9V1MxbQ5VcE= To: "ath10k@lists.infradead.org" From: ".wav" Subject: QCA6174 invalid regulatory domain/country code 0x5f Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200419_103857_923517_3228ADBC X-CRM114-Status: UNSURE ( 7.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [185.70.40.27 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [waveletlet[at]protonmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ".wav" Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org Having the wifi-breaking error mentioned in the subject with Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32) (in a Samsung Galaxy Book if that's relevant). dmesg output: [ 4877.975464] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0 [ 4878.250441] ath10k_pci 0000:01:00.0: firmware: failed to load ath10k/pre-cal-pci-0000:01:00.0.bin (-2) [ 4878.250473] ath10k_pci 0000:01:00.0: firmware: failed to load ath10k/cal-pci-0000:01:00.0.bin (-2) [ 4878.275378] ath10k_pci 0000:01:00.0: firmware: direct-loading firmware ath10k/QCA6174/hw3.0/firmware-6.bin [ 4878.275399] ath10k_pci 0000:01:00.0: qca6174 hw3.2 target 0x05030000 chip_id 0x00340aff sub 144d:c150 [ 4878.275404] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0 [ 4878.277267] ath10k_pci 0000:01:00.0: firmware ver WLAN.RM.4.4.1-00151-QCARMSWPZ-2 api 6 features wowlan,ignore-otp,mfp crc32 64160d13 [ 4878.374074] ath10k_pci 0000:01:00.0: firmware: direct-loading firmware ath10k/QCA6174/hw3.0/board-2.bin [ 4878.375656] ath10k_pci 0000:01:00.0: board_file api 2 bmi_id N/A crc32 e74847dc [ 4878.448065] ath10k_pci 0000:01:00.0: unsupported HTC service id: 1536 [ 4878.466956] ath10k_pci 0000:01:00.0: htt-ver 3.60 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 [ 4878.554101] ath: EEPROM regdomain: 0x5f [ 4878.554105] ath: EEPROM indicates we should expect a direct regpair map [ 4878.554108] ath: invalid regulatory domain/country code 0x5f [ 4878.554110] ath: Invalid EEPROM contents [ 4878.554126] ath10k_pci 0000:01:00.0: failed to initialise regulatory: -22 [ 4878.554135] ath10k_pci 0000:01:00.0: could not register to mac80211 (-22) With the following patch (suggested on this list in 2017 by Ryan Hsu), the wifi works. After patching I still have the "failed to load pre-cal-pci.../cal-pci..." errors and the "unsupported HTC service id: 1536" warning, but wifi works. Is there any reason this patch was never merged in to the ath10k kernel module? It'd be nice to not have to manually rebuild it every kernel update. Cheers, .wav diff --git a/drivers/net/wireless/ath/regd_common.h b/regd_common.h index c4bd26e..900452f 100644 --- a/../linux-kernel-wifi/drivers/net/wireless/ath/regd_common.h +++ b/regd_common.h @@ -76,6 +76,7 @@ enum EnumRd {         APL7_FCCA = 0x5C,         APL8_WORLD = 0x5D,         APL9_WORLD = 0x5E, +       APL10_WORLD = 0x5F,         WOR0_WORLD = 0x60,         WOR1_WORLD = 0x61, @@ -204,6 +205,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {         {APL6_WORLD, CTL_ETSI, CTL_ETSI},         {APL8_WORLD, CTL_ETSI, CTL_ETSI},         {APL9_WORLD, CTL_ETSI, CTL_ETSI}, +       {APL10_WORLD, CTL_ETSI, CTL_ETSI},         {APL3_FCCA, CTL_FCC, CTL_FCC},         {APL7_FCCA, CTL_FCC, CTL_FCC}, @@ -423,7 +425,7 @@ static struct country_code_to_enum_rd allCountries[] = {         {CTRY_KAZAKHSTAN, NULL1_WORLD, "KZ"},         {CTRY_KENYA, APL1_WORLD, "KE"},         {CTRY_KOREA_NORTH, APL9_WORLD, "KP"}, -       {CTRY_KOREA_ROC, APL9_WORLD, "KR"}, +       {CTRY_KOREA_ROC, APL10_WORLD, "KR"},         {CTRY_KOREA_ROC2, APL2_WORLD, "K2"},         {CTRY_KOREA_ROC3, APL9_WORLD, "K3"},         {CTRY_KUWAIT, ETSI3_WORLD, "KW"},