Thread (8 messages) 8 messages, 3 authors, 2012-05-08

Re: [PATCH] mac80211: support adding IV-room in the skb for CCMP keys

From: Janusz Dziedzic <hidden>
Date: 2012-05-07 12:01:48

2011/10/26 Arik Nemtsov [off-list ref]:
On Wed, Oct 26, 2011 at 11:59, Johannes Berg [off-list ref] wrote:
quoted
On 10/23/2011 8:21 AM, Arik Nemtsov wrote:
quoted
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.


BR
Janusz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help