diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2009-03-13 10:56:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-27 20:12:52 -0400 |
commit | ec30415f7935f0ff92f93a4ac87233ca3007a78a (patch) | |
tree | 15d32b4bd16db54167e5f0c8cad58ad25b749a62 /net/mac80211 | |
parent | aae89831df03e5282a8f5c0ee46432cfb677fc5c (diff) |
mac80211: Populate HT limitation with TKIP/WEP to the handler for SIOCSIWENCODE too
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/wext.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 935c63ed3dfa..e55d2834764c 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -630,7 +630,7 @@ static int ieee80211_ioctl_siwencode(struct net_device *dev, | |||
630 | struct ieee80211_sub_if_data *sdata; | 630 | struct ieee80211_sub_if_data *sdata; |
631 | int idx, i, alg = ALG_WEP; | 631 | int idx, i, alg = ALG_WEP; |
632 | u8 bcaddr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | 632 | u8 bcaddr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; |
633 | int remove = 0; | 633 | int remove = 0, ret; |
634 | 634 | ||
635 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 635 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
636 | 636 | ||
@@ -656,11 +656,20 @@ static int ieee80211_ioctl_siwencode(struct net_device *dev, | |||
656 | return 0; | 656 | return 0; |
657 | } | 657 | } |
658 | 658 | ||
659 | return ieee80211_set_encryption( | 659 | ret = ieee80211_set_encryption( |
660 | sdata, bcaddr, | 660 | sdata, bcaddr, |
661 | idx, alg, remove, | 661 | idx, alg, remove, |
662 | !sdata->default_key, | 662 | !sdata->default_key, |
663 | keybuf, erq->length); | 663 | keybuf, erq->length); |
664 | |||
665 | if (!ret) { | ||
666 | if (remove) | ||
667 | sdata->u.mgd.flags &= ~IEEE80211_STA_TKIP_WEP_USED; | ||
668 | else | ||
669 | sdata->u.mgd.flags |= IEEE80211_STA_TKIP_WEP_USED; | ||
670 | } | ||
671 | |||
672 | return ret; | ||
664 | } | 673 | } |
665 | 674 | ||
666 | 675 | ||