linux/include
Johannes Berg 523b02ea23 mac80211: fix TKIP races, make API easier to use
Our current TKIP code races against itself on TX
since we can process multiple packets at the same
time on different ACs, but they all share the TX
context for TKIP. This can lead to bad IVs etc.

Also, the crypto offload helper code just obtains
the P1K/P2K from the cache, and can update it as
well, but there's no guarantee that packets are
really processed in order.

To fix these issues, first introduce a spinlock
that will protect the IV16/IV32 values in the TX
context. This first step makes sure that we don't
assign the same IV multiple times or get confused
in other ways.

Secondly, change the way the P1K cache works. I
add a field "p1k_iv32" that stores the value of
the IV32 when the P1K was last recomputed, and
if different from the last time, then a new P1K
is recomputed. This can cause the P1K computation
to flip back and forth if packets are processed
out of order. All this also happens under the new
spinlock.

Finally, because there are argument differences,
split up the ieee80211_get_tkip_key() API into
ieee80211_get_tkip_p1k() and ieee80211_get_tkip_p2k()
and give them the correct arguments.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:11:19 -04:00
..
acpi Fix common misspellings 2011-03-31 11:26:23 -03:00
asm-generic bug.h: Move ratelimit warn interfaces to ratelimit.h 2011-05-26 15:00:31 -04:00
crypto
drm drm: Take lock around probes for drm_fb_helper_hotplug_event 2011-05-16 12:01:43 +10:00
keys libceph: Create a new key type "ceph". 2011-03-29 12:11:24 -07:00
linux cfg80211/nl80211: support GTK rekey offload 2011-07-06 15:05:42 -04:00
math-emu
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2011-04-27 15:17:52 -07:00
mtd
net mac80211: fix TKIP races, make API easier to use 2011-07-08 11:11:19 -04:00
pcmcia pcmcia: re-enable Zoomed Video support 2011-02-20 12:47:34 +01:00
rdma Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-05-20 13:43:21 -07:00
rxrpc Fix common misspellings 2011-03-31 11:26:23 -03:00
scsi scsi: remove performance regression due to async queue run 2011-05-17 11:04:44 +02:00
sound Merge branch 'topic/asoc' into for-linus 2011-05-22 10:01:33 +02:00
staging [media] Altera FPGA firmware download module 2011-03-21 20:32:16 -03:00
target Fix common misspellings 2011-03-31 11:26:23 -03:00
trace Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-19 18:14:34 -07:00
video Merge branch 'master' into for-next 2011-04-26 10:22:59 +02:00
xen xen/irq: Export 'xen_pirq_from_irq' function. 2011-04-14 11:17:55 -04:00
Kbuild