From patchwork Mon Jan 18 23:19:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Ortiz X-Patchwork-Id: 73787 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0INHnpw006406 for ; Mon, 18 Jan 2010 23:17:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754555Ab0ARXRs (ORCPT ); Mon, 18 Jan 2010 18:17:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754558Ab0ARXRs (ORCPT ); Mon, 18 Jan 2010 18:17:48 -0500 Received: from mga09.intel.com ([134.134.136.24]:59016 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754391Ab0ARXRs (ORCPT ); Mon, 18 Jan 2010 18:17:48 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Jan 2010 15:17:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,299,1262592000"; d="scan'208";a="484994038" Received: from unknown (HELO sortiz-mobl) ([10.255.17.127]) by orsmga002.jf.intel.com with ESMTP; 18 Jan 2010 15:17:43 -0800 Date: Tue, 19 Jan 2010 00:19:21 +0100 From: Samuel Ortiz To: "John W. Linville" Cc: linux-wireless@vger.kernel.org, Dan Williams Subject: [PATCH] libertas: Set/clear WPA keys before the WEP ones Message-ID: <20100118231920.GH5176@sortiz.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index 5e650f3..fb3dff0 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c @@ -2052,13 +2052,6 @@ void lbs_association_worker(struct work_struct *work) goto out; } - if ( test_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags) - || test_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags)) { - ret = assoc_helper_wep_keys(priv, assoc_req); - if (ret) - goto out; - } - if (test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) { ret = assoc_helper_secinfo(priv, assoc_req); if (ret) @@ -2078,6 +2071,14 @@ void lbs_association_worker(struct work_struct *work) goto out; } + if ( test_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags) + || test_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags)) { + ret = assoc_helper_wep_keys(priv, assoc_req); + if (ret) + goto out; + } + + /* SSID/BSSID should be the _last_ config option set, because they * trigger the association attempt. */