From patchwork Sun Nov 1 09:18:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 56832 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA19F9eA009453 for ; Sun, 1 Nov 2009 09:19:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751692AbZKAJTD (ORCPT ); Sun, 1 Nov 2009 04:19:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751630AbZKAJTB (ORCPT ); Sun, 1 Nov 2009 04:19:01 -0500 Received: from 128-177-27-249.ip.openhosting.com ([128.177.27.249]:55908 "EHLO jmalinen.user.openhosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751619AbZKAJTA (ORCPT ); Sun, 1 Nov 2009 04:19:00 -0500 Received: from jm (a88-112-110-114.elisa-laajakaista.fi [88.112.110.114]) (authenticated bits=0) by jmalinen.user.openhosting.com (8.13.8/8.13.8) with ESMTP id nA19Injn019443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Nov 2009 04:18:50 -0500 Received: by jm (sSMTP sendmail emulation); Sun, 01 Nov 2009 11:18:49 +0200 Date: Sun, 1 Nov 2009 11:18:49 +0200 From: Jouni Malinen To: "John W. Linville" , Johannes Berg Cc: linux-wireless@vger.kernel.org Subject: [PATCH] cfg80211: Fix WEXT compat siwauth wpa and group cipher Message-ID: <20091101091849.GA32252@jm.kir.nu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --- 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;