netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Hong Liu <hong.liu@intel.com>
Cc: Jiri Benc <jbenc@suse.cz>,
	"John W. Linville" <linville@tuxdriver.com>,
	netdev <netdev@vger.kernel.org>, Michael Buesch <mb@bu3sch.de>
Subject: Re: [patch 1/2]d80211: hardware TKIP support for ipw3945
Date: Tue, 24 Oct 2006 11:10:21 +0200	[thread overview]
Message-ID: <1161681021.2840.23.camel@ux156> (raw)
In-Reply-To: <1161679134.7258.6.camel@devlinux-hong>

On Tue, 2006-10-24 at 16:38 +0800, Hong Liu wrote:

> The first time when we set the TKIP key, we can set the phase1 key if
> the driver requires.

Right.

> The problem is when IV16 wraps, who will generate the new phase1 key?

Ok, I was confused for a moment, but yes, when the 16-bit part of the IV
wraps then the upper part changes and hence you need to regenerate the
phase1 key. 

> If the stack need to do this, then we will need to call set_key in the
> packet TX path which I think may not be appropriate.

Well, I checked again and found that bcm34xx requires the IV (48) to be
maintained by software, iow with each packet you tell the hardware what
the IV16 should be. Hence you know when it has wrapped and thus (before
submitting the DMA for the packet) you can regenerate the phase1 key in
software and upload it to the hardware key memory.

This is getting quite complicated. How about having the stack maintain
the IV *only*, and adding helper functions for
 * generating the phase 1 key
 * generating the phase 2 key based on the phase 1 key
that the drivers can use as required?

ipw3945 would call both key generation functions as required, and
bcm43xx would just call the phase 1 function when a key is uploaded and
when the iv16 wraps, not using the phase 2 function at all.

johannes

  reply	other threads:[~2006-10-24  9:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-20  9:19 [patch 1/2]d80211: hardware TKIP support for ipw3945 Hong Liu
2006-10-21 21:10 ` Matthieu CASTET
2006-10-23 12:40 ` Jiri Benc
2006-10-23 12:48   ` Johannes Berg
2006-10-23 12:56     ` Jiri Benc
2006-10-24  8:20       ` Hong Liu
2006-10-24  8:35         ` Johannes Berg
2006-10-24  8:38           ` Hong Liu
2006-10-24  9:10             ` Johannes Berg [this message]
2006-10-24  9:12               ` Johannes Berg
2006-10-25  8:28               ` Hong Liu
2006-10-25  8:50                 ` Johannes Berg
2006-11-14  2:22                   ` Hong Liu
2006-11-15 16:25                     ` Johannes Berg
2006-11-16  9:52                       ` Johannes Berg
2006-11-16 17:21                         ` Jouni Malinen
2006-11-16 17:38                           ` Johannes Berg
2006-11-16 17:40                             ` Jouni Malinen
2006-11-16 17:49                               ` Johannes Berg
2006-10-23 13:04   ` Stuffed Crust
2006-10-23 15:29   ` David Kimdon
2006-10-23 16:31     ` Jiri Benc

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=1161681021.2840.23.camel@ux156 \
    --to=johannes@sipsolutions.net \
    --cc=hong.liu@intel.com \
    --cc=jbenc@suse.cz \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    --cc=netdev@vger.kernel.org \
    /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).