summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2011-04-27 18:40:29 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-04-28 14:53:21 -0400
commitaac6af5534fade2b18682a0b9efad1a6c04c34c6 (patch)
tree786840d7b3dc0ea942e91075ffe6f2cf5ba9d5d9 /net/mac80211/tx.c
parente2186b7c25ef9cdb6d631c8dd6a672f41abe22d5 (diff)
mac80211: Skip tailroom reservation for full HW-crypto devices
In xmit path, devices that do full hardware crypto (including TKIP MMIC) 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. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index a2043e40549..e3e3aa173af 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1476,12 +1476,7 @@ static int ieee80211_skb_resize(struct ieee80211_local *local,
{
int tail_need = 0;
- /*
- * This could be optimised, devices that do full hardware
- * crypto (including TKIP MMIC) need no tailroom... But we
- * have no drivers for such devices currently.
- */
- if (may_encrypt) {
+ if (may_encrypt && local->crypto_tx_tailroom_needed_cnt) {
tail_need = IEEE80211_ENCRYPT_TAILROOM;
tail_need -= skb_tailroom(skb);
tail_need = max_t(int, tail_need, 0);