Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3501811iob; Tue, 17 May 2022 01:06:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEA+/N1vxJ8PMXwQNZBppmr1nzYTic6sSiEgbztr9de6Yv0Nx7RV1T3cfPydtCzReRKlXC X-Received: by 2002:a17:903:3112:b0:161:80df:f11 with SMTP id w18-20020a170903311200b0016180df0f11mr7830798plc.68.1652774790854; Tue, 17 May 2022 01:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652774790; cv=none; d=google.com; s=arc-20160816; b=fA+GyeVossriHDWFsKkKOVl/ePlhm1cdC5h3SSGF9rEyjehkeyeR+snLXthy+tOFBf EyuoMnbSiP7A3xc5ZtdMyNXApcrPRfVvVByjXmgBtoDvkIjQ/ss23dKGtO5SHBG6w9S5 8CTVWDkVk8PhutXaWdNE8/NGc0Gcc79xjJBw5WBGZPwVh+SeJqQLJm+MdZ9jmHEPEnRQ Z7pmm3MpLkcWO6E1x+5hecinXSoklzxb9jxf7IyqbDbh9hewVLUDLA13sV93OfRVt3EZ U2dYLQ7kg032TXETCvt8CsiXmg3S72csm5DIPNJzB1Sa1i2W5f/PEI65pnyAVfW8DIcS NQEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=MTfV3kZGVnrkxCsO0XjhCr2AVmWu4f7IQB0vynHt5bc=; b=TNDkaAbqnPlxKkoWBobAH34oEhPVL44lRQecDTP2W3HKuSO4xjQqwKo83BjVGliwH4 QN64C0qfh01gcSLqg38mF2oyfKEXFx+zfD97rumOvMak6Rc88PLhQY84vhp4sOs2o6QB m3WTiGm2AsT8PRGH6I14zjwco6Pmdtg35MVM32jtIek6Vr3zVCbzlcjer2/VWyfai/xM 87aoUDDpTISaORcRIwZ33rPYLjYlXFhDYQULSUY9hKEUDRLT9ER4ZHJruEazD5DiV2lx 1RI5T3jn4szNJMxhyfm57zynGJfB59HC4ot4qsbH+KXAUYoq67/FGCvm6JGggIOlu28p pz6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Iksef+KO; 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=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m22-20020a634c56000000b003ab1f09b881si14628643pgl.514.2022.05.17.01.06.13; Tue, 17 May 2022 01:06:30 -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=@sipsolutions.net header.s=mail header.b=Iksef+KO; 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=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238408AbiEQHv7 (ORCPT + 70 others); Tue, 17 May 2022 03:51:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241863AbiEQHvs (ORCPT ); Tue, 17 May 2022 03:51:48 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18E581A820; Tue, 17 May 2022 00:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=MTfV3kZGVnrkxCsO0XjhCr2AVmWu4f7IQB0vynHt5bc=; t=1652773907; x=1653983507; b=Iksef+KOCnq+3mNmxusCzl0JP88zn0RrjEyA/SMxFs/zMhm TDz62cpP1Z80ZRipT8I8EU7rCMxOsWmCL7wiRsoCKyvjBevGuvD/aL3NzfeknNrtyJTrJmqA5AH43 yuAnqiskM8vJQSwnZOgqiXmK2zKAi9/8vyDp/BNvoIvPVb3HpWtmlScSqP5oicbQ3ficg7W9OYLM9 dO47E1O+08qdj+NBu9aCJAugdyhrp3je2/ieHV1k9Icq82fqvH4U5cCuwtAUmrKOMKuVcwb20vfyD bSIye2257Q5/q4hIY71iqzaX3tI+V+sGg7Sx1paw9c0shW7HVuNBbWjoBLj4NTdA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nqrzQ-00EGgL-Rf; Tue, 17 May 2022 09:51:33 +0200 Message-ID: <8b9d18e351cc58aed65c4a4c7f12f167984ee088.camel@sipsolutions.net> Subject: Re: [PATCH net-next] net: ifdefy the wireless pointers in struct net_device From: Johannes Berg To: Jakub Kicinski , davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, alex.aring@gmail.com, stefan@datenfreihafen.org, mareklindner@neomailbox.ch, sw@simonwunderlich.de, a@unstable.cc, sven@narfation.org, linux-wireless@vger.kernel.org, linux-wpan@vger.kernel.org Date: Tue, 17 May 2022 09:51:31 +0200 In-Reply-To: <20220516215638.1787257-1-kuba@kernel.org> References: <20220516215638.1787257-1-kuba@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.1 (3.44.1-1.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 On Mon, 2022-05-16 at 14:56 -0700, Jakub Kicinski wrote: >=20 > +#if IS_ENABLED(CONFIG_WIRELESS) > struct wireless_dev *ieee80211_ptr; > +#endif Technically, you should be able to use CONFIG_CFG80211 here, but in practice I'd really hope nobody enables WIRELESS without CFG80211 :) > +++ b/include/net/cfg80211.h > @@ -8004,10 +8004,7 @@ int cfg80211_register_netdevice(struct net_device = *dev); > * > * Requires the RTNL and wiphy mutex to be held. > */ > -static inline void cfg80211_unregister_netdevice(struct net_device *dev) > -{ > - cfg80211_unregister_wdev(dev->ieee80211_ptr); > -} > +void cfg80211_unregister_netdevice(struct net_device *dev); Exported functions aren't free either - I think in this case I'd (slightly) prefer the extra ifdef. Anyway, we can do this, but I also like Florian's suggestion about the union, and sent an attempt at a disambiguation patch there. johannes