Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6606395rwi; Mon, 24 Oct 2022 03:55:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5zs7TEG59E5TOR7sryAE5YmcYlIchC9ueEm/oWMVRcnN0HegIQB+y2fx+LUufrMbXaXtBG X-Received: by 2002:a62:4e50:0:b0:56b:d5e8:335e with SMTP id c77-20020a624e50000000b0056bd5e8335emr4289729pfb.61.1666608943413; Mon, 24 Oct 2022 03:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666608943; cv=none; d=google.com; s=arc-20160816; b=P+bNL+ysaCGvXDnIVvq3B3YeJJsBq4jCzTtX6XRBO2U02DCThaY88u9TY4QNK3w1QZ 1nz58cmMkR+KN5YuxA9lNO3zFPOxkHcLrwOLVLjdTYep3+2odQQe/AO6C4SKI263nz48 JuxWlKpDwxBt59F6KXhOY+ZuhwnKuAVz8HbVeGsW/owCnXvJ/395YA3nwamC0xZ+BLxC TtBRDGBdYppsTqcI9dqODoWTL9DGEYBEJ5FawSXM2bjLnsUWyi3SwnaFQpcEOiZGtUR3 9fKOXOX/dZkIHJzhtfyP5d4y/m7ObdrmnO92Tn5Brui2ic9pf1TEFfaz9sXomtmbcWdj 0A9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=HebflUfmb0xzkpzgtXEZXiqDwh4Q57WzR/yXqcbZLbs=; b=P65A+gI2ey9lwhhChGbhHN2T1n82G91NRoz5G5nEuHPyO5PJee4Bosdk4u7rNkwvx4 8B2xjbeytj1SS3/1zP/KUToLdy+V/IyEahugjGjP4T/4VCPSljq4ZdlWSGNFB/DPUQ2v y/NQcUcqJtm/GcpIKYn/C8k4OW2StZyLG5s9IBq/4ISnUc1biqbOLz9XhJ14yH3iGGMw e+iwkqGD//JMMACeQ1MjeG37YL++sXecBU9W9+vOAOxVzduk7ugxx/+hy4xR9KjpynPa a4r9zY/+IqmlqW0RJem+C0Pdua8OoWvNiTbmDKziXxXCycSlzmCtCFBDtgfBzPBUM0HP xf6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dV9UTvMK; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a170902d54e00b0017680ae3a9csi32104423plf.534.2022.10.24.03.55.29; Mon, 24 Oct 2022 03:55:43 -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=@kernel.org header.s=k20201202 header.b=dV9UTvMK; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbiJXKtr (ORCPT + 65 others); Mon, 24 Oct 2022 06:49:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbiJXKtn (ORCPT ); Mon, 24 Oct 2022 06:49:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C17DD192AD for ; Mon, 24 Oct 2022 03:49:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 32FF3611F6 for ; Mon, 24 Oct 2022 10:49:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C36F2C433C1; Mon, 24 Oct 2022 10:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666608579; bh=C+W+nafYk4z7vUOcRS04+/I3i+xv4J8FnbKyAzSq6+0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=dV9UTvMKs7Mnf4qcTJM+AqWmyEAE1+kDs8pMMYIaParxrSG1suKDZU3pr8+kw9aL/ Zck6jpV1m+7O2Gp9mLyS7M1hY8GzQ60GyT7VBiBUvjPxCkg8ZU1m4S35PnGuJz+AN0 WDgt729BAREhEoWJ//jW8KVzmSbtdsbDNOtJXLv4769SuDWzkXVslFnM1H/STfPA7Z jYTbSVm6gY7qabupUcb4J08LmHplyWYdNBjIbDdbg+CTCk8HZphcDTZoMhK4xBetQr BHyJA401AuwQBkyhA8q9+TIuE7rdNPRKdGJRLkcDo9BR65ttBr0Orj3TqL+Vs2D5qt X0sYvahgjLckw== From: Kalle Valo To: Arend Van Spriel Cc: arend.vanspriel@broadcom.com, linux-wireless@vger.kernel.org Subject: Re: [PATCH 3/7] brcmfmac: add support for vendor-specific firmware api References: <20220613091915.18884-1-arend.vanspriel@broadcom.com> <87sfmlo9yi.fsf@kernel.org> <4e5c9cc1-a00e-c3de-3186-6d4cf5694339@gmail.com> Date: Mon, 24 Oct 2022 13:49:11 +0300 In-Reply-To: (Arend Van Spriel's message of "Wed, 19 Oct 2022 13:58:38 +0200") Message-ID: <87r0yxzec8.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, PP_MIME_FAKE_ASCII_TEXT,RCVD_IN_DNSWL_HI,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 Arend Van Spriel writes: > On 7/29/2022 11:32 AM, Arend Van Spriel wrote: >> 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". Yes, I meant dropping the options altogether. >> 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 all (or some) vendor support modules and they are loaded into >> .?.? memory only when they are needed for the device detected. > > I wanted to give this series another try, but the conversation above > never came to any conclusion/consensus. Maybe good to finish this before > resending? Sorry, I was supposed to answer but it got piled up with other unanswered emails. So why I'm hesitant about these options is that Linus has multiple times critised of adding unnecessary Kconfig options, and I agree with him. Kconfig is quite a mess already and we need to be careful when adding new options. It's being a long time since I looked these patches so take this with grain of salt, but is the memory savings from this really so significant? From my point of view a faster way to get these to upstream is to submit them without Kconfig options first. The options can be added later if there's still strong need for them, and it's also easier to show numbers to back it up. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches