All of lore.kernel.org
 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 16:15:10 +0100	[thread overview]
Message-ID: <1448291710.5792.10.camel@sipsolutions.net> (raw)
In-Reply-To: <56532B67.5080508@suse.com>

On Mon, 2015-11-23 at 16:06 +0100, Michal Marek wrote:
> 
> > Indeed, the runtime check will catch both of these.
> 
> Will it catch the former case? The driver built out of has not way to
> select or increment any of the CONFIG_MAC80211_* options.

Correct, but ieee80211_hwflags_check() will verify that the flags are
compatible with the compilation settings, regardless of the respective
source. Note that our preferred way of working out-of-tree is backports
anyway and that ships with mac80211 and cfg80211 due to the relatively
tight coupling between all the pieces.

In any case - consider first compiling mac80211 with a driver that does
"count CONFIG_HWFLAG_XYZ", and no other drivers. This means
that hwflags_state[XYZ] will end up as 1. So once the other (out-of-
tree) driver is registered, it'll pass hw->flags with the bit of XYZ
not set. This would cause a warning and refusal to register
in ieee80211_hwflags_check().

johannes

  reply	other threads:[~2015-11-23 15:15 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
2015-11-23 15:06       ` Michal Marek
2015-11-23 15:15         ` Johannes Berg [this message]
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=1448291710.5792.10.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.