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: Mats F. <ma...@us...> - 2001-07-20 06:41:03
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_mux.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: If it isn't an ack-packet, we shouldn't signal an ack here. Ack sent in dat= a packets are taken care of in the sequence-layer. The diff of the modified file(s): --- bcsp_mux.c 2001/05/30 09:47:00 1.7 +++ bcsp_mux.c 2001/07/20 06:41:00 1.8 @@ -72,10 +72,9 @@ /* If we received an ack packet, we discard the packet, sice the ack has already been handled by signal_rxack */ =20 - bcsp_signal_rxack(BCSP_GET_ACK(bcsp)); -=09 if (bcsp->identifier =3D=3D 0) { D(__FUNCTION__ ": Received ack, returning\n"); + bcsp_signal_rxack(BCSP_GET_ACK(bcsp)); return 0; } =20=09 |
From: Mattias A. <mat...@us...> - 2001-07-18 12:42:31
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.166 1.167=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added 10 ms sleep in hci emulator when running usermode stack to avoid race problems (due to lack of real wait queues) The diff of the modified file(s): --- hci.c 2001/07/17 16:04:10 1.166 +++ hci.c 2001/07/18 12:42:30 1.167 @@ -3541,6 +3541,11 @@ void=20 hci_emulator(u8 *data, u32 len) {=09 +#ifndef __KERNEL__ + /* Add a sleep here to avoid race problems when running=20 + usermode stack (using busy wait 'wait queues') */ + usleep(10000); +#endif if (*data =3D=3D SCO_PKT) { bt_write_lower_driver(data, len); hci_ctrl.hc_buf.sco_num++; |
From: Mattias A. <mat...@us...> - 2001-07-18 10:07:03
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- l2cap.c 1.111 1.112=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added include when compiling for usermode stack The diff of the modified file(s): --- l2cap.c 2001/07/10 12:52:55 1.111 +++ l2cap.c 2001/07/18 10:07:02 1.112 @@ -67,6 +67,7 @@ #include <errno.h> #include "include/l2cap.h" #include "include/hci.h" +#include "include/hci_internal.h" #include "include/l2cap_internal.h" #include "include/l2cap_con.h" #include "include/l2cap_sec.h" |
From: embedded L. <lin...@ho...> - 2001-07-18 09:16:30
|
I am a newbie to axis. My friend and I downloaded the Axis from the site http://sourceforge.net/project/showfiles.php?group_id=1966. Then he installed the Axis successfully using Red hat 6.2. But when I installed it using Redhat 7.1. I faced the problem saying " make[2]:** [hci.o]Error 1 ..." when I use the command make the compile the vertion 0.0.4 or 0.0.5. When I change the make to "make INCLUDEDIR=/usr/src/linux-2.4.2/include" it gives same error. Please help me on it. Thanks in advance. Regards, Xiaoyong _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. |
From: Olov H. <ol...@us...> - 2001-07-10 13:01:36
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btconfig.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added support for max number of BT connections The diff of the modified file(s): --- btconfig.c 2001/06/08 10:17:24 1.4 +++ btconfig.c 2001/07/10 13:01:35 1.5 @@ -77,6 +77,8 @@ #define HOST_NAME_LENGTH 100 #define DOMAIN_NAME_LENGTH 100 #define BUF_MAXSIZE 300 +#define MIN_CONNECTIONS 0 +#define MAX_CONNECTIONS 7 =20 #define CONF_FILE "/etc/bt.conf" =20 @@ -106,6 +108,7 @@ static int var_write_scan_enable =3D -1; /* not yet set */ static int var_force_ms_switch =3D -1; /* not yet set */ static int var_set_local_name =3D 0; +static int var_max_connections =3D -1; /* not yet set */ =20 /* long option list */ static struct option long_options[] =3D @@ -115,6 +118,7 @@ { "force-msswitch", 1, NULL, 'm' }, /* force m/s switch as server */ { "name", 1, NULL, 'n' }, /* set BT friendly name */ { "wrscan-enable", 1, NULL, 'w' }, /* sets write scan enable */ + { "max-connections",1, NULL, 'c' }, /* sets max simultatious connection= s */ { 0, 0, 0, 0 } }; =20 @@ -123,7 +127,7 @@ void show_usage(void) { - printf("Syntax: btconfig [--force-msswitch (0|1)] [--wrscan-enable <mode= >] [--name <name>] [--file <config file>]\n"); + printf("Syntax: btconfig [--force-msswitch (0|1)] [--wrscan-enable <mode= >] [--name <name>] [--file <config file>] [--max-connections (0-7)] \n"); } =20 int @@ -132,12 +136,14 @@ int bt_cfd, opt; int opt_write_scan_enable =3D -1; int opt_force_ms_switch =3D -1; + int opt_max_connections =3D -1; +=20=20 char *opt_name =3D NULL; char *opt_config_file =3D CONF_FILE; =20 /* Parse command line options */ =20 - while ((opt =3D getopt_long(argc, argv, "f:hm:n:w:", + while ((opt =3D getopt_long(argc, argv, "f:hm:n:w:c:", long_options, &option_index)) !=3D -1) { switch (opt) @@ -165,6 +171,11 @@ opt_write_scan_enable =3D atoi(optarg); break; =20 + case 'c': + /* Set max connections */ + opt_max_connections =3D atoi(optarg); + break; +=20=20=20=20=20=20 default: break; } @@ -187,11 +198,15 @@ if (opt_force_ms_switch >=3D 0) var_force_ms_switch =3D opt_force_ms_switch; =20 + if (opt_max_connections >=3D0) + var_max_connections =3D opt_max_connections; +=20=20 /* Configure the stack according to the options specified */ =20=20=20 if (var_set_local_name || var_write_scan_enable >=3D 0 || - var_force_ms_switch >=3D 0) + var_force_ms_switch >=3D 0 || + var_max_connections >=3D0) { /* Open BT ctrl device */=20=20 if ((bt_cfd =3D bt_openctrl()) < 0) @@ -216,6 +231,14 @@ if (var_force_ms_switch >=3D 0) bt_force_msswitch_as_server(bt_cfd, var_force_ms_switch); =20 + /* Configure Max BT connections */ + if (var_max_connections >=3D MIN_CONNECTIONS && var_max_connections <= =3D MAX_CONNECTIONS ) + { + syslog(LOG_INFO, __FUNCTION__": Setting Max BT connections to %d",va= r_max_connections); + bt_set_max_conections(bt_cfd, var_max_connections); + } + else + syslog(LOG_INFO, __FUNCTION__": Max BT connections, %d, out of range= !",var_max_connections); close(bt_cfd); } =20 @@ -430,6 +453,12 @@ var_force_ms_switch =3D !strcasecmp(value, "yes"); D(syslog(LOG_INFO, __FUNCTION__ ": Force M/S switch: %s", (var_force_ms_switch ? "yes" : "no"))); + } +=20=20 + else if (!strcasecmp(field, "MaxBTConnections"))=20=20 + {=20 + var_max_connections =3D atoi(value); + D(syslog(LOG_INFO, __FUNCTION__ ": Maximum BT connections: %s",value)); } =20=20=20 return TRUE; |
From: Olov H. <ol...@us...> - 2001-07-10 13:01:14
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.h 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added support for max number of BT connections The diff of the modified file(s): --- bt_if.h 2001/06/19 10:35:56 1.15 +++ bt_if.h 2001/07/10 13:01:14 1.16 @@ -252,7 +252,7 @@ #define BT_CSR_PSKEY _IOWR(BT_IOC_MAGIC, 0xf5, unsigned short[CSR_PSKEY_MS= GHDR_SIZE + CSR_PSKEY_MAXPARAMS]) =20 #define BTINITBCSP _IO(BT_IOC_MAGIC, 0xf6) - +#define BTSETMAXCONNECTIONS _IOW(BT_IOC_MAGIC, 0xf7, unsigned char) /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ /* Structs */ =20 |
From: Olov H. <ol...@us...> - 2001-07-10 13:01:02
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.21 1.22=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added support for max number of BT connections The diff of the modified file(s): --- bt_if.c 2001/06/19 10:36:45 1.21 +++ bt_if.c 2001/07/10 13:01:02 1.22 @@ -542,6 +542,22 @@ return ret_val; } =20 +int bt_set_max_conections(int bt_cfd, int connections) +{ + int ret_val; + + syslog(LOG_INFO, __FUNCTION__ ": %d", connections); +#ifndef BT_USERSTACK=20 + if ((ret_val =3D ioctl(bt_cfd, BTSETMAXCONNECTIONS, &connections)) < 0) + { + fprintf(stderr, __FUNCTION__ ": %s\n", error_msg(ret_val)); + } +#else + printf(__FUNCTION__": not implemented in userstack mode!\n" +#endif + return ret_val; +} + /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ /* HCI functions */ =20 |
From: Olov H. <ol...@us...> - 2001-07-10 12:57:46
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btcommon.h 1.78 1.79=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added constant to support to max number of BT connections The diff of the modified file(s): --- btcommon.h 2001/06/19 10:34:03 1.78 +++ btcommon.h 2001/07/10 12:57:45 1.79 @@ -191,12 +191,14 @@ =20 #define BTSETBCSPMODE _IOW(BT_IOC_MAGIC, 0xf4, u8) =20 + #define CSR_PSKEY_MSGHDR_SIZE 3 #define CSR_PSKEY_MAXPARAMS 10 =20 #define BT_CSR_PSKEY _IOWR(BT_IOC_MAGIC, 0xf5, u16[CSR_PSKEY_MSGHDR_SIZE = + CSR_PSKEY_MAXPARAMS]) =20 #define BTINITBCSP _IO(BT_IOC_MAGIC, 0xf6) +#define BTSETMAXCONNECTIONS _IOW(BT_IOC_MAGIC, 0xf7, u8) =20 /* | BD(6) | len(2) | data |*/ #define BTPING _IOW(BT_IOC_MAGIC, 0x73, ping_struct) |
From: Olov H. <ol...@us...> - 2001-07-10 12:54:20
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.186 1.187=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added support to set max number of BT connections The diff of the modified file(s): --- bluetooth.c 2001/06/29 10:46:29 1.186 +++ bluetooth.c 2001/07/10 12:54:20 1.187 @@ -1055,6 +1055,20 @@ return 0; } =20 + /* Set max number of connections */ + case BTSETMAXCONNECTIONS : + { + u8 max_connections; + + GET_USER(tmp, (s32*)arg); + + max_connections =3D (u8)(tmp & 0xff); +=09=09 + BT_DRIVER("BTSETMAXCONNECTIONS : %d\n", max_connections); + hci_set_max_connections(max_connections); + return 0; + } + case BTSETBCSPMODE : { u8 enable; |
From: Olov H. <ol...@us...> - 2001-07-10 12:52:56
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- l2cap.c 1.110 1.111=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added support for max number of BT connections The diff of the modified file(s): --- l2cap.c 2001/06/18 12:49:31 1.110 +++ l2cap.c 2001/07/10 12:52:55 1.111 @@ -50,6 +50,7 @@ #include <linux/malloc.h> #include <linux/bluetooth/l2cap.h> #include <linux/bluetooth/hci.h> +#include <linux/bluetooth/hci_internal.h> #include <linux/bluetooth/rfcomm.h> #include <linux/bluetooth/sdp.h> #include <linux/bluetooth/test.h> @@ -254,6 +255,8 @@ static l2cap_layer l2capmain; /* Main structure */ static l2cap_layer* l2cap; static struct protocol_layer default_protocol; +extern int bt_max_connections; +extern hci_controller hci_ctrl; =20 /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20=20=20 @@ -1312,11 +1315,20 @@ =20 /* We are server and creates an l2cap connection object=20 which we set hci handle when we received lp_connect_cfm */ + /* Denying a connection at this state does not allow + SDP queries when max amount of connections is reached*/ =20=20=20 + if (hci_ctrl.nbr_of_connections < bt_max_connections){ D_CON(__FUNCTION__ ": Accepting connection\n"); l2cap_create_con(bd_addr); lp_connect_rsp(bd_addr,1); } + else{ + D_CON(__FUNCTION__ ": Denying connection. Current connections: %d,=20 + max connections: %d\n", bt_connections, bt_max_connections= ); + lp_connect_rsp(bd_addr,0); + } +} =20 /* is called when we accept a _new_ baseband connection */ void=20 |
From: Olov H. <ol...@us...> - 2001-07-10 12:51:56
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.164 1.165=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added support for load factor and max number of BT connections The diff of the modified file(s): --- hci.c 2001/07/06 06:56:08 1.164 +++ hci.c 2001/07/10 12:51:55 1.165 @@ -333,6 +333,11 @@ static s32 force_msswitch =3D 0; static s32 i_am_initiator =3D 0; =20 +/* In order to change load factor, store the other class of device paramet= ers */ +static u8 class_of_device[3]; +/* If maximum BT connections is not set from above, use 7 as default */ +int bt_max_connections =3D 7; + /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 /* @@ -816,7 +821,7 @@ D_CMD(__FUNCTION__ ": CONNECTION_COMPLETE: %s\n", get_err_msg(buf[0])); =20 - hci_ctrl.nbr_of_connections++; + =20 link_type =3D buf[9]; hci_hdl =3D CHAR2INT12(buf[2], buf[1]); @@ -830,7 +835,7 @@ /* remove hci handle if connection failed */ DSYS(__FUNCTION__ ": CONNECTION_COMPLETE %s\n", get_err_msg(buf[0])); - hci_ctrl.nbr_of_connections--; + reset_hci_con_bd(hci_hdl); } else { DSYS(__FUNCTION__ ": ACL link is up\n"); @@ -856,7 +861,8 @@ } /* reset variable again */ i_am_initiator =3D 0; -=09=09=09=09=09=09 + hci_ctrl.nbr_of_connections++; + hci_update_load_factor(); } #endif /* HCI_EMULATION */ =20 @@ -865,6 +871,8 @@ wake_up_interruptible(&test_wq); } } else { + hci_ctrl.nbr_of_connections++; + hci_update_load_factor(); tcs_add_sco_link(buf[0], hci_hdl); } =20=09=09 @@ -889,7 +897,7 @@ connections we can acl_num by reading the buffersizes again, but this will not work in a multipoint connection. */ hci_ctrl.nbr_of_connections--; - + hci_update_load_factor(); reset_hci_con_bd(CHAR2INT12(buf[2], buf[1])); =20=09=09 if (hci_ctrl.nbr_of_connections <=3D 0) { @@ -2660,8 +2668,12 @@ =20 =20 s32 -hci_write_class_of_device(u8 *class_of_device) +hci_write_class_of_device(u8 *class_of_dev) { + class_of_device[0] =3D class_of_dev[0]; + class_of_device[1] =3D class_of_dev[1]; + class_of_device[2] =3D class_of_dev[2]; + D_CMD(__FUNCTION__ ": Service class 0x%02x, major:0x%01x, minor:0x%01x\n"= ,(class_of_device[2] << 3) | (class_of_device[1] >> 5), (class_of_device[1]= & 0x1f), (class_of_device[0] >> 2)); =20 D_CMD(__FUNCTION__ ": %01x:%01x:%01x\n", class_of_device[2], class_of_dev= ice[1], class_of_device[0]); @@ -2676,6 +2688,55 @@ =20=20=20 return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } + + +void hci_set_max_connections(u8 max_connections) +{ + bt_max_connections =3D (int)max_connections; + DSYS("Setting max BT connections to %x\n", bt_max_connections); + hci_update_load_factor(); + +} + + +/* Change the 3-bit load factor (all bits set is max load, all zero is min= load). + * Renew load factor if: Any client is connected, disconnected or if the m= aximum + * amount of simultanious connections is altered.=20 +*/=20 +s32 +hci_update_load_factor() +{ + static unsigned char load; + + /* Makes a rough calculation of the current load */=20 + if ((bt_max_connections =3D=3D hci_ctrl.nbr_of_connections) || (bt_max_co= nnections =3D=3D 0)) + load=3D0x07; + else if (bt_max_connections >=3D 4) + load=3Dhci_ctrl.nbr_of_connections; + else + load=3Dhci_ctrl.nbr_of_connections*2; + + /* Make sure only bit2 to bit0 are used */ + load &=3D 0x07; + + D_CMD(__FUNCTION__ ": Load factor changed from %d to %d \n",( (class_of_d= evice[0] >> 5) & 0x07),load); + + /* Clear bit7 to bit5 for old load factor */ + class_of_device[0] &=3D 0x1F; + + /* Mask in new load factor value */ + class_of_device[0] |=3D (load<<5); + + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(WRITE_CLASS_OF_DEVICE, HCI_HC) ; + c_pkt.data[0] =3D class_of_device[0]; + c_pkt.data[1] =3D class_of_device[1]; + c_pkt.data[2] =3D class_of_device[2]; + c_pkt.len =3D 3; +=20=20 + return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); +} + =20 s32 hci_set_event_filter(u8 *data) |
From: Mats F. <ma...@us...> - 2001-07-09 09:48:38
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.115 1.116=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Increased the number of credits The diff of the modified file(s): --- rfcomm.c 2001/07/06 06:46:54 1.115 +++ rfcomm.c 2001/07/09 09:48:37 1.116 @@ -132,9 +132,9 @@ =20 #define RFCOMM_MAX_HDR_SIZE 5 =20 -#define MAX_CREDITS 20 +#define MAX_CREDITS 30 #define START_CREDITS 7 -#define MIN_CREDITS 3 +#define MIN_CREDITS 15 =20 #define DEF_RFCOMM_MTU 127 =20 |
From: Mats F. <ma...@us...> - 2001-07-06 07:00:08
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp_sequence.c 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Corrected the RTX timeout * Some minor changes The diff of the modified file(s): --- bcsp_sequence.c 2001/06/08 12:46:49 1.13 +++ bcsp_sequence.c 2001/07/06 07:00:07 1.14 @@ -64,6 +64,8 @@ #define WINSIZE 4 #define SEQUENCE_TIMEOUT (HZ/4) /* default 250 ms */ =20 +#define BCSP_RTX_MAX 20 + /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 typedef struct resend_buf { @@ -102,6 +104,8 @@ static u8 winspace; #endif =20 +static u8 rtx_count =3D BCSP_RTX_MAX; + =20 static u32 got_packet =3D FALSE; =20 @@ -152,7 +156,7 @@ sti(); =20 /* FIXME: Do we need to schedule when winsize > 0 ? */ - if ((winspace > 0) && (buf_count())) { + if ((winspace > 0) && buf_count() && (hci_acl_num_cnt() > 0)) { /* ack is piggybacked in next tx data packet */ D("<-data ack\n"); } else { @@ -167,7 +171,9 @@ /* ack is piggybacked in next tx data packet */ printk("seq out-of-order [exp:%d, got:%d]\n",=20 expected_rxseq, BCSP_GET_SEQ(bcsp)); + } else { + s32 i; printk("seq out-of-order [exp:%d, got:%d], send ack\n", expected_rxseq, BCSP_GET_SEQ(bcsp)); send_ack(); @@ -247,6 +253,7 @@ D(__FUNCTION__" win_up:%d\n", winspace); =20 rxack =3D new_ack; + rtx_count =3D BCSP_RTX_MAX; =20 sti(); =20=09 @@ -264,16 +271,14 @@ } } =20 -#define BCSP_RTX_MAX 20 void sequence_resend(void) { struct bcsp bcsp; u8 resend_cnt =3D rxack; - u8 rtx_count =3D BCSP_RTX_MAX; =20=09 cli(); - while ((resend_cnt !=3D txseq) && (rtx_count--)) { + 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); =20=09=09 @@ -295,13 +300,14 @@ }=20=20=20=20=20=20=20 sti(); =20=09 - if (rtx_count =3D=3D 0) - { + rtx_count--; +=09 + if (rtx_count =3D=3D 0) { printk("ERROR : giving up on rtx !\n"); /* fixme -- signal link down etc. */ - } - else + } else { start_resend_timer(); + } } =20 =20 |
From: Mats F. <ma...@us...> - 2001-07-06 06:56:39
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.163 1.164=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * If acl_num =3D=3D 0, we shouldn't schedule in hci_trig_send * Added function to check acl_num, needed in bcsp_sequence The diff of the modified file(s): --- hci.c 2001/07/05 10:52:45 1.163 +++ hci.c 2001/07/06 06:56:08 1.164 @@ -685,7 +685,7 @@ hci_trig_send(void) { #ifdef __KERNEL__ - if (buf_count()) { + if (buf_count() && (hci_ctrl.hc_buf.acl_num > 0)) { #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) queue_task(&send_data_task, &tq_scheduler); #else @@ -702,6 +702,12 @@ #endif } =20 +s32 +hci_acl_num_cnt(void) +{ + return hci_ctrl.hc_buf.acl_num; +} + void update_ncp(u8 nbr_of_hdl, u8 *pkt) { @@ -985,6 +991,7 @@ This must be signalled using lp_connect_cfm (neg) */ D_ERR(__FUNCTION__ ": COMMAND_STATUS: %s\n", get_err_msg(buf[0])); + #ifdef USE_INQTIMER if (hci_inq_pending) release_inq_timer(); @@ -1564,6 +1571,7 @@ break; } } + =20 /*Parses an ACL-data packet and copies it into the hci_in-buffer, data is = a=20 pointer to the data in the memory, pb_flag is the packet boundary flag= =20 |
From: Mats F. <ma...@us...> - 2001-07-06 06:56:09
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.h 1.61 1.62=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * If acl_num =3D=3D 0, we shouldn't schedule in hci_trig_send * Added function to check acl_num, needed in bcsp_sequence The diff of the modified file(s): --- hci.h 2001/06/15 12:31:55 1.61 +++ hci.h 2001/07/06 06:56:08 1.62 @@ -90,7 +90,7 @@ /****************** EXPORTED FUNCTION DECLARATION SECTION ****************= ***/ =20 s32 hci_trig_send(void); - +s32 hci_acl_num_cnt(void); s32 hci_init(void); void hci_shutdown(void); void hci_clear_buffer(u32 con_hdl); |
From: Mats F. <ma...@us...> - 2001-07-06 06:48:56
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected call to buf_byte_cnt() The diff of the modified file(s): --- bcsp.c 2001/06/20 13:46:07 1.15 +++ bcsp.c 2001/07/06 06:48:54 1.16 @@ -244,7 +244,7 @@ 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(), tot_len); + winspace, hci_ctrl.hc_buf.acl_num, buf_byte_count(-1), tot_len); =20 printk("status: txseq[%d] txack[%d] cur_rxack[%d] exp_rxseq[%d]\n\n",=20 txseq, txack, rxack, expected_rxseq); |
From: Mats F. <ma...@us...> - 2001-07-06 06:46:56
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.114 1.115=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Increased the amount of credits The diff of the modified file(s): --- rfcomm.c 2001/06/19 06:13:01 1.114 +++ rfcomm.c 2001/07/06 06:46:54 1.115 @@ -132,7 +132,8 @@ =20 #define RFCOMM_MAX_HDR_SIZE 5 =20 -#define MAX_CREDITS 6 +#define MAX_CREDITS 20 +#define START_CREDITS 7 #define MIN_CREDITS 3 =20 #define DEF_RFCOMM_MTU 127 @@ -1608,11 +1609,11 @@ credit =3D pn_pkt->credit_flow; nbrof_credits =3D pn_pkt->credits;=09=09=09 if (credit) { - D_CTRL(FNC"Using credit flow control, initiating credits are %d on dlc= i %d\n", nbrof_credits, tmp_dlci); + DSYS(FNC"Using credit flow control, initiating credits are %d on dlci = %d\n", nbrof_credits, tmp_dlci); rfcomm->credit_flow =3D TRUE; rfcomm->dlci[tmp_dlci].local_credits =3D nbrof_credits; D_CTRL(FNC"Local credits:%d\n", rfcomm->dlci[tmp_dlci].local_credits);= =20 - rfcomm->dlci[tmp_dlci].remote_credits =3D MAX_CREDITS; + 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 |
From: Peter K. <pk...@us...> - 2001-07-05 21:45:10
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.48 1.49=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made it compile for 2.4.x again (this fix was accidentally removed in the last commit). The diff of the modified file(s): --- hci_vendor.c 2001/07/05 10:53:18 1.48 +++ hci_vendor.c 2001/07/05 21:45:08 1.49 @@ -691,10 +691,14 @@ /* wait for command status */ while (hci_ctrl.hc_buf.cmd_num =3D=3D 0) { - current->timeout =3D HZ/100; current->state =3D TASK_INTERRUPTIBLE; +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,2,0) + schedule_timeout(HZ/100); +#else + current->timeout =3D HZ/100; schedule(); current->timeout =3D 0; +#endif } } =20 |
From: Olov H. <ol...@us...> - 2001-07-05 19:02:13
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.162 1.163=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added timeout value to cmdtimer. Added release of command timer when repons= es are received The diff of the modified file(s): --- hci.c 2001/06/29 10:09:58 1.162 +++ hci.c 2001/07/05 10:52:45 1.163 @@ -140,6 +140,7 @@ #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 @@ -892,6 +893,8 @@ =20 case AUTHENTICATION_COMPLETE: DSYS(__FUNCTION__ ": AUTHENTICATION_COMPLETE\n"); + release_cmd_timer(); +=09=09 #ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER if (buf[0]) { D_ERR(__FUNCTION__ ": AUTHENTICATION_COMPLETE: %s\n", get_err_msg(buf[0= ])); @@ -900,6 +903,7 @@ =20=09=09 sec_man_event(HCI, get_bd(CHAR2INT12(buf[2], buf[1])), AUTHENTICATION_CO= MPLETE, buf, 1); #endif + wake_up_interruptible(&hci_wq); break; =20 case REMOTE_NAME_REQUEST_COMPLETE: @@ -918,6 +922,7 @@ =20 case ENCRYPTION_CHANGE: DSYS(__FUNCTION__ ": ENCRYPTION_CHANGE\n"); + release_cmd_timer(); #ifdef CONFIG_BLUETOOTH_USE_SECURITY_MANAGER if (buf[0]) { D_ERR(__FUNCTION__ ": ENCRYPTION_CHANGE: %s\n", get_err_msg(buf[0])); @@ -931,6 +936,7 @@ sec_man_event(HCI, get_bd(CHAR2INT12(buf[2], buf[1= ])), ENCRYPTION_CHANGE, tmp, 2); } #endif + wake_up_interruptible(&hci_wq); break; =20=09 case CHANGE_CONNECTION_LINK_KEY_COMPLETE: @@ -968,6 +974,7 @@ performing the task for this command */ =20=09=09 case COMMAND_STATUS: + release_cmd_timer(); D_CMD(__FUNCTION__ ": COMMAND_STATUS\n"); =20=09=09 if (buf[0]) {=09=09=09 @@ -985,6 +992,7 @@ } =20=09=09 update_nhcp(buf[1]); + wake_up_interruptible(&hci_wq); break; case FLUSH_OCCURRED: D_CMD(__FUNCTION__ ": FLUSH_OCCURRED on hci_hdl %d\n", @@ -1982,7 +1990,7 @@ c_pkt.data[3] =3D 0x00; c_pkt.len =3D 4; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 /* The Hci_Disconnect function is used to terminate an existing connection. @@ -2063,7 +2071,7 @@ c +=3D 16; c_pkt.len =3D c; =20 - tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN); + tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN, DEFAULT_TIMEOUT); if (tmp < 0) { return tmp; } else { @@ -2086,7 +2094,7 @@ =20=09 c_pkt.len =3D 6; =20 - tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN); + tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN, DEFAULT_TIMEOUT); printk(__FUNCTION__ ": Returned from send_secblock\n"); if (tmp < 0) { return tmp; @@ -2117,7 +2125,7 @@ =20 c_pkt.len =3D c; =20=09 - tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN); + tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN, DEFAULT_TIMEOUT); if (tmp < 0) { return tmp; } else { @@ -2140,7 +2148,7 @@ =20 c_pkt.len =3D 6; =20=09 - tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN); + tmp =3D send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN, DEFAULT_TIMEOUT); if (tmp < 0) { return tmp; } else { @@ -2218,7 +2226,7 @@ c_pkt.data[1] =3D (con_hdl >> 8) & 0xff; c_pkt.len =3D 2; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 /* @@ -2259,7 +2267,7 @@ c_pkt.data[2] =3D enable; c_pkt.len =3D 3; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 =20 @@ -2365,7 +2373,7 @@ c_pkt.data[1] =3D ((hdl >> 8) & 0xff); c_pkt.len =3D 2; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 s32 @@ -2379,7 +2387,7 @@ =20 c_pkt.len =3D 0; =20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); if (tmp < 0) { return tmp; } else { @@ -2399,7 +2407,7 @@ c_pkt.data[6] =3D flag; c_pkt.len =3D 7; =20=20=20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); =20 if (tmp < 0) { return tmp; @@ -2422,7 +2430,7 @@ memcpy(c_pkt.data + 7, link_key, 16); c_pkt.len =3D 23; =20=20=20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); if (tmp < 0) { return tmp; } else { @@ -2442,7 +2450,7 @@ c_pkt.data[6] =3D flag; c_pkt.len =3D 7; =20=20=20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); =20 if (tmp < 0) { return tmp; @@ -2464,7 +2472,7 @@ strcpy(c_pkt.data, new_name); c_pkt.len =3D NAME_LEN; =20 - return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N);=09 + return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT);=09 #undef NAME_LEN } =20 @@ -2480,7 +2488,7 @@ =20=20=20 c_pkt.len =3D 0; =20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); if (tmp < 0) { return tmp; } else { @@ -2505,7 +2513,7 @@ c_pkt.data[0] =3D enable; c_pkt.len =3D 1; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= );=20 + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT);=20 } =20 /* @@ -2527,7 +2535,7 @@ c_pkt.data[3] =3D ((wind >> 8) & 0xff); c_pkt.len =3D 4; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 /* @@ -2563,7 +2571,7 @@ =20=20=20 print_data(__FUNCTION__, (u8*)&c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN); =20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); if (tmp < 0) { return tmp; } else { @@ -2592,7 +2600,7 @@ =20=20=20 print_data(__FUNCTION__, (u8*)&c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN); =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); if (tmp < 0) { return tmp; } else { @@ -2658,7 +2666,7 @@ =20 c_pkt.len =3D 3; =20=20=20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 s32 @@ -2674,7 +2682,7 @@ =20 c_pkt.len =3D 3; =20=20=20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); =20=09 } =20 @@ -2711,7 +2719,7 @@ c_pkt.data[0] =3D enable; c_pkt.len =3D 1; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); #else return 0; #endif @@ -2758,7 +2766,7 @@ c_pkt.data[c++] =3D sco_num & 0xff; c_pkt.data[c++] =3D (sco_num >> 8) & 0xff; =20 - return send_cmd_block((u8*) &c_pkt, c + CMD_HDR_LEN + HCI_HDR_LEN); + return send_cmd_block((u8*) &c_pkt, c + CMD_HDR_LEN + HCI_HDR_LEN, DEFAUL= T_TIMEOUT); #else return 0; #endif @@ -2801,7 +2809,7 @@ c_pkt.data[1] =3D (hdl >> 8) & 0xff; c_pkt.len =3D 2; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_= HDR_LEN); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_= HDR_LEN, DEFAULT_TIMEOUT); } =20 s32=20 @@ -2819,7 +2827,7 @@ print_data("write_link_to:",(u8*)&c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 /* Defines of Informational Parameters function */ @@ -2840,7 +2848,7 @@ c_pkt.len =3D 0; =20 if (block) { - int ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_H= DR_LEN); + int ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_H= DR_LEN, DEFAULT_TIMEOUT); #if 0 if (ret >=3D 0 && hci_ctrl.hc_buf.acl_len =3D=3D 256 && @@ -2850,7 +2858,7 @@ c_pkt.type =3D CMD_PKT; c_pkt.opcode =3D hci_put_opcode(READ_BUFFER_SIZE, = HCI_IP); c_pkt.len =3D 0; - ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + C= MD_HDR_LEN + HCI_HDR_LEN); + ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + C= MD_HDR_LEN + HCI_HDR_LEN, DEFAULT_TIMEOUT); } #endif return ret; @@ -2871,7 +2879,7 @@ c_pkt.len =3D 0; =20 if (block) - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); else return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); } @@ -2897,7 +2905,7 @@ =20 memset(bd, 0, 6);=20 =20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); memcpy(bd, hci_ctrl.local_bd, 6); return tmp; }=20 @@ -2911,7 +2919,7 @@ c_pkt.opcode =3D hci_put_opcode(RESET, HCI_HC) ; c_pkt.len =3D 0; =20=20=20 - return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + return send_cmd_block((u8*) &c_pkt , c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); } =20 =20 @@ -3075,7 +3083,7 @@ c_pkt.opcode =3D hci_put_opcode(ENABLE_DEVICE_UNDER_TEST_MODE, HCI_TC) ; c_pkt.len =3D 0; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 =20 @@ -3301,7 +3309,7 @@ } =20 =20=09=09=09 - D_QUEUE("<--%d (%d)\n", buf_byte_count(-1),=20 + D_QUEUE("<--%d (%d)\n", buf_byte_count(),=20 hci_ctrl.hc_buf.acl_num); =20=09=09 if (bytes2send =3D=3D 0) { @@ -3857,14 +3865,14 @@ #endif /* USE_NCPTIMER */ =20 void -start_cmd_timer(void) +start_cmd_timer(u8 max_time) { #ifdef __KERNEL__ D_CTRL(__FUNCTION__ "\n"); init_timer(&hci_cmd_timer); hci_cmd_timer.function =3D cmd_timeout; hci_cmd_timer.data =3D 0; - hci_cmd_timer.expires =3D jiffies + 2*HZ; + hci_cmd_timer.expires =3D jiffies + max_time*HZ; add_timer(&hci_cmd_timer); #endif } @@ -3938,7 +3946,7 @@ #endif =20 s32=20 -send_cmd_block(u8 *cmd, u8 len) +send_cmd_block(u8 *cmd, u8 len, u8 max_time) { u32 tmp; #ifdef __KERNEL__ @@ -3956,7 +3964,7 @@ #endif hci_cmd_pending =3D 1; =20=20=20 - start_cmd_timer(); + start_cmd_timer(max_time); =20=09 tmp =3D send_cmd(cmd, len); =20 |
From: Olov H. <ol...@us...> - 2001-07-05 19:02:10
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.47 1.48=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added timeout value to cmdtimer The diff of the modified file(s): --- hci_vendor.c 2001/06/20 13:46:07 1.47 +++ hci_vendor.c 2001/07/05 10:53:18 1.48 @@ -132,7 +132,7 @@ pkt[3] =3D 0x06; memcpy(pkt + 4, tmp_bd, 6); =20=20=20 - return send_cmd_block(pkt, 10); + return send_cmd_block(pkt, 10, DEFAULT_TIMEOUT); } =20=20 s32 @@ -143,7 +143,7 @@ c_pkt.opcode =3D hci_put_opcode(0xf, 0x3f) ; c_pkt.len =3D 0; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 s32=20 @@ -176,7 +176,7 @@ } =20 #ifdef CONFIG_BLUETOOTH_SET_BAUDRATE_BLOCKING - send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); + send_cmd_block((u8*) &c_pekt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN, DEFA= ULT_TIMEOUT); #else if (hci_ctrl.hc_buf.cmd_num < 1) { DSYS(__FUNCTION__ VENDOR ": sleeping\n"); @@ -691,14 +691,10 @@ /* wait for command status */ while (hci_ctrl.hc_buf.cmd_num =3D=3D 0) { - current->state =3D TASK_INTERRUPTIBLE; -#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,2,0) - schedule_timeout(HZ/100); -#else current->timeout =3D HZ/100; + current->state =3D TASK_INTERRUPTIBLE; schedule(); current->timeout =3D 0; -#endif } } =20 @@ -751,7 +747,7 @@ memset(ps_retbuf, 0, PSRETBUF_SIZE*2); =20 tmp =3D send_cmd_block((u8*) &c_pkt,=20 - c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); + c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN, DEFAULT_TIMEOUT); =20=09=20 if (rw_mode =3D=3D CSR_MSGTYPE_GETREQ) memcpy(retb, ps_retbuf, n_pars*sizeof(u16)); @@ -801,7 +797,7 @@ ps->ps_val[2] =3D (u16)bd[2]; ps->ps_val[3] =3D (((u16)bd[0] << 8) | ((u16)bd[1])); =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 s32=20 @@ -842,7 +838,7 @@ =20 ps->ps_val[0] =3D num; =20 - ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); if (ret < 0) return ret; =20=09 @@ -850,7 +846,7 @@ ps->ps_key =3D CSR_PS_MAX_ACL_PKT_LEN; ps->ps_val[0] =3D len; =20 - return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= , DEFAULT_TIMEOUT); } =20 s32 @@ -883,21 +879,21 @@ cmd->status =3D CSR_STATUS_OK; /* always OK in GETREQ */ memset(cmd->payload, 0, 6*sizeof(u16)); =20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); if (tmp < 0) return tmp; =20 cmd->seq =3D csr_count++; cmd->var_id =3D CSR_CMD_CHIP_VER; memset(cmd->payload, 0, 6*sizeof(u16)); - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); if (tmp < 0) return tmp; =20 cmd->seq =3D csr_count++; cmd->var_id =3D CSR_CMD_CHIP_REV; memset(cmd->payload, 0, 6*sizeof(u16)); - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N, DEFAULT_TIMEOUT); =20 return tmp; } @@ -1194,7 +1190,7 @@ c_pkt.len =3D 0; =20 return send_cmd_block((u8*) &c_pkt, - c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); + c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN, DEFAULT_TIMEOUT); } =20 s32 |
From: Olov H. <ol...@us...> - 2001-07-05 19:02:07
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_internal.h 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added timeout value to cmdtimer The diff of the modified file(s): --- hci_internal.h 2001/06/15 12:31:55 1.19 +++ hci_internal.h 2001/07/05 10:54:34 1.20 @@ -286,6 +286,10 @@ #define DISCMSG_LOW_RESOURCES 0x14 #define DISCMSG_ABOUT_TO_POWER_OFF 0x15 =20 +/* Time out values */ +#define DEFAULT_TIMEOUT 2=20 +#define LONG_TIMEOUT 15 + /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 /* Struct used to keep track of the current number of buffers, and the siz= es @@ -342,9 +346,9 @@ Implemented in hci.c */ void release_cmd_timer(void); -void start_cmd_timer(void); +void start_cmd_timer(u8 max_time); s32 send_cmd(u8 *cmd, u8 len); -s32 send_cmd_block(u8 *cmd, u8 len); +s32 send_cmd_block(u8 *cmd, u8 len, u8 max_time); =20 /* Called from hci.c. |
From: Mattias A. <mat...@us...> - 2001-06-29 10:46:30
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.185 1.186=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added function that searches a data buffer for number of complete packet events. If only NCP was found, return 1. Otherwize return 0. The diff of the modified file(s): --- bluetooth.c 2001/06/19 10:34:34 1.185 +++ bluetooth.c 2001/06/29 10:46:29 1.186 @@ -1743,6 +1743,43 @@ } } #endif /* CONFIG_BLUETOOTH_USE_INBUFFER */ + + +/*=20 + * Searches data buffer for number of completed packets (NCP)=20 + * If only NCP data was found tell serial driver not to=20 + * schedule a flip of DMA inbuffer. + */ +int bt_catch_ncp(u8* data, u32 count) +{ + int ncp_len; + int index =3D 0; + + /* fixme -- do this for BCSP as well */ +#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP + if (bt_use_bcsp(-1)) + return 0; +#endif + + /* || uart hdr | event code | par_len | nbr_handles | [data...] || */ + + while (((index+2) < count) && (data[index] =3D=3D 0x4) &&=20 + (data[index+1] =3D=3D 0x13) ) { + /* we found a NCP */ + index +=3D (3 + data[index + 2]); /* event hdr + par len */ + } + + if (index =3D=3D count) { + /* Contains _only_ NCP data, parse it ! */ + bt_receive_data(data, count); + return 1; + } +=09 + /* Contains more than NCP data, tell serial=20 + driver to queue it up as usual */ + return 0; +} + =20 static void bt_receive_data(u8* data, u32 count) |
From: Peter K. <pk...@us...> - 2001-06-29 10:10:00
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.161 1.162=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected a call to buf_byte_count() that had not had the line argument added. The diff of the modified file(s): --- hci.c 2001/06/18 12:15:13 1.161 +++ hci.c 2001/06/29 10:09:58 1.162 @@ -3301,7 +3301,7 @@ } =20 =20=09=09=09 - D_QUEUE("<--%d (%d)\n", buf_byte_count(),=20 + D_QUEUE("<--%d (%d)\n", buf_byte_count(-1),=20 hci_ctrl.hc_buf.acl_num); =20=09=09 if (bytes2send =3D=3D 0) { |
From: Lena H. <le...@us...> - 2001-06-20 13:46:07
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20 hci_vendor.c 1.46 1.47=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made it compile for linux 2.4.x The diff of the modified file(s): --- bcsp.c 2001/06/13 12:11:53 1.14 +++ bcsp.c 2001/06/20 13:46:07 1.15 @@ -90,7 +90,11 @@ /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 static struct timer_list bcsp_sync_timer; +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0) +static wait_queue_head_t bcsp_sync_wq; +#else static struct wait_queue *bcsp_sync_wq =3D NULL; +#endif static u32 bcsp_sync =3D FALSE; =20 /****************** FUNCTION DEFINITION SECTION **************************= ***/ @@ -123,6 +127,10 @@ { DSYS("Initializing BCSP\n"); =20=09 +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,4,0) + init_waitqueue_head(&bcsp_sync_wq); +#endif + bcsp_datagram_init(); bcsp_sequence_init(); =20=09 --- hci_vendor.c 2001/06/15 13:39:08 1.46 +++ hci_vendor.c 2001/06/20 13:46:07 1.47 @@ -691,10 +691,14 @@ /* wait for command status */ while (hci_ctrl.hc_buf.cmd_num =3D=3D 0) { - current->timeout =3D HZ/100; current->state =3D TASK_INTERRUPTIBLE; +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,2,0) + schedule_timeout(HZ/100); +#else + current->timeout =3D HZ/100; schedule(); current->timeout =3D 0; +#endif } } =20 |
From: Peter K. <pk...@us...> - 2001-06-20 11:10:15
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.h 1.39 1.40=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected HCISENDRAWDATA. The diff of the modified file(s): --- btd.h 2001/06/19 10:36:14 1.39 +++ btd.h 2001/06/20 11:10:15 1.40 @@ -116,7 +116,7 @@ /* ioctls vendor specific HCI commands */ #define HCISETBAUDRATE _IOW(BT_IOC_MAGIC, 0x70, int) #define HCIWRITEBDADDR _IOW(BT_IOC_MAGIC, 0x71, unsigned char[6]) -#define HCISENDRAWDATA _IOW(BT_IOC_MAGIC, 0x72, unsigned char[64]) +#define HCISENDRAWDATA _IOW(BT_IOC_MAGIC, 0x72, unsigned char[261]) =20 /* other ioctls used for testing */ #define BTSENDTESTDATA _IOW(BT_IOC_MAGIC, 0xf0, int[2]) |