diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-05-19 16:16:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-20 14:46:35 -0400 |
commit | 175427ce40bd5a3f973a76c46502875f0eed877c (patch) | |
tree | 98e49b3847948e83fafe5cacf69b6ed34891c212 /net/mac80211/wext.c | |
parent | ce4c45e099a81b2bc820b6e145aa9058c5acf0bd (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/wext.c')
-rw-r--r-- | net/mac80211/wext.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index c14394744a9c..a01154e127f0 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -37,12 +37,13 @@ static int ieee80211_ioctl_siwgenie(struct net_device *dev, | |||
37 | 37 | ||
38 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 38 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
39 | int ret = ieee80211_sta_set_extra_ie(sdata, extra, data->length); | 39 | int ret = ieee80211_sta_set_extra_ie(sdata, extra, data->length); |
40 | if (ret) | 40 | if (ret && ret != -EALREADY) |
41 | return ret; | 41 | return ret; |
42 | sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL; | 42 | sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL; |
43 | sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME; | 43 | sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME; |
44 | sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT; | 44 | sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT; |
45 | ieee80211_sta_req_auth(sdata); | 45 | if (ret != -EALREADY) |
46 | ieee80211_sta_req_auth(sdata); | ||
46 | return 0; | 47 | return 0; |
47 | } | 48 | } |
48 | 49 | ||