diff options
author | Zhu Yi <yi.zhu@intel.com> | 2009-07-20 11:47:43 +0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:27 -0400 |
commit | 1f00fca5c83c1bc5b4ca7e07f2a030bc39c130f2 (patch) | |
tree | 4614b44a228c5a32a1ae4f455e94d5101e0ef9fc /net/wireless/wext-compat.c | |
parent | e6a3f551bc236010c4d4d99e626e150e98a4c3e6 (diff) | |
download | kernel-crypto-1f00fca5c83c1bc5b4ca7e07f2a030bc39c130f2.tar.gz kernel-crypto-1f00fca5c83c1bc5b4ca7e07f2a030bc39c130f2.tar.xz kernel-crypto-1f00fca5c83c1bc5b4ca7e07f2a030bc39c130f2.zip |
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/wireless/wext-compat.c')
-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 e6731bf5506..c7351a98e66 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, wdev->wext.keys->data[idx]; } - if (params->cipher != WLAN_CIPHER_SUITE_AES_CMAC && + if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || + params->cipher == WLAN_CIPHER_SUITE_WEP104) && (tx_key || (!addr && wdev->wext.default_key == -1))) { if (wdev->current_bss) err = rdev->ops->set_default_key(&rdev->wiphy, |