Commit 2b5f7f94 authored by Gertjan van Wingerde's avatar Gertjan van Wingerde Committed by Greg Kroah-Hartman

mac80211: Add define for TX headroom reserved by mac80211 itself.

commit d24deb25 upstream.

Add a definition of the amount of TX headroom reserved by mac80211 itself
for its own purposes. Also add BUILD_BUG_ON to validate the value.
This define can then be used by drivers to request additional TX headroom
in the most efficient manner.
Signed-off-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
[bwh: Adjust context for 2.6.32]
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5e93019e
......@@ -1700,6 +1700,12 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
*/
void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb);
/*
* The TX headroom reserved by mac80211 for its own tx_status functions.
* This is enough for the radiotap header.
*/
#define IEEE80211_TX_STATUS_HEADROOM 13
/**
* ieee80211_tx_status - transmit status callback
*
......
......@@ -859,6 +859,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
* and we need some headroom for passing the frame to monitor
* interfaces, but never both at the same time.
*/
BUILD_BUG_ON(IEEE80211_TX_STATUS_HEADROOM !=
sizeof(struct ieee80211_tx_status_rtap_hdr));
local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
sizeof(struct ieee80211_tx_status_rtap_hdr));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment