linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Michal Marek <mmarek@suse.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC v5 4/5] mac80211: use Kconfig counters to elide unnecessary code
Date: Mon, 23 Nov 2015 15:58:02 +0100	[thread overview]
Message-ID: <1448290682.5792.6.camel@sipsolutions.net> (raw)
In-Reply-To: <5653283C.8050207@suse.com>

On Mon, 2015-11-23 at 15:52 +0100, Michal Marek wrote:
> 
> So one issue with this logic is that it is not safe to build and use an
> out-of-tree mac80211 driver after the kernel has been built. Also, any
> new driver needs the 'count MAC80211_NUM_DRIVERS' annotation, but there
> is the runtime check to catch omissions. 

Indeed, the runtime check will catch both of these.

> Since this is targeting users
> of very specific configs, how about an opt-in scheme à la
> 
> - User has to select CONFIG_MAC80211_SINGLE_DRIVER, the help text
>   explains the caveats and lists drivers known to work in such mode.
> - mac80211 uses the Kconfig-defined constants + dynamic bits iff
>   CONFIG_MAC80211_SINGLE_DRIVER=y, otherwise it behaves as before.
> - Some build- or compile-time check ensuring that we are not building /
>   loading multiple drivers with CONFIG_MAC80211_SINGLE_DRIVER=y.

That'd be possible - but I know of at least one potential use case that
would like to have two similar drivers, with similar flags: some
routers ship with ath9k hardware for the 2.4 GHz band and ath10k
hardware for the 5 GHz band. Doing "single-driver" and avoiding the
counters would not allow those to have any kind of optimisation, and
such low-power platforms are the ones who'd most likely benefit from
it...

That said, we really do need to figure out whether this makes sense at
all.

I'd actually Cc'ed you out of confusion, thinking you were maintaining
kconfig. I guess I really should've Cc'ed Yann instead.

johannes

  reply	other threads:[~2015-11-23 14:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 22:00 [RFC v5 0/5] mac80211: elide code for static hw flags Johannes Berg
2015-11-12 22:00 ` [RFC v5 1/5] kconfig: introduce "count" Johannes Berg
2015-11-12 22:00 ` [RFC v5 2/5] kconfig: regenerate the shipped files Johannes Berg
2015-11-12 22:00 ` [RFC v5 3/5] mac80211: generate hw flags from include file Johannes Berg
2015-11-12 22:00 ` [RFC v5 4/5] mac80211: use Kconfig counters to elide unnecessary code Johannes Berg
2015-11-13  9:48   ` Julian Calaby
2015-11-13  9:52     ` Johannes Berg
2015-11-13  9:55       ` Johannes Berg
2015-11-20 15:24   ` Michal Marek
2015-11-20 15:29     ` Johannes Berg
2015-11-20 16:37       ` Michal Marek
2015-11-23 14:52   ` Michal Marek
2015-11-23 14:58     ` Johannes Berg [this message]
2015-11-23 15:06       ` Michal Marek
2015-11-23 15:15         ` Johannes Berg
2015-11-12 22:00 ` [RFC v5 5/5] iwlwifi: mvm: add Kconfig settings for hw flags Johannes Berg

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=1448290682.5792.6.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mmarek@suse.com \
    /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).