From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <j@w1.fi>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 1/3] cfg80211: Allow BSS hint to be provided for connect
Date: Tue, 07 Jan 2014 16:56:24 +0100 [thread overview]
Message-ID: <1389110184.4645.23.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20140106075102.GA31031@w1.fi>
On Mon, 2014-01-06 at 09:51 +0200, Jouni Malinen wrote:
> This clarifies the expected driver behavior on the older
> NL80211_ATTR_MAC and NL80211_ATTR_WIPHY_FREQ attributes and adds a new
> set of similar attributes with _HINT postfix to enable use of a
> recommendation of the initial BSS to choose. This can be helpful for
> some drivers that can avoid an additional full scan on connection
> request if the information is provided to them (user space tools like
> wpa_supplicant already has that information available based on earlier
> scans).
>
> In addition, this can be used to get more expected behavior for cases
> where a specific BSS should be picked first based on operations like
> Interworking network selection or WPS. These cases were already easily
> addressed with drivers that leave BSS selection to user space, but there
> was no convenient way to do this with drivers that take care of BSS
> selection internally without using the NL80211_ATTR_MAC which is not
> really desired since it is needed for other purposes to force the
> association to remain with the same BSS.
Makes sense.
> struct cfg80211_connect_params {
> struct ieee80211_channel *channel;
> + struct ieee80211_channel *channel_hint;
> u8 *bssid;
> + u8 *bssid_hint;
> u8 *ssid;
Those should probably all be const, but we can do that separately.
> return -EINVAL;
> + } else if (info->attrs[NL80211_ATTR_WIPHY_FREQ_HINT]) {
> + connect.channel_hint =
> + ieee80211_get_channel(wiphy,
> + nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ_HINT]));
> + if (!connect.channel_hint ||
> + connect.channel_hint->flags & IEEE80211_CHAN_DISABLED)
> + return -EINVAL;
I'm starting to wonder if this pattern should be abstracted out, but
again, we can do that separately.
johannes
next prev parent reply other threads:[~2014-01-07 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 7:51 [RFC 1/3] cfg80211: Allow BSS hint to be provided for connect Jouni Malinen
2014-01-07 15:56 ` Johannes Berg [this message]
2014-01-14 18:20 ` Jouni Malinen
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=1389110184.4645.23.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=j@w1.fi \
--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.