Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 11 Nov 2015 14:39:16 +0100
Johannes Berg <johannes@xxxxxxxxxxxxxxxx> 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 why not just use SELECT?  
> 
> > > 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 */  
> 
> I'm comparing those numbers to see if there's a driver that's
> incrementing NUM_DRIVERS but not HW_MYFLAG.
> 

OK, I'm still a bit confused. What happens if another driver increments
NUM_DRIVERS? Then the above wont be equal right? That's what you want?

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux