Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f00fca5 authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville
Browse files

cfg80211: set_default_key only for WEP



We invoke the cfg80211 set_default_key callback only for WEP key
configuring.

Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e6a3f551
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -531,7 +531,8 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
			wdev->wext.keys->data[idx];
			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))) {
	    (tx_key || (!addr && wdev->wext.default_key == -1))) {
		if (wdev->current_bss)
		if (wdev->current_bss)
			err = rdev->ops->set_default_key(&rdev->wiphy,
			err = rdev->ops->set_default_key(&rdev->wiphy,