All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliad Peller <eliad@wizery.com>
To: Arend van Spriel <arend@broadcom.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Gautam Kumar Shukla <gautams@broadcom.com>
Subject: Re: [RFC] cfg80211: Add feature flag for 4-way handshake offload
Date: Thu, 18 Dec 2014 18:01:04 +0200	[thread overview]
Message-ID: <CAB3XZEdB7NWrgqqAR5jtEBkXbj6fxv1zdOX0M=r0TPE43b96tw@mail.gmail.com> (raw)
In-Reply-To: <5492F104.9020600@broadcom.com>

hi Arend,

On Thu, Dec 18, 2014 at 5:21 PM, Arend van Spriel <arend@broadcom.com> wrote:
> On 12/18/14 14:44, Eliad Peller wrote:
>> On Thu, Dec 18, 2014 at 2:51 PM, Arend van Spriel<arend@broadcom.com>
>> wrote:
>>>
>>> From: Gautam Kumar Shukla<gautams@broadcom.com>
>>>
>>> The new feature flag allows the driver to indicate that it can
>>> offload the 4-way handshake for WPA/RSN-PSK. With the
>>> wiphy::features flag being used up this patch adds a new
>>> field wiphy::ext_features. Considering extensibility this
>>> new field is declared as a byte array.
>>>
>>> Signed-off-by: Gautam (Gautam Kumar) Shukla<gautams@broadcom.com>
>>> Signed-off-by: Arend van Spriel<arend@broadcom.com>
>>> ---
>>> Hi Johannes,
>>>
>>> Here the proposed way to deal with new feature flags. Let
>>> me know if this is suitable.
>>>
>>> Regards,
>>> Arend
>>> ---
>>
>>
>>> @@ -3122,6 +3124,7 @@ struct wiphy {
>>>          u16 max_acl_mac_addrs;
>>>
>>>          u32 flags, regulatory_flags, features;
>>> +       u8 ext_features[1];
>>>
>> i think it would be nicer to use unsigned long (instead of u8) along
>> with BITS_TO_LONGS
>
>
> Thanks, Eliad
>
> I considered that, but decided against it. The main reason for me was the
> fact that this is passed in nl80211 attribute and using u8 seemed more
> straightforward to me. That said I think I will need to describe in nl80211
> how the bits are ordered in the byte-array.
>
usually bitmaps are implemented by unsigned long array, but i didn't
consider that in this case the array is passed to userspace as well
(as you and Johannes pointed out).
adding a conversion function to nl80211 can do the trick, but i guess
simply using u8 instead in this case makes sense :)

>>>
>>>   /**
>>> + * enum nl80211_ext_feature_index - bit index of extended features.
>>> + *
>>> + * @NL80211_EXT_FEATURE_4WAY_HANDSHAKE: the device supports 4way
>>> handshake
>>> + */
>>> +enum nl80211_ext_feature_index {
>>> +       NL80211_EXT_FEATURE_4WAY_HANDSHAKE,
>>> +};
>>
>>
>> just add the standard LAST/MAX defines here, and the bitmap size will
>> be allocated automatically.
>
>
> I thought that was only for attribute enumerations. This is a bit index
> within a attribute.
>
it's usually not needed, but in this case it will allow defining
ext_features with proper length automatically.

Eliad.

      reply	other threads:[~2014-12-18 16:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 12:51 [RFC] cfg80211: Add feature flag for 4-way handshake offload Arend van Spriel
2014-12-18 13:31 ` Johannes Berg
2014-12-18 17:56   ` Arend van Spriel
2014-12-18 13:44 ` Eliad Peller
2014-12-18 13:51   ` Johannes Berg
2014-12-18 15:21   ` Arend van Spriel
2014-12-18 16:01     ` Eliad Peller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB3XZEdB7NWrgqqAR5jtEBkXbj6fxv1zdOX0M=r0TPE43b96tw@mail.gmail.com' \
    --to=eliad@wizery.com \
    --cc=arend@broadcom.com \
    --cc=gautams@broadcom.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.