[U-Boot] [PATCH 2/4] net: tweak eth_device layout to simplify enetaddr use

thomas.langer at lantiq.com thomas.langer at lantiq.com
Fri Nov 11 12:19:16 CET 2011


Hello Mike,

> +	union {
> +		u32 enetaddr32;
> +		u16 enetaddr16[3];
> +		unsigned char enetaddr[6];
> +	};

This will work only as long the endianess is matching.

Picking single chars from enetaddr[] and combine them to a u32 register
will be more independent from endianess.

If this goes in, I would like to see at least a comment about the problem.

Best Regards,
Thomas


More information about the U-Boot mailing list