aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2014-07-29 08:39:14 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-08-26 05:16:00 -0400
commitc70f59a2a007c57843195a93c3b7308204e0a5ab (patch)
treedb9426d7dbadd28f97c006b6426ac1e3cbca880c /include
parentca34e3b5c808385b175650605faa29e71e91991b (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/net/mac80211.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1fbed0a6d556..c9b2bec8db47 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1609,6 +1609,9 @@ struct ieee80211_tx_control {
1609 * is not enabled the default action is to disconnect when getting the 1609 * is not enabled the default action is to disconnect when getting the
1610 * CSA frame. 1610 * CSA frame.
1611 * 1611 *
1612 * @IEEE80211_HW_SUPPORTS_CLONED_SKBS: The driver will never modify the payload
1613 * or tailroom of TX skbs without copying them first.
1614 *
1612 * @IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS: The HW supports scanning on all bands 1615 * @IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS: The HW supports scanning on all bands
1613 * in one command, mac80211 doesn't have to run separate scans per band. 1616 * in one command, mac80211 doesn't have to run separate scans per band.
1614 */ 1617 */
@@ -1642,7 +1645,7 @@ enum ieee80211_hw_flags {
1642 IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26, 1645 IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26,
1643 IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 1<<27, 1646 IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 1<<27,
1644 IEEE80211_HW_CHANCTX_STA_CSA = 1<<28, 1647 IEEE80211_HW_CHANCTX_STA_CSA = 1<<28,
1645 /* bit 29 unused */ 1648 IEEE80211_HW_SUPPORTS_CLONED_SKBS = 1<<29,
1646 IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS = 1<<30, 1649 IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS = 1<<30,
1647}; 1650};
1648 1651