Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Johannes Berg
On Wed, 2015-11-11 at 09:45 -0500, Steven Rostedt wrote: >  > config FLAG_ALL_SET >   default y >   depends on MY_DRIVER_1 && !MY_DRIVER_2 && ... && MY_DRIVER_N Right. But then I have to list all the drivers, which is rather annoying. I'd have to add more magic so that you somehow can't build with

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Steven Rostedt
On Wed, 11 Nov 2015 15:29:02 +0100 Johannes Berg wrote: config MY_DRIVER_1 SELECT SET_FLAG config MY_DRIVER_2 SELECT SET_FLAG [...] config FLAG_ALL_SET default y depends on MY_DRIVER_1 && !MY_DRIVER_2 && ... && MY_DRIVER_N > Right. Basically it'd be one of three options

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Johannes Berg
OnOn Wed, 11 Nov 2015 14:39:16 +0100 > Johannes Berg wrote: > > > On Wed, 2015-11-11 at 08:34 -0500, Steven Rostedt wrote: > > > > > > config MY_DRIVER > > > > depends on MAC80211 > > > > increment MAC80211_NUM_DRIVERS > > > > increment MAC80211_HW_MYFLAG   > > > > > > If

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Steven Rostedt
On Wed, 11 Nov 2015 14:39:16 +0100 Johannes Berg wrote: > On Wed, 2015-11-11 at 08:34 -0500, Steven Rostedt wrote: > > > > config MY_DRIVER > > > depends on MAC80211 > > > increment MAC80211_NUM_DRIVERS > > > increment MAC80211_HW_MYFLAG > > > > If you don't need to check more that >0 w

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Steven Rostedt
On Wed, 11 Nov 2015 08:37:52 +0100 Johannes Berg wrote: > 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 th

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-11 Thread Johannes Berg
On Wed, 2015-11-11 at 08:34 -0500, Steven Rostedt wrote: > > config MY_DRIVER > > depends on MAC80211 > > increment MAC80211_NUM_DRIVERS > > increment MAC80211_HW_MYFLAG > > If you don't need to check more that >0 why not just use SELECT? > > if (CONFIG_MAC80211_HW_MYFLAG == 0) > >

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-10 Thread Johannes Berg
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

Re: [RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-10 Thread Luca Coelho
On Tue, 2015-11-10 at 09:52 +0100, Johannes Berg wrote: > From: Johannes Berg > > There are many drivers with different behaviour, but in a lot of > systems only a single driver will ever be built. In that case we > could practically get rid of the code for the paths that this > driver/device doe

[RFC v2 3/4] mac80211: use static keys for hw flags

2015-11-10 Thread Johannes Berg
From: Johannes Berg There are many drivers with different behaviour, but in a lot of systems only a single driver will ever be built. In that case we could practically get rid of the code for the paths that this driver/device doesn't need. Doing that, however, would be rather dangerous. As a dec