From: Peter K. <pk...@us...> - 2001-08-16 13:01:53
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_datagram.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_integrity.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_mux.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_sequence.c 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_slip.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made the BCSP files at least compile for user mode. The diff of the modified file(s): --- bcsp.c 2001/07/06 06:48:54 1.16 +++ bcsp.c 2001/08/16 13:01:22 1.17 @@ -43,22 +43,36 @@ =20 #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 +#ifdef __KERNEL__ #include <linux/malloc.h> #include <linux/string.h> #include <linux/types.h> #include <linux/delay.h> + #include <asm/byteorder.h> #include <asm/unaligned.h> =20 - #include <linux/bluetooth/sysdep-2.1.h> #include <linux/bluetooth/btcommon.h> +#include <linux/bluetooth/bluetooth.h> +#include <linux/bluetooth/hci.h> #include <linux/bluetooth/btmem.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> -#include <linux/bluetooth/bluetooth.h> -#include <linux/bluetooth/hci.h> +#else +#include <stdlib.h> +#include <errno.h> + +#include <asm/unaligned.h> =20 +#include "btcommon.h" +#include "bluetooth.h" +#include "hci.h" +#include "btmem.h" +#include "bcsp.h" +#include "bcsp_debug.h" +#endif + /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 #if BCSP_DEBUG @@ -89,7 +103,9 @@ =20 /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 +#ifdef __KERNEL__ static struct timer_list bcsp_sync_timer; +#endif #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0) static wait_queue_head_t bcsp_sync_wq; #else --- bcsp_datagram.c 2001/07/31 18:06:40 1.8 +++ bcsp_datagram.c 2001/08/16 13:01:22 1.9 @@ -44,15 +44,23 @@ =20 #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 +#ifdef __KERNEL__ #include <linux/malloc.h> + #include <asm/byteorder.h> #include <asm/unaligned.h> =20 - #include <linux/bluetooth/sysdep-2.1.h> +#include <linux/bluetooth/btcommon.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> -#include <linux/bluetooth/btcommon.h> +#else +#include <asm/unaligned.h> + +#include "btcommon.h" +#include "bcsp.h" +#include "bcsp_debug.h" +#endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 --- bcsp_integrity.c 2001/05/30 09:47:00 1.6 +++ bcsp_integrity.c 2001/08/16 13:01:22 1.7 @@ -44,13 +44,21 @@ =20 #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 +#ifdef __KERNEL__ #include <asm/byteorder.h> #include <asm/unaligned.h> =20 #include <linux/bluetooth/sysdep-2.1.h> +#include <linux/bluetooth/btcommon.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> -#include <linux/bluetooth/btcommon.h> +#else +#include <asm/unaligned.h> + +#include "btcommon.h" +#include "bcsp.h" +#include "bcsp_debug.h" +#endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 --- bcsp_mux.c 2001/07/20 06:41:00 1.8 +++ bcsp_mux.c 2001/08/16 13:01:22 1.9 @@ -43,10 +43,15 @@ =20 #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 +#ifdef __KERNEL__ #include <linux/malloc.h> =20 #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> +#else +#include "bcsp.h" +#include "bcsp_debug.h" +#endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 --- bcsp_sequence.c 2001/07/31 17:59:25 1.16 +++ bcsp_sequence.c 2001/08/16 13:01:22 1.17 @@ -44,6 +44,7 @@ =20 #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 +#ifdef __KERNEL__ #include <linux/malloc.h> #include <linux/types.h> #include <linux/interrupt.h> @@ -54,6 +55,12 @@ #include <linux/bluetooth/hci.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> +#else +#include "btmem.h" +#include "hci.h" +#include "bcsp.h" +#include "bcsp_debug.h" +#endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 @@ -89,8 +96,10 @@ =20 /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 +#ifdef __KERNEL__ static struct tq_struct resend_data_task; static struct tq_struct send_ack_task; +#endif =20 #if BCSP_PARSELOWER u8 txseq; @@ -108,7 +117,9 @@ =20 static u8 rtx_count =3D BCSP_RTX_MAX; =20 +#ifdef __KERNEL__ static struct timer_list resend_timer; +#endif =20 static u8 resend_timer_active =3D FALSE; =20 @@ -119,11 +130,13 @@ void bcsp_sequence_init(void) { +#ifdef __KERNEL__ resend_data_task.routine =3D (void*)sequence_resend; resend_data_task.data =3D NULL; =20 send_ack_task.routine =3D (void*)send_ack; send_ack_task.data =3D NULL; +#endif =20 txseq =3D 0; txack =3D 0; @@ -311,7 +324,6 @@ } } =20 - void send_ack(void) { @@ -329,6 +341,7 @@ release_resend_timer(); } =20=09 +#ifdef __KERNEL__ init_timer(&resend_timer); resend_timer.function =3D (void*)sequence_resend; resend_timer.data =3D 0; @@ -337,6 +350,7 @@ resend_timer_active =3D TRUE; =20=09 add_timer(&resend_timer); +#endif } =20 void @@ -344,7 +358,9 @@ { if (resend_timer_active) { resend_timer_active =3D FALSE; +#ifdef __KERNEL__ del_timer(&resend_timer); +#endif } } =20 --- bcsp_slip.c 2001/05/30 09:47:00 1.5 +++ bcsp_slip.c 2001/08/16 13:01:22 1.6 @@ -43,10 +43,19 @@ =20 #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 +#ifdef __KERNEL__ #include <linux/malloc.h> =20 #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> +#else +#include <stdlib.h> +#include <errno.h> + +#include "btcommon.h" +#include "bcsp.h" +#include "bcsp_debug.h" +#endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 |