Skip to content

Commit

Permalink
mac80211: Populate HT limitation with TKIP/WEP to the handler for SIO…
Browse files Browse the repository at this point in the history
…CSIWENCODE too

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Mar 28, 2009
1 parent aae8983 commit ec30415
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions net/mac80211/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ static int ieee80211_ioctl_siwencode(struct net_device *dev,
struct ieee80211_sub_if_data *sdata;
int idx, i, alg = ALG_WEP;
u8 bcaddr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
int remove = 0;
int remove = 0, ret;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);

Expand All @@ -656,11 +656,20 @@ static int ieee80211_ioctl_siwencode(struct net_device *dev,
return 0;
}

return ieee80211_set_encryption(
ret = ieee80211_set_encryption(
sdata, bcaddr,
idx, alg, remove,
!sdata->default_key,
keybuf, erq->length);

if (!ret) {
if (remove)
sdata->u.mgd.flags &= ~IEEE80211_STA_TKIP_WEP_USED;
else
sdata->u.mgd.flags |= IEEE80211_STA_TKIP_WEP_USED;
}

return ret;
}


Expand Down

0 comments on commit ec30415

Please sign in to comment.