diff options
author | Zhu Yi <yi.zhu@intel.com> | 2009-07-19 23:47:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:27 -0400 |
commit | 1f00fca5c83c1bc5b4ca7e07f2a030bc39c130f2 (patch) | |
tree | 4614b44a228c5a32a1ae4f455e94d5101e0ef9fc /net | |
parent | e6a3f551bc236010c4d4d99e626e150e98a4c3e6 (diff) |
cfg80211: set_default_key only for WEP
We invoke the cfg80211 set_default_key callback only for WEP key
configuring.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-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, |