aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-05-19 22:16:25 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-05-20 14:46:35 -0400
commit175427ce40bd5a3f973a76c46502875f0eed877c (patch)
tree98e49b3847948e83fafe5cacf69b6ed34891c212 /net/mac80211/mlme.c
parentce4c45e099a81b2bc820b6e145aa9058c5acf0bd (diff)
mac80211: don't try to do anything on unchanged genIE
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 54a2a1db98a..87743e47a05 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2492,6 +2492,13 @@ int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ if (len == 0 && ifmgd->extra_ie_len == 0)
+ return -EALREADY;
+
+ if (len == ifmgd->extra_ie_len && ifmgd->extra_ie &&
+ memcmp(ifmgd->extra_ie, ie, len) == 0)
+ return -EALREADY;
+
kfree(ifmgd->extra_ie);
if (len == 0) {
ifmgd->extra_ie = NULL;