On Monday 30 November 2009, Gertjan van Wingerde wrote: > L2 padding will only be present when there is actual payload present. > > Signed-off-by: Gertjan van Wingerde <gwingerde@xxxxxxxxx> > --- > drivers/net/wireless/rt2x00/rt2x00dev.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c > index ca2bcc0..b93731b 100644 > --- a/drivers/net/wireless/rt2x00/rt2x00dev.c > +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c > @@ -401,7 +401,9 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev, > (rxdesc.flags & RX_FLAG_IV_STRIPPED)) > rt2x00crypto_rx_insert_iv(entry->skb, header_length, > &rxdesc); > - else if (rxdesc.dev_flags & RXDONE_L2PAD) > + else if (header_length && > + (rxdesc.size > header_length) && > + (rxdesc.dev_flags & RXDONE_L2PAD)) > rt2x00queue_remove_l2pad(entry->skb, header_length); > else > rt2x00queue_align_payload(entry->skb, header_length); Is there a scenario where header_lenght can be 0? And if there is, shouldn't we have bailed-out completely already? Ivo -- 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