Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp146862imn; Fri, 29 Jul 2022 02:39:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR50vUItcIf6tE4AAs0YgT4p8lClaFRZi+WENoD44mu5fUCAwAKDyKR17BDt0uMkHwBM6Cbw X-Received: by 2002:a17:902:e749:b0:16c:3d6f:aba3 with SMTP id p9-20020a170902e74900b0016c3d6faba3mr2953479plf.135.1659087545334; Fri, 29 Jul 2022 02:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659087545; cv=none; d=google.com; s=arc-20160816; b=C8ax90tonGY04E31V3rGGpfR8BDM2IryyQpm6CgDpvAsFvTUy+xbh+9SxH1PTjcsNK miTrnW8k+xlqtS40i8S3W4IIXkVWSTNjmYwoVn5cxWqeoJg/aDczFwl9CKkh11cnheVZ sWfXXWJnnFFfP8A2nFXIdByDDiS0ONi2JZxvEIIdKFtl++Ab/3Y88Cd8fOjiKSVWhavt KtVqeXFcCaKyWtnNycS+HbuonvjzQTESJS9wo/eNpPQlnOIcvViMc/LF3mmefi/kKS+K b3/3QgJn/DwS40AwNVhS4L3mxIzLHLEmlfc5Kn93fFiYKjHmaRAtbmC7g7SIzJTyZ6Pk pS2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=NrfgRugzBHaLDQI30ztA44x/8iQuQCRZbmL8D4ZJtHE=; b=JiIkC3iuWU5SJTGFwSlVOiP8MPIhBei2w2bXarVr2/OlkrIL3h3WOG54zM+ny2A3/o YcVwjR7DIhjpJ6V5e/rTK25+BDWfbmD+EYOjFn4J24IYsgNsQiPUrn0i+d35EUrpoiut VNujBEcff+ogQ1ROVnFHEtfsNA0ZmgZxx3Jy4onxYYC1sPpVMGPG+B36ZAUzpaDX73xC f6xTXRYAaK9TPa7tkmgHC49R+9koxLHuf0t+ibV+sc5ARFjpG5RAnrMFAr0Lo1CKjUEM Fq4Lo6/UzI9nr/oAQjaOcmLZfFxl9ZMJCHaJfIxUiPfQMjb5vWaoOOGgsWUtYVDT6mEA NCAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eMJKO6dR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a170903111000b0016be8d5e12asi4008348plh.420.2022.07.29.02.38.51; Fri, 29 Jul 2022 02:39:05 -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=@gmail.com header.s=20210112 header.b=eMJKO6dR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234660AbiG2Jcc (ORCPT + 65 others); Fri, 29 Jul 2022 05:32:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232795AbiG2Jca (ORCPT ); Fri, 29 Jul 2022 05:32:30 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 685D5140B1 for ; Fri, 29 Jul 2022 02:32:28 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id tk8so7519212ejc.7 for ; Fri, 29 Jul 2022 02:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=NrfgRugzBHaLDQI30ztA44x/8iQuQCRZbmL8D4ZJtHE=; b=eMJKO6dRlSlqPIB3XO+44kiGscbI6NzOMDgCgb1I2Oy08yHXjANDCyEjbcEQcox4UU OocZH+SpTjTjOZfRapZsmn4GNBVVRf7jv2PAaRgfP2ju7cNDDMFJsYqyNgNcWUg66nWA UsmfGG7JrPOh1FQaYn0pma24daDl7005ABvmp7Dz1l5HlNzsk+76GqJWi0uCi3M8BW6T 3K+qTEcIFV5rPqgAcAl12h1/W4VlFT0sB3LayF61FH7Zyzx8QbFeLgWIaBtt23/ZT9z+ tPkuoPW7miat58DqcQ5YgLWPgKUvHhLLETBEFnNSAgPDWQeU6YmiXq20YNfSk5IotpI4 FXiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=NrfgRugzBHaLDQI30ztA44x/8iQuQCRZbmL8D4ZJtHE=; b=mT/M+vHggJui4rLylvArkM8wQ4BAV/siGw5Miwf9DMj3GsNZ8Xp3D5ekjuxNoUKuoN 6gettz3CRE15JonyDceVtzu3cDUD4ZpsNpaJ/ebPpGDEELNOy5jeF6jS+EPp+9JY8uJs iAwJUagpQfVtzXXTlXaZp+oTlJW4CAF4xdz1lhHV4ofCujuCaimU/QQZAfWHJPjFcOvr WtkRfATNKjoW3R542+KtIe2DJLMDcJwQssSk7u+CSp51QR54VvDxPnnBOJ1G9hGMWuZg WLCwhm43bG1FR17P0/r2AiyGjzG/zT8pTI9wmM5ZMMd8E9AcnGmE1VUsHAFIC+nnhshe 6MdA== X-Gm-Message-State: AJIora8yUUVhEiRJTxiv0exPmItmc9leqeBGf3OU6mnI+DhVr0JklvkE FqsVfNxRMuA8Gd6wyRG55S0= X-Received: by 2002:a17:907:6d8b:b0:72b:5f51:a9e7 with SMTP id sb11-20020a1709076d8b00b0072b5f51a9e7mr2268303ejc.628.1659087146951; Fri, 29 Jul 2022 02:32:26 -0700 (PDT) Received: from [192.168.178.136] (f215227.upc-f.chello.nl. [80.56.215.227]) by smtp.gmail.com with ESMTPSA id e21-20020a170906315500b0072af930cf97sm1453706eje.115.2022.07.29.02.32.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Jul 2022 02:32:26 -0700 (PDT) Message-ID: <4e5c9cc1-a00e-c3de-3186-6d4cf5694339@gmail.com> Date: Fri, 29 Jul 2022 11:32:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 3/7] brcmfmac: add support for vendor-specific firmware api Content-Language: en-US To: Kalle Valo Cc: arend.vanspriel@broadcom.com, linux-wireless@vger.kernel.org References: <20220613091915.18884-1-arend.vanspriel@broadcom.com> <87sfmlo9yi.fsf@kernel.org> From: Arend Van Spriel In-Reply-To: <87sfmlo9yi.fsf@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On 7/28/2022 11:36 AM, Kalle Valo wrote: > aspriel@gmail.com writes: > >> The driver is being used by multiple vendors who develop the firmware >> api independently. So far the firmware api as used by the driver has >> not diverged (yet). This change adds framework for supporting multiple >> firmware apis. The vendor-specific support code has to provide a number >> of callback operations. Right now it is only attach and detach callbacks >> so no real functionality as the api is still common. This code only >> adds WCC variant anyway, which is selected for all devices right now. >> >> Reviewed-by: Hante Meuleman >> Reviewed-by: Pieter-Paul Giesberts >> Reviewed-by: Franky Lin >> Signed-off-by: Arend van Spriel > > [...] > >> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Kconfig >> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Kconfig >> @@ -8,6 +8,22 @@ config BRCMFMAC >> interface support. If you choose to build a module, it'll be called >> brcmfmac.ko. >> >> +config BRCMFMAC_VENDOR_MODULES >> + bool "Use vendor-specific modules" >> + depends on BRCMFMAC = m >> + help >> + This option will build separate modules for the vendor-specific >> + firmware support. If not selected the vendor-specific support >> + will be build in brcmfmac.ko. >> + >> +config BRCMFMAC_VENDOR_WCC >> + bool "Broadcom WCC" >> + default y >> + depends on BRCMFMAC >> + help >> + This option will allow the driver to communicate with devices >> + shipped by Broadcom WCC division. >> + > > I'm not really a fan of these Kconfig options, I would rather have them > always enabled. Why do we need these options, what would be the use case > when user disables these? I assume with "always enabled" you mean "drop these options". Obviously I would prefer to keep them. The default will result in a single module with all vendor support built-in, but this allows people to trim down their configuration based on what they have. So the choices are: 1) single module with all vendor support built-in 2) single module with partial vendor support built-in (as needed) allows users to select vendor for their specific device not carrying stuff they don't need. If they have a Cypress/Infineon device they only need support for that. 3) separate vendor support modules loaded as needed during device probe build one or more vendor support modules and they are loaded into memory only when they are needed for the device detected. Regards, Arend