You can subscribe to this list here.
2001 |
Jan
|
Feb
(44) |
Mar
(202) |
Apr
(134) |
May
(89) |
Jun
(94) |
Jul
(58) |
Aug
(58) |
Sep
(56) |
Oct
(75) |
Nov
(26) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(24) |
Feb
(30) |
Mar
(15) |
Apr
(49) |
May
(12) |
Jun
(6) |
Jul
(11) |
Aug
(20) |
Sep
(19) |
Oct
(3) |
Nov
(13) |
Dec
(1) |
2003 |
Jan
(7) |
Feb
(4) |
Mar
(7) |
Apr
(5) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(51) |
Dec
(1) |
2004 |
Jan
(11) |
Feb
(5) |
Mar
|
Apr
(5) |
May
(2) |
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Anders J. <and...@us...> - 2001-09-28 14:35:39
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- test.c 1.27 1.28=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected parsing of bb_conn testcommand. The diff of the modified file(s): --- test.c 2001/09/10 12:24:10 1.27 +++ test.c 2001/09/28 14:35:38 1.28 @@ -450,8 +450,8 @@ if(!strncmp(cmd, "bb_conn ", 8)) { char *p =3D cmd + 8; =20=09=09 - for (i =3D 0; i < 6; i++) { - bd[i] =3D strtoul(p, &p, 0); + for (i =3D 5; i >=3D 0; i--) { + bd[i] =3D strtoul(p, &p, 16); printk("bb_conn read [%d] =3D 0x%x\n", i, bd[i]); p=3Dp+1; } |
From: Peter K. <pk...@us...> - 2001-09-26 14:24:27
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Do not build btsend and bttest by default. The diff of the modified file(s): --- Makefile 2001/08/29 10:15:53 1.8 +++ Makefile 2001/09/26 14:24:26 1.9 @@ -5,7 +5,7 @@ include $(APPS)/Rules.elinux endif =20 -PROGS =3D btdm memul bti btinq bttest btcon btsend btdisc btconfig +PROGS =3D btdm memul bti btinq btcon btdisc btconfig # btsend bttest =20 # Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude # files in $(include_dir)/readline. Define HAVE_READLINE if you have the |
From: Peter K. <pk...@us...> - 2001-09-21 15:33:38
|
The following file was modified in libs/expat/xmlparse: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use AXIS_USABLE_LIBS instead of USE_UCLIBC. The diff of the modified file(s): --- Makefile 2001/02/18 12:35:44 1.1 +++ Makefile 2001/09/21 15:33:07 1.2 @@ -1,4 +1,4 @@ -USE_UCLIBC =3D 1 +AXIS_USABLE_LIBS =3D UCLIBC GLIBC include $(APPS)/Rules.elinux =20 LIB =3D libxmlparse.a |
From: Peter K. <pk...@us...> - 2001-09-21 15:33:08
|
The following file was modified in libs/expat/xmltok: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use AXIS_USABLE_LIBS instead of USE_UCLIBC. The diff of the modified file(s): --- Makefile 2001/02/18 12:35:44 1.1 +++ Makefile 2001/09/21 15:33:07 1.2 @@ -1,4 +1,4 @@ -USE_UCLIBC =3D 1 +AXIS_USABLE_LIBS =3D UCLIBC GLIBC include $(APPS)/Rules.elinux =20 LIB =3D libxmltok.a |
From: Peter K. <pk...@us...> - 2001-09-21 12:51:37
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.180 1.181=20=20=20=20=20=20=20=20=20=20=20 l2cap.c 1.118 1.119=20=20=20=20=20=20=20=20=20=20=20 sdp.c 1.79 1.80=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Replaces CHAR2INTx() macros with get_unaligned() and leXX_to_cpu(). The diff of the modified file(s): --- hci.c 2001/09/12 12:42:19 1.180 +++ hci.c 2001/09/21 12:51:06 1.181 @@ -61,11 +61,16 @@ #include <linux/interrupt.h> #include <linux/bluetooth/sec_client.h> #include <asm/io.h> +#include <asm/byteorder.h> +#include <asm/unaligned.h> =20 #else /* user mode */ #include <stdlib.h> #include <string.h> #include <errno.h> + +#include <asm/unaligned.h> + #include "include/bluetooth.h" #include "include/hci.h" #include "include/hci_internal.h" @@ -79,23 +84,11 @@ #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ - - -#define SET_UART(x1,x2,x3,x4) (((((x4)&7)<<5) + (((x3)&1)<<4) + \ - (((x2)&1)<<3) + (((x1)&1)<<2)) & 0xfc) - -#define SET_BAUD_RATE(x) (27648000/(x)) - - -#define SET_PROTOCOL_MODE(x1,x2,x3,x4,x5,x6) ((((x6)&7)<<5) + (((x5)&1)<<4= ) + \ - (((x4)&1)<<3) + (((x3)&1)<<2) + \ - (((x2)&1)<<1) + ((x1)&1)) - =20 -#define MAKE_ACL_HDR(hci_hdl,pb,bc,len) (cpu_to_le32(((len & 0xffff) << 16= ) + \ - ((bc & 0x3) << 14) + \ - ((pb & 0x3) << 12) + \ - (hci_hdl & 0xfff))) +/* These two macros are the same as le16_to_cpup() and le32_to_cpup() + only that they work with unaligned addresses */ +#define le16_to_cpuu(addr) (le16_to_cpu(get_unaligned((u16 *)addr))) +#define le32_to_cpuu(addr) (le32_to_cpu(get_unaligned((u32 *)addr))) =20 #define ACL_LINK 1 #define SCO_LINK 0 @@ -140,7 +133,6 @@ #define USE_NCPTIMER=20 #define NCP_TIMEOUT (2*HZ) =20 - /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 /* cmd_t and cmd_buf are structures used to handle the queue of commands @@ -156,9 +148,9 @@ u32 next_to_send; /* index in cmd_buf */ u8 count; cmd_t buf[NBR_CMD_BUFS]; -} cmd_buf; +}; =20 -/* This is the states the state machine in hci_receive_data can be in */ +/* These are the states the state machine in hci_receive_data can be in */ enum states{WAIT_FOR_PACKET_TYPE, WAIT_FOR_EVENT_TYPE, WAIT_FOR_EVENT_LENG= TH, WAIT_FOR_EVENT_PARAM, WAIT_FOR_ACL_HDR, WAIT_FOR_ACL_DATA,=20 WAIT_FOR_SCO_HDR, WAIT_FOR_SCO_DATA, WAIT_FOR_TIMEOUT}; @@ -170,11 +162,11 @@ description of the HCI event packet. */ =20 typedef struct event_struct { - u32 pkt_type:8; - u32 event_type:8; - u32 len:8; + u8 pkt_type; + u8 event_type; + u8 len; u8 data[0]; -} event_struct; +} __attribute__ ((packed)) event_struct; #endif =20 /****************** LOCAL FUNCTION DECLARATION SECTION *******************= ***/ @@ -187,6 +179,7 @@ static hci_in_buffer* get_free_inbuffer(void); static u32 send_acl_packet(bt_tx_buf *tx_buf); static void set_acl_hdr(u8 *data, u32 len, u8 pb, u8 bc, u32 hci_hdl); +static u16 hci_handle(void *data); static cmd_t* get_next_cmd(void);=20 static s32 insert_cmd(u8* cmd, u8 len);=20 static void init_cmd_buf(void); @@ -261,6 +254,8 @@ =20 /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 +static struct cmd_buf cmd_buf; + /* Struct used for sending command packets */ cmd_pkt c_pkt; =20 @@ -346,7 +341,6 @@ * parse_sco_packet or the parse_event_packet, depending on the packet type */ =20 - void hci_receive_data(u8* data, u32 count) { @@ -473,10 +467,11 @@ buf +=3D c; count -=3D c; if (tmp_pos =3D=3D ACL_HDR_LEN) { - hci_hdl =3D CHAR2INT12(hdr[1],hdr[0]); - pb_flag =3D (((u32) hdr[1]) & 0x30) >> 4; - bc_flag =3D (((u32) hdr[1]) & 0xc0) >> 6; - data_len =3D CHAR2INT16(hdr[3],hdr[2]); + u32 tmp_hdr =3D le32_to_cpuu(hdr); + hci_hdl =3D GET_BITS(tmp_hdr, 0, 12); + pb_flag =3D GET_BITS(tmp_hdr, 12, 2); + bc_flag =3D GET_BITS(tmp_hdr, 14, 2); + data_len =3D GET_BITS(tmp_hdr, 16, 16); =20 /* Check the length to make sure we won't=20 overrun in_buf->buf_ptr in a memcpy later. @@ -562,7 +557,7 @@ buf +=3D c; count -=3D c; if (tmp_pos =3D=3D SCO_HDR_LEN) { - hci_hdl =3D CHAR2INT12(hdr[1],hdr[0]); + hci_hdl =3D hci_handle(hdr); data_len =3D hdr[2]; tmp_pos =3D 0; state =3D WAIT_FOR_SCO_DATA; @@ -606,8 +601,8 @@ while (count > 0) { event_type =3D tmp_buf[0]; event_len =3D tmp_buf[1]; - tmp_buf +=3D 2; - count -=3D 2; + tmp_buf +=3D EVENT_HDR_LEN; + count -=3D EVENT_HDR_LEN; =20 D_REC(__FUNCTION__ ": Received event 0x%02x with len:%d\n", event_type, = event_len); =20=09=09 @@ -630,14 +625,17 @@ tmp_buf =3D data; =20 while (count > 0) { - /* Parse the HCI header */ - hci_hdl =3D CHAR2INT12(tmp_buf[1],tmp_buf[0]); - pb_flag =3D (((u32) tmp_buf[1]) & 0x30) >> 4; - bc_flag =3D (((u32) tmp_buf[1]) & 0xc0) >> 6; - data_len =3D CHAR2INT16(tmp_buf[3],tmp_buf[2]); - tmp_buf +=3D 4; - count -=3D 4; + u32 tmp_hdr =3D le32_to_cpuu(tmp_buf); =20=09=09 + /* Parse the ACL header */ + hci_hdl =3D GET_BITS(tmp_hdr, 0, 12); + pb_flag =3D GET_BITS(tmp_hdr, 12, 2); + bc_flag =3D GET_BITS(tmp_hdr, 14, 2); + data_len =3D GET_BITS(tmp_hdr, 16, 16); + + tmp_buf +=3D ACL_HDR_LEN; + count -=3D ACL_HDR_LEN; +=09=09 /* Check the length to make sure we won't=20 overrun in_buf->buf_ptr in a memcpy later. --gmcnutt @@ -727,7 +725,7 @@ that have been sent */ =20 for (i =3D 0; i < 4 * nbr_of_hdl; i +=3D 4) { - hci_ctrl.hc_buf.acl_num +=3D CHAR2INT16(pkt[i+3], pkt[i+2]); + hci_ctrl.hc_buf.acl_num +=3D le16_to_cpuu(&pkt[i+2]); } =20=09 D_QUEUE("<NCP:%d>\n", hci_ctrl.hc_buf.acl_num); @@ -824,7 +822,7 @@ get_err_msg(buf[0])); =20 link_type =3D buf[9]; - hci_hdl =3D CHAR2INT12(buf[2], buf[1]); + hci_hdl =3D hci_handle(&buf[1]); test_hci_hdl =3D hci_hdl; =20 if (link_type =3D=3D ACL_LINK) { @@ -898,7 +896,7 @@ release_cmd_timer(); wake_up_interruptible(&hci_wq); =20 - if (lp_disconnect_ind(CHAR2INT12(buf[2], buf[1]))) + if (lp_disconnect_ind(hci_handle(&buf[1]))) if (hci_ctrl.nbr_of_connections > 0) { hci_ctrl.nbr_of_connections--; hci_update_load_factor(); @@ -909,7 +907,7 @@ connections we can acl_num by reading the buffersizes again, but this will not work in a multipoint connection. */ =20 - reset_hci_con_bd(CHAR2INT12(buf[2], buf[1])); + reset_hci_con_bd(hci_handle(&buf[1])); =20=09=09 if (hci_ctrl.nbr_of_connections <=3D 0) { hci_read_buffer_size(HCI_NON_BLOCK); @@ -926,7 +924,7 @@ =20=09=09=09 } =20=09=09 - sec_man_event(HCI, get_bd(CHAR2INT12(buf[2], buf[1])), AUTHENTICATION_CO= MPLETE, buf, 1); + sec_man_event(HCI, get_bd(hci_handle(&buf[1])), AUTHENTICATION_COMPLETE,= buf, 1); #endif wake_up_interruptible(&hci_wq); break; @@ -958,7 +956,7 @@ tmp[0] =3D buf[0]; tmp[1] =3D buf[3]; =20=09=09 - sec_man_event(HCI, get_bd(CHAR2INT12(buf[2], buf[1= ])), ENCRYPTION_CHANGE, tmp, 2); + sec_man_event(HCI, get_bd(hci_handle(&buf[1])), EN= CRYPTION_CHANGE, tmp, 2); } #endif wake_up_interruptible(&hci_wq); @@ -1022,12 +1020,13 @@ =20 case FLUSH_OCCURRED: D_CMD(__FUNCTION__ ": FLUSH_OCCURRED on hci_hdl %d\n", - CHAR2INT12(buf[1],buf[0])); - btmem_flushhandle(CHAR2INT12(buf[1],buf[0])); + hci_handle(buf)); + btmem_flushhandle(hci_handle(buf)); break; =20 case HARDWARE_ERROR: - D_ERR(__FUNCTION__ ": An hardware error with error code 0x%02x occurred\= n Please refer to your bluetooth module manual\n", buf[0]); + D_ERR(__FUNCTION__ ": A hardware error with error code 0x%02X occurred.\= n", buf[0]); + D_ERR(__FUNCTION__ ": Please refer to your Bluetooth module's manual.\n"= ); break; =20 case ROLE_CHANGED: @@ -1041,10 +1040,10 @@ =20=09=09=09 } else if (buf[7]) { DSYS(__FUNCTION__ ": Current master is 0x%04x%08x\n",=20 - CHAR2INT16(buf[6], buf[5]),=20 - CHAR2INT32(buf[4], buf[3], buf[2], buf[1])); + le16_to_cpuu(&buf[5]), le32_to_cpuu(&buf[1])); } else { - DSYS(__FUNCTION__ ": Our role is master for BD Address 0x%04x%08x\n", C= HAR2INT16(buf[6], buf[5]), CHAR2INT32(buf[4], buf[3], buf[2], buf[1])); + DSYS(__FUNCTION__ ": Our role is master for BD Address 0x%04x%08x\n", + le16_to_cpuu(&buf[5]), le32_to_cpuu(&buf[1])); } break; =20 @@ -1058,7 +1057,7 @@ =20 case MODE_CHANGE: D_CMD(__FUNCTION__ ": MODE_CHANGE on hci_hdl %d\n", - CHAR2INT12(buf[2],buf[1])); + hci_handle(&buf[1])); break; =20 case RETURN_LINK_KEYS: @@ -1162,13 +1161,11 @@ the command complete event */ =20 ogf =3D (u32) buf[2] >> 2; - ocf =3D CHAR2INT10(buf[2],buf[1]); + ocf =3D le16_to_cpuu(&buf[1]) & 0x03FF; r_val =3D buf + 3; =20 switch (ogf) { - case HCI_LC: -=20=20=20=20=20=20=20=20=20=20 switch (ocf) { case LINK_KEY_REQUEST_REPLY: release_cmd_timer(); @@ -1239,16 +1236,13 @@ D_CMD(__FUNCTION__ ": HCI_LC, ocf %d not recognised!\n", ocf); break; } - break; =20=20=20=20=20=20=20=20=20=20=20 case HCI_HC: /* Host Controller commands */ -=09=09 release_cmd_timer(); /* FIXME -- correct timer should be released */ =20=20=20=20=20=20=20=20=20=20=20 switch (ocf) { -=09=09=09 case CREATE_NEW_UNIT_KEY: D_CMD(__FUNCTION__ ": CREATE_NEW_UNIT_KEY\n"); if (r_val[0]) { @@ -1268,13 +1262,12 @@ result_param =3D - r_val[0]; } else { D_CMD(__FUNCTION__ ": READ_STORED_LINK_KEY Success\n"); - result_param =3D CHAR2INT32(r_val[4], r_val[3], - r_val[2], r_val[= 1]); + result_param =3D le32_to_cpuu(&r_val[1]); } DSYS(__FUNCTION__ ": Max number of Linkkeys: %d\n", - CHAR2INT16(r_val[2], r_val[1])); + le16_to_cpuu(&r_val[1])); DSYS(__FUNCTION__ ": Number of Linkkeys read: %d\n", - CHAR2INT16(r_val[4], r_val[3])); + le16_to_cpuu(&r_val[3])); break; =20 case WRITE_STORED_LINK_KEY: @@ -1296,11 +1289,11 @@ result_param =3D - r_val[0]; } else { D_CMD(__FUNCTION__ ": DELETE_STORED_LINK_KEY Success\n"); - result_param =3D CHAR2INT16(r_val[2], r_val[1]); + result_param =3D le16_to_cpuu(&r_val[1]); } =20=09=09=09 D_CMD(__FUNCTION__ ": Number of Linkkeys deleted: %d\n", - CHAR2INT16(r_val[2], r_val[1])); + le16_to_cpuu(&r_val[1])); break;=09 =20=20=20=20=20=20=20=20=20=20=20=20=20 case READ_TRANSMIT_POWER_LEVEL:=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 @@ -1311,8 +1304,7 @@ get_err_msg(r_val[0])); break; } else { - unsigned short hci_hdl =3D CHAR2INT12(r_val[2], r_val[1]); - DSYS("READ_TRANSMIT_POWER_LEVEL : handle %d, %d dBm\n", hci_hdl, r_val= [3]); + DSYS("READ_TRANSMIT_POWER_LEVEL: handle %d, %d dBm\n", hci_handle(&r_v= al[1]), r_val[3]); } break; =20 @@ -1438,7 +1430,7 @@ =20=20=20=20=20=20=20=20=20=20=20=20=20 case READ_LINK_SUPERVISION_TIMEOUT: D_CMD(__FUNCTION__ ": Link supervision timeout is: %d\n", - CHAR2INT16(buf[4],buf[3])); + le16_to_cpuu(&buf[3])); break; =20=20=20=20=20=20=20=20=20=20=20=20=20 case WRITE_LINK_SUPERVISION_TIMEOUT: @@ -1497,7 +1489,6 @@ release_cmd_timer(); =20 switch (ocf) { - case READ_COUNTRY_CODE: if (r_val[0]) { D_ERR(__FUNCTION__ ": READ_COUNTRY_CODE : %s\n", @@ -1528,10 +1519,10 @@ get_err_msg(r_val[0])); break; } - hci_ctrl.hc_buf.acl_len =3D CHAR2INT16(r_val[2],r_val[1]); + hci_ctrl.hc_buf.acl_len =3D le16_to_cpuu(&r_val[1]); hci_ctrl.hc_buf.sco_len =3D (u32) r_val[3]; - hci_ctrl.hc_buf.acl_num =3D CHAR2INT16(r_val[5],r_val[4]); - hci_ctrl.hc_buf.sco_num =3D CHAR2INT16(r_val[7],r_val[6]); + hci_ctrl.hc_buf.acl_num =3D le16_to_cpuu(&r_val[4]); + hci_ctrl.hc_buf.sco_num =3D le16_to_cpuu(&r_val[6]); printk("\nHW module contains...\n"); printk("%d ACL buffers at %d bytes\n%d SCO buffers at %d bytes\n\n", hci_ctrl.hc_buf.acl_num, hci_ctrl.hc_buf.acl_len, @@ -1592,10 +1583,9 @@ wake_up_interruptible(&hci_wq); break; =20=20=20=20=20=20=20=20=20=20=20 - case MANUFACTURER_SPEC: { /* manufacturer specific */ + case MANUFACTURER_SPEC: /* Manufacturer specific */ D_CMD(__FUNCTION__ ": MANUFACTURER_SPEC\n"); process_vendor_return_param(ocf, r_val); - } break; =20=20=20=20=20=20=20=20=20 default: @@ -3531,13 +3521,22 @@ void=20 set_acl_hdr(u8 *data, u32 len, u8 pb, u8 bc, u32 hci_hdl) { - u32 tmp_hdr; + u32 tmp_hdr =3D 0; + + SET_BITS(tmp_hdr, 0, 12, hci_hdl); + SET_BITS(tmp_hdr, 12, 2, pb); + SET_BITS(tmp_hdr, 14, 2, bc); + SET_BITS(tmp_hdr, 16, 16, len); =20 data[0] =3D ACL_PKT; - tmp_hdr =3D MAKE_ACL_HDR(hci_hdl,pb,bc,len); - memcpy(data + 1, &tmp_hdr, 4); + put_unaligned(cpu_to_le32(tmp_hdr), (u32*)&data[1]); } =20 +u16 +hci_handle(void *data) +{ + return GET_BITS(le16_to_cpuu(data), 0, 12); +} =20 /* Returns the error messages according to the specification page 746 */ u8*=20 @@ -3645,9 +3644,9 @@ and 0x13 is the code for "Other End Terminated Connection: User Ended Connection" */ D_CMD(__FUNCTION__ ": DISCONNECT->disconnection complete\n"); - o_len =3D set_discon_cpl_event(out_event, CHAR2INT12(cmd->data[1], cmd-= >data[0]), 0x13); + o_len =3D set_discon_cpl_event(out_event, hci_handle(cmd->data), 0x13); bt_write_lower_driver(o_event, o_len); - if (lp_disconnect_ind(CHAR2INT12(cmd->data[1],cmd->data[0]))) + if (lp_disconnect_ind(hci_handle(cmd->data))) if (hci_ctrl.nbr_of_connections > 0) { hci_ctrl.nbr_of_connections--; hci_update_load_factor(); --- l2cap.c 2001/09/12 12:38:10 1.118 +++ l2cap.c 2001/09/21 12:51:06 1.119 @@ -59,12 +59,16 @@ #include <linux/bluetooth/l2cap_con.h> #include <linux/bluetooth/l2cap_sec.h> #include <linux/bluetooth/bt_errno.h> +#include <asm/byteorder.h> +#include <asm/unaligned.h> #else /* user mode */ #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <signal.h> #include <errno.h> +#include <asm/unaligned.h> + #include "include/l2cap.h" #include "include/hci.h" #include "include/hci_internal.h" @@ -588,7 +592,7 @@ in the connection less packet */ con =3D get_con_hcihdl(hci_handle); =20=09=09 - get_upper(CHAR2INT16(pkt->data[1], pkt->data[0]))-> + get_upper(le16_to_cpu(get_unaligned((u16 *)&pkt->data[0])))-> receive_data(con, pkt->data + 2, pkt_len - 2); break; =20=20=20=20=20 --- sdp.c 2001/09/19 10:16:27 1.79 +++ sdp.c 2001/09/21 12:51:06 1.80 @@ -58,6 +58,8 @@ #include <string.h> #include <sys/socket.h> #include <sys/un.h> +#include <asm/unaligned.h> + #include "include/bluetooth.h" #include "include/btcommon.h" #include "include/sdp.h" @@ -798,7 +800,7 @@ =20 #ifndef __KERNEL__ if (sdp_sock < 0) { - send_error_rsp(sdp, CHAR2INT16(data[2], data[1]), 6); + send_error_rsp(sdp, le16_to_cpu(get_unaligned((u16 *)&data[1])), 6); } #endif =20 |
From: Peter K. <pk...@us...> - 2001-09-21 12:51:07
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btcommon.h 1.84 1.85=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Replaces CHAR2INTx() macros with get_unaligned() and leXX_to_cpu(). The diff of the modified file(s): --- btcommon.h 2001/09/18 12:14:35 1.84 +++ btcommon.h 2001/09/21 12:51:06 1.85 @@ -92,13 +92,6 @@ (((x) & ((1UL << (bits)) - 1)) << (bit)); \ } while (0) =20 -#define CHAR2INT10(c1,c0) (((u32)((c1) & 0x03) << 8) + (u32)((c0) & 0xff)) -#define CHAR2INT12(c1,c0) (((u32)((c1) & 0x0f) << 8) + (u32)((c0) & 0xff)) -#define CHAR2INT16(c1,c0) (((u32)((c1) & 0xff) << 8) + (u32)((c0) & 0xff)) -#define CHAR2INT32(c3,c2,c1,c0) (((u32)((c3) & 0xff) << 24) + \ - ((u32)((c2) & 0xff) << 16) + \ - ((u32)((c1) & 0xff) << 8) + (u32)((c0) &0xff)) - /* extract line number from tty */ #define GET_TTYLINE(tty) (MINOR(tty->device) - tty->driver.minor_start) =20 |
From: Peter K. <pk...@us...> - 2001-09-20 17:02:04
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_sequence.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Fixed a debug message. The diff of the modified file(s): --- bcsp_sequence.c 2001/09/18 13:04:27 1.19 +++ bcsp_sequence.c 2001/09/20 17:02:03 1.20 @@ -294,7 +294,8 @@ cli(); while (rtx_count && (resend_cnt !=3D txseq)) { sti(); - printk(__FUNCTION__" : seq_nbr:%d, last_ack:%d, cur_seq:%d\n\n", resend_= cnt, rxack, txseq); + D(__FUNCTION__ ": seq_nbr:%d, last_ack:%d, cur_seq:%d\n", + resend_cnt, rxack, txseq); =20=09=09 bcsp_init_packet(&bcsp); =20=09=09 |
From: Peter K. <pk...@us...> - 2001-09-20 14:58:37
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.h 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added declaration of csr_pskey(). The diff of the modified file(s): --- bt_vendor.h 2001/09/06 16:16:26 1.8 +++ bt_vendor.h 2001/09/20 14:58:36 1.9 @@ -73,4 +73,7 @@ void csr_bcsp_to_h4(int bt_cfd, int phys_fd, int speed); void csr_h4_to_bcsp(int bt_cfd, int phys_fd, int speed); =20 +void csr_pskey(int bt_cfd, unsigned short ps_key, unsigned short rw_mode,= =20 + unsigned short *ps_vals, unsigned short n_pars); + #endif /* __BT_VENDOR_H__*/ |
From: Peter K. <pk...@us...> - 2001-09-20 10:11:10
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.197 1.198=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Do not check the pid when unregistering ttyBTC. The diff of the modified file(s): --- bluetooth.c 2001/09/13 15:53:38 1.197 +++ bluetooth.c 2001/09/20 10:11:08 1.198 @@ -2933,11 +2933,8 @@ if (line =3D=3D BT_NBR_PORTS-BT_NBR_CTRLPORTS) { if (--NBR_CTRL_FDS !=3D 0) return 0; /* still more open fd:s on ttyBTC */ - } - - /* Check that the pid closing is the one that opened the tty */ - if (current->pid !=3D bt_ctrl.session[line].pid) - { + } else if (current->pid !=3D bt_ctrl.session[line].pid) { + /* The pid closing the tty is not the one that opened it */ BT_DRIVER(__FUNCTION__ ": Invalid pid\n"); return -1; } |
From: Peter K. <pk...@us...> - 2001-09-19 15:11:29
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btdebug.h 1.40 1.41=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Minor beauty fixes to D_ERR() and D_WARN(). The diff of the modified file(s): --- btdebug.h 2001/08/27 15:26:41 1.40 +++ btdebug.h 2001/09/19 15:11:28 1.41 @@ -56,7 +56,7 @@ =20 /* Always defined */ #define D_ERR(fmt...) printk(BT_SYS_STR"ERROR :" fmt) -#define D_WARN(fmt...) printk(BT_SYS_STR"warning :" fmt) +#define D_WARN(fmt...) printk(BT_SYS_STR "Warning: " fmt) =20 /***************** Over all debug and system print outs ******************= ****/ =20 |
From: Peter K. <pk...@us...> - 2001-09-19 12:34:34
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- sysdep-2.1.h 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected copy-paste error in cpu_to_le32s() and cpu_to_be32s(). The diff of the modified file(s): --- sysdep-2.1.h 2000/04/07 18:50:41 1.1 +++ sysdep-2.1.h 2001/09/19 12:34:33 1.2 @@ -199,9 +199,9 @@ # define cpu_to_be32p(addr) (cpu_to_be32(*(addr))) =20 extern inline void cpu_to_le16s(__u16 *a) {*a =3D cpu_to_le16(*a);} - extern inline void cpu_to_le32s(__u16 *a) {*a =3D cpu_to_le32(*a);} + extern inline void cpu_to_le32s(__u32 *a) {*a =3D cpu_to_le32(*a);} extern inline void cpu_to_be16s(__u16 *a) {*a =3D cpu_to_be16(*a);} - extern inline void cpu_to_be32s(__u16 *a) {*a =3D cpu_to_be32(*a);} + extern inline void cpu_to_be32s(__u32 *a) {*a =3D cpu_to_be32(*a);} =20 # define le16_to_cpup(x) cpu_to_le16p(x) # define le32_to_cpup(x) cpu_to_le32p(x) |
From: Peter K. <pk...@us...> - 2001-09-19 10:16:28
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- sdp.c 1.78 1.79=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Removed unused typedefs attr_id, uuid_struct and attr_struct. * Removed packed attribute from database_query again. The diff of the modified file(s): --- sdp.c 2001/09/18 08:32:50 1.78 +++ sdp.c 2001/09/19 10:16:27 1.79 @@ -138,22 +138,6 @@ =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 -typedef struct attr_id { - u32 size:3; /* Least significant comes first in struct */ - u32 type:5; - u8 data[0]; -} attr_id; - -typedef struct uuid_struct { - u32 len; - u8 *uuid; -} uuid_struct; - -typedef struct attr_struct { - u8 range; - u8 *attr; -} attr_struct; - /****************** LOCAL FUNCTION DECLARATION SECTION *******************= ***/ =20 static sdp_con* get_free_sdp_con(void); @@ -299,7 +283,7 @@ struct database_query { u32 count; u8 query[256]; -} __attribute__ ((packed)) database_query; +} database_query; =20 sdp_con sdp_con_list[MAX_NBR_SDP]; =20 |
From: Peter K. <pk...@us...> - 2001-09-19 09:49:17
|
The following file was modified in apps/bluetooth/sdp_server: Name Old version New version Comment ---- ----------- ----------- ------- sdp_parser.h 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added the packed attribute to the data_struct struct. The diff of the modified file(s): --- sdp_parser.h 2001/06/14 10:30:42 1.6 +++ sdp_parser.h 2001/09/19 09:49:16 1.7 @@ -91,7 +91,7 @@ unsigned short sdp_con_id; unsigned short len; unsigned char data[0]; -} data_struct; +} __attribute__ ((packed)) data_struct; =20 /****************** EXPORTED FUNCTION DECLARATION SECTION ****************= ***/ =20 |
From: Peter K. <pk...@us...> - 2001-09-18 13:04:27
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_datagram.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_integrity.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_mux.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_sequence.c 1.18 1.19=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_slip.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected user mode includes. The diff of the modified file(s): --- bcsp.c 2001/09/18 12:10:49 1.20 +++ bcsp.c 2001/09/18 13:04:27 1.21 @@ -64,11 +64,11 @@ =20 #include <asm/unaligned.h> =20 -#include "btcommon.h" -#include "bluetooth.h" -#include "hci.h" -#include "bcsp.h" -#include "bcsp_debug.h" +#include "include/btcommon.h" +#include "include/bluetooth.h" +#include "include/hci.h" +#include "include/bcsp.h" +#include "include/bcsp_debug.h" #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ --- bcsp_datagram.c 2001/08/16 13:01:22 1.9 +++ bcsp_datagram.c 2001/09/18 13:04:27 1.10 @@ -57,9 +57,9 @@ #else #include <asm/unaligned.h> =20 -#include "btcommon.h" -#include "bcsp.h" -#include "bcsp_debug.h" +#include "include/btcommon.h" +#include "include/bcsp.h" +#include "include/bcsp_debug.h" #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ --- bcsp_integrity.c 2001/08/16 13:01:22 1.7 +++ bcsp_integrity.c 2001/09/18 13:04:27 1.8 @@ -55,9 +55,9 @@ #else #include <asm/unaligned.h> =20 -#include "btcommon.h" -#include "bcsp.h" -#include "bcsp_debug.h" +#include "include/btcommon.h" +#include "include/bcsp.h" +#include "include/bcsp_debug.h" #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ --- bcsp_mux.c 2001/08/16 13:01:22 1.9 +++ bcsp_mux.c 2001/09/18 13:04:27 1.10 @@ -49,8 +49,8 @@ #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> #else -#include "bcsp.h" -#include "bcsp_debug.h" +#include "include/bcsp.h" +#include "include/bcsp_debug.h" #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ --- bcsp_sequence.c 2001/09/18 12:20:17 1.18 +++ bcsp_sequence.c 2001/09/18 13:04:27 1.19 @@ -56,10 +56,10 @@ #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" +#include "include/btmem.h" +#include "include/hci.h" +#include "include/bcsp.h" +#include "include/bcsp_debug.h" #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ --- bcsp_slip.c 2001/09/18 12:10:49 1.7 +++ bcsp_slip.c 2001/09/18 13:04:27 1.8 @@ -54,10 +54,10 @@ #include <stdlib.h> #include <errno.h> =20 -#include "btcommon.h" -#include "btmem.h" -#include "bcsp.h" -#include "bcsp_debug.h" +#include "include/btcommon.h" +#include "include/btmem.h" +#include "include/bcsp.h" +#include "include/bcsp_debug.h" #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ |
From: Peter K. <pk...@us...> - 2001-09-18 12:59:49
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.118 1.119=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Removed some unused code, and cleaned-up a little. The diff of the modified file(s): --- rfcomm.c 2001/08/02 16:03:28 1.118 +++ rfcomm.c 2001/09/18 12:59:47 1.119 @@ -102,11 +102,6 @@ =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 -#define GET_BIT(pos,bitfield) ((bitfield[(pos)/32]) & (1 << ((pos) % 32))) -#define SET_BIT(pos,bitfield) ((bitfield[(pos)/32]) |=3D (1 << ((pos) % 32= )))=20 -#define CLR_BIT(pos,bitfield) ((bitfield[(pos)/32]) &=3D ((1 << ((pos) % 3= 2)) \ - ^ (~0))) - #define SET_PF(ctr) ((ctr) | (1 << 4))=20 /* Sets the P/F-bit in the control field */ #define CLR_PF(ctr) ((ctr) & 0xef) @@ -168,6 +163,8 @@ #define swap_mcc_long_frame(x) (swap_long_frame(x)) #define swap_pn_msg(x) ((x)->frame_size =3D le16_to_cpu((x)->frame_size)) =20 +#define RFCOMM_CON_TIMEOUT (5*HZ) + /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 /* Typedefinitions of stuctures used for creating and parsing packets, for= a @@ -249,7 +246,7 @@ u8 value[0]; } __attribute__ ((packed)) mcc_long_frame; =20 -/* MSC-command */ +/* MSC command */ typedef struct v24_signals { u8 ea:1; u8 fc:1; @@ -277,59 +274,7 @@ u8 fcs; } __attribute__ ((packed)) msc_msg; =20 -#if 0 /* RPN command */ -#define B2400 0 -#define B4800 1 -#define B7200 2 -#define B9600 3 -#define B19200 4 -#define B38400 5 -#define B57600 6 -#define B115200 7 -#define D230400 8 - -#endif - -#if 0 /* Temporary moved to rfcomm.h during the UnPlugFest */ -typedef struct parameter_mask { - u8 bit_rate:1; - u8 data_bits:1; - u8 stop_bit:1; - u8 parity:1; - u8 parity_type:1; - u8 xon_u8:1; - u8 xoff_u8:1; - u8 res1:1; - u8 xon_input:1; - u8 xon_output:1; - u8 rtr_input:1; - u8 rtr_output:1; - u8 rtc_input:1; - u8 rtc_output:1; - u8 res2:2; -} parameter_mask; - -typedef struct rpn_values { - u8 bit_rate; - u8 data_bits:2; - u8 stop_bit:1; - u8 parity:1; - u8 parity_type:2; - u8 res1:2; - u8 xon_input:1; - u8 xon_output:1; - u8 rtr_input:1; - u8 rtr_output:1; - u8 rtc_input:1; - u8 rtc_output:1; - u8 res2:2; - u8 xon_u8; - u8 xoff_u8; - parameter_mask pm; -} rpn_values; -#endif - typedef struct rpn_msg { short_frame_head s_head; mcc_short_frame_head mcc_s_head; @@ -338,7 +283,7 @@ u8 fcs; } __attribute__ ((packed)) rpn_msg; =20 -/* RLS-command */=20=20 +/* RLS command */=20=20 typedef struct rls_msg { short_frame_head s_head; mcc_short_frame_head mcc_s_head; @@ -348,7 +293,7 @@ u8 fcs; } __attribute__ ((packed)) rls_msg; =20 -/* PN-command */ +/* PN command */ typedef struct pn_msg { short_frame_head s_head; mcc_short_frame_head mcc_s_head; @@ -360,7 +305,7 @@ u8 prior:6; u8 res2:2; u8 ack_timer; - u32 frame_size:16; + u16 frame_size; u8 max_nbrof_retrans; u8 credits; u8 fcs; @@ -419,6 +364,7 @@ u8 data[0]; } __attribute__ ((packed)) long_frame; =20 +/* Typedefinitions for structures used for the multiplexer commands */ typedef struct mcc_type {=20 u8 type:6; u8 cr:1; @@ -447,6 +393,7 @@ u8 value[0]; } __attribute__ ((packed)) mcc_long_frame; =20 +/* MSC command */ typedef struct v24_signals {=20 u8 dv:1; u8 ic:1; @@ -474,6 +421,7 @@ u8 fcs; } __attribute__ ((packed)) msc_msg; =20 +/* RPN command */ typedef struct rpn_msg {=20 short_frame_head s_head; mcc_short_frame_head mcc_s_head; @@ -482,6 +430,7 @@ u8 fcs; } __attribute__ ((packed)) rpn_msg; =20 +/* RLS command */=20=20 typedef struct rls_msg {=20 short_frame_head s_head; mcc_short_frame_head mcc_s_head; @@ -491,9 +440,11 @@ u8 fcs; } __attribute__ ((packed)) rls_msg; =20 +/* PN command */ typedef struct pn_msg {=20 short_frame_head s_head; mcc_short_frame_head mcc_s_head; +/* The res1, res2 and res3 values have to be set to 0 by the sender */ u8 res1:2; u8 dlci:6; u8 credit_flow:4; @@ -501,12 +452,13 @@ u8 res2:2; u8 prior:6; u8 ack_timer; - u32 frame_size:16; + u16 frame_size; u8 max_nbrof_retrans; u8 credits; u8 fcs; } __attribute__ ((packed)) pn_msg; =20 +/* NSC-command */ typedef struct nsc_msg {=20 short_frame_head s_head; mcc_short_frame_head mcc_s_head; @@ -550,7 +502,6 @@ #ifdef __KERNEL__ static struct timer_list rfcomm_timer; #endif -#define RFCOMM_CON_TIMEOUT (5*HZ) =20 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) static struct wait_queue *rfcomm_disconnect_wq =3D NULL; @@ -558,9 +509,6 @@ static wait_queue_head_t rfcomm_disconnect_wq; #endif /* LINUX_VERSION_CODE */ =20 - -void send_send_data(unsigned long ptr); - rpn_values rpn_val; =20 /****************** FUNCTION DEFINITION SECTION **************************= ***/ @@ -1641,12 +1589,12 @@ D_CTRL(FNC"Local credits:%d\n", rfcomm->dlci[tmp_dlci].local_credits);= =20 rfcomm->dlci[tmp_dlci].remote_credits =3D START_CREDITS; D_CTRL(FNC"Remote credits: %d\n",rfcomm->dlci[tmp_dlci].remote_credits= ); - send_pn_msg(rfcomm, pn_pkt->prior, frame_size - , credit ^ 1, MAX_CREDITS,=20 + send_pn_msg(rfcomm, pn_pkt->prior, frame_size, + credit ^ 1, MAX_CREDITS,=20 tmp_dlci, MCC_RSP); } else { - send_pn_msg(rfcomm, pn_pkt->prior, frame_size - , 0, 0, tmp_dlci, MCC_RSP); + send_pn_msg(rfcomm, pn_pkt->prior, frame_size, + 0, 0, tmp_dlci, MCC_RSP); } rfcomm->dlci[tmp_dlci].mtu =3D frame_size; D_CTRL(FNC"process_mcc : mtu set to %d\n",=20 @@ -1759,6 +1707,7 @@ tx_buf->cur_len =3D rfcomm_frame_size; =20=20=20 dm_pkt =3D (short_frame*) (tx_buf->data + sizeof(rfcomm_tx_buf)); + /* Always one in the address field */ dm_pkt->h.addr.ea =3D 1; /* If we are the responder the cr bit should be set in a response */ @@ -2045,6 +1994,7 @@ } =20=09=09 tx_buf->cur_len =3D rfcomm_frame_size; + uih_pkt =3D (long_frame*) (tx_buf->data + sizeof(rfcomm_tx_buf)); =20=20=20=20=20 set_uih_hdr((short_frame*) uih_pkt, CTRL_CHAN, len + |
From: Peter K. <pk...@us...> - 2001-09-18 12:22:01
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.53 1.54=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use GET_BITS() and SET_BITS() instead of using bitfields for the descriptor byte in CSR messages. The diff of the modified file(s): --- hci_vendor.c 2001/09/18 08:32:50 1.53 +++ hci_vendor.c 2001/09/18 12:22:00 1.54 @@ -463,16 +463,18 @@ #define CSR_VARID_PACKET_STAT_REPORT 0x1001 #define CSR_VARID_BITERR_REPORT 0x1006 =20 -typedef struct payload_descr -{ - u8 ch_id:6; - u8 first:1; - u8 last:1; -} __attribute__ ((packed)) payload_descr; +#define CSR_GET_CH_ID(msg) GET_BITS((msg)->descr, 0, 6) +#define CSR_SET_CH_ID(msg, id) SET_BITS((msg)->descr, 0, 6, id) =20 +#define CSR_GET_FIRST(msg) GET_BITS((msg)->descr, 6, 1) +#define CSR_SET_FIRST(msg, x) SET_BITS((msg)->descr, 6, 1, (x) !=3D 0) + +#define CSR_GET_LAST(msg) GET_BITS((msg)->descr, 7, 1) +#define CSR_SET_LAST(msg, x) SET_BITS((msg)->descr, 7, 1, (x) !=3D 0) + typedef struct csr_msg { - payload_descr p_descr; + u8 descr; u8 msg[0]; } __attribute__ ((packed)) csr_msg; =20 @@ -761,9 +763,9 @@ msg =3D (csr_msg *)c_pkt.data; =20=09 /* General msg header */ - msg->p_descr.last =3D 1; /* first and last segment */ - msg->p_descr.first =3D 1; - msg->p_descr.ch_id =3D CSR_CH_ID_HQ; + CSR_SET_LAST(msg, 1); /* first and last segment */ + CSR_SET_FIRST(msg, 1); + CSR_SET_CH_ID(msg, CSR_CH_ID_HQ); =20 memcpy(msg->msg, cmd, cmd->len * 2); =20 @@ -816,9 +818,9 @@ ps =3D (csr_bccmd_ps *)cmd->payload; =20 /* General msg header */ - msg->p_descr.last =3D 1; /* first and last segment */ - msg->p_descr.first =3D 1; - msg->p_descr.ch_id =3D CSR_CH_ID_BCCMD; + CSR_SET_LAST(msg, 1); /* first and last segment */ + CSR_SET_FIRST(msg, 1); + CSR_SET_CH_ID(msg, CSR_CH_ID_BCCMD); =20 /* BCCMD type */ =20 @@ -871,9 +873,9 @@ ps =3D (csr_bccmd_ps *)cmd->payload; =20 /* General msg header */ - msg->p_descr.last =3D 1; /* first and last segment */ - msg->p_descr.first =3D 1; - msg->p_descr.ch_id =3D CSR_CH_ID_BCCMD; + CSR_SET_LAST(msg, 1); /* first and last segment */ + CSR_SET_FIRST(msg, 1); + CSR_SET_CH_ID(msg, CSR_CH_ID_BCCMD); =20 /* BCCMD type */ cmd->type =3D CSR_MSGTYPE_SETREQ; @@ -915,9 +917,9 @@ ps =3D (csr_bccmd_ps *)cmd->payload; =20 /* General msg header */ - msg->p_descr.last =3D 1; /* first and last segment */ - msg->p_descr.first =3D 1; - msg->p_descr.ch_id =3D CSR_CH_ID_BCCMD; + CSR_SET_LAST(msg, 1); /* first and last segment */ + CSR_SET_FIRST(msg, 1); + CSR_SET_CH_ID(msg, CSR_CH_ID_BCCMD); =20 /* BCCMD type */ cmd->type =3D CSR_MSGTYPE_SETREQ; @@ -962,9 +964,9 @@ cmd =3D (csr_bccmd *)msg->msg; =20 /* General msg header */ - msg->p_descr.last =3D 1; /* first and last segment */ - msg->p_descr.first =3D 1; - msg->p_descr.ch_id =3D CSR_CH_ID_BCCMD; + CSR_SET_LAST(msg, 1); /* first and last segment */ + CSR_SET_FIRST(msg, 1); + CSR_SET_CH_ID(msg, CSR_CH_ID_BCCMD); =20 /* BCCMD type */ cmd->type =3D CSR_MSGTYPE_GETREQ; @@ -1044,9 +1046,9 @@ ps =3D (csr_bccmd_ps *)cmd->payload; =20 /* General msg header */ - msg->p_descr.last =3D 1; /* first and last segment */ - msg->p_descr.first =3D 1; - msg->p_descr.ch_id =3D CSR_CH_ID_BCCMD; + CSR_SET_LAST(msg, 1); /* first and last segment */ + CSR_SET_FIRST(msg, 1); + CSR_SET_CH_ID(msg, CSR_CH_ID_BCCMD); =20 cmd->type =3D CSR_MSGTYPE_SETREQ; cmd->len =3D 5 + 4; @@ -1100,7 +1102,7 @@ cmd =3D (struct csr_bccmd *)msg->msg; ps =3D (struct csr_bccmd_ps *)cmd->payload; =20 - switch (msg->p_descr.ch_id) { + switch (CSR_GET_CH_ID(msg)) { case CSR_CH_ID_BCCMD: if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP && cmd->status =3D=3D CSR_STATUS_OK) { @@ -1176,12 +1178,12 @@ =20 #ifdef VERBOSE printk("msg: last: %d, first: %d, chID: %d\n",=20 - msg->p_descr.last, msg->p_descr.first, msg->p_descr.ch_id); + CSR_GET_LAST(msg), CSR_GET_FIRST(msg), CSR_GET_CH_ID(msg)); =20 printk("cmd: type: 0x%04X, msg_len: %d, seq_nbr: %d, varid: 0x%04X, statu= s: 0x%04X\n", cmd->type, cmd->len, cmd->seq, cmd->var_id, cmd->status); =20 - switch (msg->p_descr.ch_id) { + switch (CSR_GET_CH_ID(msg)) { case CSR_CH_ID_BCCMD: printk("BCCMD MSG\n"); =20 |
From: Peter K. <pk...@us...> - 2001-09-18 12:20:17
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_sequence.c 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Fixed a compiler warning. The diff of the modified file(s): --- bcsp_sequence.c 2001/08/16 13:01:22 1.17 +++ bcsp_sequence.c 2001/09/18 12:20:17 1.18 @@ -184,11 +184,11 @@ } else { /* out of order rx seq nbr */=20 if ((winspace > 0) && (hci_trig_send())) { /* ack is piggybacked in next tx data packet */ - printk("seq out-of-order [exp:%d, got:%d]\n",=20 + printk("seq out-of-order [exp:%d, got:%ld]\n",=20 expected_rxseq, BCSP_GET_SEQ(bcsp)); =20 } else { - printk("seq out-of-order [exp:%d, got:%d], send ack\n", + printk("seq out-of-order [exp:%d, got:%ld], send ack\n", expected_rxseq, BCSP_GET_SEQ(bcsp)); send_ack(); } |
From: Peter K. <pk...@us...> - 2001-09-18 12:19:54
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.h 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Make BCSP_GET_*() and BCSP_SET_*() use GET_BITS() and SET_BITS(). The diff of the modified file(s): --- bcsp.h 2001/09/18 12:10:49 1.10 +++ bcsp.h 2001/09/18 12:19:53 1.11 @@ -46,8 +46,10 @@ =20 #ifdef __KERNEL__ #include <linux/types.h> +#include <linux/bluetooth/btcommon.h> #else #include "local.h" +#include "include/btcommon.h" #endif =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ @@ -73,11 +75,6 @@ #define CONF 0xEDACEFAD #define CONF_RSP 0xD0D0ADDE =20 -#define BCSP_FLAG_SEQ 0x07 -#define BCSP_FLAG_ACK 0x38 -#define BCSP_FLAG_CRC 0x40 -#define BCSP_FLAG_TYPE 0x80 - #define BCSP_CRC_NOT_PRESENT 0 #define BCSP_CRC_PRESENT 1 =20 @@ -90,18 +87,18 @@ #define ERR_CHECKSUM 1 #define ERR_PAYLOAD_LENGTH 2 =20 -#define BCSP_GET_SEQ(bcsp) ((bcsp)->flags & BCSP_FLAG_SEQ) -#define BCSP_SET_SEQ(bcsp, x) do { (bcsp)->flags =3D ((bcsp)->fl= ags & ~BCSP_FLAG_SEQ) | ((x) & BCSP_FLAG_SEQ); } while (0) -#define BCSP_GET_ACK(bcsp) (((bcsp)->flags & BCSP_FLAG_ACK) >= > 3) -#define BCSP_SET_ACK(bcsp, x) do { (bcsp)->flags =3D ((((x) & 0x= 7) << 3) | ((bcsp)->flags & 0xc7)); } while (0) -#define BCSP_GET_CRC_PRESENT(bcsp) ((bcsp)->flags & BCSP_FLAG_CRC ? B= CSP_CRC_PRESENT : BCSP_CRC_NOT_PRESENT) -#define BCSP_SET_CRC_PRESENT(bcsp, x) do { ; } while (0) -#define BCSP_GET_PROTOCOL_TYPE(bcsp) ((bcsp)->flags & BCSP_FLAG_TYPE ? = BCSP_RELIABLE : BCSP_UNRELIABLE) -#define BCSP_SET_PROTOCOL_TYPE(bcsp, x) do {(bcsp)->flags =3D ((bcsp)->fla= gs & 0x7f) | ((x & 0x1) << 7); } while (0) +#define BCSP_GET_SEQ(bcsp) GET_BITS((bcsp)->flags, 0, 3) +#define BCSP_SET_SEQ(bcsp, x) SET_BITS((bcsp)->flags, 0, 3, x) +#define BCSP_GET_ACK(bcsp) GET_BITS((bcsp)->flags, 3, 3) +#define BCSP_SET_ACK(bcsp, x) SET_BITS((bcsp)->flags, 3, 3, x) +#define BCSP_GET_CRC_PRESENT(bcsp) (GET_BITS((bcsp)->flags, 6, 1) ? B= CSP_CRC_PRESENT : BCSP_CRC_NOT_PRESENT) +#define BCSP_SET_CRC_PRESENT(bcsp, x) SET_BITS((bcsp)->flags, 6, 1, x) +#define BCSP_GET_PROTOCOL_TYPE(bcsp) (GET_BITS((bcsp)->flags, 7, 1) ? B= CSP_RELIABLE : BCSP_UNRELIABLE) +#define BCSP_SET_PROTOCOL_TYPE(bcsp, x) SET_BITS((bcsp)->flags, 7, 1, x) =20 #define BCSP_GET_FLAGS(bcsp) ((bcsp)->packet[0]) -#define BCSP_GET_IDENTIFIER(bcsp) ((bcsp)->packet[1] & 0x0f)=20 -#define BCSP_GET_PAYLOAD_LENGTH(bcsp) (((bcsp)->packet[2] << 4) | (((bcsp)= ->packet[1] >> 4) & 0xff)) +#define BCSP_GET_IDENTIFIER(bcsp) ((bcsp)->packet[1] & 0x0F)=20 +#define BCSP_GET_PAYLOAD_LENGTH(bcsp) (((bcsp)->packet[2] << 4) | (((bcsp)= ->packet[1] >> 4) & 0xFF)) #define BCSP_GET_CHECKSUM(bcsp) ((bcsp)->packet[3]) =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ |
From: Peter K. <pk...@us...> - 2001-09-18 12:14:35
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btcommon.h 1.83 1.84=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added GET_BITS() and SET_BITS() to get and set a number of bits from a variable. The diff of the modified file(s): --- btcommon.h 2001/09/10 10:16:22 1.83 +++ btcommon.h 2001/09/18 12:14:35 1.84 @@ -85,12 +85,20 @@ #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b)) =20 +#define GET_BITS(var, bit, bits) (((var) >> (bit)) & ((1UL << (bits)) - 1)) +#define SET_BITS(var, bit, bits, x) \ + do { \ + (var) =3D ((var) & ~(((1UL << (bits)) - 1) << (bit))) | \ + (((x) & ((1UL << (bits)) - 1)) << (bit)); \ + } while (0) + #define CHAR2INT10(c1,c0) (((u32)((c1) & 0x03) << 8) + (u32)((c0) & 0xff)) #define CHAR2INT12(c1,c0) (((u32)((c1) & 0x0f) << 8) + (u32)((c0) & 0xff)) #define CHAR2INT16(c1,c0) (((u32)((c1) & 0xff) << 8) + (u32)((c0) & 0xff)) #define CHAR2INT32(c3,c2,c1,c0) (((u32)((c3) & 0xff) << 24) + \ ((u32)((c2) & 0xff) << 16) + \ ((u32)((c1) & 0xff) << 8) + (u32)((c0) &0xff)) + /* extract line number from tty */ #define GET_TTYLINE(tty) (MINOR(tty->device) - tty->driver.minor_start) =20 |
From: Peter K. <pk...@us...> - 2001-09-18 12:11:20
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20 bcsp_slip.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Made bcsp_slip_receive() call bcsp_integrity_receive() instead of having bcsp_receive_lower() do it. * Moved bcsp_dbg() to bcsp_slip.c and renamed it to slip_debug(). Previously there was a chance of it displaying incorrect seq and ack values for outgoing packets (as it used the slip encoded values). The diff of the modified file(s): --- bcsp.c 2001/09/07 12:53:24 1.19 +++ bcsp.c 2001/09/18 12:10:49 1.20 @@ -56,7 +56,6 @@ #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> #else @@ -68,7 +67,6 @@ #include "btcommon.h" #include "bluetooth.h" #include "hci.h" -#include "btmem.h" #include "bcsp.h" #include "bcsp_debug.h" #endif @@ -235,56 +233,18 @@ return 0; } =20 -#if BCSP_PARSELOWER - -/* - * Used to parse headers of sent/incoming BCSP packets - * Also prints other potentially interesting stats=20 - */ - -void -bcsp_dbg(const u8 *str, u8 flags, u32 tot_len) -{ -#include <linux/bluetooth/hci_internal.h> - extern hci_controller hci_ctrl; - extern u8 winspace; - extern u8 txseq; - extern u8 txack; - extern u8 rxack; - extern u8 expected_rxseq; - - printk("%s | seq:%d | ack:%d | winsize:%d | acl:%d | bufc:%d [%d]\n", - str, (flags&BCSP_FLAG_SEQ),=20 - (flags&BCSP_FLAG_ACK) >> 3,=20 - winspace, hci_ctrl.hc_buf.acl_num, buf_byte_count(-1), tot_len); - - printk("status: txseq[%d] txack[%d] cur_rxack[%d] exp_rxseq[%d]\n\n",=20 - txseq, txack, rxack, expected_rxseq); -} -#endif - s32 bcsp_receive_lower(u8 *data, u32 len) { s32 handled =3D 0; - struct bcsp bcsp; =20 D(__FUNCTION__ ": Incoming data:\n"); =20 BCSPDUMP(data, len); =20 while (handled < len) { - bcsp_init_packet(&bcsp); - handled +=3D bcsp_slip_receive(&bcsp, data + handled,=20 - len - handled); + handled +=3D bcsp_slip_receive(data + handled, len - handled); D(__FUNCTION__ ": So far handled: %d bytes\n", handled); - if (bcsp.packet) { -#if BCSP_PARSELOWER - bcsp_dbg("=3D=3D> ", bcsp.packet[0], bcsp.packet_length); -#endif - bcsp_integrity_receive(&bcsp); - kfree(bcsp.packet); - } } return 0; } @@ -325,9 +285,6 @@ =20 BCSPDUMP(data, len); =20 -#if BCSP_PARSELOWER - bcsp_dbg("<-- ", data[1], len); -#endif=20 return bt_write_lower_driver_real(data, len); } =20 --- bcsp_slip.c 2001/08/16 13:01:22 1.6 +++ bcsp_slip.c 2001/09/18 12:10:49 1.7 @@ -46,6 +46,8 @@ #ifdef __KERNEL__ #include <linux/malloc.h> =20 +#include <linux/bluetooth/btcommon.h> +#include <linux/bluetooth/btmem.h> #include <linux/bluetooth/bcsp.h> #include <linux/bluetooth/bcsp_debug.h> #else @@ -53,6 +55,7 @@ #include <errno.h> =20 #include "btcommon.h" +#include "btmem.h" #include "bcsp.h" #include "bcsp_debug.h" #endif @@ -73,6 +76,10 @@ =20 static void slip_send_add_byte(struct bcsp* bcsp, u8 data); =20 +#if BCSP_PARSELOWER +static void slip_debug(const u8 *str, const struct bcsp *bcsp); +#endif + /****************** GLOBAL VARIABLE DECLARATION SECTION ******************= ***/ =20 /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ @@ -114,6 +121,10 @@ =20 bcsp->packet[bcsp->packet_length++] =3D 0xC0; =20 +#if BCSP_PARSELOWER + slip_debug("<=3D=3D ", bcsp); +#endif=20 + bcsp_write_lower(bcsp->packet, bcsp->packet_length); kfree(bcsp->packet); =20 @@ -121,15 +132,18 @@ } =20 s32 -bcsp_slip_receive(struct bcsp* bcsp, const u8* packet, u32 len) +bcsp_slip_receive(const u8* packet, u32 len) { static u8 buffer[4 + 4096 + 2 + 1]; static s32 length =3D 0; static s32 skipping =3D TRUE; + struct bcsp bcsp; s32 i =3D 0; =20 D(__FUNCTION__ "\n"); =20=09 + bcsp_init_packet(&bcsp); +=09 if (skipping) { while (i < len) { if (packet[i++] =3D=3D 0xC0) { @@ -139,7 +153,7 @@ } } =20 - bcsp->packet =3D NULL; + bcsp.packet =3D NULL; } =20 for (; i < len && !skipping; i++) { @@ -149,9 +163,9 @@ if (!length) { i--; } - else if ((bcsp->packet =3D kmalloc(length, GFP_ATOMIC))) { - memcpy(bcsp->packet, buffer, length); - bcsp->packet_length =3D length; + else if ((bcsp.packet =3D kmalloc(length, GFP_ATOMIC))) { + memcpy(bcsp.packet, buffer, length); + bcsp.packet_length =3D length; } break; =20 @@ -181,6 +195,14 @@ } } =20 + if (bcsp.packet) { +#if BCSP_PARSELOWER + slip_debug("=3D=3D> ", &bcsp); +#endif + bcsp_integrity_receive(&bcsp); + kfree(bcsp.packet); + } + return i; } =20 @@ -203,5 +225,34 @@ break; } } + +#if BCSP_PARSELOWER + +/* + * Used to parse headers of sent/incoming BCSP packets + * Also prints other potentially interesting stats=20 + */ + +#include <linux/bluetooth/hci_internal.h> + +void +slip_debug(const u8 *str, const struct bcsp *bcsp) +{ + extern hci_controller hci_ctrl; + extern u8 winspace; + extern u8 txseq; + extern u8 txack; + extern u8 rxack; + extern u8 expected_rxseq; + + printk("%sseq: %ld, ack: %ld, winsize: %d, acl: %d, bufc: %d, length: %d\= n", + str, BCSP_GET_SEQ(bcsp), BCSP_GET_ACK(bcsp), winspace, + hci_ctrl.hc_buf.acl_num, buf_byte_count(-1), + bcsp->packet_length); + + printk("Status: txseq: %d, txack: %d, cur_rxack: %d, exp_rxseq: %d\n", + txseq, txack, rxack, expected_rxseq); +} +#endif =20 /****************** END OF FILE slip.c ***********************************= ***/ |
From: Peter K. <pk...@us...> - 2001-09-18 12:10:49
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.h 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Made bcsp_slip_receive() call bcsp_integrity_receive() instead of having bcsp_receive_lower() do it. * Moved bcsp_dbg() to bcsp_slip.c and renamed it to slip_debug(). Previously there was a chance of it displaying incorrect seq and ack values for outgoing packets (as it used the slip encoded values). The diff of the modified file(s): --- bcsp.h 2001/09/06 15:56:56 1.9 +++ bcsp.h 2001/09/18 12:10:49 1.10 @@ -135,7 +135,7 @@ /************************* functions in slip.c ***************************= ***/ =20 s32 bcsp_slip_send(struct bcsp* bcsp); -s32 bcsp_slip_receive(struct bcsp* bcsp, const u8* packet, u32 len); +s32 bcsp_slip_receive(const u8* packet, u32 len); =20 /************************* functions in integrity.c **********************= ****/ =20 |
From: Peter K. <pk...@us...> - 2001-09-18 12:01:06
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- l2cap_con.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added inclusion of btdebug.h The diff of the modified file(s): --- l2cap_con.c 2001/04/26 13:33:26 1.10 +++ l2cap_con.c 2001/09/18 12:01:05 1.11 @@ -50,14 +50,17 @@ #include <linux/bluetooth/l2cap.h> #include <linux/bluetooth/l2cap_con.h> #include <linux/bluetooth/l2cap_internal.h> +#include <linux/bluetooth/btdebug.h> #else /* user mode */ #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <signal.h> + #include "include/l2cap.h" #include "include/l2cap_con.h" #include "include/l2cap_internal.h" +#include "include/btdebug.h" #endif =20 /****************** DEBUG CONSTANT AND MACRO SECTION *********************= ***/ |
From: Peter K. <pk...@us...> - 2001-09-18 10:48:24
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.h 1.45 1.46=20=20=20=20=20=20=20=20=20=20=20=20 btmem.h 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20 hci.h 1.69 1.70=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added inclusion of linux/config.h The diff of the modified file(s): --- bluetooth.h 2001/09/10 10:16:22 1.45 +++ bluetooth.h 2001/09/18 10:48:22 1.46 @@ -43,6 +43,7 @@ #define BLUETOOTH_H =20 #ifdef __KERNEL__ +#include <linux/config.h> #include <linux/bluetooth/btcommon.h> #else #include "btcommon.h" --- btmem.h 2001/08/17 09:19:00 1.20 +++ btmem.h 2001/09/18 10:48:22 1.21 @@ -45,6 +45,7 @@ /****************** INCLUDE FILES SECTION ********************************= ***/ =20 #ifdef __KERNEL__ +#include <linux/config.h> #include <linux/types.h> #include <linux/bluetooth/btcommon.h> #else --- hci.h 2001/09/10 11:19:57 1.69 +++ hci.h 2001/09/18 10:48:22 1.70 @@ -46,6 +46,7 @@ /****************** INCLUDE FILES SECTION ********************************= ***/ =20 #ifdef __KERNEL__ +#include <linux/config.h> #include <linux/types.h> #include <linux/bluetooth/btcommon.h> #else |
From: Peter K. <pk...@us...> - 2001-09-18 08:32:50
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.52 1.53=20=20=20=20=20=20=20=20=20=20=20=20 sdp.c 1.77 1.78=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added the packed attribute to a couple of structs. The diff of the modified file(s): --- hci_vendor.c 2001/09/07 12:53:24 1.52 +++ hci_vendor.c 2001/09/18 08:32:50 1.53 @@ -468,13 +468,13 @@ u8 ch_id:6; u8 first:1; u8 last:1; -} payload_descr; +} __attribute__ ((packed)) payload_descr; =20 typedef struct csr_msg { payload_descr p_descr; u8 msg[0]; -} csr_msg; +} __attribute__ ((packed)) csr_msg; =20 typedef struct csr_bccmd { @@ -484,7 +484,7 @@ u16 var_id; u16 status; u16 payload[0]; -} csr_bccmd; +} __attribute__ ((packed)) csr_bccmd; =20=20=20 typedef struct csr_bccmd_ps { @@ -492,12 +492,12 @@ u16 ps_len; /* len of only ps_val */ u16 unused; /* always 0x0000 */ u16 ps_val[0]; -} csr_bccmd_ps; +} __attribute__ ((packed)) csr_bccmd_ps; =20 typedef struct csr_rssi_rep {=20=20 u16 rssi; -} csr_rssi_rep; +} __attribute__ ((packed)) csr_rssi_rep; =20 typedef struct csr_packstat_rep {=20=20 @@ -506,14 +506,14 @@ u16 n_corr; u16 rssi; u16 rssi_valid; -} csr_packstat_rep; +} __attribute__ ((packed)) csr_packstat_rep; =20 typedef struct csr_biterr_rep {=20=20 u16 index; u16 val_last; u16 val_tot; -} csr_biterr_rep; +} __attribute__ ((packed)) csr_biterr_rep; =20 static u16 csr_count =3D 0; =20 --- sdp.c 2001/06/14 10:34:53 1.77 +++ sdp.c 2001/09/18 08:32:50 1.78 @@ -294,12 +294,12 @@ u16 sdp_con_id; u16 len; u8 data[0]; -} data_struct; +} __attribute__ ((packed)) data_struct; =20 struct database_query { u32 count; u8 query[256]; -} database_query; +} __attribute__ ((packed)) database_query; =20 sdp_con sdp_con_list[MAX_NBR_SDP]; =20 |
From: Peter K. <pk...@us...> - 2001-09-13 15:53:39
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.196 1.197=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made the BT_SET_DFU_MODE ioctl available even if BCSP is not supported. The diff of the modified file(s): --- bluetooth.c 2001/09/12 13:55:36 1.196 +++ bluetooth.c 2001/09/13 15:53:38 1.197 @@ -1096,6 +1096,15 @@ put_user(tmp, (s32*)arg); return 0; =20 + case BT_SET_DFU_MODE: + GET_USER(tmp, (s32*)arg); + + BT_DRIVER("BT_SET_DFU_MODE: %d\n", tmp); + + tmp =3D bt_dfu_mode(tmp); + put_user(tmp, (s32*)arg); + return 0; + #ifdef CONFIG_BLUETOOTH_CSR /* | ps_key (u16) | rw_mode (u16) | len (u16) | params (u16[])| */ case BT_CSR_PSKEY: @@ -1119,15 +1128,6 @@ printk("Sync failed\n"); return -ETIMEDOUT; } - return 0; - - case BT_SET_DFU_MODE: - GET_USER(tmp, (s32*)arg); - - BT_DRIVER("BT_SET_DFU_MODE: %d\n", tmp); - - tmp =3D bt_dfu_mode(tmp); - put_user(tmp, (s32*)arg); return 0; =20 case BT_SEND_DFU_COMMAND: |