Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:13092 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653Ab2H0PcL (ORCPT ); Mon, 27 Aug 2012 11:32:11 -0400 From: Vladimir Kondratiev To: Johannes Berg CC: "John W . Linville" , , "Luis R . Rodriguez" , Jouni Malinen Subject: Scalable approach for nl80211_feature_flags Date: Mon, 27 Aug 2012 18:32:01 +0300 Message-ID: <3206344.1tm1fpsF4D@lx-vladimir> (sfid-20120827_173214_959129_07962250) In-Reply-To: <1345967092.3622.2.camel@jlt4.sipsolutions.net> References: <1343907187-6686-1-git-send-email-qca_vkondrat@qca.qualcomm.com> <3373913.UaOl7A5Fl4@lx-vladimir> <1345967092.3622.2.camel@jlt4.sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi, 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. 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. If the direction looks correct, I'll go ahead to prepare patch. Thanks, Vladimir.