Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp123671pxb; Wed, 8 Sep 2021 19:23:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/fefZBBg7x66l/cDvNNE0SBRASLIBE40iR8sm3JM7K/RwkBnAj8mxu1P1GQqEvb4QOXLL X-Received: by 2002:a5d:9ac1:: with SMTP id x1mr552233ion.191.1631154227095; Wed, 08 Sep 2021 19:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631154227; cv=none; d=google.com; s=arc-20160816; b=HRuXuReild9ohDMYJUUzHUupbKNDb4iIgfxsS7FkJmrMKciq/34sJGoKETeb63kTfD 3wW0HfrXUwKJapdNK0rR39UC6wK1ESrM4MXkcmhd7ERVJv1TLt9dP5BQ3Tdbz0vihQfa cN88vFAJOXMVaie2yS1RKD/bofYxpCJklyTI4F8MrApRtxaGBQ7eE3ac9ftIo0fqjBEL J20TLvb6hXYV0lm/NP3O/P6w/7k0CcjB29eaa4/w2AomPo87UwVZNmGNYX3YxqJwR8J1 Cyv0n3LgpSEjoTtWiirNSrCxRgHue2JVmZgiXDCx+dswUgxB7suGIqz7+TrYYWXQmMpK LFow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IAfEpqoGn5FhStESKZaKaDUjCrQlR5OZFuiaBUrglls=; b=p7aedWw6LION+tE96jYuLHuvgJgf/IuF2dthwIgtbUQ/Ofe+G/VRSuVE6ElTUuMiGx TqdtMRZqhBNBGnyDAv3iAgJTcZZI2pN7F4CL7GfItyJ52Nnlozweq2tBYOlR7M5adQzB KzjDsDN0DUKQXOWjo3BZDYiG2PDoALh5VoiFVJLLuL3mOf+Puy763Um7LzflY4v9tsQn 0mjKZ9jufbbsi45owecvOhhbbuJfVVKCsOJEHByPmk9gaZ1H+2Zy1IaNiGFM9I8jW9Ht jHuhzEdP734RFy0u5ilf+eJ85/UOnc6ynNdC5F5Gz70mlpTkG51R1B94IkAFjdbvsP0X PsXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jJmJTCtf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k35si291632jac.46.2021.09.08.19.23.35; Wed, 08 Sep 2021 19:23:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jJmJTCtf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349852AbhIICV4 (ORCPT + 99 others); Wed, 8 Sep 2021 22:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348921AbhIICVz (ORCPT ); Wed, 8 Sep 2021 22:21:55 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 261C3C06175F for ; Wed, 8 Sep 2021 19:20:47 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id n4so87799plh.9 for ; Wed, 08 Sep 2021 19:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=IAfEpqoGn5FhStESKZaKaDUjCrQlR5OZFuiaBUrglls=; b=jJmJTCtfPAKF991YiwhZ2iuFcRvrCaPxQ1lZfOk1extXuMMmVAhSL90s/OVbdW8Sxn DhrNhzgi4cKOEUCONL3oi4UGm3kjzozY07CHS+4zQlFwCOf2mshbsVeL5swtaFYTPNFW upX559upPQOsY09pAoXcsyBWBCJG8h9hzOFcIoAA9BX14BVYj5IMQwhJ+8KZMRyXuhLB kUWSGt1gZuXwPLj3r+J6rdUga3MJL5NhGRF4+Db74BIOuWdodfGhpjnw224u+rC99ypI 8vL/bIR3o/qXf/SDkQGIfCAEk+mRX6atIqo0Dvv9QY0ULM3rhRg/Ur8tMuTG/gOOfj0B FjFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=IAfEpqoGn5FhStESKZaKaDUjCrQlR5OZFuiaBUrglls=; b=QeXfnf/uwqx1kSLlVRIu4XE9jjBSsr7904l+cveHPNAW5cNRicMHWW/nGx5Qnk8xu5 BRpcXyeZZIk1IuBV7tMPQ0mtv9z1ShK4wHliyt0WQmiGyhr5/Xbs4MFz35xUjY2uodAC t+8B3/q0kK2Wb0CGyVc7/K85fVsUZFAEQb4K/IaYyaszOzjsfwEm1i+BmL6M2VUAcKdH I8BuINuRT7Cn5a/BhMIslUrGBJSLiHSnFH3+EElxmjL2ETO4QpXY24Csj/gTEeeo5llo pLhEzaY+ZxYnwqkog+lwjjS/v3mDYAbnocl0qSOfzFumSTa4pTkFGfQHd5xpPcIunzv0 n++g== X-Gm-Message-State: AOAM532gKzNhChVN1mpyWJxpW56TwuQDKUG3gNzsCBkgsfvGEOICAEgY RjBEfbPdw1fCynUTSuHR2ZXjjg== X-Received: by 2002:a17:902:778a:b0:13a:bfd:94ed with SMTP id o10-20020a170902778a00b0013a0bfd94edmr511368pll.24.1631154046606; Wed, 08 Sep 2021 19:20:46 -0700 (PDT) Received: from dragon (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id v25sm183290pfm.202.2021.09.08.19.20.42 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Sep 2021 19:20:45 -0700 (PDT) Date: Thu, 9 Sep 2021 10:20:37 +0800 From: Shawn Guo To: Soeren Moch Cc: Kalle Valo , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-rockchip@lists.infradead.org" Subject: Re: [BUG] Re: [PATCH] brcmfmac: use ISO3166 country code and 0 rev as fallback Message-ID: <20210909022033.GC25255@dragon> References: <20210425110200.3050-1-shawn.guo@linaro.org> <20210908010057.GB25255@dragon> <100f5bef-936c-43f1-9b3e-a477a0640d84@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <100f5bef-936c-43f1-9b3e-a477a0640d84@web.de> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 07:08:06AM +0200, Soeren Moch wrote: > Hi Shawn, > > On 08.09.21 03:00, Shawn Guo wrote: > > Hi Soeren, > > > > On Tue, Sep 07, 2021 at 09:22:52PM +0200, Soeren Moch wrote: > >> On 25.04.21 13:02, Shawn Guo wrote: > >>> Instead of aborting country code setup in firmware, use ISO3166 country > >>> code and 0 rev as fallback, when country_codes mapping table is not > >>> configured. This fallback saves the country_codes table setup for recent > >>> brcmfmac chipsets/firmwares, which just use ISO3166 code and require no > >>> revision number. > >> This patch breaks wireless support on RockPro64. At least the access > >> point is not usable, station mode not tested. > >> > >> brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4359/9 wl0: Mar? 6 2017 > >> 10:16:06 version 9.87.51.7 (r686312) FWID 01-4dcc75d9 > >> > >> Reverting this patch makes the access point show up again with linux-5.14 . > > Sorry for breaking your device! > > > > So it sounds like you do not have country_codes configured for your > > BCM4359/9 device, while it needs particular `rev` setup for the ccode > > you are testing with. It was "working" likely because you have a static > > `ccode` and `regrev` setting in nvram file. > It always has been a mystery to me how country codes are configured for > this device. Before I read your patch I did not even know that a > translation table is required. Is there some documentation how this is > supposed to work? Not sure if this makes a difference, BCM4359/9 is a > Cypress device I think, I added mainline support for it some time ago. One way to add the translation table is using DT. You can find more info and example in following commits: b41936227078 ("dt-bindings: bcm4329-fmac: add optional brcm,ccode-map") 1a3ac5c651a0 ("brcmfmac: support parse country code map from DT") > > I have installed different firmware files, brcmfmac4359-sdio.clm_blob, > brcmfmac4359-sdio.bin, brcmfmac4359-sdio.txt, the latter also linked as > brcmfmac4359-sdio.pine64,rockpro64-2.1.txt. This probably is the nvram > file. ccode and regrev are set to zero, which probably means > 'international save settings". I'm not sure how this 'international save settings' works for brcmfmac devices. Do you have more info or any pointers? > > But roaming to a different > > region will mostly get you a broken WiFi support. Is it possible to set > > up the country_codes for your device to get it work properly? > In linux-5.13 it worked, probably with save settings (not all channels > selectable, limited tx power), with linux-5.14 it stopped working, so it > is a regression. > I personally would like to learn how all this is configured properly. > For general use I think save settings are better than no wifi at all > with this patch. This fallback to ISO CC seams to work with newer > (Synaptics?) devices only. I do not mind you send a reverting if you have problem to add a proper translation table for your device. But that would mean I have to add a pretty "meaningless" translation table for my devices :( Shawn