linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Cc: Arik Nemtsov <arik@wizery.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: support adding IV-room in the skb for CCMP keys
Date: Mon, 07 May 2012 14:05:14 +0200	[thread overview]
Message-ID: <1336392314.4325.26.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CAFED-jku-zGtTvYwGpwCastRJZAfQf9uyJAeqtevGVRn22Qygg@mail.gmail.com> (sfid-20120507_140219_605554_7A5D6519)

On Mon, 2012-05-07 at 14:01 +0200, Janusz Dziedzic wrote:
> 2011/10/26 Arik Nemtsov <arik@wizery.com>:
> > On Wed, Oct 26, 2011 at 11:59, Johannes Berg <johannes@sipsolutions.net> wrote:
> >> On 10/23/2011 8:21 AM, Arik Nemtsov wrote:
> >>>
> >>> Some cards can generate CCMP IVs in HW, but require the space for the IV
> >>> to be pre-allocated in the frame at the correct offset. Add a key flag
> >>> that allows us to achieve this.
> >>
> >> Is it really that expensive to generate the IV and then not use it that this
> >> is worth the extra complexity? This not just makes it more complex but also
> >> more expensive in the other case.
> >>
> >
> > Some of the platforms with this chip are pretty weak (host CPU is the
> > bottleneck).
> >
> > We add another "if" for the other case (for a value that's likely in
> > the cacheline already). I don't think that's too bad.
> >
> 
> Hello,
> Why this is only done for CCMP?
> Our firmware require such IVs allocation for all modes and currently
> we have common code that do that in the driver based on:
> iv_len = tx_info->control.hw_key->iv_len
> icv_len = tx_info->control.hw_key->icv_len
> 
> /* cw1200 driver */
> skb_push(t->skb, iv_len);
> memmove(newhdr, newhdr + iv_len, t->hdrlen);
> skb_put(t->skb, icv_len);
> ....
> 
> Isn't better to handle all modes in mac80211 base on
> IEEE80211_KEY_FLAG_PUT_IV_SPACE or just leave this for the driver?
> 
> I know this is easy to fix in our driver but still we have to remember
> that in case of CCMP mac80211 will already do it for us and will not
> do that in case of other modes.
> So, my proposal is to remove all changes from net/mac80211/wpa.c file
> and remember that driver should care about it - in such case
> PUT_IV_SPACE will be more generic.

I suggest the opposite, make it more generic in mac80211.

johannes


  reply	other threads:[~2012-05-07 12:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-23  6:21 [PATCH] mac80211: support adding IV-room in the skb for CCMP keys Arik Nemtsov
2011-10-26  9:59 ` Johannes Berg
2011-10-26 17:53   ` Arik Nemtsov
2012-05-07 12:01     ` Janusz Dziedzic
2012-05-07 12:05       ` Johannes Berg [this message]
2012-05-07 12:21         ` Arik Nemtsov
2012-05-08  9:23           ` Janusz Dziedzic
2012-05-08 18:39             ` Arik Nemtsov

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=1336392314.4325.26.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arik@wizery.com \
    --cc=janusz.dziedzic@gmail.com \
    --cc=linux-wireless@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).