Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp349399iob; Wed, 11 May 2022 16:13:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDI4UhPfZZkWNPjGtAW2veP+i30A3cpPze6CZbBzCn7feAvcWgYso7bKClWuHVOBcNx4hR X-Received: by 2002:a17:906:7311:b0:6f4:da1c:2866 with SMTP id di17-20020a170906731100b006f4da1c2866mr27072575ejc.195.1652310786323; Wed, 11 May 2022 16:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652310786; cv=none; d=google.com; s=arc-20160816; b=TW7pIK4pXY+NC3C3Ufswhkw6NBi6Cl00MLMGGtz3u9dQAw3t3LOxBJaI7q2Z1qDsVD B/CBRnilcSJUXU4fRyLKitTUuV1jDJLC3QgWHJ2SX4zsaccQAVHAX8a0DQb9CQ4pPl4w wly5GxL8gWLWdBHaSPFwYv0G+kqIdI9F/Hmp4wyTq98t8d2AucRlnsRsRrZZKYXtO+wh ezG/iuZCe8diu1Yyz6r1ghVjQ9n+ssGFoP67xc8M8oaaR4sDddU9GqvjmSlCiv/uS2ZB vc5Uzxqs/p8HhHRon+sH36PKLb7vJQsfjF7qOIFeIJVAFh6xNVUpF2o8m7mYYCzA6daV xHNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=29E8HlhduSQieWez20AluJPdVntOzq6QdIcJrP9MAKk=; b=DQcQJkXuw1sdxpVk7JL77PZVvyA3hDInr3c4+z/rvnZrXGwHbRnPMdghQjQ88JVwhY 3XbloeYPCxH8TzjV60ysAtwb06F2Fn1oBTjcLv1XnRoKK6LoftG9SPaDxNQPark+RffA kQ0meVT56/3v6ElXnWIchcdUIM6JQU4qX8ZHZGGTOLlTXDz0v3/zzbzglAw7hS+9aVQ1 JKmjWp0G9zeB/Z5uuxB70KMLZHM/JTGhgx5pgLLkw+A5LXbGdpElpN43i6reCoUr/Nf+ ULygfIpYCjdt6v8xSIWO/F/UzefTTAiQnzmRUmWSnRCHktzLU9PL+ATaSCM0Qo6nEG8d 5vDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=eXGPAqhI; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170906814600b006f429eb5456si3480534ejw.836.2022.05.11.16.12.26; Wed, 11 May 2022 16:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=eXGPAqhI; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348898AbiEKWw7 (ORCPT + 69 others); Wed, 11 May 2022 18:52:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233822AbiEKWw5 (ORCPT ); Wed, 11 May 2022 18:52:57 -0400 Received: from mail-vk1-xa33.google.com (mail-vk1-xa33.google.com [IPv6:2607:f8b0:4864:20::a33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39C906339B for ; Wed, 11 May 2022 15:52:55 -0700 (PDT) Received: by mail-vk1-xa33.google.com with SMTP id y27so1854539vkl.8 for ; Wed, 11 May 2022 15:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=29E8HlhduSQieWez20AluJPdVntOzq6QdIcJrP9MAKk=; b=eXGPAqhI9a4OPJLyWf2JCXYWPoGF2Iqgn/jpjizCOMqrKYoxsu1tb7zHp3VJp3IFTo 9yAYtEqlcPCbW21popx8Zr45u8pa+c9YhpeTgmeLUZo0K6sfDkZg+TRKDhcITVSjd6ET zKDrLLI2q4L+21rdFSp174xKy8LWXr9bNw/3XZGcMo3ke+9mdeNHfzLeZlAavO+zzdnx VRDsPxze0AR4UuOxdZwyW6VCwrI9v1kHbE1dKzaXVQ9tYQPORPjLUuTtxOYnxkD/zr8i 0uUdnLTlZWQKD/qJyTxesp836Zw49IcLVD9QHDeByverzbHjaJDoWoSV5qW0RhxqtPoq LVQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=29E8HlhduSQieWez20AluJPdVntOzq6QdIcJrP9MAKk=; b=4s1qTndCRX7gtsOcnNEwBm73ckalMWKItbmFBhTFlgxnsFtwA5nWlVgDQII46AP6mc 447tBlmZ8/yrYvoxGX5IF8GR1qAz/SNdLuGjZ/rRrlSiJeXBAkpW+B4c87qcwdnMizoJ yL1F89tHPnI0lU/Vx2v+itBwuo4RvclE3Ey+u3RLbCZPYZ93J21bWZt5ldgPxvf+f60K K5bkrJMm6y/ipBJe1JkCzDPedUPYg+Grn7tvIgFSmrMZlLyx1w+pbIY0VwZz8DN2SXZy ygWLKBn3H6N7F9QRiOHvm3rG70qYuqx0m3LPBNTx5dVLTQcUkFsEW0+q2dgCscHzve06 9BLg== X-Gm-Message-State: AOAM53118akPDuZ6eUZPxNiFMdMoJjRl5jnrk8Wom+wlW6cwmwJbnvjz P0NnYjkVIOE5al68efv6+C2bYGPoguF8e+bRUZqP92esMA== X-Received: by 2002:a1f:91cb:0:b0:34e:10c8:cf1c with SMTP id t194-20020a1f91cb000000b0034e10c8cf1cmr15641958vkd.31.1652309574277; Wed, 11 May 2022 15:52:54 -0700 (PDT) MIME-Version: 1.0 References: <20200527165718.129307-1-briannorris@chromium.org> In-Reply-To: From: Cale Collins Date: Wed, 11 May 2022 15:52:18 -0700 Message-ID: Subject: Re: [PATCH] Revert "ath: add support for special 0x0 regulatory domain" To: kvalo@kernel.org, Brian Norris Cc: Patrick Steinhardt , ath10k , linux-wireless , Linux Kernel , stable , Tim Harvey , Stephen McCarthy Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Adding Kalle, I got his address wrong the first time. On Mon, May 9, 2022 at 11:16 AM Cale Collins wrote: > > Hello Brian and Kalle, > > I'm experiencing an issue very similar to this. The regulatory domain > settings wouldn't allow me to create an AP on 5ghz bands on kernels > newer than 5.10 when using a WLE900VX (QCA9984) radio. I bisected the > kernel and ultimately landed on the regression that Brian patched. I > applied the patch and that resolved the issue from 5.4 up to 5.10. > For versions later than that I encountered the same problem. I tried > to bisect again but PCI is broken for the ARM board(s) I'm using in > many of the RC's, I'm pretty new to all of this and it was just over > my head. I saw Kalle pushed Brian's patch a few weeks ago, so I > figured the politics behind how the regulatory domain should be > addressed was decided at that point. I cherry picked Brian's patch > onto 5.17 to test, the results are below. Can someone help me figure > out what I can do to get 5ghz APs back? > > If there's any more information I can provide please let me know, I > wanted to keep things on the shorter side. > > cale@cale:~/builds/upstream/linux$ git log --oneline > 5c12efe9e783 (HEAD) Revert "ath: add support for special 0x0 regulatory domain" > f443e374ae13 (tag: v5.17) Linux 5.17 > > #On my ARM64 board > > root@focal-ventana:~# uname -a > Linux focal-ventana 5.17.0-00001-g5c12efe9e783 #1 SMP Wed Apr 6 > 16:33:54 PDT 2022 armv7l armv7l armv7l GNU/Linux > > > root@focal-ventana:~# ls /sys/class/net/ > can0 eth0 lo sit0 wlp6s0 > > root@focal-ventana:~# iw phy phy0 info | grep " MHz \[" | grep -v "no > IR\|disabled" > * 2412 MHz [1] (20.0 dBm) > * 2417 MHz [2] (20.0 dBm) > * 2422 MHz [3] (20.0 dBm) > * 2427 MHz [4] (20.0 dBm) > * 2432 MHz [5] (20.0 dBm) > * 2437 MHz [6] (20.0 dBm) > * 2442 MHz [7] (20.0 dBm) > * 2447 MHz [8] (20.0 dBm) > * 2452 MHz [9] (20.0 dBm) > * 2457 MHz [10] (20.0 dBm) > * 2462 MHz [11] (20.0 dBm) > > > root@focal-ventana:~# iw reg get > global > country 00: DFS-UNSET > (2402 - 2472 @ 40), (N/A, 20), (N/A) > (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR > (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR > (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR > (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR > (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR > (5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR > (57240 - 63720 @ 2160), (N/A, 0), (N/A) > > phy#0 > country 99: DFS-UNSET > (2402 - 2472 @ 40), (N/A, 20), (N/A) > (5140 - 5360 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN > (5715 - 5860 @ 80), (N/A, 30), (N/A), PASSIVE-SCAN > > #dmesg |grep ath output > > [ 5.724215] ath10k_pci 0000:06:00.0: enabling device (0140 -> 0142) > [ 5.732439] ath10k_pci 0000:06:00.0: pci irq msi oper_irq_mode > 2 irq_mode 0 reset_mode 0 > [ 17.573591] ath10k_pci 0000:06:00.0: qca988x hw2.0 target > 0x4100016c chip_id 0x043202ff sub 0000:0000 > [ 17.573707] ath10k_pci 0000:06:00.0: kconfig debug 0 debugfs 0 > tracing 0 dfs 0 testmode 0 > [ 17.575118] ath10k_pci 0000:06:00.0: firmware ver > 10.2.4-1.0-00047 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast > crc32 35bd9258 > [ 17.637397] ath10k_pci 0000:06:00.0: board_file api 1 bmi_id > N/A crc32 bebc7c08 > [ 18.849651] ath10k_pci 0000:06:00.0: htt-ver 2.1 wmi-op 5 > htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1 > > Best regards, > > Cale Collins > > > Cale Collins > Field Applications Engineer II > Gateworks Corporation > (805)781-2000 x37 > 3026 S. Higuera, San Luis Obispo, CA 93401 > www.gateworks.com > > > > On Mon, Apr 25, 2022 at 11:55 AM Brian Norris wrote: > > > > Hi Patrick, > > > > On Sat, Apr 23, 2022 at 3:52 AM Patrick Steinhardt wrote: > > > This revert is in fact causing problems on my machine. I have a QCA9984, > > > which exports two network interfaces. While I was able to still use one > > > of both NICs for 2.4GHz, I couldn't really use the other card to set up > > > a 5GHz AP anymore because all frequencies were restricted. This has > > > started with v5.17.1, to which this revert was backported. > > > > > > Reverting this patch again fixes the issue on my system. So it seems > > > like there still are cards out there in the wild which have a value of > > > 0x0 as their regulatory domain. > > > > > > Quoting from your other mail: > > > > > > > My understanding was that no QCA modules *should* be shipped with a > > > > value of 0 in this field. The instance I'm aware of was more or less a > > > > manufacturing error I think, and we got Qualcomm to patch it over in > > > > software. > > > > > > This sounds like the issue should've already been fixed in firmware, > > > right? > > > > See the original patch: > > https://git.kernel.org/linus/2dc016599cfa9672a147528ca26d70c3654a5423 > > > > "Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029." > > > > That patch was only tested for QCA6174 SDIO, and the 6174 firmware has > > since been updated. So none of that really applies to QCA9984. I > > suppose your device was also not working before v5.6 either, and IIUC, > > according to Qualcomm your hardware is a manufacturing error (i.e., > > invalid country code). > > > > I don't know what to tell you exactly, other than that the original > > patch was wrong/unnecessary (and broke various existing systems) so it > > should be reverted. I'm not quite sure how to fix the variety of > > hardware out there (like yours) that may be using non-conforming > > EEPROM settings. It would seem to me that we might need some more > > targeted way of addressing broken hardware, rather than changing this > > particular default workaround. I'm honestly not that familiar with > > this Qualcomm regulatory stuff though, so my main contribution was > > just to suggest reverting (i.e., don't break what used to work); I'm > > not as savvy on providing alternative "fixes" for you. > > > > (That said: I *think* what's happening is that in the absence of a > > proper EEPROM code, ath drivers fall back to a default=US country > > code, and without further information to know you're compliant, > > regulatory rules disallow initiating radiation (such as, an AP) on > > 5GHz.) > > > > > I've added the relevant dmesg > > > snippets though in case I'm mistaken: > > > > With what kernel? That looks like pre-v5.17.1. The "broken" > > (post-5.17.1) logs might be a bit more informative. > > > > Sorry, > > Brian