diff options
-rw-r--r-- | net/wireless/wext-compat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index e6731bf55062..c7351a98e660 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -531,7 +531,8 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev, | |||
531 | wdev->wext.keys->data[idx]; | 531 | wdev->wext.keys->data[idx]; |
532 | } | 532 | } |
533 | 533 | ||
534 | if (params->cipher != WLAN_CIPHER_SUITE_AES_CMAC && | 534 | if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || |
535 | params->cipher == WLAN_CIPHER_SUITE_WEP104) && | ||
535 | (tx_key || (!addr && wdev->wext.default_key == -1))) { | 536 | (tx_key || (!addr && wdev->wext.default_key == -1))) { |
536 | if (wdev->current_bss) | 537 | if (wdev->current_bss) |
537 | err = rdev->ops->set_default_key(&rdev->wiphy, | 538 | err = rdev->ops->set_default_key(&rdev->wiphy, |