]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: Skip tailroom reservation for full HW-crypto devices with race fix
authorYogesh Ashok Powar <yogeshp@marvell.com>
Tue, 28 Jun 2011 13:11:37 +0000 (18:41 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Jul 2011 19:26:50 +0000 (15:26 -0400)
commitbee2591566afbc7f121f5354c4872867f63beba2
tree4a9150f82cbb83a01f8fb82b3bf2d69028230928
parent8381216a490a90161d58047eed1919cf61bc235e
mac80211: Skip tailroom reservation for full HW-crypto devices with race fix

Based on inputs from Johannes Berg <johannes@sipsolutions.net>
from http://article.gmane.org/gmane.linux.kernel.wireless.general/68193
and http://article.gmane.org/gmane.linux.kernel.wireless.general/71702

In xmit path, devices that do full hardware crypto (including
MMIC and ICV) need no tailroom. For such devices, tailroom
reservation can be skipped if all the keys are programmed into
the hardware (i.e software crypto is not used for any of the
keys) and none of the keys wants software to generate Michael
MIC and IV.

v2: Added check for IV along with MMIC.
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Tested-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Cc: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
v3: Fixing races to avoid WARNING: at net/mac80211/wpa.c:397
    ccmp_encrypt_skb+0xc4/0x1f0
Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Tested-by: Andreas Hartmann <andihartmann@01019freenet.de>
v4: Added links with message ID

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_i.h
net/mac80211/key.c
net/mac80211/tx.c