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-05-17 10:23:01
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 btinit.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added check for BCSP when setting up phys_fd The diff of the modified file(s): --- btd.c 2001/05/15 12:13:04 1.13 +++ btd.c 2001/05/17 10:23:01 1.14 @@ -259,7 +259,6 @@ syslog(LOG_INFO, "phys dev : %s\n", optarg); physdev =3D optarg; break; -=20=20=20=20=20=20 default: break; } @@ -286,7 +285,7 @@ =20 /* Sets initial HW baudrate */ if (init_hw_speed !=3D 0) - fd_setup(phys_fd, init_hw_speed, USE_FLOW_CTRL); + fd_setup(phys_fd, init_hw_speed, USE_FLOW_CTRL, hw_vendor() =3D=3D HW_= CSR_BCSP); else init_phys(phys_fd); =20 --- btinit.c 2001/05/14 11:29:36 1.6 +++ btinit.c 2001/05/17 10:23:01 1.7 @@ -208,7 +208,7 @@ /* Set default speed */ =20 if (init_hw_speed !=3D 0) - fd_setup(phys_fd, init_hw_speed, 1); + fd_setup(phys_fd, init_hw_speed, 1, hw_vendor() =3D=3D HW_CSR_BCSP); else init_phys(phys_fd); =20 |
From: Mats F. <ma...@us...> - 2001-05-17 10:22:04
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_misc.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 bt_misc.h 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added param to fd_setup() to support BCSP The diff of the modified file(s): --- bt_misc.c 2001/05/14 11:29:36 1.9 +++ bt_misc.c 2001/05/17 10:22:04 1.10 @@ -300,7 +300,7 @@ =20 =20 void -fd_setup(int fd, int speed, int flow) +fd_setup(int fd, int speed, int flow, int use_bcsp) { struct termios t; =20 @@ -319,7 +319,16 @@ cfmakeraw(&t); =20=09 t.c_cflag &=3D ~CBAUD; + if (use_bcsp) + { + flow =3D 0; + t.c_cflag |=3D translate_speed(speed) | CS8 | CLOCAL | PARENB; + t.c_cflag &=3D ~PARODD; + } + else + { t.c_cflag |=3D translate_speed(speed) | CS8 | CLOCAL; + } t.c_oflag =3D 0; /* turn off output processing */ t.c_lflag =3D 0; /* no local modes */ =20=20=20 --- bt_misc.h 2001/04/26 15:58:15 1.5 +++ bt_misc.h 2001/05/17 10:22:04 1.6 @@ -50,7 +50,7 @@ =20 #define LOCAL_NAME_LENGTH 32 =20 -void fd_setup(int fd, int speed, int flow); +void fd_setup(int fd, int speed, int flow, int use_bcsp); int translate_speed(int spd); =20 /* Socket handling */ |
From: Mats F. <ma...@us...> - 2001-05-15 15:28:46
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Fixed initialization of the packet_length, in init_bcsp_packet()=20 The diff of the modified file(s): --- bcsp.c 2001/05/15 14:36:51 1.1 +++ bcsp.c 2001/05/15 15:28:46 1.2 @@ -216,7 +216,7 @@ bcsp->payload =3D NULL; bcsp->crc =3D 0; bcsp->packet =3D NULL; - bcsp->packet_length =3D NULL; + bcsp->packet_length =3D 0; }; =20 /****************** END OF FILE bcsp.c ***********************************= ***/ |
From: Mats F. <ma...@us...> - 2001-05-15 15:21:17
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_internal.h 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added the hci_set_buffer_sizes() function The diff of the modified file(s): --- hci_internal.h 2001/05/15 15:10:11 1.14 +++ hci_internal.h 2001/05/15 15:21:16 1.15 @@ -363,5 +363,6 @@ */ void process_vendor_return_param(u32 ocf, u8* r_val); void process_vendor_event(u8 *buf, u32 len, u32 event_code); +s32 hci_set_buffer_sizes(u16 len, u16 num); #endif /****************** END OF FILE hci_internal.h ***************************= ***/ |
From: Mats F. <ma...@us...> - 2001-05-15 15:19:59
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.33 1.34=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added functions for parsing BCSP and HQ packets * Added function for setting the HW buffers in the CSR module The diff of the modified file(s): --- hci_vendor.c 2001/05/09 09:22:28 1.33 +++ hci_vendor.c 2001/05/15 15:19:58 1.34 @@ -407,6 +407,7 @@ #endif =20 #elif defined(CONFIG_BLUETOOTH_CSR) + /*************************************************************************= ****/ /****************************** CSR functions ****************************= ****/ /*************************************************************************= ****/ @@ -438,6 +439,8 @@ #define CSR_CMD_PS 0x7003 =20 #define CSR_PS_BDADDR 0x0001 +#define CSR_PS_MAX_ACL_PKT_LEN 0x0011 +#define CSR_PS_MAX_ACL_PKTS 0x0013 #define CSR_PS_BAUD_RATE 0x0204 =20 #define CSR_UART_RATE_9K6 0x0027 @@ -460,7 +463,6 @@ #define CSR_VARID_PACKET_STAT_REPORT 0x1001 #define CSR_VARID_BITERR_REPORT 0x1006 =20 - typedef struct payload_descr { u8 ch_id:6; @@ -515,6 +517,119 @@ =20 static u16 csr_count =3D 0; =20 +#ifdef CONFIG_BLUETOOTH_USE_BCSP +void +hci_receive_bcsp(u8 *data, u32 count) +{ + csr_bccmd *cmd; + csr_bccmd_ps *ps; +=09 + D_REC(__FUNCTION__ "\n"); + + /* FIXME -- is there only one cmd buffer available ? */ + hci_ctrl.hc_buf.cmd_num =3D 1;=20=20 + + release_cmd_timer(); + + cmd =3D (struct csr_bccmd *)data; + ps =3D (struct csr_bccmd_ps *)cmd->payload; + + if (cmd->status =3D=3D CSR_STATUS_OK) { + if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP) { + switch (cmd->var_id) { +=09=09=09=09 + case CSR_CMD_CONFIG_UART: + break; +=09=09=09=09 + case CSR_CMD_BUILD_ID: + /* Store this for later retrieval */ + sprintf(bt_hw_firmware_info, + "\n Firmware version: %d", + cmd->payload[0]); + break; +=09=09=09=09 + case CSR_CMD_CHIP_VER: + break; +=09=09=09=09 + case CSR_CMD_CHIP_REV: + break; +=09=09=09=09 + case CSR_CMD_PS: + break; +=09=09=09=09 + default: + break; + } + } else { + DSYS(__FUNCTION__", Not a GETRESP msg\n"); + } + } else { + D_ERR(__FUNCTION__", BCSP status error 0x%x\n", cmd->status); + print_data(__FUNCTION__, data, count); + } + + wake_up_interruptible(&hci_wq);=09 +} + +void +hci_receive_hq(u8 *data, u32 count) +{ + csr_bccmd *cmd; + csr_bccmd_ps *ps; +=09 + D_REC(__FUNCTION__"\n"); +=09 + /* FIXME -- is there only one cmd buffer available ? */ + hci_ctrl.hc_buf.cmd_num =3D 1;=20=20 + + release_cmd_timer(); + + cmd =3D (struct csr_bccmd *)data; + ps =3D (struct csr_bccmd_ps *)cmd->payload; + + if (cmd->status =3D=3D CSR_STATUS_OK) { + if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP) { +=09 + switch (cmd->var_id) { + case CSR_VARID_RSSI_REPORT: + { + csr_rssi_rep *rep; + rep =3D (csr_rssi_rep *)cmd->payload; + DSYS("RSSI report, rssi : %d\n", rep->rssi); + break; + } +=09=09=09 + case CSR_VARID_PACKET_STAT_REPORT: + { + csr_packstat_rep *rep; + rep =3D (struct csr_packstat_rep*)cmd->payload; + DSYS("Packet status report : n_pkts %d, n_good %d, n_corr %d, rssi %d,= rssi_valid %d\n", rep->n_pkts, rep->n_good, rep->n_corr, rep->rssi, rep->r= ssi_valid); + break; + } +=09=09=09 + case CSR_VARID_BITERR_REPORT: + { + csr_biterr_rep *rep; + rep =3D (struct csr_biterr_rep*)cmd->payload; + DSYS("Biterror report : index %d, val_last %d, val_tot %d\n", rep->ind= ex, rep->val_last, rep->val_tot); + break; + } + default: + D_ERR("Unknown varid [0x%x]!\n", cmd->var_id); + break; + } + } else { + DSYS(__FUNCTION__", Not a GETRESP msg\n"); + } + } else { + D_ERR(__FUNCTION__", HQ status error 0x%x\n", cmd->status); + print_data(__FUNCTION__, data, count); + } +=09 + wake_up_interruptible(&hci_wq);=09 +} +#endif + s32=20 hci_set_bd_addr(u8 bd[6]) { @@ -522,7 +637,7 @@ csr_bccmd *cmd; csr_bccmd_ps *ps; =20 - D_CMD(__FUNCTION__ VENDOR "\n"); + D_CMD(__FUNCTION__"\n"); =20 /* HCI Manufacturer specific header */ c_pkt.type =3D CMD_PKT; @@ -559,6 +674,55 @@ } =20 s32 +hci_set_buffer_sizes(u16 len, u16 num) +{ + csr_msg *msg; + csr_bccmd *cmd; + csr_bccmd_ps *ps; + int ret; + + D_CMD(__FUNCTION__ VENDOR "\n"); + + /* HCI Manufacturer specific header */ + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f); + c_pkt.len =3D 1 + 5*sizeof(u16) + 3*sizeof(u16) + 1*sizeof(u16); + + msg =3D (csr_msg *)c_pkt.data; + cmd =3D (csr_bccmd *)msg->msg; + ps =3D (csr_bccmd_ps *)cmd->payload; + + /* 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; + + /* BCCMD type */ + cmd->type =3D CSR_MSGTYPE_SETREQ; + cmd->len =3D 5 + 3 + 1; + cmd->seq =3D csr_count++; + cmd->var_id =3D CSR_CMD_PS; + cmd->status =3D CSR_STATUS_OK; /* always OK in SETREQ */ + + /* Actual PS key request */ + ps->ps_key =3D CSR_PS_MAX_ACL_PKTS; + ps->ps_len =3D 1; /* x 16 bits */ + ps->unused =3D 0x0000; + + ps->ps_val[0] =3D num; + + ret =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + if (ret < 0) + return ret; +=09 + cmd->seq =3D csr_count++; + ps->ps_key =3D CSR_PS_MAX_ACL_PKT_LEN; + ps->ps_val[0] =3D len; + + return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); +} + +s32 hci_read_firmware_rev_info(void) { s32 tmp; @@ -607,6 +771,7 @@ return tmp; } =20 + //#define SET_BAUD_RATE_TEMPORARILY s32 hci_set_baudrate(u32 baudrate) |
From: Mats F. <ma...@us...> - 2001-05-15 15:10:13
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_internal.h 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Moved defines for H4 UART packet types to hci.h * Added two functions for parsing BCSP packets The diff of the modified file(s): --- hci_internal.h 2001/03/30 10:53:31 1.13 +++ hci_internal.h 2001/05/15 15:10:11 1.14 @@ -116,14 +116,6 @@ =20 #define NBR_CMD_BUFS 10 =20 -/* Defines for the packet types */ -#define CMD_PKT 0x01 -#define ACL_PKT 0x02 -#define SCO_PKT 0x03 -#define EVENT_PKT 0x04 -#define ERROR_PKT 0x05 -#define NEG_PKT 0x06 - /* Define the different OpCode Group Field (OGF) values */ #define HCI_LC 0x01 /* Link Control Command */ #define HCI_LP 0x02 /* Link Policy Command */ @@ -360,12 +352,16 @@ s32 send_cmd(u8 *cmd, u8 len); s32 send_cmd_block(u8 *cmd, u8 len); =20 +#ifdef CONFIG_BLUETOOTH_USE_BCSP +void hci_receive_hq(u8 *data, u32 count); +void hci_receive_bcsp(u8 *data, u32 count); +#endif + /* Called from hci.c. Implemented in hci_vendor.c */ void process_vendor_return_param(u32 ocf, u8* r_val); void process_vendor_event(u8 *buf, u32 len, u32 event_code); - #endif /****************** END OF FILE hci_internal.h ***************************= ***/ |
From: Mats F. <ma...@us...> - 2001-05-15 15:08:00
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.h 1.55 1.56=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Moved defines for H4 UART packet types from hci_internal.h * Added functions for Park, Hold and Sniff mode * Added two new functions for receiving BCSP packets The diff of the modified file(s): --- hci.h 2001/04/27 15:19:29 1.55 +++ hci.h 2001/05/15 15:08:00 1.56 @@ -55,6 +55,14 @@ =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 +/* Defines for the packet types */ +#define CMD_PKT 0x01 +#define ACL_PKT 0x02 +#define SCO_PKT 0x03 +#define EVENT_PKT 0x04 +#define ERROR_PKT 0x05 +#define NEG_PKT 0x06 + #define INQUIRY_PAGESCAN_DISABLE 0 #define INQUIRY_SCAN_ENABLE 1 #define PAGE_SCAN_ENABLE 2 @@ -87,6 +95,11 @@ void hci_receive_data(u8* data, u32 count); s32 hci_send_data(bt_tx_buf *tx_buf); =20 +#ifdef CONFIG_BLUETOOTH_USE_BCSP +void hci_receive_event(u8 *data, s32 count); +void hci_receive_acl(u8 *data, s32 count); +#endif + s32 lp_connect_req(u8 bd_addr[]); s32 lp_connect_rsp(u8 bd_addr[], u32 cfm); s32 lp_disconnect(u32 con_hdl); @@ -112,6 +125,9 @@ s32 hci_set_connection_encryption_bd(BD_ADDR bd, u8 enable); =20 /* Link Policy Commands */ +s32 hci_hold_mode(u16 hci_hdl, u16 max_int, u16 min_int); +s32 hci_sniff_mode(u16 hci_hdl, u16 max_int, u16 min_int, u16 attempt, u16= timeout); +s32 hci_park_mode(u16 hci_hdl, u16 max_int, u16 min_int); s32 hci_switch_role(u8 *bd, u8 role); =20 /* Host Controller and Baseband Commands */ @@ -135,7 +151,6 @@ s32 hci_write_class_of_device(u8 *class_of_device); s32 hci_set_event_filter(u8 *data); s32 hci_read_power_transmit_level(u32 con_hdl, unsigned char type); -s32 hci_hold_mode(u32 con_hdl, u32 max_interval, u32 min_interval); s32 hci_write_page_to(u32 page_to); s32 hci_write_hold_mode_activity(u32 hma); s32 hci_write_connection_accept_to(u32 co_ac_to); |
From: Mats F. <ma...@us...> - 2001-05-15 15:02:21
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btconfig.h 1.28 1.29=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added define to enable/disable BCSP The diff of the modified file(s): --- btconfig.h 2001/04/29 11:37:08 1.28 +++ btconfig.h 2001/05/15 15:02:20 1.29 @@ -82,7 +82,10 @@ #endif =20 #undef CONFIG_BLUETOOTH_ENABLE_MSSWITCH + #undef CONFIG_BLUETOOTH_EARLY_MSSWITCH + +#define CONFIG_BLUETOOTH_USE_BCSP =20 /*************** * HCI * |
From: Mats F. <ma...@us...> - 2001-05-15 15:00:55
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.c 1.146 1.147=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Added functions for Park, Hold and Sniff mode * Added two new functions for receiving data from BCSP The diff of the modified file(s): --- hci.c 2001/04/29 11:37:02 1.146 +++ hci.c 2001/05/15 15:00:55 1.147 @@ -140,6 +140,10 @@ #define USE_NCPTIMER=20 #define NCP_TIMEOUT (3*HZ) =20 +#ifdef CONFIG_BLUETOOTH_USE_BCSP +#define bt_write_lower_driver(data, len) bcsp_write_top(data, len) +#endif + /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 /* cmd_t and cmd_buf are structures used to handle the queue of commands @@ -327,7 +331,7 @@ static s32 test_hci_hdl; =20 /* temp solution to handle m/s switch */ -static s32 force_msswitch; +static s32 force_msswitch =3D 0; static s32 i_am_initiator =3D 0; =20 /****************** FUNCTION DEFINITION SECTION **************************= ***/ @@ -337,6 +341,7 @@ * parse_sco_packet or the parse_event_packet, depending on the packet type */ =20 + void hci_receive_data(u8* data, u32 count) { @@ -584,6 +589,99 @@ } } =20 +#ifdef CONFIG_BLUETOOTH_USE_BCSP +void +hci_receive_event(u8 *data, s32 count) +{ + u8 event_type, event_len; + u8 *tmp_buf; + + tmp_buf =3D data; +=09 + while (count > 0) { + event_type =3D tmp_buf[0]; + event_len =3D tmp_buf[1]; + tmp_buf +=3D 2; + count -=3D 2; + + D_REC(__FUNCTION__", Received event 0x%02x with len:%d\n", event_type, e= vent_len); +=09=09 + process_event(tmp_buf, event_len, event_type); + tmp_buf +=3D event_len; + count -=3D event_len; + } +} + +void +hci_receive_acl(u8 *data, s32 count) +{ + u8 *tmp_buf; + u16 hci_hdl; + u8 pb_flag; + u8 bc_flag; + u16 data_len; + hci_in_buffer *in_buf; + + tmp_buf =3D data; + + 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; +=09=09 + /* Check the length to make sure we won't=20 + overrun in_buf->buf_ptr in a memcpy later. + --gmcnutt + */ + if (data_len > HCI_IN_SIZE) { + D_ERR(__FUNCTION__ ": %d is too big "\ + "for our HCI input buffers -- "\ + "discarding buffer\n", + data_len); + return; + } +=09=09 + if (pb_flag =3D=3D L2CAP_FRAME_START) { + D_REC(__FUNCTION__", new L2CAP frame\n"); + in_buf =3D get_free_inbuffer(); + if (in_buf) { + in_buf->nbr_of_hci_pkt =3D 1; + in_buf->hci_hdl =3D hci_hdl; + }=09 + } else { + D_REC(__FUNCTION__", cont L2CAP frame\n"); + in_buf =3D get_inbuffer(hci_hdl); + if (in_buf) { + in_buf->nbr_of_hci_pkt++; + } + } +=09=09 + if (in_buf) { + memcpy(in_buf->buf_ptr, tmp_buf, data_len); + D_REC(__FUNCTION__", Copied %d bytes into inbuffer\n", + data_len); + in_buf->buf_ptr +=3D data_len; + in_buf->count +=3D data_len; + D_REC(__FUNCTION__", in_buf->count:%d\n", in_buf->count); + } else { + D_ERR(__FUNCTION__", No inbuffer was found, "\ + "discarding data\n"); + return; + } +=09=09 + /* Decrease the amount of remaining data */ + count -=3D data_len; +=09=09 + process_acl_data(in_buf, pb_flag); + tmp_buf +=3D data_len; + } +} +#endif + void update_ncp(u8 nbr_of_hdl, u8 *pkt) { @@ -1746,6 +1844,8 @@ hci_force_msswitch(1); #else /* CONFIG_BLUETOOTH_ENABLE_MSSWITCH */ DSYS("M/S switch disabled\n"); + + hci_force_msswitch(0); #endif } =20 @@ -2698,6 +2798,7 @@ data portion of HCI ACL and SCO Data Packets sent from the Host to the = Host=20 Controller. The function can be called from both the process currently = in the driver and the interrupt handler, therefore the option to block or not.= */ + s32 hci_read_buffer_size(s32 block) { @@ -2713,6 +2814,7 @@ return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); } =20 + #if 0 s32 hci_read_local_version_info(s32 block) @@ -2770,6 +2872,100 @@ =20 =20 s32 +hci_hold_mode(u16 hci_hdl, u16 max_int, u16 min_int) +{=20=20 + D_CMD(__FUNCTION__", for connnection handle 0x%x\n", hci_hdl); + + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(HOLD_MODE, HCI_LP); +=09 + c_pkt.data[0] =3D hci_hdl & 0xff; + c_pkt.data[1] =3D (hci_hdl >> 8) & 0xff; + c_pkt.data[2] =3D max_int & 0xff; + c_pkt.data[3] =3D (max_int >> 8) & 0xff; + c_pkt.data[4] =3D min_int & 0xff; + c_pkt.data[5] =3D (min_int >> 8) & 0xff; + c_pkt.len =3D 6; + + return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); +} + +s32 +hci_sniff_mode(u16 hci_hdl, u16 max_int, u16 min_int, u16 attempt, u16 tim= eout) +{=20=20 + D_CMD(__FUNCTION__", for connnection handle 0x%x\n", hci_hdl); + + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(SNIFF_MODE, HCI_LP); +=09 + c_pkt.data[0] =3D hci_hdl & 0xff; + c_pkt.data[1] =3D (hci_hdl >> 8) & 0xff; + c_pkt.data[2] =3D max_int & 0xff; + c_pkt.data[3] =3D (max_int >> 8) & 0xff; + c_pkt.data[4] =3D min_int & 0xff; + c_pkt.data[5] =3D (min_int >> 8) & 0xff; + c_pkt.data[6] =3D attempt & 0xff; + c_pkt.data[7] =3D (attempt >> 8) & 0xff; + c_pkt.data[8] =3D timeout & 0xff; + c_pkt.data[9] =3D (timeout >> 8) & 0xff; +=09 + c_pkt.len =3D 10; + + return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); +} + +s32 +hci_exit_sniff_mode(u16 hci_hdl) +{=20 + D_CMD(__FUNCTION__", for connnection handle 0x%x\n", hci_hdl); + + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(EXIT_SNIFF_MODE, HCI_LP); +=09 + c_pkt.data[0] =3D hci_hdl & 0xff; + c_pkt.data[1] =3D (hci_hdl >> 8) & 0xff; + c_pkt.len =3D 2; + + return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); +} + +s32 +hci_park_mode(u16 hci_hdl, u16 max_int, u16 min_int) +{=20=20 + D_CMD(__FUNCTION__", for connnection handle 0x%x\n", hci_hdl); + + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(PARK_MODE, HCI_LP); +=09 + c_pkt.data[0] =3D hci_hdl & 0xff; + c_pkt.data[1] =3D (hci_hdl >> 8) & 0xff; + c_pkt.data[2] =3D max_int & 0xff; + c_pkt.data[3] =3D (max_int >> 8) & 0xff; + c_pkt.data[4] =3D min_int & 0xff; + c_pkt.data[5] =3D (min_int >> 8) & 0xff; + c_pkt.len =3D 6; + + return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); +} + +s32 +hci_exit_park_mode(u16 hci_hdl) +{=20=20 + D_CMD(__FUNCTION__", for connnection handle 0x%x\n", hci_hdl); + + c_pkt.type =3D CMD_PKT; + c_pkt.opcode =3D hci_put_opcode(EXIT_PARK_MODE, HCI_LP); +=09 + c_pkt.data[0] =3D hci_hdl & 0xff; + c_pkt.data[1] =3D (hci_hdl >> 8) & 0xff; + c_pkt.len =3D 2; + + return send_cmd((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN); +} + + + +s32 get_con_hdl(u8 *bd) { u32 i; @@ -2885,24 +3081,7 @@ force_msswitch =3D enable;=20 } =20 - s32 -hci_hold_mode(u32 con_hdl, u32 max_interval, u32 min_interval) -{ - c_pkt.type =3D CMD_PKT; - c_pkt.opcode =3D hci_put_opcode(HOLD_MODE, HCI_LP) ; - c_pkt.len =3D 6; - c_pkt.data[0] =3D con_hdl & 0xff; - c_pkt.data[1] =3D (con_hdl >> 8) & 0xff; - c_pkt.data[2] =3D max_interval & 0xff; - c_pkt.data[3] =3D (max_interval >> 8) & 0xff; - c_pkt.data[4] =3D min_interval & 0xff; - c_pkt.data[5] =3D (min_interval >> 8) & 0xff; - - return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); -} - -s32 hci_write_page_to(u32 page_to) { c_pkt.type =3D CMD_PKT; @@ -3172,7 +3351,6 @@ return c; } =20 - void=20 set_acl_hdr(u8 *data, u32 len, u8 pb, u8 bc, u32 hci_hdl) { |
From: Mats F. <ma...@us...> - 2001-05-15 14:44:50
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.173 1.174=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: If using BCSP, then the incomming data should be sent to BCSP instead of HCI The diff of the modified file(s): --- bluetooth.c 2001/04/26 13:27:21 1.173 +++ bluetooth.c 2001/05/15 14:44:50 1.174 @@ -91,6 +91,10 @@ #include <linux/bluetooth/bt_proc.h> #endif =20 +#ifdef CONFIG_BLUETOOTH_USE_BCSP +#define hci_receive_data(data, len) bcsp_receive_lower(data, len) +#endif + #ifdef __CRIS__ #include <asm/io.h> #endif @@ -2309,6 +2313,9 @@ =20 DSYS("Current HW: %s\n", bt_hw_vendor()); =20 +#ifdef CONFIG_BLUETOOTH_USE_BCSP + bcsp_init(); +#endif hci_init(); l2cap_init(); =20 |
From: Mats F. <ma...@us...> - 2001-05-15 14:41:16
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- Config.in 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added option to enable BCSP The diff of the modified file(s): --- Config.in 2001/04/29 11:37:02 1.13 +++ Config.in 2001/05/15 14:41:16 1.14 @@ -28,6 +28,7 @@ bool ' Allow connectionless L2CAP' CONFIG_BLUETOOTH_L2CAP_CONNECTIONLESS bool ' Enable TCI' CONFIG_BLUETOOTH_USE_TCI bool ' Enable M/S Switch' CONFIG_BLUETOOTH_ENABLE_MSSWITCH + bool ' Enable BCSP ' CONFIG_BLUETOOTH_USE_BCSP =20 if [ "$CONFIG_BLUETOOTH_ENABLE_MSSWITCH" =3D "y" ]; then # CSR can't do scatternet yet, so we need to do M/S switch=20 |
From: Mats F. <ma...@us...> - 2001-05-15 14:37:52
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.h 1.1 Added bcsp_debug.h 1.1 Added The accompanying log: Initial version |
From: Mats F. <ma...@us...> - 2001-05-15 14:36:52
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.1 Added bcsp_datagram.c 1.1 Added bcsp_integrity.c 1.1 Added bcsp_mux.c 1.1 Added bcsp_sequence.c 1.1 Added bcsp_slip.c 1.1 Added The accompanying log: Initial version |
From: Mattias A. <mat...@us...> - 2001-05-15 12:13:07
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_ipa.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * when USE_IPASSIGN is defined in bt_conf.h, btd will try to connect to IPA server. If this fails btd will continue just as USE_IPASSIGN never was defined (before this change, it used to exit btd). * some cleanup The diff of the modified file(s): --- bt_ipa.c 2001/04/11 12:54:52 1.3 +++ bt_ipa.c 2001/05/15 12:13:04 1.4 @@ -58,8 +58,6 @@ #include "bt_conf.h" #include "bt_misc.h" =20 -#ifdef USE_IPASSIGN - int ipa_open(void) { int ipa_fd; @@ -153,5 +151,3 @@ syslog(LOG_INFO, " usingmasq: %d", set->usingmasq); } } - -#endif /* USE_IPASSIGN */ --- btd.c 2001/05/14 11:29:36 1.12 +++ btd.c 2001/05/15 12:13:04 1.13 @@ -148,14 +148,12 @@ /* =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 */ /* IPA stuff */ =20 -#ifdef USE_IPASSIGN static int ipa_fd =3D -1; static struct ipa_msg *msg; static unsigned char ipa_buf[256]; static int parse_ipa_response(struct ipa_msg *msg); static int ipa_sendrequest(int line, unsigned char *bd, unsigned short type); -#endif =20 /* =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 */ /* General BTD stuff */ @@ -164,20 +162,23 @@ #define MODEMEMULCMD "memul" /* change name !*/ #define PPPDCMD "pppd" =20 +static int do_hwinit =3D 1; /* do vendor specific initialization */ +static int do_reset =3D 0; /* reset hw using I/O pins */ + +static int ipa_available =3D 0; /* is set if IPA was successfully initiali= zed */ +static int modem_emul =3D 1; /* default modem emulation is enabled */ +static int init_hw_speed =3D 0; /* not set */ =20 static char *physdev =3D DEFAULT_PHYS_DEV; static char *speedstr =3D DEFAULT_SPEED; -static int bt_cfd =3D -1; /* control tty for bt stack */ - -static int btd_pid; static char local_name[LOCAL_NAME_LENGTH+1]; /* 'friendly' name in HW modu= le */ -static int do_hwinit =3D 1; /* do vendor specific initialization */ -static int do_reset =3D 0; /* reset hw using I/O pins */ -static int init_hw_speed =3D 0; /* not set */ -static int modem_emul =3D 1; /* default modem emulation is enabled */ + +static int btd_pid =3D -1; +static int sdpsrv_pid =3D 0; +static int bt_cfd =3D -1; /* control tty for bt stack */ static int phys_fd =3D -1; /* physical device e.g ttyS0 */ static jmp_buf jmpbuffer; /* used to jump back in program after doing rese= t */ -static int sdpsrv_pid =3D 0; + =20 /* long option list */ static struct option long_options[] =3D @@ -308,9 +309,10 @@ tv.tv_usec =3D 0; =20 FD_ZERO(&rfd);=20=20 -#ifdef USE_IPASSIGN + + if (ipa_available) FD_SET(ipa_fd, &rfd); -#endif +=20=20=20=20 FD_SET(0, &rfd); =20 result =3D select(FD_SETSIZE, &rfd, NULL, NULL, &tv); @@ -394,7 +396,8 @@ read_remote_bd(bt_cfd, PEER(line).remote_bd); printf("Remote bd: %s\n", bd2str(PEER(line).remote_bd)); =20=20=20=20=20=20=20 -#ifdef USE_IPASSIGN + if (ipa_available) + {=20=20 D(syslog(LOG_INFO, "Sending IPA request\n")); =20=20=20=20=20=20=20 PEER(line).ipset =3D &IPSET(line); @@ -412,14 +415,16 @@ } else D(syslog(LOG_INFO, "IPA request sent")); -#else + } + else /* No IPA server available */ + {=20 STATE(line) =3D PPPCONF_DONE; build_pppdopts(line, (char**)pppd_options);=20=20=20=20=20=20 start_pppd(line, speedstr, (char**)pppd_options);=20=20=20=20=20 -#endif=20=20 } } } +} =20 /* only server */ void build_pppdopts(int line, char **opts) @@ -428,9 +433,8 @@ struct ip_set *ipset =3D PEER(line).ipset; char local_ip[20]; =20 -#ifdef USE_IPASSIGN + if (ipa_available) show_ipset(ipset, line); -#endif =20=20=20 D(syslog(LOG_INFO, "build_pppdopts\n")); =20=20=20 @@ -698,7 +702,8 @@ =20=20=20=20=20 syslog(LOG_INFO, "PPP line %d was shutdown\n", line); =20=20=20=20=20 -#ifdef USE_IPASSIGN + if (ipa_available)=20 + {=20 STATE(line) =3D WAITING_RETURN_PPPCONF; =20 if (ipa_sendrequest(line, (unsigned char *)&PEER(line).remote_bd,=20 @@ -709,9 +714,11 @@ will be discovered in timout */ STATE(line) =3D NOCONNECTION;=20=20=20=20 } -#else + } + else + { STATE(line) =3D NOCONNECTION;=20=20=20=20 -#endif=20=20=20=20 + } =20 PEER(line).ipset =3D NULL; PEER(line).pppd_pid =3D -1; @@ -759,7 +766,7 @@ =20 if (i > 8) {=20=20 - exit(1); + break; } else { @@ -768,7 +775,12 @@ i *=3D 2; }=20=20=20=20=20=20 }=20 + else=20 + {=20=20=20=20=20=20 + syslog(LOG_INFO, "Found IPA server"); + ipa_available =3D 1; }=20 + }=20 #endif =20=20=20 if (modem_emul =3D=3D 1) @@ -802,7 +814,6 @@ phys_fd =3D -1; } =20 -#ifdef USE_IPASSIGN if (ipa_fd !=3D -1) { syslog(LOG_INFO, "closing IPA"); @@ -810,7 +821,7 @@ close(ipa_fd); ipa_fd =3D -1; } -#endif=20 + /* pid_fd is set if we created the pid file when we started */ if (btd_pid !=3D -1) { @@ -851,8 +862,6 @@ /* =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 */ /* IPA stuff */ =20 -#ifdef USE_IPASSIGN - static int ipa_sendrequest(int line, unsigned char *bd, unsigned short typ= e) { unsigned char buf[IPA_MSG_MAXSIZE]; @@ -942,6 +951,5 @@ } return 0; } -#endif =20 /* =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 */ |
From: Peter K. <pk...@us...> - 2001-05-14 11:47:46
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use bt_openctrl() to open the control device. The diff of the modified file(s): --- bt_if.c 2001/05/14 11:09:22 1.14 +++ bt_if.c 2001/05/14 11:47:45 1.15 @@ -138,7 +138,7 @@ #ifndef BT_USERSTACK char* bt_hw_vendor(void) { - int bt_cfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY); + int bt_cfd =3D bt_openctrl(); static char buffer[20]; =20 if (bt_cfd < 0 || ioctl(bt_cfd, BTHWVENDOR, buffer) < 0) @@ -157,7 +157,7 @@ int devfd; =20 printf("Resetting HW board...\n"); - if ((devfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY)) >=3D 0) + if ((devfd =3D bt_openctrl()) >=3D 0) { if (ioctl(devfd, BTRESETPHYSICALHW) < 0) { @@ -172,7 +172,7 @@ } else { - fprintf(stderr, "ERROR! Failed to open " BT_CTRL_TTY "\n"); + fprintf(stderr, "ERROR! Failed to open BT control device\n"); } #else printf("Please reset HW board within 5 seconds\n"); @@ -183,14 +183,14 @@ int bt_openctrl(void) { int bt_cfd; - D(syslog(LOG_INFO, "Now opening BT Ctrl TTY [%s]\n", BT_CTRL_TTY)); + D(syslog(LOG_INFO, "Now opening BT Ctrl TTY [" BT_CTRL_TTY "]")); #ifdef BT_USERSTACK printf(__FUNCTION__ ": ignored in userstack\n"); return FD_BTUSERCTRL; #else=20 if ((bt_cfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY)) < 0) { - fprintf(stderr, "could not open %s\n", BT_CTRL_TTY); + fprintf(stderr, "Could not open " BT_CTRL_TTY "\n"); exit(1); } #endif |
From: Peter K. <pk...@us...> - 2001-05-14 11:37:09
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btsend.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Removed incorrect mode argument given to open(). The diff of the modified file(s): --- btsend.c 2001/05/14 11:29:36 1.4 +++ btsend.c 2001/05/14 11:37:06 1.5 @@ -116,7 +116,7 @@ /* Open BT device */=20=20 =20 printf("Opening %s\n", btdev); - if ((bt_fd =3D open(btdev, O_RDWR | O_NOCTTY, CLIENT)) < 0) + if ((bt_fd =3D open(btdev, O_RDWR | O_NOCTTY)) < 0) { printf("could not open %s\n", btdev); exit(1); |
From: Peter K. <pk...@us...> - 2001-05-14 11:29:38
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_misc.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 btcon.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20 btdisc.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 btinit.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 btinq.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20 btsend.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 bttest.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 modememul.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Cleaned up usage of getopt. The diff of the modified file(s): --- bt_misc.c 2001/04/26 15:58:15 1.8 +++ bt_misc.c 2001/05/14 11:29:36 1.9 @@ -53,7 +53,6 @@ #include <errno.h> #include <stdarg.h> #include <signal.h> -#include <getopt.h> =20 /* The following includes are required to be able to determine the local * address by examining eth0 */ --- btcon.c 2001/05/14 11:09:22 1.5 +++ btcon.c 2001/05/14 11:29:36 1.6 @@ -85,9 +85,7 @@ } =20 /* now parse options */ -#define OPTIONS_STRING "a:d:r:S:p:" - - while ((opt =3D getopt(argc, argv, OPTIONS_STRING)) !=3D -1) + while ((opt =3D getopt(argc, argv, "a:d:r:S:p:")) !=3D -1) { switch (opt) { --- btd.c 2001/04/26 15:58:15 1.11 +++ btd.c 2001/05/14 11:29:36 1.12 @@ -219,9 +219,7 @@ } =20=20=20 /* now parse options */ -#define OPTIONS_STRING "i:m:nRs:u:" -=20=20 - while ((opt =3D getopt_long(argc, argv, OPTIONS_STRING, + while ((opt =3D getopt_long(argc, argv, "i:m:nRs:u:", long_options, &option_index)) !=3D -1) { switch(opt) @@ -879,7 +877,7 @@ case IPARSP_STATUS: { ipa_status *rsp =3D (struct ipa_status*)(msg->msg); - D(syslog(LOG_INFO, "parse_ipa_response : got status %d on line\n",= =20 + D(syslog(LOG_INFO, "parse_ipa_response : got status %d on line %d\n"= ,=20 rsp->status, rsp->id)); =20 /* Check state */ --- btdisc.c 2001/05/14 11:09:22 1.5 +++ btdisc.c 2001/05/14 11:29:36 1.6 @@ -82,9 +82,7 @@ } =20 /* now parse options */ -#define OPTIONS_STRING "d:D:" - - while ((opt =3D getopt(argc, argv, OPTIONS_STRING)) !=3D -1) + while ((opt =3D getopt(argc, argv, "d:D:")) !=3D -1) { switch (opt) { --- btinit.c 2001/03/30 12:45:11 1.5 +++ btinit.c 2001/05/14 11:29:36 1.6 @@ -147,9 +147,7 @@ } =20 /* now parse options */ -#define OPTIONS_STRING "i:nRs:u:" -=20=20 - while ((opt =3D getopt_long(argc, argv, OPTIONS_STRING, + while ((opt =3D getopt_long(argc, argv, "i:nRs:u:", long_options, &option_index)) !=3D -1) { switch(opt) @@ -184,8 +182,7 @@ physdev =3D optarg; break; =20 - case '?' : - printf("unknown option: %c\n", optopt); + default: break; } } --- btinq.c 2001/05/14 11:09:22 1.2 +++ btinq.c 2001/05/14 11:29:36 1.3 @@ -70,9 +70,7 @@ {=20 int bt_cfd, opt, t =3D 10, nbr =3D 10; =20 -#define OPTIONS_STRING "n:t:" - - while ((opt =3D getopt(argc, argv, OPTIONS_STRING)) !=3D -1) + while ((opt =3D getopt(argc, argv, "n:t:")) !=3D -1) { switch(opt) { @@ -84,8 +82,7 @@ t =3D atoi(optarg); break; =20 - case '?': - printf("unknown option: %c\n", optopt); + default: break; } } --- btsend.c 2001/05/14 11:09:22 1.3 +++ btsend.c 2001/05/14 11:29:36 1.4 @@ -83,9 +83,7 @@ } =20 /* now parse options */ -#define OPTIONS_STRING "d:s:r:" - - while ((opt =3D getopt(argc, argv, OPTIONS_STRING)) !=3D -1) + while ((opt =3D getopt(argc, argv, "d:s:r:")) !=3D -1) { switch(opt) { @@ -104,8 +102,7 @@ printf("repeat %d\n", repeat); break; =20 - case '?': - printf("unknown option: %c\n", optopt); + default: break; } } --- bttest.c 2001/05/14 11:09:22 1.8 +++ bttest.c 2001/05/14 11:29:36 1.9 @@ -55,7 +55,6 @@ #include <errno.h> #include <stdarg.h> #include <signal.h> -#include <getopt.h> =20 #if defined(HAVE_READLINE_READLINE) #include <readline/readline.h> --- modememul.c 2001/04/17 15:42:51 1.4 +++ modememul.c 2001/05/14 11:29:36 1.5 @@ -55,7 +55,6 @@ #include <errno.h> #include <stdarg.h> #include <signal.h> -#include <getopt.h> =20 #include "btd.h" #include "bt_misc.h" |
From: Peter K. <pk...@us...> - 2001-05-14 11:09:23
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 bt_if.h 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 btcon.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 btconfig.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20 btdisc.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 btinq.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 btsend.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20 bttest.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: bt_isinitiated() now takes the file descriptor to the control device as argument (if it is -1 it still opens/closes it as necessary). The diff of the modified file(s): --- bt_if.c 2001/04/27 14:53:31 1.13 +++ bt_if.c 2001/05/14 11:09:22 1.14 @@ -96,17 +96,20 @@ /* =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 */ /* Init/shutdown and control of stack */=20 =20 -int bt_isinitiated(void) +int bt_isinitiated(int bt_cfd) { - int bt_cfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY); + int fd =3D (bt_cfd < 0 ? bt_openctrl() : bt_cfd); int stack_initiated =3D -1; =20 - if (bt_cfd < 0 || ioctl(bt_cfd, BTISINITIATED, &stack_initiated) < 0) + if (fd < 0 || ioctl(fd, BTISINITIATED, &stack_initiated) < 0) { perror(__FUNCTION__); exit(1); } - close(bt_cfd); + if (bt_cfd < 0) + { + close(fd); + } return stack_initiated; } =20 --- bt_if.h 2001/04/27 14:53:31 1.8 +++ bt_if.h 2001/05/14 11:09:22 1.9 @@ -269,7 +269,7 @@ */ =20 void init_stack(int bt_cfd, int spd); -int bt_isinitiated(void); +int bt_isinitiated(int bt_cfd); void shutdown_stack(int bt_cfd); #ifndef BT_USERSTACK char* bt_hw_vendor(void); --- btcon.c 2001/04/04 10:43:04 1.4 +++ btcon.c 2001/05/14 11:09:22 1.5 @@ -161,15 +161,19 @@ exit(1); } =20 + /* Open BT ctrl device */=20=20 + if ((bt_cfd =3D bt_openctrl()) < 0) + { + perror("Could not open BT control device"); + exit(1); + } + /* First of all check that stack is running */ - if (!bt_isinitiated()) + if (!bt_isinitiated(bt_cfd)) { printf("Stack not initiated, exit\n"); exit(1); } - - /* Open BT ctrl device */=20=20 - bt_cfd =3D bt_openctrl(); =20 line =3D atoi((char*)(btdev+10)); =20=20=20 --- btconfig.c 2001/04/27 18:33:23 1.2 +++ btconfig.c 2001/05/14 11:09:22 1.3 @@ -193,13 +193,17 @@ var_write_scan_enable >=3D 0 || var_force_ms_switch >=3D 0) { + /* Open BT ctrl device */=20=20 + if ((bt_cfd =3D bt_openctrl()) < 0) + { + perror("Could not open BT control device"); + exit(1); + } + /* Wait until stack is initiated */ - while (!bt_isinitiated()) + while (!bt_isinitiated(bt_cfd)) sleep(1); =20 - /* Open BT control tty */ - if ((bt_cfd =3D bt_openctrl()) >=3D 0) - { /* Configure BT local name */ if (var_set_local_name) bt_set_local_name(bt_cfd, bt_name); @@ -213,7 +217,6 @@ bt_force_msswitch_as_server(bt_cfd, var_force_ms_switch); =20 close(bt_cfd); - } } =20 exit(0); --- btdisc.c 2001/04/04 10:33:03 1.4 +++ btdisc.c 2001/05/14 11:09:22 1.5 @@ -111,15 +111,19 @@ exit(0); } =20 + /* Open BT ctrl device */=20=20 + if ((bt_cfd =3D bt_openctrl()) < 0) + { + perror("Could not open BT control device"); + exit(1); + } + /* First of all check that stack is running */ - if (!bt_isinitiated()) + if (!bt_isinitiated(bt_cfd)) { printf("Stack not initiated, exit\n"); exit(1); } - - /* Open BT ctrl device */ - bt_cfd =3D bt_openctrl(); =20 line =3D atoi((char*)(btdev+10)); =20=20=20 --- btinq.c 2001/03/02 10:59:57 1.1 +++ btinq.c 2001/05/14 11:09:22 1.2 @@ -70,13 +70,6 @@ {=20 int bt_cfd, opt, t =3D 10, nbr =3D 10; =20 - /* First of all check that stack is running */ - if (!bt_isinitiated()) - { - printf("Stack not initiated, exit\n"); - exit(1); - } - #define OPTIONS_STRING "n:t:" =20=20 while ((opt =3D getopt(argc, argv, OPTIONS_STRING)) !=3D -1) @@ -98,7 +91,18 @@ } =20 /* Open BT ctrl device */ - bt_cfd =3D bt_openctrl(); + if ((bt_cfd =3D bt_openctrl()) < 0) + { + perror("Could not open BT control device"); + exit(1); + } + + /* First of all check that stack is running */ + if (!bt_isinitiated(bt_cfd)) + { + printf("Stack not initiated, exit\n"); + exit(1); + } =20 bt_inquiry(bt_cfd, nbr, t); =20=20 --- btsend.c 2001/03/13 22:21:17 1.2 +++ btsend.c 2001/05/14 11:09:22 1.3 @@ -76,7 +76,7 @@ int line, bt_fd, opt, len=3D-1, repeat=3D1; =20 /* First of all check that stack is running */ - if (!bt_isinitiated()) + if (!bt_isinitiated(-1)) { printf("Stack not initiated, exit\n"); exit(1); --- bttest.c 2001/04/25 17:56:54 1.7 +++ bttest.c 2001/05/14 11:09:22 1.8 @@ -147,14 +147,19 @@ { int bt_cfd; =20 + /* Open BT ctrl device */=20=20 + if ((bt_cfd =3D bt_openctrl()) < 0) + { + perror("Could not open BT control device"); + exit(1); + } + /* First of all check that stack is running */ - if (!bt_isinitiated()) + if (!bt_isinitiated(bt_cfd)) { printf("Stack not initiated, exit\n"); exit(1); } - - bt_cfd =3D bt_openctrl(); =20 read_history(BTD_HISTORY_FILE);=20=20 =20 |
From: Peter K. <pk...@us...> - 2001-05-09 09:22:29
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.32 1.33=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added baud rates below 57600 for CSR. The diff of the modified file(s): --- hci_vendor.c 2001/05/08 16:45:34 1.32 +++ hci_vendor.c 2001/05/09 09:22:28 1.33 @@ -620,6 +620,15 @@ D_CMD(__FUNCTION__ VENDOR " (%u baud)\n", baudrate); =20 switch (baudrate) { + case 9600: + baud_divider =3D CSR_UART_RATE_9K6; + break; + case 19200: + baud_divider =3D CSR_UART_RATE_19K2; + break; + case 38400: + baud_divider =3D CSR_UART_RATE_38K4; + break; case 57600: baud_divider =3D CSR_UART_RATE_57K6; break; |
From: Peter K. <pk...@us...> - 2001-05-08 16:45:34
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.31 1.32=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: CSR sends the response using the new speed when changing baud rate temporarily. The diff of the modified file(s): --- hci_vendor.c 2001/04/27 16:45:05 1.31 +++ hci_vendor.c 2001/05/08 16:45:34 1.32 @@ -668,7 +668,13 @@ memset(cmd->payload, 0, 6*sizeof(u16)); cmd->payload[0] =3D baud_divider | CSR_UART_NO_PARITY | CSR_UART_ONE_STOP= _BIT; =20 - tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE= N); + if (hci_ctrl.hc_buf.cmd_num < 1) { + DSYS(__FUNCTION__ VENDOR ": sleeping\n"); + interruptible_sleep_on(&set_baudrate_wq); + } + tmp =3D bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI= _HDR_LEN); +=20=20 + hci_ctrl.hc_buf.cmd_num--; #else cmd->type =3D CSR_MSGTYPE_SETREQ; cmd->len =3D 5 + 3 + 1; |
From: Peter K. <pk...@us...> - 2001-05-08 16:06:13
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Changed order of commands in csr_init_hw() to change the hardware speed in time for the answer to the change of baud rate command. The diff of the modified file(s): --- bt_vendor.c 2001/04/27 16:49:38 1.12 +++ bt_vendor.c 2001/05/08 16:06:13 1.13 @@ -229,11 +229,11 @@ =20 bt_set_baudrate(bt_cfd, spd); =20 - syslog(LOG_INFO, "Baudrate set\n"); -=20=20 /* Now set phys device speed to whatever HW was set to use */ fd_setup(phys_fd, spd, USE_FLOW_CTRL); tcflush(phys_fd, TCIOFLUSH); + + syslog(LOG_INFO, "Baudrate set\n"); } =20 /* =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=3D*/ |
From: Peter K. <pk...@us...> - 2001-05-07 11:26:30
|
The following file was modified in apps/bluetooth/sdp_server: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.9 1.10=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/03/10 12:57:38 1.9 +++ Makefile 2001/05/07 11:25:59 1.10 @@ -1,7 +1,7 @@ # $Id$ =20 ifdef APPS -USE_UCLIBC =3D 1 +AXIS_USABLE_LIBS =3D UCLIBC include $(APPS)/Rules.elinux endif =20 |
From: Peter K. <pk...@us...> - 2001-05-07 11:26:30
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.4 1.5=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/04/27 14:39:50 1.4 +++ Makefile 2001/05/07 11:25:59 1.5 @@ -1,7 +1,7 @@ # $Id$ =20 ifdef APPS -USE_UCLIBC =3D 1 +AXIS_USABLE_LIBS =3D UCLIBC include $(APPS)/Rules.elinux endif =20 |
From: Peter K. <pk...@us...> - 2001-05-07 11:26:30
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.9 1.10=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/03/10 12:57:38 1.9 +++ Makefile 2001/05/07 11:25:59 1.10 @@ -1,7 +1,7 @@ # $Id$ =20 ifdef APPS -USE_UCLIBC =3D 1 +AXIS_USABLE_LIBS =3D UCLIBC include $(APPS)/Rules.elinux endif =20 |
From: Peter K. <pk...@us...> - 2001-05-07 11:26:00
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.18 1.19=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/03/10 12:57:39 1.18 +++ Makefile 2001/05/07 11:25:59 1.19 @@ -1,7 +1,7 @@ # $Id$ =20 ifdef APPS -USE_UCLIBC =3D 1 +AXIS_USABLE_LIBS =3D UCLIBC include $(APPS)/Rules.elinux endif =20 |