From: Jakub Kicinski <kuba@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: davem@davemloft.net, 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
Subject: Re: [PATCH net-next] net: ifdefy the wireless pointers in struct net_device
Date: Tue, 17 May 2022 10:44:43 -0700 [thread overview]
Message-ID: <20220517104443.68756db3@kernel.org> (raw)
In-Reply-To: <8b9d18e351cc58aed65c4a4c7f12f167984ee088.camel@sipsolutions.net>
On Tue, 17 May 2022 09:51:31 +0200 Johannes Berg wrote:
> On Mon, 2022-05-16 at 14:56 -0700, Jakub Kicinski wrote:
> >
> > +#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 :)
ack
> > +++ 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.
fine
> Anyway, we can do this, but I also like Florian's suggestion about the
> union, and sent an attempt at a disambiguation patch there.
Would you be willing to do that as a follow up? Are you talking about
wifi only or all the proto pointers?
As a netdev maintainer I'd like to reduce the divergence in whether
the proto pointers are ifdef'd or not.
next prev parent reply other threads:[~2022-05-17 17:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 21:56 [PATCH net-next] net: ifdefy the wireless pointers in struct net_device Jakub Kicinski
2022-05-17 2:12 ` Florian Fainelli
2022-05-17 7:48 ` Johannes Berg
2022-05-17 17:37 ` Jakub Kicinski
2022-05-17 18:16 ` Johannes Berg
2022-05-17 19:33 ` Alexander Aring
2022-05-17 19:49 ` Jakub Kicinski
2022-05-17 4:36 ` Kalle Valo
2022-05-17 17:32 ` Jakub Kicinski
2022-05-17 7:08 ` Stefan Schmidt
2022-05-17 7:51 ` Johannes Berg
2022-05-17 17:44 ` Jakub Kicinski [this message]
2022-05-17 18:03 ` Johannes Berg
2022-05-17 11:49 ` Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220517104443.68756db3@kernel.org \
--to=kuba@kernel.org \
--cc=a@unstable.cc \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stefan@datenfreihafen.org \
--cc=sven@narfation.org \
--cc=sw@simonwunderlich.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).