Allow drivers to consume the extra TX headroom they are requesting instead of assuming they will give it back. This specifically is the case for the rt2x00 driver, as a large part of the requested extra TX headroom is used to properly align the frame for DMA usage, and the frame is never moved back to the original location. Fix this by reserving TX headroom accounting for both the driver requested amount and the special monitor interface header that needs to be added, instead of just the maximum of the two. See http://marc.info/?l=linux-kernel&m=125892467801662&w=2 for details. Reported-by: David Ellingsworth <david@xxxxxxxxxxxxxxxxx> Signed-off-by: Gertjan van Wingerde <gwingerde@xxxxxxxxx> Tested-by: David Ellingsworth <david@xxxxxxxxxxxxxxxxx> Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> --- net/mac80211/main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index dd8ec8d..e666b66 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -515,8 +515,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. */ - local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom, - sizeof(struct ieee80211_tx_status_rtap_hdr)); + local->tx_headroom = local->hw.extra_tx_headroom + + sizeof(struct ieee80211_tx_status_rtap_hdr); debugfs_hw_add(local); -- 1.6.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html