Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4378208pxb; Tue, 5 Oct 2021 01:38:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU43KCgA2PEIbiW2tduLrKJChOjeTUN3HOOj82NHU1SKTL1FXtAV4DVZM7vFPJ/olPfy3s X-Received: by 2002:aa7:9d0b:0:b0:44c:62a6:8679 with SMTP id k11-20020aa79d0b000000b0044c62a68679mr9253144pfp.0.1633423082497; Tue, 05 Oct 2021 01:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633423082; cv=none; d=google.com; s=arc-20160816; b=dJC56E2O/2MFNP87eQeuH+O2m/oOr1LyEQdbwXN0IYbo13tR4OCXD16+JXKeNJQ2nQ F/way2cIxPWLp3ObegyJMG/A1wHhxR/6Ru4r7b5yUWJo0rdNG+efWGHwOGwmbz/3b2II vOY0V0RCioU6PEBHM1ZQKtjmulooBva1zRxTekoywOphkhCbf6LWzRtgLDdi90ohCbhw 71zoyJsvmWE7zG89DSFzUNAym2FV5+GsrUvso86tRrhZJm1ieB+cY+A8eUZeiCu6oz8j pnZKoZNBLsfIpRvUD79w1AJWd+yXK9aJ0Dqlh4ElDJ0kJc/x49t4dtsYZFR4Piolocre 8e9A== 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=GaLsFCnleig7EzZnkwnd8K4iW8JYfGTZW2bwlrxQE5A=; b=AI1TVUrKIAhpNg3PfTD0OYB2DThgJHWPgJoxylOMg7+SAmC4bcpK3r6tCJuPRFQ3iZ /Y1kP51BbOPuNg4wTC4wAOhtRbuGhCTuaLK/xT4HNY/MecQ+s+maTCR/JcDyNKQR+LPl +S0tZ3GibTbK2zULqD6TfCiE6IM8Pw6xQ6Bj2FjlsGp48rDthmc6TbSg2cM0VbYI2boQ KezdRYFmtbVokueXFv/5rOkDkSbwtwzNpdwnbmJ5FTvv/W0ZzTAnPF48VK/hqtQk/IPh 5zdzd3O8fFmA+Ya7FHRSRClmNgixTJ+wWggMrgTFxayohYwLkuO5hmTezmMi5WK4/PBo sSTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="WDRj/som"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si1248771pjd.41.2021.10.05.01.37.51; Tue, 05 Oct 2021 01:38:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@gmail.com header.s=20210112 header.b="WDRj/som"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232739AbhJEIjW (ORCPT + 75 others); Tue, 5 Oct 2021 04:39:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232478AbhJEIjV (ORCPT ); Tue, 5 Oct 2021 04:39:21 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A3ABC061745 for ; Tue, 5 Oct 2021 01:37:31 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id bm13so25197335edb.8 for ; Tue, 05 Oct 2021 01:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GaLsFCnleig7EzZnkwnd8K4iW8JYfGTZW2bwlrxQE5A=; b=WDRj/somzKRBsBuyPXTW2RpdH3uZDcj9IiX9BgXez9ag075BBlq8JGWTp4OtnT6CwZ Jempw5i46hG2th44npBM2sdI8Gne4Fm7dVao4JI1GAkS7mesJltrG99WAdXaSBtMks+e h4x8fMgBsGoFi43W6n7jq4hsZX2SwZexwaCwStA8m9kgM8bV43m5/m0eSNycRdhPns5t BcVSGJl10O0VeKx3LluJQpuCai8UrE+mG2bjT913u6E6R6OOm0Pn1sw+ujhO7CV65zpI Ow/AiZRy2EqPbbpVHliFQb5WXlR1Tq31HCJ/z8plZAKrzdUZf8X//gvNE4eYXP3YdWe4 ke9Q== 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=GaLsFCnleig7EzZnkwnd8K4iW8JYfGTZW2bwlrxQE5A=; b=zL+b2uzNTZPK08COShoROl9V2QwmFMLMDYjXvcJaE9kq7lAa0H5oX3v1l2Av0m2ECA QubEUwlvVMGjZZ0FTQLYaZWV6TqS60ZAkj82rkoWIFO4X1A20zbCsi73uItNpsG+oozi hIOaMyXVErmT3LE2pdmU5gGSJwQHKamKmHJVuoXHwQgDF3wW2t5k7T7HarFbR8GGxuKM YFaCqI0byt7+98B+av9TM/0gyumTzabb3uUqsJSijZiNliuQd3Eu24X6U/6fEz8nuFKl nUR0/0nelQ+cnzRrYWyFmqgkazv0rzQy8QVgOLI5rsyBfxDd62ltwgzWT1vt73P3J8KY nGGw== X-Gm-Message-State: AOAM532Ine6jA63e1CiamuY9p7UhJli2CgflM1EaZTcqya9PhDPeHTdj TY88lBPzKt2MXN0CJONEU3i6/zhWKcnST2JyrHE= X-Received: by 2002:a17:906:9401:: with SMTP id q1mr22956405ejx.313.1633423049379; Tue, 05 Oct 2021 01:37:29 -0700 (PDT) MIME-Version: 1.0 References: <20211003160325.119696-1-hdegoede@redhat.com> <87fstgghhr.fsf@codeaurora.org> <43e39a93-fed1-acbb-517e-94cf0d6d739c@redhat.com> In-Reply-To: <43e39a93-fed1-acbb-517e-94cf0d6d739c@redhat.com> From: Arend van Spriel Date: Tue, 5 Oct 2021 10:37:18 +0200 Message-ID: Subject: Re: [PATCH] brcmfmac: firmware: Treat EFI nvram ccode=XT the same as ccode=XV To: Hans de Goede Cc: Kalle Valo , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Chung-hsien Hsu , Wright Feng , linux-wireless , brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, Oct 5, 2021 at 10:02 AM Hans de Goede wrote: > > Hi Kalle, > > On 10/5/21 7:36 AM, Kalle Valo wrote: > > Hans de Goede writes: > > > >> In some cases the EFI-var stored nvram contains "ccode=ALL", "ccode=XV" > >> or "ccode=XT", to specify "worldwide" compatible settings, but these > >> ccode-s do not work properly. "ccode=ALL" causes channels 12 and 13 to > >> not be available, "ccode=XV" / "ccode=XT" may cause all 5GHz channels > >> to not be available. > >> > >> ccode="ALL" and ccode="XV" where already being replaced with ccode="X2" > >> with a bit of special handling for nvram settings coming from an EFI > >> variable. Extend this handling to also deal with nvram settings from > >> EFI variables which contain "ccode=XT", which has similar issues to > >> "ccode=XV". > >> > >> This fixes 5GHz wifi not working on the HP ElitePad 1000 G2. > >> > >> This was also tested on a Lenovo Thinkpad 8 tablet which also uses > >> "ccode=XT" and this causes no adverse effects there. > >> > >> Signed-off-by: Hans de Goede > > > > To me worldwide compatible settings mean that channels 12 and 13 should > > be disabled, so I'm quite hesitant about this patch. > > The X2 setting puts channel 12 and 13 in passive / listen-only modes > and only starts using them if there is an AP on them. > > AFAIK this is the same with the XT/XV settings. The problem is that the XT > setting results in 5G not being available on some boards even though the > hw supports it. > > Also note that we already use the X2 setting for any EFI supplied nvram > files where ccode=ALL or ccode=XV, this just extends the handling we > already have to also patch ccode=XT. I am not overly excited about this approach that is already in use. AFAIK these worldwide codes are tailored for specific devices/customers based on their RF components. Using it as fallback for other devices in such a generic way could even result in exceeding regulatory limits. However, I do not have a better solution for this. I am surprised to learn there are nvram out there with ccode=ALL as that is for internal use only, but if these devices has SROM than the nvram value is ignored. Hopefully, that is the case although given the fact that changing it to X2 helps suggests otherwise :-( Regards, Arend