Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] cfg80211: Fix WEXT compat siwauth wpa and group cipher
@ 2009-11-01  9:18 Jouni Malinen
  0 siblings, 0 replies; only message in thread
From: Jouni Malinen @ 2009-11-01  9:18 UTC (permalink / raw)
  To: John W. Linville, Johannes Berg; +Cc: linux-wireless

Neither of these commands should clear the current configuration value
if they return error. Furthermore, cfg80211_set_cipher_group() should
be able to handle IW_AUTH_CIPHER_NONE without reporting error.

Signed-off-by: Jouni Malinen <j@w1.fi>

---
 net/wireless/wext-compat.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- 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;
 

-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-01  9:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-01  9:18 [PATCH] cfg80211: Fix WEXT compat siwauth wpa and group cipher Jouni Malinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox