diff options
Diffstat (limited to 'net/mac80211/wext.c')
-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 | ||