Search Linux Wireless

Re: zd1211rw (2.6.22 sparc64): unaligned access (do_rx)

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

 



Michael Buesch wrote:
The wire protocol for the iv files is the following structure:

struct b43_iv {
	be16 a;
	union {
		be16 x;
		be32 y;
	} ((attr_packed));
} ((attr_packed));

How do I handle that in userspace? In kernel space it's simple
(and we already use get_unaligned() for the 32bit value there).

Please correct me if I'm wrong, but adding the "packed" attribute causes gcc to generate extra instructions to avoid the potentially unaligned accesses.
(i.e. it basically does put_aligned/get_unaligned automatically)

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