Search Linux Wireless

Re: [PATCH v6 4/6] wireless: use OR operation to set wiphy features

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

 



On Wed, 2012-10-24 at 12:03 +0300, Kalle Valo wrote:
> Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes:
> 
> > On Wed, 2012-10-24 at 11:59 +0300, Kalle Valo wrote:
> >
> >> Is there a way to check that drivers don't accidentally clear the flags
> >> (ie. use '=' instead '|=')? For example by adding a dummy flag and
> >> checking afterwards that it's not cleared?
> >> 
> >> I'm just worried that this detail might be too easy to miss, for example
> >> somehow I had missed this patch and noticed only when rebasing ath6kl
> >> patches.
> >
> > Yes, that should be possible, set some dummy flag in wiphy_new() and
> > test & clear it in wiphy_register()?
> 
> The tricky part is to make sure that the dummy flag won't conflict with
> a real feature flag value in the future :) 

Seems like a non-issue? If you say use 1<<31 to test, and somebody adds
1<<31, they'll find that their flag never works and will figure it out?

johannes

--
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