linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Bill Jordan <bjordan@rajant.com>
Cc: ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org,
	linville@tuxdriver.com
Subject: Re: [PATCH] ath: Fix hardware decryption of WEP
Date: Mon, 08 Aug 2011 20:04:50 -0600	[thread overview]
Message-ID: <4E4095C2.3010607@openwrt.org> (raw)
In-Reply-To: <1312831193-8691-1-git-send-email-bjordan@rajant.com>

On 2011-08-08 1:19 PM, Bill Jordan wrote:
> The first 4 hardware key indexes are reserved for WEP, but
> never programmed. The result was that WEP always used
> software decryption.
>
> Signed-off-by: Bill Jordan<bjordan@rajant.com>
> ---
>   drivers/net/wireless/ath/key.c |    8 +++++---
>   1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c
> index 17b0efd..73177f1 100644
> --- a/drivers/net/wireless/ath/key.c
> +++ b/drivers/net/wireless/ath/key.c
> @@ -501,7 +501,11 @@ int ath_key_config(struct ath_common *common,
>   	if (key->keylen)
>   		memcpy(hk.kv_val, key->key, key->keylen);
>
> -	if (!(key->flags&  IEEE80211_KEY_FLAG_PAIRWISE)) {
> +	if (hk.kv_type == ATH_CIPHER_WEP) {
> +		if (key->keyidx>= IEEE80211_WEP_NKID)
> +			return -EOPNOTSUPP;
> +		idx = key->keyidx;
> +	} else if (!(key->flags&  IEEE80211_KEY_FLAG_PAIRWISE)) {
I'm not sure this is a good idea, this would break adding pairwise WEP 
keys. Also, maybe WEP keys could use the BSSID in the lookup to avoid 
the first 4 keycache slots, that way it'd work properly in multi-BSSID 
AP setups.

- Felix

  reply	other threads:[~2011-08-09  2:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 19:19 [PATCH] ath: Fix hardware decryption of WEP Bill Jordan
2011-08-09  2:04 ` Felix Fietkau [this message]
2011-08-09  8:04   ` [ath9k-devel] " Jouni Malinen
2011-08-09 15:58     ` Bill Jordan
2011-08-09 17:07       ` Jouni Malinen

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=4E4095C2.3010607@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=bjordan@rajant.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).