alistair23-linux/net/mac80211
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
..
aes_ccm.c mac80211: Fix warnings due to -Wunused-but-set-variable 2011-04-26 15:50:31 -04:00
aes_ccm.h
aes_cmac.c
aes_cmac.h
agg-rx.c mac80211: reestablish mis-configured existing Rx BA sessions 2011-06-27 15:09:40 -04:00
agg-tx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-05-20 13:43:21 -07:00
cfg.c mac80211: support GTK rekey offload 2011-07-06 15:05:43 -04:00
cfg.h
chan.c mac80211: fix channel type recalculation with HT and non-HT interfaces 2011-03-14 14:46:58 -04:00
debugfs.c mac80211: add basic support for WoWLAN 2011-05-05 14:59:20 -04:00
debugfs.h
debugfs_key.c mac80211: sparse RCU annotations 2011-05-16 14:10:41 -04:00
debugfs_key.h
debugfs_netdev.c mac80211: fix SMPS debugfs locking 2011-04-20 16:05:59 -04:00
debugfs_netdev.h
debugfs_sta.c mac80211: fix debugfs printk format warning 2011-04-19 15:38:03 -04:00
debugfs_sta.h
driver-ops.h mac80211: support GTK rekey offload 2011-07-06 15:05:43 -04:00
driver-trace.c
driver-trace.h mac80211: support GTK rekey offload 2011-07-06 15:05:43 -04:00
event.c
ht.c mac80211: Stop BA session event from device 2011-06-07 14:41:36 -04:00
ibss.c mac80211: fix IBSS teardown race 2011-06-08 14:19:05 -04:00
ieee80211_i.h mac80211: Skip tailroom reservation for full HW-crypto devices with race fix 2011-07-05 15:26:50 -04:00
iface.c mac80211: call dev_alloc_name before copying name to sdata 2011-06-03 14:22:06 -04:00
Kconfig mac80211: remove the dependency on crypto_blkcipher 2011-04-04 16:20:00 -04:00
key.c mac80211: fix TKIP races, make API easier to use 2011-07-08 11:11:19 -04:00
key.h mac80211: fix TKIP races, make API easier to use 2011-07-08 11:11:19 -04:00
led.c
led.h
main.c mac80211: add missing rcu_barrier 2011-05-16 14:25:29 -04:00
Makefile
mesh.c mac80211: mesh: move some code to make it static 2011-05-12 14:10:55 -04:00
mesh.h mac80211: annotate and fix RCU in mesh code 2011-05-16 14:25:29 -04:00
mesh_hwmp.c mac80211: sparse RCU annotations 2011-05-16 14:10:41 -04:00
mesh_pathtbl.c mac80211: fix smatch complains 2011-07-05 15:26:53 -04:00
mesh_plink.c nl80211: Move peer link state definition to nl80211 2011-05-16 14:10:49 -04:00
michael.c
michael.h
mlme.c mac80211: fix smatch complains 2011-07-05 15:26:53 -04:00
offchannel.c
pm.c mac80211: allow driver to impose WoWLAN restrictions 2011-07-05 15:26:56 -04:00
rate.c
rate.h
rc80211_minstrel.c minstrel_ht: fixed rate mode through debugfs 2011-06-01 15:12:29 -04:00
rc80211_minstrel.h minstrel_ht: fixed rate mode through debugfs 2011-06-01 15:12:29 -04:00
rc80211_minstrel_debugfs.c
rc80211_minstrel_ht.c minstrel_ht: fixed rate mode through debugfs 2011-06-01 15:12:29 -04:00
rc80211_minstrel_ht.h
rc80211_minstrel_ht_debugfs.c
rc80211_pid.h Fix common misspellings 2011-03-31 11:26:23 -03:00
rc80211_pid_algo.c
rc80211_pid_debugfs.c
rx.c wireless: unify QoS control field definitions 2011-06-27 15:09:39 -04:00
scan.c mac80211: Drop DS Channel PARAM in directed probe 2011-06-27 15:09:41 -04:00
spectmgmt.c
sta_info.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-05-16 19:32:19 -04:00
sta_info.h mac80211: Stop BA session event from device 2011-06-07 14:41:36 -04:00
status.c mac80211: allow low level drivers to report packet loss 2011-04-28 14:50:00 -04:00
tkip.c mac80211: fix TKIP races, make API easier to use 2011-07-08 11:11:19 -04:00
tkip.h mac80211: fix TKIP races, make API easier to use 2011-07-08 11:11:19 -04:00
tx.c mac80211: Skip tailroom reservation for full HW-crypto devices with race fix 2011-07-05 15:26:50 -04:00
util.c mac80211: Drop DS Channel PARAM in directed probe 2011-06-27 15:09:41 -04:00
wep.c mac80211: remove the dependency on crypto_blkcipher 2011-04-04 16:20:00 -04:00
wep.h mac80211: remove the dependency on crypto_blkcipher 2011-04-04 16:20:00 -04:00
wme.c wireless: unify QoS control field definitions 2011-06-27 15:09:39 -04:00
wme.h wireless: unify QoS control field definitions 2011-06-27 15:09:39 -04:00
work.c mac80211: Drop DS Channel PARAM in directed probe 2011-06-27 15:09:41 -04:00
wpa.c mac80211: fix TKIP races, make API easier to use 2011-07-08 11:11:19 -04:00
wpa.h