linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ivo van Doorn <ivdoorn@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, Zhu Yi <yi.zhu@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: Re: [PATCH v4] mac80211: Replace ieee80211_tx_control->key_idx with ieee80211_key_conf
Date: Fri, 18 Apr 2008 00:02:26 +0200	[thread overview]
Message-ID: <1208469746.4066.98.camel@johannes.berg> (raw)
In-Reply-To: <200804171941.03002.IvDoorn@gmail.com> (sfid-20080417_183653_595777_FF5E34A3)

[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]


> --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
> @@ -1936,7 +1936,7 @@ static void iwl4965_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
>  	struct iwl_wep_key *wepkey;
>  	int keyidx = 0;
>  
> -	BUG_ON(ctl->key_idx > 3);
> +	BUG_ON(ctl->hw_key->hw_key_idx > 3);
>  
>  	switch (keyinfo->alg) {
>  	case ALG_CCMP:
> @@ -1955,11 +1955,11 @@ static void iwl4965_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
>  		break;
>  
>  	case ALG_WEP:
> -		wepkey = &priv->wep_keys[ctl->key_idx];
> +		wepkey = &priv->wep_keys[ctl->hw_key->hw_key_idx];
>  		cmd->cmd.tx.sec_ctl = 0;
>  		if (priv->default_wep_key) {
>  			/* the WEP key was sent as static */
> -			keyidx = ctl->key_idx;
> +			keyidx = ctl->hw_key->hw_key_idx;
>  			memcpy(&cmd->cmd.tx.key[3], wepkey->key,
>  							wepkey->key_size);
>  			if (wepkey->key_size == WEP_KEY_LEN_128)

All this is rather odd. I think you (Intel) may want to change it to use
hw_key->keyidx and just leave the hw_key_idx alone, it seems to be a
copy of keyidx in iwl4965 but an actual index as it was meant to be used
in iwl3945?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2008-04-18 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 15:28 [PATCH] mac80211: Replace ieee80211_tx_control->key_idx with ieee80211_key_conf Ivo van Doorn
2008-04-17 15:29 ` Michael Buesch
2008-04-17 15:56   ` Ivo van Doorn
2008-04-17 15:59 ` [PATCH v2] " Ivo van Doorn
2008-04-17 16:54   ` Johannes Berg
2008-04-17 17:23   ` [PATCH v3] " Ivo van Doorn
2008-04-17 17:26     ` Johannes Berg
2008-04-17 17:41     ` [PATCH v4] " Ivo van Doorn
2008-04-17 22:02       ` Johannes Berg [this message]
2008-04-18 16:56         ` Tomas Winkler

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=1208469746.4066.98.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=reinette.chatre@intel.com \
    --cc=yi.zhu@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 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).