netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Daniel Drake <dsd@gentoo.org>
Cc: netdev@vger.kernel.org, yi.zhu@intel.com, ipw2100-admin@linux.intel.com
Subject: Re: ieee80211 and devices which decrypt in hardware
Date: Wed, 13 Sep 2006 16:27:57 +0200	[thread overview]
Message-ID: <200609131627.58153.mb@bu3sch.de> (raw)
In-Reply-To: <45077241.1070102@gentoo.org>

On Wednesday 13 September 2006 04:51, Daniel Drake wrote:
> Hi,
> 
> I'm working on support for hardware-based frame decryption in zd1211rw. 
> While doing so I encountered some strange behaviour in ieee80211 which 
> I'm wondering if someone can clarify. Alternatively if someone could 
> just confirm how the Intel hardware behaves here that would be useful...
> 
> The normal structure of a WEP-encrypted frame is:
> 
> 1. 802.11 header (including WEP bit)
> 2. IV (4 bytes)
> 3. Encrypted data
4. ICV
5. FCS

> The structure of a frame coming from the zd1211 device where the frame 
> has been decrypted in hardware is:
> 
> 1. 802.11 header (including WEP bit)
> 2. IV (4 bytes)
> 3. Decrypted data

Does it strip ICV and FCS?

> We pass this up to ieee80211_rx as usual, but things don't work right. 
> ieee80211 converts the frame to an ethernet frame as usual, but includes 
> the WEP IV as the first 4 bytes of the data. (Instead, I want it to skip 
> over the IV, successful decryption has already been verified)
> 
> This is easy enough to fix with another ieee80211 flag or something like 
> that, but I am wondering why it already works for existing drivers which 
> decrypt in hardware. When doing hardware decryption, does the Intel 
> hardware really cut out the 4 byte IV and shift the rest of the data so 
> that it continues immediately on from the header? Seems like a 
> complicated operation to do in hardware (although I don't really know 
> much about hw design...)

in bcm43xx-softmac we use memmove to move the wireless header 4 bytes
up and after that strip the first 4 bytes of the skb.
I don't think there is another easy way to handle this. You'd have
to modify the stack and softmac. And this would probably result in more
overhead than the simple memove of 24 bytes.

-- 
Greetings Michael.

  reply	other threads:[~2006-09-13 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13  2:51 ieee80211 and devices which decrypt in hardware Daniel Drake
2006-09-13 14:27 ` Michael Buesch [this message]
2006-09-13 22:35   ` Daniel Drake
2006-09-13 22:43     ` Daniel Drake
2006-09-14  7:51     ` Johannes Berg
2006-09-14 15:25     ` Michael Buesch

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=200609131627.58153.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=dsd@gentoo.org \
    --cc=ipw2100-admin@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --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).