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

Re: [bluetooth-dev] patch for arm



Xavier DEBREUIL[SMTP:xde@xxxxxxx.fr] wrote:
> Xavier DEBREUIL wrote:
> > 
> > Hello,
> > I try to run in user mode the axis stack for ARM. I have applied your patch and
> > encountered a link problem.
> > 
> 
> 
> I forgot to say that I am using the user mode...
> I took a look in the kernel header file and found that __u16 is defined only
> when compiling for kernel mode.
> I think that the cpu_to_le16 should be define at the top of l2cap.c for both
> mode (each user should look at its kernel definition to modify it if needed)...
> Hope this help.
> 
> As for me, I added the following line :
> #define cpu_to_le16(x) ((unsigned short)(x))
> and everything linked properly.
> 
> Am I correct to do such a modification ?
> 
> Now I am going to test it on the board...
> 
Hi,

those conversion macros for le/be are included in all later kernels,
starting with 2.2, I believe. For older kernels, you can use 
include/linux/bluetooth/sysdep-2.1.h. The definition 
that you used will only work on LE architectures.

Regards,

Erwin