aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2009-03-13 10:56:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-27 20:12:52 -0400
commitec30415f7935f0ff92f93a4ac87233ca3007a78a (patch)
tree15d32b4bd16db54167e5f0c8cad58ad25b749a62 /net
parentaae89831df03e5282a8f5c0ee46432cfb677fc5c (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')
-rw-r--r--net/mac80211/wext.c13
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