diff mbox

cfg80211: Fix WEXT compat siwauth wpa and group cipher

Message ID 20091101091849.GA32252@jm.kir.nu (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jouni Malinen Nov. 1, 2009, 9:18 a.m. UTC
None
diff mbox

Patch

--- uml.orig/net/wireless/wext-compat.c	2009-11-01 10:54:56.000000000 +0200
+++ uml/net/wireless/wext-compat.c	2009-11-01 10:58:45.000000000 +0200
@@ -904,8 +904,6 @@  static int cfg80211_set_auth_alg(struct 
 
 static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions)
 {
-	wdev->wext.connect.crypto.wpa_versions = 0;
-
 	if (wpa_versions & ~(IW_AUTH_WPA_VERSION_WPA |
 			     IW_AUTH_WPA_VERSION_WPA2|
 		             IW_AUTH_WPA_VERSION_DISABLED))
@@ -933,8 +931,6 @@  static int cfg80211_set_wpa_version(stru
 
 static int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher)
 {
-	wdev->wext.connect.crypto.cipher_group = 0;
-
 	if (cipher & IW_AUTH_CIPHER_WEP40)
 		wdev->wext.connect.crypto.cipher_group =
 			WLAN_CIPHER_SUITE_WEP40;
@@ -950,6 +946,8 @@  static int cfg80211_set_cipher_group(str
 	else if (cipher & IW_AUTH_CIPHER_AES_CMAC)
 		wdev->wext.connect.crypto.cipher_group =
 			WLAN_CIPHER_SUITE_AES_CMAC;
+	else if (cipher & IW_AUTH_CIPHER_NONE)
+		wdev->wext.connect.crypto.cipher_group = 0;
 	else
 		return -EINVAL;