From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>, Jouni Malinen <j@w1.fi>
Subject: Re: [PATCH] mac80211: don't try to do anything on unchanged genIE
Date: Tue, 19 May 2009 22:09:43 +0200 [thread overview]
Message-ID: <1242763783.31350.0.camel@johannes.local> (raw)
In-Reply-To: <1242760372.4797.70.camel@johannes.local>
[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]
On Tue, 2009-05-19 at 21:12 +0200, Johannes Berg wrote:
> When the genIE hasn't changed there's no reason to kick
> the state machine since it won't be able to do anything
> new -- doing this decreases the useless work we do for
> reassociating because if we do kick the state machine
> it will try to find a usable BSS but there might not be
> one because wpa_supplicant will only change the BSSID
> a little later.
>
> In a sense this is a workaround for userspace behaviour,
> but on the other hand userspace cannot really keep track
> of what the kernel currently has for genIE since any
> process could have changed that while wpa_supplicant
> wasn't looking.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> net/mac80211/mlme.c | 4 ++++
> net/mac80211/wext.c | 5 +++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> --- wireless-testing.orig/net/mac80211/mlme.c 2009-05-19 21:01:09.923912895 +0200
> +++ wireless-testing/net/mac80211/mlme.c 2009-05-19 21:01:37.662665272 +0200
> @@ -2496,6 +2496,10 @@ int ieee80211_sta_set_extra_ie(struct ie
> {
> struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
>
> + if (len == ifmgd->extra_ie_len &&
> + !memcmp(ifmgd->extra_ie, ie, len))
> + return -EALREADY;
> +
Oops, this is buggy when extra_ie is NULL.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2009-05-19 20:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 19:12 [PATCH] mac80211: don't try to do anything on unchanged genIE Johannes Berg
2009-05-19 20:09 ` Johannes Berg [this message]
2009-05-19 20:16 ` [PATCH v2] " 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=1242763783.31350.0.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=j@w1.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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