From: Johannes Berg <johannes@sipsolutions.net>
To: Luca Coelho <luca@coelho.fi>, linux-wireless@vger.kernel.org
Cc: Jason Baron <jbaron@akamai.com>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RFC v2 3/4] mac80211: use static keys for hw flags
Date: Wed, 11 Nov 2015 08:37:52 +0100 [thread overview]
Message-ID: <1447227472.2276.7.camel@sipsolutions.net> (raw)
In-Reply-To: <1447201345.2475.15.camel@coelho.fi>
On Wed, 2015-11-11 at 02:22 +0200, Luca Coelho wrote:
>
> Now that you have all these options in Kconfig, wouldn't it be
> possible
> to remove the calls to the "static" ieee80211_hw_set() in the drivers
> and somehow set all the flags that are defined in Kconfig
> automatically?
>
Since Kconfig flags are global (across multiple drivers) I don't really
see a way to do that.
I'd *love*, however, to have an "increment" in Kconfig, then I could
get rid of the _OFF ones:
config MAC80211_NUM_DRIVERS
int
config MAC80211_HW_HAS_RATE_CONTROL
int
config MY_DRIVER
depends on MAC80211
increment MAC80211_NUM_DRIVERS
increment MAC80211_HW_MYFLAG
and then later
if (CONFIG_MAC80211_HW_MYFLAG == 0)
/* optimise for flag OFF */
else if (CONFIG_MAC80211_HW_MYFLAG > 0 &&
CONFIG_MAC80211_NUM_DRIVERS == CONFIG_MAC80211_HW_MYFLAG)
/* optimise for flag ON */
else if (CONFIG_MAC80211_HW_MYFLAG > 0)
/* don't optimise */
That's far more maintainable in the long term, since each driver only
needs to list in its Kconfig the flags it *wants*, not *all*.
Maybe I'll try to see if I can hack Kconfig to do that.
johannes
next prev parent reply other threads:[~2015-11-11 7:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 8:52 [RFC v2 0/4] mac80211: jump labels for hw flags Johannes Berg
2015-11-10 8:52 ` [RFC v2 1/4] mac80211: add ieee80211_hw_clear() Johannes Berg
2015-11-10 8:52 ` [RFC v2 2/4] mac80211: introduce ieee80211_local_check() Johannes Berg
2015-11-10 8:52 ` [RFC v2 3/4] mac80211: use static keys for hw flags Johannes Berg
2015-11-11 0:22 ` Luca Coelho
2015-11-11 7:37 ` Johannes Berg [this message]
2015-11-11 13:34 ` Steven Rostedt
2015-11-11 13:39 ` Johannes Berg
2015-11-11 14:18 ` Steven Rostedt
2015-11-11 14:29 ` Johannes Berg
2015-11-11 14:45 ` Steven Rostedt
2015-11-11 15:05 ` Johannes Berg
2015-11-10 8:52 ` [RFC v2 4/4] mac80211: test the static key code Johannes Berg
2015-11-10 9:11 ` [RFC v2 5/4] mac80211: generate hw flags from include file 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=1447227472.2276.7.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=jbaron@akamai.com \
--cc=linux-wireless@vger.kernel.org \
--cc=luca@coelho.fi \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/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.