On 11/23/09 11:41, Johannes Berg wrote: > On Mon, 2009-11-23 at 08:16 +0100, Gertjan van Wingerde wrote: >> 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. > >> - 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); > > Even though the radiotap header currently is only 13 bytes long, I don't > really like this, you're not consuming all of extra_tx_headroom! I'd > rather have a definition somewhere > > #define MAC80211_TX_STATUS_HEADROOM 13 > > (with a BUILD_BUG_ON(sizeof(rtap_hdr) == MAC80211_TX_STATUS_HEADROOM)) > so that you can make the driver set > extra_tx_headroom = max_t(MAC80211_TX_STATUS_HEADROOM, txi) + align; > We're just talking about a small amount of bytes (max 8 in the rt2x00 case), but I'll look into this direction. Probably will have to combine patches 5 & 6 of the series then, though. --- Gertjan. -- 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