Search Linux Wireless

Re: Warning emited by 2.6.24-rc6-git5

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

 



On Saturday 29 December 2007, Johannes Berg wrote:
> I didn't think that many drivers had this problem... The warning is
> harmless on machines that are ok with unaligned memory accesses.
> 
> > WARNING: at net/mac80211/rx.c:1486 __ieee80211_rx()
> > Pid: 0, comm: swapper Not tainted 2.6.24-rc6-git5 #11
> 
> comes from
>         /*
>          * Drivers are required to align the payload data to a four-byte
>          * boundary, so the last two bits of the address where it starts
>          * may not be set. The header is required to be directly before
>          * the payload data, padding like atheros hardware adds which is
>          * inbetween the 802.11 header and the payload is not supported,
>          * the driver is required to move the 802.11 header further back
>          * in that case.
>          */
>         hdrlen = ieee80211_get_hdrlen(rx.fc);
>         WARN_ON_ONCE(((unsigned long)(skb->data + hdrlen)) & 3);
> 
> 
> Although I'm starting to doubt my own sanity here with this sanity check
> if so many drivers can trigger it.

If it helps as reference, rt2x00 allocates and initializes the data as follows:

		skb_reserve(skb, NET_IP_ALIGN);
		skb_put(skb, desc.size); /* Always a multiple of 4 bytes */
		memcpy(skb->data, entry->data_addr, desc.size);

Should there have done more for the aligning of the data?

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

[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