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; johannes
Attachment:
signature.asc
Description: This is a digitally signed message part