From patchwork Fri Sep 18 00:15:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 48434 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 n8I0G72B012041 for ; Fri, 18 Sep 2009 00:16:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754851AbZIRAQA (ORCPT ); Thu, 17 Sep 2009 20:16:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754830AbZIRAQA (ORCPT ); Thu, 17 Sep 2009 20:16:00 -0400 Received: from xc.sipsolutions.net ([83.246.72.84]:60984 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244AbZIRAP7 (ORCPT ); Thu, 17 Sep 2009 20:15:59 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MoR8r-0007Xz-Kq; Fri, 18 Sep 2009 02:16:02 +0200 Subject: [PATCH] cfg80211: don't overwrite privacy setting From: Johannes Berg To: John Linville Cc: linux-wireless , ASIC Felix Date: Thu, 17 Sep 2009 17:15:31 -0700 Message-Id: <1253232931.23567.6.camel@johannes.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.92 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When cfg80211 is instructed to connect, it always uses the default WEP key for the privacy setting, which clearly is wrong when using wpa_supplicant. Don't overwrite the setting, and rely on it being false when wpa_supplicant is not running, instead set it to true when we have keys. Signed-off-by: Johannes Berg --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- wireless-testing.orig/net/wireless/wext-sme.c 2009-09-17 17:12:03.000000000 -0700 +++ wireless-testing/net/wireless/wext-sme.c 2009-09-17 17:12:53.000000000 -0700 @@ -26,11 +26,11 @@ int cfg80211_mgd_wext_connect(struct cfg wdev->wext.connect.ie = wdev->wext.ie; wdev->wext.connect.ie_len = wdev->wext.ie_len; - wdev->wext.connect.privacy = wdev->wext.default_key != -1; if (wdev->wext.keys) { wdev->wext.keys->def = wdev->wext.default_key; wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key; + wdev->wext.connect.privacy = true; } if (!wdev->wext.connect.ssid_len)