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

Re: [bluetooth-dev] Re: Porting to ARM



Erwin Authried wrote:

> The bluetooth packets are big-endian, thus the ntoh* functions are not usable.
> The macros cpu_to_le* and le*_to_cpu from the kernel headers seem
> to do the right job. Using some clever assember inline codes isn't
> necessary. The ARM compiler, at least, produces much better code
> with the simple, architecture independent definitions together with
> packed variable access.

I think you meant to say that bluetooth is little-endian (mostly!) therefore we
can't use ntoh*. And I agree that the macros already defined in the kernel are
the ones to use. The occasional special field which is not evenly divisible by
eight bits will just have to be handled specially when it comes up (as well as
the occasional opposite-endian field like the bd address).

--Gordon