]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: move TX PN to public part of key struct
authorJohannes Berg <johannes.berg@intel.com>
Mon, 1 Jun 2015 13:36:51 +0000 (15:36 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 2 Jun 2015 09:16:35 +0000 (11:16 +0200)
commita927712f6653eb3144ceac7799ddbc2b2ae119f9
treec61ca3afeb1980de84cedde6ee6a74938d6556fe
parent253d10205d0b357bfa076a78465964d057aa2998
mac80211: move TX PN to public part of key struct

For drivers supporting TSO or similar features, but that still have
PN assignment in software, there's a need to have some memory to
store the current PN value. As mac80211 already stores this and it's
somewhat complicated to add a per-driver area to the key struct (due
to the dynamic sizing thereof) it makes sense to just move the TX PN
to the keyconf, i.e. the public part of the key struct.

As TKIP is more complicated and we won't able to offload it in this
way right now (fast-xmit is skipped for TKIP unless the HW does it
all, and our hardware needs MMIC calculation in software) I've not
moved that for now - it's possible but requires exposing a lot of
the internal TKIP state.

As an bonus side effect, we can remove a lot of code by assuming the
keyseq struct has a certain layout - with BUILD_BUG_ON to verify it.

This might also improve performance, since now TX and RX no longer
share a cacheline.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/cfg.c
net/mac80211/debugfs_key.c
net/mac80211/key.c
net/mac80211/key.h
net/mac80211/tx.c
net/mac80211/wpa.c