mac80211: fix CCMP races
authorJohannes Berg <johannes.berg@intel.com>
Wed, 6 Jul 2011 19:59:39 +0000 (21:59 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Jul 2011 15:11:19 +0000 (11:11 -0400)
commitaba83a0b301c32dbb91c017f33307611e1a1d384
tree9f8478ddf2160c9b4c50666e037e6239ea52e274
parent523b02ea23b175dd3e46e3daf1bc9354376640a3
mac80211: fix CCMP races

Since we can process multiple packets at the
same time for different ACs, but the PN is
allocated from a single counter, we need to
use an atomic value there. Use atomic64_t to
make this cheaper on 64-bit platforms, other
platforms will support this through software
emulation, see lib/atomic64.c.

We also need to use an on-stack scratch buf
so that multiple packets won't corrupt each
others scratch buffers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/cfg.c
net/mac80211/debugfs_key.c
net/mac80211/key.h
net/mac80211/wpa.c