All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] libertas: Set/clear WPA keys before the WEP ones
Date: Tue, 19 Jan 2010 17:48:12 -0800	[thread overview]
Message-ID: <1263952092.4481.2.camel@localhost.localdomain> (raw)
In-Reply-To: <20100118231920.GH5176@sortiz.org>

On Tue, 2010-01-19 at 00:19 +0100, Samuel Ortiz wrote:
> With the v10 firmware running on 8688 HW, clearing WPA keys after setting the
> WEP key prevents us from being able to associate with WEP APs.
> Swapping the calling order for assoc_helper_wpa_keys() and
> assoc_helper_wep_keys fixes that issue.
> 
> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

Acked-by: Dan Williams <dcbw@redhat.com>

Tested on both sd8686 (v9 fw) and usb8388 (v5 OLPC fw).  Switching
between WEP and WPA-PSK on-the-fly works as expected with this patch.

Though maybe we want to add a comment about this specific issue that
says something like:

/* v10 FW wants WPA keys to be set/cleared after WEP key operations,
 * otherwise it will fail to correctly associate to WEP networks.
 * Other firmware versions don't appear to care.
 */

> ---
>  drivers/net/wireless/libertas/assoc.c |   15 ++++++++-------
>  1 files changed, 8 insertions(+), 7 deletions(-)
> 
> 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.
>  	 */
> -- 
> 1.6.3.3
> 


  reply	other threads:[~2010-01-20  1:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 23:19 [PATCH] libertas: Set/clear WPA keys before the WEP ones Samuel Ortiz
2010-01-20  1:48 ` Dan Williams [this message]
2010-01-21 17:23   ` Samuel Ortiz
2010-01-21 17:26 ` [PATCH v2] " Samuel Ortiz
2010-01-21 17:59   ` John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1263952092.4481.2.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.