From: Ivo van Doorn <ivdoorn@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Tomas Winkler <tomasw@gmail.com>,
linux-wireless@vger.kernel.org, Michael Buesch <mb@bu3sch.de>
Subject: Re: mac80211 hardware encryption
Date: Thu, 17 Apr 2008 19:04:25 +0200 [thread overview]
Message-ID: <200804171904.26094.IvDoorn@gmail.com> (raw)
In-Reply-To: <1208427279.4066.14.camel@johannes.berg>
On Thursday 17 April 2008, Johannes Berg wrote:
> On Tue, 2008-04-15 at 17:17 +0200, Ivo van Doorn wrote:
>=20
> > > In any case, for the problem at hand, I wouldn't mind increasing
> > > hw_key_idx to a u16 all the way through, or pass the key_conf poi=
nter
> > > instead.
> >=20
> > I'll create a patch that changes it to the key_conf pointer then,
> > that sounds like the safest option to allow changes to key_conf lat=
er.
>=20
> That'll also solve your problem of having to know the algorithm, and =
b43
> might benefit of that too, I think it currently keeps a table for the
> algorithms.
Exactly :)
A follow up patch that I will create later will add a flag to the key_c=
onf
structure that marks the key as shared or pairwise. After that adding t=
he
final bits for HW encryption to rt61pci and rt73usb should be very easy=
=2E :)
> One thing to keep in mind that you'll want to document clearly: the
> key_conf pointer there will only be valid until ops->tx() returns, so
> you must not access it (e.g. via the tx control copy you need to make
> for tx status) outside of the tx() routine unless you want to somehow
> make sure it isn't removed while in use (which is possible [1] since
> set_key() may sleep.)
>=20
> Hence, if you defer ops->tx() to some workqueue or something, you nee=
d
> to copy out all the data you need from the key_conf beforehand.
Ok, I'll update my patch with the above warning.
> Tomas: was it you who mentioned we should remove tx_control from
> tx_status and just require copying the fields we need? If so, did you
> ever look into that?
>=20
> > Note that this change (either adding the key_conf pointer or the hw=
_key_idx to u16)
> > will cause ieee80211_tx_control to exceed the 48 bytes. So that wil=
l make it
> > harder to move it into the skb->cb array later.
>=20
> I just had a look, we could make the rate pointers index into the rat=
e
> array instead which would make them go from 24=EF=BB=BF bytes (12 on =
32-bit) to
> 3 bytes (we only need a u8 index.)
>=20
> johannes
>=20
> [1] using creative bit-locking in hw_key_idx.
Ivo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-04-17 16:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-05 17:31 mac80211 hardware encryption Ivo van Doorn
2008-04-06 16:44 ` Ivo van Doorn
2008-04-07 7:07 ` Jouni Malinen
2008-04-07 13:09 ` Johannes Berg
2008-04-07 13:34 ` Ivo van Doorn
2008-04-07 13:47 ` Johannes Berg
2008-04-07 14:10 ` Ivo van Doorn
2008-04-07 14:12 ` Johannes Berg
2008-04-07 14:26 ` Ivo van Doorn
2008-04-07 14:36 ` Johannes Berg
2008-04-07 14:45 ` Ivo van Doorn
2008-04-14 16:27 ` Ivo van Doorn
2008-04-14 18:39 ` Tomas Winkler
2008-04-14 21:07 ` Ivo van Doorn
2008-04-15 10:35 ` Johannes Berg
2008-04-15 15:17 ` Ivo van Doorn
2008-04-16 13:57 ` Johannes Berg
2008-04-17 10:14 ` Johannes Berg
2008-04-17 17:04 ` Ivo van Doorn [this message]
2008-04-15 15:55 ` Tomas Winkler
2008-04-16 6:15 ` 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=200804171904.26094.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
--cc=tomasw@gmail.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.