Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp278916iog; Mon, 13 Jun 2022 02:29:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2sQu5iT/6TL9pRDOurvLG4Mj/O0FalZRuM3y2Iwn5SRGb3WD5pq1dVaRO/FDx8ppY6Wt9 X-Received: by 2002:a63:e705:0:b0:3fd:fb59:bd7f with SMTP id b5-20020a63e705000000b003fdfb59bd7fmr28838257pgi.505.1655112546972; Mon, 13 Jun 2022 02:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655112546; cv=none; d=google.com; s=arc-20160816; b=r67Gz1QdZJPx9WhyFJxLjYpCs95UYmixMzYw30hLjbmWGvcZ63VW9xasHnfhEhfYut AiNsbFvGYx+H65yFX8btnk1lTlHDL/a1nWQ6ijWbb55qqMWyilTy9N3d900pj+oWhgXx rQZZe5XZYb0oZZuStYG5iWmAi59Xg6tc4C6rYVNmnG1A3uTlK7cfse0754130kGKlDQt KQpqQ06OAxYGwEi4gJtaIvg1G4YX54uipvdpEybO0FUn0C4jiHC8lC3Rwj3G0jslFd27 K6mPW+3xjiclnXgCDoZqAD16m3cgvuGzknOfKboUX6lCxezE0iPGarsSfMTOKADHw4Kb O/2A== 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:references :in-reply-to:from:mime-version:dkim-signature; bh=OHBXs0DbY77ATKoHUGkTyqnhfdtuttsxGgPkMN1OQUc=; b=qr9Wpto87u0QLzi1pa6VKiMn2WNF1sGlXQ0irkat3HwM0BAXt7mjnKamgwZmkd8tec Hg603A/TRDK0Bj9mwVuFWcYEypEhoKlTfhZe0ElFIZLV1g2dBb/yFEI+0TmPlIiSJ5n7 AmSyNlxMVlKjrbcxq9HlNqsXD8k9F3kDnee/mdX4YGBiAwdzOvtZ7ozifivAt90wQidr Gp/+o5xxYPFUi7GsmGYoTVnYog++LOfvDE7s71yqdai/A8ni/dxGe8WXmGoTqkYb5oal OwJOZwZFc7MBJ6xTKwNYClAWm5wnimQuN98fQZQIfzjaRcqyoJKUPKR09g9ATE/fRChi 2tpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SOpniUvr; 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 u20-20020a170903309400b001675c6e3205si7740462plc.402.2022.06.13.02.28.57; Mon, 13 Jun 2022 02:29: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=@gmail.com header.s=20210112 header.b=SOpniUvr; 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 S239158AbiFMJTj (ORCPT + 65 others); Mon, 13 Jun 2022 05:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240680AbiFMJTb (ORCPT ); Mon, 13 Jun 2022 05:19:31 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD21F14D14 for ; Mon, 13 Jun 2022 02:19:30 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id d14so6208215eda.12 for ; Mon, 13 Jun 2022 02:19:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:in-reply-to:references:date:message-id:subject:to :cc; bh=OHBXs0DbY77ATKoHUGkTyqnhfdtuttsxGgPkMN1OQUc=; b=SOpniUvrIwzr3EsUmruKb70w1NZ0wsgcN7oliL4cEsnv3MbBrSzVH724MpxdpLdFw3 9GZbrLFxEnFQ6pXRkdS4VNo06PN3MKwfAyZ0QOEMb4GkY8wvc+W91+wD4pUAZqEfW5IB zsXZeJ5A34ALvS4ehJPUR8PEYMScXG7hjUOzEIdWGQR3VxzL7TVh1NksxM2ZLGD4Henn 9hegXMo1GOlDVvJ0+2is7eUzurudkA3+ZpYW5+TuB0PV+84+iXVj4Ri5mb4u+nHmILPu BqADSvwtIObfDkE+T6RLeqPd34m3KfZCSw282bw3i2W47XW9w6h34iOI9TPs0tWaiLR0 1KNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:in-reply-to:references:date :message-id:subject:to:cc; bh=OHBXs0DbY77ATKoHUGkTyqnhfdtuttsxGgPkMN1OQUc=; b=msGFhqP+NpsEuazGCfJxZlxIJ2mVlnVmpLoK2Le/pK78K7TTTuzmuqDJba4a60JXLc ZOftU8eIGAdAsf8LUTaZzWU5251Vq6bRbskHklbiWr4m1MjzqkF3HSEcPYz+idlNuY0l OBiSBqZ7Fxx6PyDMjWfiWkejmLVxaVSVMwySC8g6S6c+pSERJJyIeUErosjBl1hoJVYr LTCPTUkC89oyZoFUnYYt6EVMQD4XCLlKTUhj/aOBuPtukfqw6s2qi3EOj6vJkUgoeS/N hfDWGcbrrdO4zcoYy7tPuRxShqD9T8bf+fyU7VzCOOWoWHhiJxw+YNAzZqYNUXXqZnXw 0BWQ== X-Gm-Message-State: AOAM532+0n+rtxqpBsspgKw1LBrYu1HUFgmOjojb8b7tb8ILqKf622Aq EAvv+ltZfCzBdelE6TppEmDdUk+yIfO6Oj34F0w= MIME-Version: 1.0 X-Received: by 2002:a05:6402:1d51:b0:41f:cf6c:35a5 with SMTP id dz17-20020a0564021d5100b0041fcf6c35a5mr64939661edb.25.1655111970315; Mon, 13 Jun 2022 02:19:30 -0700 (PDT) Received: from 35650733073 named unknown by gmailapi.google.com with HTTPREST; Mon, 13 Jun 2022 05:19:29 -0400 From: aspriel@gmail.com X-Mailer: git-send-email 2.12.2 In-Reply-To: <20220613091915.18884-1-arend.vanspriel@broadcom.com> References: <20220613091915.18884-1-arend.vanspriel@broadcom.com> Date: Mon, 13 Jun 2022 05:19:29 -0400 Message-ID: Subject: [PATCH 7/7] brcmfmac: introduce BRCMFMAC exported symbols namespace To: Kalle Valo , arend.vanspriel@broadcom.com Cc: linux-wireless@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Instead of using EXPORT_SYMBOL() use namespace variant and only if build vendor-specific code as separate module. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- .../net/wireless/broadcom/brcm80211/brcmfmac/bca/module.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | 6 ++++++ .../net/wireless/broadcom/brcm80211/brcmfmac/cyw/module.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c | 4 ++-- .../net/wireless/broadcom/brcm80211/brcmfmac/wcc/module.c | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/module.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/module.c index 790116a735c7..d55f3271d619 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/module.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/module.c @@ -21,6 +21,7 @@ static void __exit brcmf_bca_exit(void) } MODULE_LICENSE("Dual BSD/GPL"); +MODULE_IMPORT_NS(BRCMFMAC); module_init(brcmf_bca_init); module_exit(brcmf_bca_exit); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h index 5d627b8dbb50..8cafe59c089d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h @@ -13,6 +13,12 @@ #include #include "fweh.h" +#if IS_ENABLED(CONFIG_BRCMFMAC_VENDOR_MODULES) +#define BRCMF_EXPORT_SYMBOL_GPL(__sym) EXPORT_SYMBOL_NS_GPL(__sym, BRCMFMAC) +#else +#define BRCMF_EXPORT_SYMBOL(__sym) +#endif + #define TOE_TX_CSUM_OL 0x00000001 #define TOE_RX_CSUM_OL 0x00000002 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/module.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/module.c index 34294724a1f8..f82fbbe3ecef 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/module.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/module.c @@ -21,6 +21,7 @@ static void __exit brcmf_cyw_exit(void) } MODULE_LICENSE("Dual BSD/GPL"); +MODULE_IMPORT_NS(BRCMFMAC); module_init(brcmf_cyw_init); module_exit(brcmf_cyw_exit); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c index d0ba2aba093b..be72203f4e0b 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c @@ -112,7 +112,7 @@ int brcmf_fwvid_register_vendor(enum brcmf_fwvendor fwvid, struct module *vmod, return 0; } -EXPORT_SYMBOL(brcmf_fwvid_register_vendor); +BRCMF_EXPORT_SYMBOL_GPL(brcmf_fwvid_register_vendor); int brcmf_fwvid_unregister_vendor(enum brcmf_fwvendor fwvid, struct module *mod) { @@ -145,7 +145,7 @@ int brcmf_fwvid_unregister_vendor(enum brcmf_fwvendor fwvid, struct module *mod) return 0; } -EXPORT_SYMBOL(brcmf_fwvid_unregister_vendor); +BRCMF_EXPORT_SYMBOL_GPL(brcmf_fwvid_unregister_vendor); #else static inline int brcmf_fwvid_request_module(enum brcmf_fwvendor fwvid) { diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/module.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/module.c index 23e3a4557880..02918d434556 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/module.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/module.c @@ -21,6 +21,7 @@ static void __exit brcmf_wcc_exit(void) } MODULE_LICENSE("Dual BSD/GPL"); +MODULE_IMPORT_NS(BRCMFMAC); module_init(brcmf_wcc_init); module_exit(brcmf_wcc_exit); -- 2.32.0