mac80211: don't resize skbs needlessly
authorIdo Yariv <ido@wizery.com>
Tue, 29 Jul 2014 12:39:14 +0000 (15:39 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 26 Aug 2014 09:16:00 +0000 (11:16 +0200)
commitc70f59a2a007c57843195a93c3b7308204e0a5ab
treedb9426d7dbadd28f97c006b6426ac1e3cbca880c
parentca34e3b5c808385b175650605faa29e71e91991b
mac80211: don't resize skbs needlessly

Header-less cloned skbs with sufficient headroom need not be cloned
unless the tailroom is going to be modified.

Fix ieee80211_skb_resize so it would only resize cloned skbs if either
the header isn't released or the tailroom is going to be modified.

Some drivers might have assumed that skbs are never cloned, so add a HW
flag that explicitly permits cloned TX skbs. Drivers which do not modify
TX skbs should set this flag to avoid copying skbs.

Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/tx.c