Search Linux Wireless

Re: [PATCH 06/12] wl1251: fix payload alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-11-26 at 17:13 +0200, Kalle Valo wrote:
> Kalle Valo <kalle.valo@xxxxxx> writes:
> 
> > mac80211 complained that in some cases IP payload was not aligned, this
> > happens if the 802.11 header is not aligned with four. In that case we have
> > to move entire packet to make the payload properly aligned.

Eh, turn off the debugging option ...

> > +	if (ieee80211_hdrlen(*fc) & 0x3) {
> > +		from = skb->data;
> > +		to = skb_push(skb, 2);
> > +		memmove(to, from, skb->len);
> > +		fc = (u16 *) skb->data;
> > +	}
> 
> I would like to get comments about this. Is memmove() the right way to
> do this?

mac80211 takes care of this for you, after warning :)

The point of the warning is to make developers aware that alignment by
firmware will be better. If you can't put the packet into the right
place directly from the device, don't bother, the memmove is done by
mac80211.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux