Search Linux Wireless

Re: [PATCH v2 1/3] libertas: Fix alignment issues in libertas core

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

 



On Thu, 2009-01-08 at 17:53 +0100, Johannes Berg wrote:
> On Fri, 2009-01-02 at 19:00 -0800, Colin McCabe wrote:
> > When loading fields from packed structs, use get_unaligned_le16 and
> > get_unaligned_le32 instead of le16_to_cpu and le32_to_cpu.
> > This doesn't matter on x86, but it is important for some other CPUs.
> > 
> > Also, mark all packed structs as packed. Generally, any data structure
> > that comes over the wire from the WLAN firmware should be a packed struct.
> 
> Just marking the structs packed should be sufficient, since then the
> compiler must assume they are potentially unaligned.

Colin, can you test out just the bits that mark the structs as packed
and see if we can get by without using get_unaligned_le16() everywhere?
There will be a few cases where get_unaligned_le16() may be required but
I'm pretty sure we don't need this many...

Dan

--
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