Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150422
b: refs/heads/master
c: 175427c
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 20, 2009
1 parent fdb90e7 commit b440885
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce4c45e099a81b2bc820b6e145aa9058c5acf0bd
refs/heads/master: 175427ce40bd5a3f973a76c46502875f0eed877c
7 changes: 7 additions & 0 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/mac80211/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ static int ieee80211_ioctl_siwgenie(struct net_device *dev,

if (sdata->vif.type == NL80211_IFTYPE_STATION) {
int ret = ieee80211_sta_set_extra_ie(sdata, extra, data->length);
if (ret)
if (ret && ret != -EALREADY)
return ret;
sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL;
sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME;
sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT;
ieee80211_sta_req_auth(sdata);
if (ret != -EALREADY)
ieee80211_sta_req_auth(sdata);
return 0;
}

Expand Down

0 comments on commit b440885

Please sign in to comment.