From: Arend van Spriel <arend@broadcom.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [RFC V2 2/3] nl80211: add bss selection attribute to CONNECT command
Date: Mon, 18 Jan 2016 10:34:08 +0100 [thread overview]
Message-ID: <569CB190.1000901@broadcom.com> (raw)
In-Reply-To: <1452769832.2444.14.camel@sipsolutions.net>
On 14-1-2016 12:10, Johannes Berg wrote:
> On Wed, 2016-01-13 at 10:49 +0100, Arend van Spriel wrote:
>>
>> +/**
>> + * enum nl80211_attr_bss_select - attributes for bss selection.
>
> I'd prefer nl80211_bss_select_attr in this name and the constants too,
> so it's more obvious that it doesn't belong to the top-level namespace.
Ok. Did not know that convention so it was not that obvious to me ;-)
Will change it.
>> + * @__NL80211_ATTR_BSS_SELECT_INVALID: reserved.
>> + * @NL80211_ATTR_BSS_SELECT_PRIMITIVE: Indicates what criteria are to
>> + *> > be used for bss selection. Value according
>> + * %enum nl80211_bss_select_primitive.
>
> This I don't understand now. Wouldn't the given attributes just be
> used?
The primitive just indicates the requested bss selection criteria and
determines what other attributes are to be expected. Could determine it
by looking at the other attributes, but that would make it harder to
validate the request. This way it also makes them mutually exclusive.
> I was thinking you'd keep the NLA_FLAG "RSSI" preference, and use the
> attribute values for the bitmap ...
You lost me here.
> But still I think this isn't described very well.
>
> Perhaps a good way of documenting this would be to say each primitive
> has a priority? E.g.
>
> Primitives with a lower document priority are executed first while
> selecting a BSS:
>
> RSSI (priority 100)
> BAND_PREF (priority 1)
> RSSI_ADJUST (priority 1) [since it's mutually exclusive with
> BAND_PREF]
Not sure about the priority. What I should document is that BAND_PREF
and RSSI_ADJUST also do RSSI based selection as a second step. As a
(possibly important) side note our firmware api allows multiple
primitives, but RSSI must be one of them as it will reject the
configuration otherwise. As such I could combine RSSI and RSSI_ADJUST as
RSSI would be RSSI_ADJUST(band=unspec, delta=0).
>> + * @NL80211_ATTR_BSS_SELECT_BAND_PREF: Required attribute indicating the
>> + * preferred band. Value according %enum nl80211_band.
>
> Why required?
>
>> + * @NL80211_ATTR_BSS_SELECT_RSSI_ADJUST: When present the value is to be
>> + * added to the RSSI level for BSS-es in the preferred band (s8).
>
> Oh, ok, I see. It's necessary with this too. Still, I wouldn't say
> required, in case future extensions don't need it.
>
> You should also more clearly document this though, I think, since in
> this case the preferred band isn't really a preferred band any more, it
> becomes just the "adjusted band".
Indeed. Will change it.
> I wonder if it'd be simpler to define two band attributes, and make
> RSSI_ADJUST and BAND_PREF mutually exclusive, adding RSSI_ADJUST_BAND.
> We could also use a complex struct value for the contents of
> RSSI_ADJUST, but that doesn't seem great either.
They are mutually exclusive as user-space can only give a single primitive.
Regards,
Arend
next prev parent reply other threads:[~2016-01-18 9:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 9:49 [RFC V2 0/3] nl80211: allow configuration of BSS selection Arend van Spriel
2016-01-13 9:49 ` [RFC V2 1/3] nl80211: add extended feature for BSS selection support Arend van Spriel
2016-01-14 11:00 ` Johannes Berg
2016-01-13 9:49 ` [RFC V2 2/3] nl80211: add bss selection attribute to CONNECT command Arend van Spriel
2016-01-14 11:10 ` Johannes Berg
2016-01-14 11:12 ` Johannes Berg
2016-01-18 9:34 ` Arend van Spriel [this message]
2016-01-19 13:20 ` Johannes Berg
2016-01-19 22:33 ` Arend van Spriel
2016-01-20 9:30 ` Johannes Berg
2016-01-20 14:02 ` Johannes Berg
2016-01-20 21:53 ` Arend van Spriel
2016-01-21 6:57 ` Peer, Ilan
2016-01-13 9:49 ` [RFC V2 3/3] brcmfmac: add support for nl80211 BSS_SELECT feature Arend van Spriel
2016-01-14 9:15 ` [RFC V2 0/3] nl80211: allow configuration of BSS selection Arend van Spriel
2016-01-14 9:20 ` Johannes Berg
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=569CB190.1000901@broadcom.com \
--to=arend@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).