From patchwork Tue Dec 21 20:44:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jussi Kivilinna X-Patchwork-Id: 425011 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBLKiHaR007017 for ; Tue, 21 Dec 2010 20:44:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752684Ab0LUUoQ (ORCPT ); Tue, 21 Dec 2010 15:44:16 -0500 Received: from saarni.dnainternet.net ([83.102.40.136]:56369 "EHLO saarni.dnainternet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751799Ab0LUUoQ (ORCPT ); Tue, 21 Dec 2010 15:44:16 -0500 Received: from localhost (localhost [127.0.0.1]) by saarni.dnainternet.net (Postfix) with ESMTP id 3C3A0E6E5A; Tue, 21 Dec 2010 22:44:15 +0200 (EET) X-Virus-Scanned: DNA Postiturva at dnainternet.net X-Spam-Flag: NO X-Spam-Score: -1.44 X-Spam-Level: X-Spam-Status: No, score=-1.44 tagged_above=-9999 required=6 tests=[ALL_TRUSTED=-1.44] Received: from saarni.dnainternet.net ([83.102.40.136]) by localhost (saarni.dnainternet.net [127.0.0.1]) (amavisd-new, port 10041) with ESMTP id wYp3zD02qW5g; Tue, 21 Dec 2010 22:44:15 +0200 (EET) Received: from kirsikkapuu.dnainternet.net (kirsikkapuu.dnainternet.net [83.102.40.214]) by saarni.dnainternet.net (Postfix) with ESMTP id 17A0FE6561; Tue, 21 Dec 2010 22:44:15 +0200 (EET) Received: from fate.lan (dyn2-85-23-163-52.psoas.suomi.net [85.23.163.52]) by kirsikkapuu.dnainternet.net (Postfix) with ESMTP id E98A97F11E; Tue, 21 Dec 2010 22:44:12 +0200 (EET) Subject: [PATCH 2/7] rndis_wlan: do not set default_key if not WEP key To: "John W. Linville" From: Jussi Kivilinna Cc: linux-wireless@vger.kernel.org Date: Tue, 21 Dec 2010 22:44:12 +0200 Message-ID: <20101221204412.12250.10396.stgit@fate.lan> In-Reply-To: <20101221204405.12250.35410.stgit@fate.lan> References: <20101221204405.12250.35410.stgit@fate.lan> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Dec 2010 20:44:18 +0000 (UTC) diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index de4c050..9e6105c 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -2435,6 +2435,9 @@ static int rndis_set_default_key(struct wiphy *wiphy, struct net_device *netdev, priv->encr_tx_key_index = key_index; + if (is_wpa_key(priv, key_index)) + return 0; + key = priv->encr_keys[key_index]; return add_wep_key(usbdev, key.material, key.len, key_index);