Thread (4 messages) 4 messages, 3 authors, 2012-08-28

Re: Scalable approach for nl80211_feature_flags

From: Kalle Valo <hidden>
Date: 2012-08-28 09:16:27

Vladimir Kondratiev [off-list ref] writes:
There is 'new' approach for specifying various wifi driver flags,
using enum nl80211_feature_flags and wiphy.features.

Problem is, wiphy.features is u32, i.e. it is not scalable
beyond 32 flags.
And currently we have used 4 out of 32. During the 10 months it has
existed we have added four new flags, which makes it a rate of 2,5
months per flag. Based on this it takes over five years to fill
that u32. So I'm not really worried about that right now.
I propose to re-define 'features' approach - convert it to
use 'bitmap' API like DECLARE_BITMAP for the 'features' and
use bit numbers rather then raw values in the
enum nl80211_feature_flags. Last value will be defined like
NL80211_FEATURE_MAX, and 'features' will auto-size using
DECLARE_BITMAP(features, NL80211_FEATURE_MAX);

Then, user space tools need to be modified as well.
Please take into account that the kernel needs to be backwards
compatible and you cannot just change an existing nl80211 attribute to
something else. IMHO this isn't worth the trouble, we manage with the
u32 just fine for now.

-- 
Kalle Valo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help