Search Linux Wireless

Re: [PATCH] mac80211: don't try to do anything on unchanged genIE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
> ---
>  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: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux