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

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