diff options
-rw-r--r-- | net/mac80211/mlme.c | 7 | ||||
-rw-r--r-- | net/mac80211/wext.c | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 54a2a1db98a3..87743e47a05f 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, | |||
2492 | { | 2492 | { |
2493 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 2493 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
2494 | 2494 | ||
2495 | if (len == 0 && ifmgd->extra_ie_len == 0) | ||
2496 | return -EALREADY; | ||
2497 | |||
2498 | if (len == ifmgd->extra_ie_len && ifmgd->extra_ie && | ||
2499 | memcmp(ifmgd->extra_ie, ie, len) == 0) | ||
2500 | return -EALREADY; | ||
2501 | |||
2495 | kfree(ifmgd->extra_ie); | 2502 | kfree(ifmgd->extra_ie); |
2496 | if (len == 0) { | 2503 | if (len == 0) { |
2497 | ifmgd->extra_ie = NULL; | 2504 | ifmgd->extra_ie = NULL; |
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 | ||