linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Jouni Malinen <jouni.malinen@atheros.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath9k: Remove unused key xoring
Date: Mon, 02 Mar 2009 16:57:20 -0800	[thread overview]
Message-ID: <1236041840.5756.34.camel@brick> (raw)
In-Reply-To: <20090302130728.GB30293@jm.kir.nu>

On Mon, 2009-03-02 at 15:07 +0200, Jouni Malinen wrote:
> This is not used anywhere in ath9k and is just making the code more
> confusing.
> 
> Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
> 
> ---
>  drivers/net/wireless/ath9k/hw.c   |   15 ++++++---------
>  drivers/net/wireless/ath9k/hw.h   |    2 +-
>  drivers/net/wireless/ath9k/main.c |    2 +-
>  drivers/net/wireless/ath9k/phy.h  |    2 --
>  4 files changed, 8 insertions(+), 13 deletions(-)
> 
> --- wireless-testing.orig/drivers/net/wireless/ath9k/hw.c	2009-03-02 14:23:07.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/ath9k/hw.c	2009-03-02 14:23:09.000000000 +0200
> @@ -2415,14 +2415,11 @@ bool ath9k_hw_keysetmac(struct ath_hw *a
>  
>  bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
>  				 const struct ath9k_keyval *k,
> -				 const u8 *mac, int xorKey)
> +				 const u8 *mac)
>  {
>  	const struct ath9k_hw_capabilities *pCap = &ah->caps;
>  	u32 key0, key1, key2, key3, key4;
>  	u32 keyType;
> -	u32 xorMask = xorKey ?
> -		(ATH9K_KEY_XOR << 24 | ATH9K_KEY_XOR << 16 | ATH9K_KEY_XOR << 8
> -		 | ATH9K_KEY_XOR) : 0;
>  
>  	if (entry >= pCap->keycache_size) {
>  		DPRINTF(ah->ah_sc, ATH_DBG_KEYCACHE,
> @@ -2474,11 +2471,11 @@ bool ath9k_hw_set_keycache_entry(struct 
>  		return false;
>  	}
>  
> -	key0 = get_unaligned_le32(k->kv_val + 0) ^ xorMask;
> -	key1 = (get_unaligned_le16(k->kv_val + 4) ^ xorMask) & 0xffff;
> -	key2 = get_unaligned_le32(k->kv_val + 6) ^ xorMask;
> -	key3 = (get_unaligned_le16(k->kv_val + 10) ^ xorMask) & 0xffff;
> -	key4 = get_unaligned_le32(k->kv_val + 12) ^ xorMask;
> +	key0 = get_unaligned_le32(k->kv_val + 0);
> +	key1 = get_unaligned_le16(k->kv_val + 4);
> +	key2 = get_unaligned_le32(k->kv_val + 6);
> +	key3 = get_unaligned_le16(k->kv_val + 10) & 0xffff;
> +	key4 = get_unaligned_le32(k->kv_val + 12);

No longer need the 0xffff here

Harvey


      parent reply	other threads:[~2009-03-03  0:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 13:07 [PATCH] ath9k: Remove unused key xoring Jouni Malinen
2009-03-02 15:20 ` Bob Copeland
2009-03-02 15:58   ` Jouni Malinen
2009-03-02 16:15 ` [PATCH v2] " Jouni Malinen
2009-03-03  0:57 ` Harvey Harrison [this message]

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=1236041840.5756.34.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=jouni.malinen@atheros.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).