|
From: Mats F. <ma...@us...> - 2001-02-27 15:24:01
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Changed char to u8 The diff of the modified file(s): --- hci_vendor.c 2001/02/15 16:27:33 1.9 +++ hci_vendor.c 2001/02/27 15:25:10 1.10 @@ -91,7 +91,7 @@ extern struct wait_queue *set_baudrate_wq; extern hci_controller hci_ctrl; =20 -char bt_hw_firmware_info[255]; +u8 bt_hw_firmware_info[255]; =20 /****************** FUNCTION DEFINITION SECTION **************************= ***/ =20 |
|
From: Peter K. <pk...@us...> - 2001-03-06 10:47:30
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
EINVAL does not exist when compiling the userstack. Just return -1
in that case.
The diff of the modified file(s):
--- hci_vendor.c 2001/03/05 23:08:39 1.16
+++ hci_vendor.c 2001/03/06 10:49:09 1.17
@@ -154,7 +154,6 @@
c_pkt.opcode =3D hci_put_opcode(ERICSSON_SET_UART_BAUD_RATE, 0x3f) ;
c_pkt.len =3D 1;
switch (baudrate) {
-=20=20=20=20
case 57600: c_pkt.data[0] =3D 0x03;
break;
case 115200: c_pkt.data[0] =3D 0x02;
@@ -165,8 +164,13 @@
break;
default:
D_ERR(__FUNCTION__": Baudrate not supported\n");
+#ifdef __KERNEL__
return -EINVAL;
+#else
+ return -1;
+#endif
}
+
#ifdef CONFIG_BLUETOOTH_SET_BAUDRATE_BLOCKING
send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
#else
|
|
From: Mattias A. <mat...@us...> - 2001-03-31 15:49:06
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.18 1.19=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
added function show_bt_vendor
added define VENDOR in all debug printouts
The diff of the modified file(s):
--- hci_vendor.c 2001/03/16 07:38:48 1.18
+++ hci_vendor.c 2001/03/31 15:49:02 1.19
@@ -108,6 +108,8 @@
/********************** Ericsson functions *******************************=
****/
/*************************************************************************=
****/
=20
+#define VENDOR " [Ericsson]"
+
s32=20
hci_set_bd_addr(u8 bd[6])
{
@@ -115,13 +117,13 @@
u8 tmp_bd[6];
s32 i;
=20=20=20
- D_CMD(__FUNCTION__"\n");
+ D_CMD(__FUNCTION__ VENDOR "\n");
=20
for (i =3D 0; i < 6; i++) {
tmp_bd[5-i] =3D bd[i];
}
=20=20=20
- PRINTPKT(__FUNCTION__":", bd, 6);
+ PRINTPKT(__FUNCTION__ VENDOR ":", bd, 6);
pkt[0] =3D CMD_PKT;
pkt[1] =3D 0x0d;
pkt[2] =3D 0xfc;
@@ -134,7 +136,7 @@
s32
hci_read_firmware_rev_info(void)
{
- D_CMD(__FUNCTION__"\n");
+ D_CMD(__FUNCTION__ VENDOR "\n");
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(0xf, 0x3f) ;
c_pkt.len =3D 0;
@@ -150,7 +152,7 @@
on the new baudrate, this function can not block (Since btd sets the
new physical device speed when this function returns). */=20=20
=20=20=20
- D_CMD(__FUNCTION__"(%d baud)\n", baudrate);
+ D_CMD(__FUNCTION__ VENDOR "(%d baud)\n", baudrate);
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(ERICSSON_SET_UART_BAUD_RATE, 0x3f) ;
c_pkt.len =3D 1;
@@ -164,7 +166,7 @@
case 460800: c_pkt.data[0] =3D 0x00;
break;
default:
- D_ERR(__FUNCTION__ ": Baudrate not supported\n");
+ D_ERR(__FUNCTION__ VENDOR ": Baudrate not supported\n");
return -EINVAL;
}
=20
@@ -172,7 +174,7 @@
send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
#else
if (hci_ctrl.hc_buf.cmd_num < 1) {
- DSYS(__FUNCTION__ ": sleeping\n");
+ DSYS(__FUNCTION__ VENDOR ": sleeping\n");
interruptible_sleep_on(&set_baudrate_wq);
}
bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
@@ -190,13 +192,13 @@
{
switch (ocf) {
case 0x04:
- D_CMD(__FUNCTION__" Synth on set\n");
+ D_CMD(__FUNCTION__ VENDOR " Synth on set\n");
release_cmd_timer();
wake_up_interruptible(&hci_wq);
break;
=20=20=20=20=20
case ERICSSON_SET_UART_BAUD_RATE:
- D_CMD(__FUNCTION__" Ericsson baudrate set\n");
+ D_CMD(__FUNCTION__ VENDOR " baudrate set\n");
#ifdef CONFIG_BLUETOOTH_SET_BAUDRATE_BLOCKING
release_cmd_timer();
wake_up_interruptible(&hci_wq);
@@ -204,7 +206,7 @@
break;
=20
case ERICSSON_WRITE_BD_ADDR:
- D_CMD(__FUNCTION__" Ericsson BD_ADDR set\n");
+ D_CMD(__FUNCTION__ VENDOR " BD_ADDR set\n");
release_cmd_timer();
wake_up_interruptible(&hci_wq);
break;
@@ -224,7 +226,7 @@
case ERICSSON_ENTER_TEST_MODE:
release_cmd_timer();
if (r_val[0]) {
- D_ERR(__FUNCTION__" ERICSSON_ENTER_TEST_MODE %s\n",
+ D_ERR(__FUNCTION__ VENDOR " ENTER_TEST_MODE %s\n",
get_err_msg(r_val[0]));
}
wake_up_interruptible(&hci_wq);
@@ -233,7 +235,7 @@
case ERICSSON_TEST_CONTROL:
release_cmd_timer();
if (r_val[0]) {
- D_ERR(__FUNCTION__" ERICSSON_TEST_CONTROL %s\n",
+ D_ERR(__FUNCTION__ VENDOR " TEST_CONTROL %s\n",
get_err_msg(r_val[0]));
}
wake_up_interruptible(&hci_wq);
@@ -242,14 +244,14 @@
case ERICSSON_TX_TEST:
release_cmd_timer();
if (r_val[0]) {
- D_ERR(__FUNCTION__" ERICSSON_TX_TEST %s\n", get_err_msg(r_val[0]));
+ D_ERR(__FUNCTION__ VENDOR " TX_TEST %s\n", get_err_msg(r_val[0]));
}
wake_up_interruptible(&hci_wq);
break;
=20=20=20=20=20
default:
release_cmd_timer();
- D_ERR(__FUNCTION__" Manufacturer specific : Invalid reply (0x%x)\n", ocf=
);
+ D_ERR(__FUNCTION__ VENDOR " Manufacturer specific : Invalid reply (0x%x)=
\n", ocf);
wake_up_interruptible(&hci_wq);
break;
}
@@ -259,7 +261,7 @@
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
- D_ERR(__FUNCTION__" Vendor specicic event not recognized.\n");
+ D_ERR(__FUNCTION__ VENDOR " Vendor specicic event not recognized.\n");
}
=20
=20
@@ -274,10 +276,12 @@
/************************* Digianswer functions **************************=
****/
/*************************************************************************=
****/
=20
+#define VENDOR " [Digianswer]"
+
s32=20
hci_set_bd_addr(u8 bd[6])
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
@@ -285,7 +289,7 @@
s32
hci_read_firmware_rev_info(void)
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
@@ -296,7 +300,7 @@
u8 pkt[5];
s32 tmp;
=20=20=20
- D_CMD(__FUNCTION__"(%d baud)\n", baudrate);
+ D_CMD(__FUNCTION__ VENDOR "(%d baud)\n", baudrate);
pkt[0] =3D CMD_PKT;
pkt[1] =3D 0x07;
pkt[2] =3D 0xfc;
@@ -349,9 +353,9 @@
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
- D_REC(__FUNCTION__"DIGIANSWER EVENT\n");
+ D_REC(__FUNCTION__ VENDOR "\n");
if (len =3D=3D 0x01) {
- D_REC(__FUNCTION__"DIGIANSWER RESET REQUEST EVENT\n");
+ D_REC(__FUNCTION__ VENDOR "RESET REQUEST EVENT\n");
} else {=09=09=09
printk(get_digi_err_code(buf[0]));
}
@@ -364,13 +368,13 @@
{
switch (ocf) {
case 0x07:
- D_CMD(__FUNCTION__" Digianswer baudrate set\n");
+ D_CMD(__FUNCTION__ VENDOR "baudrate set\n");
release_cmd_timer();
wake_up_interruptible(&hci_wq);
break;
=20=20=20=20=20
default:
- D_ERR(__FUNCTION__" Manufacturer specific : Invalid reply (0x%x)\n", ocf=
);
+ D_ERR(__FUNCTION__ VENDOR " Manufacturer specific : Invalid reply (0x%x)=
\n", ocf);
break;
}
}
@@ -387,7 +391,7 @@
send_negotiation_pkt(void)
{
u8 pkt[8];
- D_CTRL(__FUNCTION__"\n");
+ D_CTRL(__FUNCTION__ VENDOR "\n");
pkt[0] =3D NEG_PKT;
pkt[1] =3D seq_nbr;
seq_nbr++;
@@ -407,10 +411,12 @@
/****************************** CSR functions ****************************=
****/
/*************************************************************************=
****/
=20
+#define VENDOR " [CSR]"
+
s32=20
hci_set_bd_addr(u8 bd[6])
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
@@ -418,7 +424,7 @@
s32
hci_read_firmware_rev_info(void)
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
@@ -426,7 +432,7 @@
s32=20
hci_set_baudrate(u32 baudrate)
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
@@ -434,14 +440,14 @@
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
- D_REC(__FUNCTION__"CSR EVENT\n");
+ D_REC(__FUNCTION__ VENDOR "\n");
}
=20
=20
void
process_vendor_return_param(u32 ocf, u8* r_val)
{
- D_ERR(__FUNCTION__"Manufacturer specific : Invalid reply (0x%x)\n", ocf);
+ D_ERR(__FUNCTION__ VENDOR "Manufacturer specific : Invalid reply (0x%x)\n=
", ocf);
}
=20
=20
@@ -459,7 +465,7 @@
s32=20
hci_set_bd_addr(u8 bd[6])
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
@@ -467,7 +473,7 @@
s32
hci_read_firmware_rev_info(void)
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
@@ -475,7 +481,7 @@
s32=20
hci_set_baudrate(u32 baudrate)
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
@@ -483,14 +489,14 @@
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
- D_REC(__FUNCTION__"Manufacturer specific : Unknown event.\n");
+ D_REC(__FUNCTION__ VENDOR "Manufacturer specific : Unknown event.\n");
}
=20
=20
void
process_vendor_return_param(u32 ocf, u8* r_val)
{
- D_ERR(__FUNCTION__"Manufacturer specific : Invalid reply (0x%x)\n", ocf);
+ D_ERR(__FUNCTION__ VENDOR "Manufacturer specific : Invalid reply (0x%x)\n=
", ocf);
}
=20
=20
@@ -500,5 +506,10 @@
}
=20
#endif
+
+void show_bt_vendor()
+{
+ DSYS("Current HW : %s\n", VENDOR);
+}
=20
/********************* END OF FILE hci_vendor.c **************************=
****/
|
|
From: Peter K. <pk...@us...> - 2001-04-10 13:04:25
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Some clean-up.
The diff of the modified file(s):
--- hci_vendor.c 2001/04/10 12:27:10 1.20
+++ hci_vendor.c 2001/04/10 13:04:24 1.21
@@ -145,7 +145,6 @@
return send_cmd_block((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
}
=20
-
s32=20
hci_set_baudrate(u32 baudrate)
{
@@ -153,18 +152,22 @@
on the new baudrate, this function can not block (Since btd sets the
new physical device speed when this function returns). */=20=20
=20=20=20
- D_CMD(__FUNCTION__ VENDOR "(%d baud)\n", baudrate);
+ D_CMD(__FUNCTION__ VENDOR " (%u baud)\n", baudrate);
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(ERICSSON_SET_UART_BAUD_RATE, 0x3f) ;
c_pkt.len =3D 1;
switch (baudrate) {
- case 57600: c_pkt.data[0] =3D 0x03;
+ case 57600:
+ c_pkt.data[0] =3D 0x03;
break;
- case 115200: c_pkt.data[0] =3D 0x02;
+ case 115200:
+ c_pkt.data[0] =3D 0x02;
break;
- case 230400: c_pkt.data[0] =3D 0x01;
+ case 230400:
+ c_pkt.data[0] =3D 0x01;
break;
- case 460800: c_pkt.data[0] =3D 0x00;
+ case 460800:
+ c_pkt.data[0] =3D 0x00;
break;
default:
D_ERR(__FUNCTION__ VENDOR ": Baudrate not supported\n");
@@ -187,7 +190,6 @@
return 0;
}
=20
-
void
process_vendor_return_param(u32 ocf, u8* r_val)
{
@@ -258,20 +260,18 @@
}
}
=20
-
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
D_ERR(__FUNCTION__ VENDOR " Vendor specicic event not recognized.\n");
}
-
=20
-char* get_hw_name(void)
+char*
+get_hw_name(void)
{
return "Ericsson";
}
=20
-
#elif defined(CONFIG_BLUETOOTH_DIGIANSWER)
/*************************************************************************=
****/
/************************* Digianswer functions **************************=
****/
@@ -286,7 +286,6 @@
return 0;
}
=20
-
s32
hci_read_firmware_rev_info(void)
{
@@ -294,28 +293,32 @@
return 0;
}
=20
-
s32=20
hci_set_baudrate(u32 baudrate)
{
u8 pkt[5];
s32 tmp;
=20=20=20
- D_CMD(__FUNCTION__ VENDOR "(%d baud)\n", baudrate);
+ D_CMD(__FUNCTION__ VENDOR " (%u baud)\n", baudrate);
pkt[0] =3D CMD_PKT;
pkt[1] =3D 0x07;
pkt[2] =3D 0xfc;
pkt[3] =3D 0x01;
switch (baudrate) {
- case 9600: pkt[4] =3D 0x03;
+ case 9600:
+ pkt[4] =3D 0x03;
break;
- case 19200:pkt[4] =3D 0x05;
+ case 19200:
+ pkt[4] =3D 0x05;
break;
- case 38400: pkt[4] =3D 0x07;
+ case 38400:
+ pkt[4] =3D 0x07;
break;
- case 57600: pkt[4] =3D 0x09;
+ case 57600:
+ pkt[4] =3D 0x09;
break;
- case 115200: pkt[4] =3D 0x09;
+ case 115200:
+ pkt[4] =3D 0x09;
break;
}
tmp =3D send_cmd(pkt,5);
@@ -325,9 +328,9 @@
=20=20=20
return tmp;
}
-
=20
-u8* get_digi_err_code(u8 code)
+u8*
+get_digi_err_code(u8 code)
{
switch (code) {
case 0x01:
@@ -346,11 +349,10 @@
return "Unspecified error\n";
=20=20=20=20=20
default:
- return "Unkown error digianswer code";
+ return "Unkown error digianswer code\n";
}
}
=20
-
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
@@ -360,10 +362,8 @@
} else {=09=09=09
printk(get_digi_err_code(buf[0]));
}
-
}
=20
-
void
process_vendor_return_param(u32 ocf, u8* r_val)
{
@@ -380,13 +380,12 @@
}
}
=20
-
-char* get_hw_name(void)
+char*
+get_hw_name(void)
{
return "Digianswer";
}
=20
-
#if RS232_SUPPORT
s32=20
send_negotiation_pkt(void)
@@ -397,8 +396,8 @@
pkt[1] =3D seq_nbr;
seq_nbr++;
pkt[2] =3D SET_UART(0x0,0x0,0x0,0xb);
- pkt[3] =3D (SET_BAUD_RATE(115200) & 0xff);
- pkt[4] =3D ((SET_BAUD_RATE(115200) >> 8) & 0xff);
+ pkt[3] =3D SET_BAUD_RATE(115200) & 0xff;
+ pkt[4] =3D (SET_BAUD_RATE(115200) >> 8) & 0xff;
pkt[5] =3D 10; /*?!? Try with this ?!?*/
pkt[6] =3D 0;
pkt[7] =3D SET_PROTOCOL_MODE(0,0,0,1,0,0);
@@ -421,7 +420,6 @@
return 0;
}
=20
-
s32
hci_read_firmware_rev_info(void)
{
@@ -429,7 +427,6 @@
return 0;
}
=20
-
s32=20
hci_set_baudrate(u32 baudrate)
{
@@ -437,27 +434,24 @@
return 0;
}
=20
-
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
D_REC(__FUNCTION__ VENDOR "\n");
}
=20
-
void
process_vendor_return_param(u32 ocf, u8* r_val)
{
D_ERR(__FUNCTION__ VENDOR "Manufacturer specific : Invalid reply (0x%x)\n=
", ocf);
}
=20
-
-char* get_hw_name(void)
+char*
+get_hw_name(void)
{
return "CSR";
}
=20
-
#else
/*************************************************************************=
****/
/************************* HW_NOINIT and HW_GENERIC **********************=
****/
@@ -470,7 +464,6 @@
return 0;
}
=20
-
s32
hci_read_firmware_rev_info(void)
{
@@ -478,7 +471,6 @@
return 0;
}
=20
-
s32=20
hci_set_baudrate(u32 baudrate)
{
@@ -486,29 +478,27 @@
return 0;
}
=20
-
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
D_REC(__FUNCTION__ VENDOR "Manufacturer specific : Unknown event.\n");
}
=20
-
void
process_vendor_return_param(u32 ocf, u8* r_val)
{
D_ERR(__FUNCTION__ VENDOR "Manufacturer specific : Invalid reply (0x%x)\n=
", ocf);
}
-
=20
-char* get_hw_name(void)
+char*
+get_hw_name(void)
{
return "Unknown hardware";
}
-
#endif
=20
-void show_bt_vendor()
+void
+show_bt_vendor()
{
DSYS("Current HW : %s\n", VENDOR);
}
|
|
From: Gordon M. <gm...@us...> - 2001-04-17 21:55:57
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.23 1.24=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):
--- hci_vendor.c 2001/04/17 16:05:11 1.23
+++ hci_vendor.c 2001/04/17 21:55:56 1.24
@@ -505,7 +505,7 @@
}
=20
void
-bt_show_vendor()
+bt_show_vendor(void)
{
DSYS("Current HW: %s\n", VENDOR);
}
|
|
From: Peter K. <pk...@us...> - 2001-04-20 11:45:06
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.26 1.27=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added commands for setting BD address and baud rate in CSR
module, and for reading hardware/firmware information.
The diff of the modified file(s):
--- hci_vendor.c 2001/04/18 15:47:13 1.26
+++ hci_vendor.c 2001/04/20 11:45:05 1.27
@@ -412,31 +412,385 @@
=20
#define VENDOR " [CSR]"
=20
+#define CSR_CH_ID_BCCMD 0x02
+#define CSR_CH_ID_HQ 0x03
+
+#define CSR_MSGTYPE_GETREQ 0x0000
+#define CSR_MSGTYPE_GETRESP 0x0001
+#define CSR_MSGTYPE_SETREQ 0x0002
+
+#define CSR_STATUS_OK 0x0000
+#define CSR_STATUS_NO_SUCH_VARID 0x0001
+#define CSR_STATUS_TOO_BIG 0x0002
+#define CSR_STATUS_NO_VALUE 0x0003
+#define CSR_STATUS_BAD_REQ 0x0004
+#define CSR_STATUS_NO_ACCESS 0x0005
+#define CSR_STATUS_READ_ONLY 0x0006
+#define CSR_STATUS_WRITE_ONLY 0x0007
+#define CSR_STATUS_ERROR 0x0008
+#define CSR_STATUS_PERMISSION_DENIED 0x0009
+
+#define CSR_CMD_CONFIG_UART 0x6802
+#define CSR_CMD_BUILD_ID 0x2819
+#define CSR_CMD_CHIP_VER 0x281a
+#define CSR_CMD_CHIP_REV 0x281b
+#define CSR_CMD_PS 0x7003
+
+#define CSR_PS_BDADDR 0x0001
+#define CSR_PS_BAUD_RATE 0x0204
+
+#define CSR_UART_RATE_9K6 0x0027
+#define CSR_UART_RATE_19K2 0x004f
+#define CSR_UART_RATE_38K4 0x009d
+#define CSR_UART_RATE_57K6 0x00ec
+#define CSR_UART_RATE_115K2 0x01d8
+#define CSR_UART_RATE_230K4 0x03b0
+#define CSR_UART_RATE_460K8 0x075f
+#define CSR_UART_RATE_921K6 0x0ebf
+
+#define CSR_UART_ONE_STOP_BIT 0x0000
+#define CSR_UART_TWO_STOP_BITS 0x2000
+
+#define CSR_UART_NO_PARITY 0x0000
+#define CSR_UART_ODD_PARITY 0x4000
+#define CSR_UART_EVEN_PARITY 0xc000
+
+typedef struct payload_descr
+{
+ u8 ch_id:6;
+ u8 first:1;
+ u8 last:1;
+} payload_descr;
+
+typedef struct csr_msg
+{
+ payload_descr p_descr;
+ u8 msg[0];
+} csr_msg;
+
+typedef struct csr_bccmd
+{
+ u16 type;
+ u16 len; /* in 16 bit integers */
+ u16 seq;
+ u16 var_id;
+ u16 status;
+ u16 payload[0];
+} csr_bccmd;
+=20=20
+typedef struct csr_bccmd_ps
+{
+ u16 ps_key;
+ u16 ps_len; /* len of only ps_val */
+ u16 unused; /* always 0x0000 */
+ u16 ps_val[0];
+} csr_bccmd_ps;
+
+static u16 csr_count =3D 0;
+
s32=20
hci_set_bd_addr(u8 bd[6])
{
- D_ERR(__FUNCTION__ VENDOR " not supported.\n");
- return 0;
+ csr_msg *msg;
+ csr_bccmd *cmd;
+ csr_bccmd_ps *ps;
+
+ 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) + 4*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 + 4;
+ 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_BDADDR;
+ ps->ps_len =3D 4; /* x 16 bits */
+ ps->unused =3D 0x0000;
+
+ ps->ps_val[0] =3D ((u16)bd[3]) & 0x00ff;
+ ps->ps_val[1] =3D ((((u16)bd[4]) << 8) | ((u16)bd[5]));
+ ps->ps_val[2] =3D (u16)bd[2];
+ ps->ps_val[3] =3D (((u16)bd[0] << 8) | ((u16)bd[1]));
+
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
}
=20
s32
hci_read_firmware_rev_info(void)
{
- D_ERR(__FUNCTION__ VENDOR " not supported.\n");
- return 0;
+ s32 tmp;
+ csr_msg *msg;
+ csr_bccmd *cmd;
+
+ D_CMD(__FUNCTION__ VENDOR "\n");
+=09
+ /* 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) + 6*sizeof(u16);
+
+ msg =3D (csr_msg *)c_pkt.data;
+ cmd =3D (csr_bccmd *)msg->msg;
+
+ /* 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_GETREQ;
+ cmd->len =3D 5 + 6;
+ cmd->seq =3D csr_count++;
+ cmd->var_id =3D CSR_CMD_BUILD_ID;
+ cmd->status =3D CSR_STATUS_OK; /* always OK in GETREQ */
+ 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);
+ if (tmp < 0)
+ return tmp;
+
+ 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);
+ if (tmp < 0)
+ return tmp;
+
+ 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);
+
+ return tmp;
}
=20
+//#define SET_BAUD_RATE_TEMPORARILY
s32=20
hci_set_baudrate(u32 baudrate)
{
- D_ERR(__FUNCTION__ VENDOR " not supported.\n");
- return 0;
+ s32 tmp;
+ csr_msg *msg;
+ csr_bccmd *cmd;
+ csr_bccmd_ps *ps;
+ u16 baud_divider;
+
+ D_CMD(__FUNCTION__ VENDOR " (%u baud)\n", baudrate);
+
+ switch (baudrate) {
+ case 57600:
+ baud_divider =3D CSR_UART_RATE_57K6;
+ break;
+ case 115200:
+ baud_divider =3D CSR_UART_RATE_115K2;
+ break;
+ case 230400:
+ baud_divider =3D CSR_UART_RATE_230K4;
+ break;
+ case 460800:
+ baud_divider =3D CSR_UART_RATE_460K8;
+ break;
+ case 921600:
+ baud_divider =3D CSR_UART_RATE_921K6;
+ break;
+ default:
+ D_ERR(__FUNCTION__ VENDOR ": Baudrate %u not supported\n", baudrate);
+ return -EINVAL;
+ }
+
+ /* HCI Manufacturer specific header */
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
+#ifdef SET_BAUD_RATE_TEMPORARILY
+ c_pkt.len =3D 1 + 5*sizeof(u16) + 6*sizeof(u16);
+#else
+ c_pkt.len =3D 1 + 5*sizeof(u16) + 3*sizeof(u16) + 1*sizeof(u16);
+#endif
+
+ 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;
+
+#ifdef SET_BAUD_RATE_TEMPORARILY
+ cmd->type =3D CSR_MSGTYPE_SETREQ;
+ cmd->len =3D 5 + 6;
+ cmd->seq =3D csr_count++;
+ cmd->var_id =3D CSR_CMD_CONFIG_UART;
+ cmd->status =3D CSR_STATUS_OK; /* always OK in SETREQ */
+
+ memset(cmd->payload, 0, 6*sizeof(u16));
+ cmd->payload[0] =3D baud_divider | CSR_UART_NO_PARITY | CSR_UART_ONE_STOP=
_BIT;
+
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+#else
+ 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_BAUD_RATE;
+ ps->ps_len =3D 1; /* x 16 bits */
+ ps->unused =3D 0x0000;
+
+ ps->ps_val[0] =3D baud_divider;
+
+ tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
+#endif
+
+ return tmp;
}
=20
+//#define VERBOSE
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
+ csr_msg *msg;
+ csr_bccmd *cmd;
+ csr_bccmd_ps *ps;
+
D_REC(__FUNCTION__ VENDOR "\n");
+=09
+ /* FIXME -- is there only one cmd buffer available ? */
+ hci_ctrl.hc_buf.cmd_num =3D 1;=20=20
+
+ release_cmd_timer();
+
+ msg =3D (struct csr_msg *)buf;
+ cmd =3D (struct csr_bccmd *)msg->msg;
+ ps =3D (struct csr_bccmd_ps *)cmd->payload;
+
+ switch (msg->p_descr.ch_id) {
+ case CSR_CH_ID_BCCMD:
+ if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP &&
+ cmd->status =3D=3D CSR_STATUS_OK) {
+ switch (cmd->var_id) {
+ case CSR_CMD_CONFIG_UART:
+ break;
+
+ case CSR_CMD_BUILD_ID:
+ /* Store this for later retrieval */
+ sprintf(bt_hw_firmware_info,
+ "\n Firmware version: %d",
+ cmd->payload[0]);
+ break;
+
+ case CSR_CMD_CHIP_VER:
+ break;
+
+ case CSR_CMD_CHIP_REV:
+ break;
+
+ case CSR_CMD_PS:
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ case CSR_CH_ID_HQ:
+ break;
+
+ default:
+ break;
+ }
+
+#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);
+
+ 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);
+
+ switch (msg->p_descr.ch_id) {
+ case CSR_CH_ID_BCCMD:
+ printk("BCCMD MSG\n");
+
+ switch (cmd->type) {
+ case CSR_MSGTYPE_GETREQ:
+ printk("GETREQ\n");
+ break;
+
+ case CSR_MSGTYPE_GETRESP:
+ printk("GETRESP\n");
+ break;
+
+ case CSR_MSGTYPE_SETREQ:
+ printk("SETREQ\n");
+ break;
+
+ default:
+ break;
+ }
+
+ if (cmd->status =3D=3D CSR_STATUS_OK)
+ printk("Command successful\n");
+
+ if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP &&
+ cmd->status =3D=3D CSR_STATUS_OK) {
+ switch (cmd->var_id) {
+ case CSR_CMD_CONFIG_UART:
+ printk("UART config: 0x%04X\n", cmd->payload[0]);
+ break;
+
+ case CSR_CMD_BUILD_ID:
+ printk("Firmware version: %d\n", cmd->payload[0]);
+ break;
+
+ case CSR_CMD_CHIP_VER:
+ printk("Chip Version: %d\n", cmd->payload[0]);
+ break;
+
+ case CSR_CMD_CHIP_REV:
+ printk("Chip Revision: %d\n", cmd->payload[0]);
+ break;
+
+ case CSR_CMD_PS:
+ if (cmd->len > 2*5)
+ printk("ps: key 0x%x, len %d\n", ps->ps_key, ps->ps_len);
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ case CSR_CH_ID_HQ:
+ printk("HQ MSG\n");
+ break;
+
+ default:
+ printk("Unknown MSG type\n");
+ break;
+ }
+#endif /* VERBOSE */
+
+ /* FIXME -- if using raw interface we haven't slept */
+ wake_up_interruptible(&hci_wq);=09
}
=20
void
|
|
From: Mattias A. <mat...@us...> - 2001-04-25 17:42:19
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.27 1.28=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added parsing of biterror/rssi/packet_stat reports (HQ message)
The diff of the modified file(s):
--- hci_vendor.c 2001/04/20 11:45:05 1.27
+++ hci_vendor.c 2001/04/25 17:42:10 1.28
@@ -262,7 +262,7 @@
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
- D_ERR(__FUNCTION__ VENDOR " Vendor specicic event not recognized.\n");
+ D_ERR(__FUNCTION__ VENDOR " Vendor specific event not recognized.\n");
}
=20
char*
@@ -328,6 +328,7 @@
return tmp;
}
=20
+
u8*
get_digi_err_code(u8 code)
{
@@ -455,6 +456,11 @@
#define CSR_UART_ODD_PARITY 0x4000
#define CSR_UART_EVEN_PARITY 0xc000
=20
+#define CSR_VARID_RSSI_REPORT 0x0801
+#define CSR_VARID_PACKET_STAT_REPORT 0x1001
+#define CSR_VARID_BITERR_REPORT 0x1006
+
+
typedef struct payload_descr
{
u8 ch_id:6;
@@ -486,6 +492,27 @@
u16 ps_val[0];
} csr_bccmd_ps;
=20
+typedef struct csr_rssi_rep
+{=20=20
+ u16 rssi;
+} csr_rssi_rep;
+
+typedef struct csr_packstat_rep
+{=20=20
+ u16 n_pkts;
+ u16 n_good;
+ u16 n_corr;
+ u16 rssi;
+ u16 rssi_valid;
+} csr_packstat_rep;
+
+typedef struct csr_biterr_rep
+{=20=20
+ u16 index;
+ u16 val_last;
+ u16 val_tot;
+} csr_biterr_rep;
+
static u16 csr_count =3D 0;
=20
s32=20
@@ -686,6 +713,7 @@
if (cmd->type =3D=3D CSR_MSGTYPE_GETRESP &&
cmd->status =3D=3D CSR_STATUS_OK) {
switch (cmd->var_id) {
+
case CSR_CMD_CONFIG_UART:
break;
=20
@@ -712,9 +740,37 @@
break;
=20
case CSR_CH_ID_HQ:
+ switch (cmd->var_id)=20
+ {
+=09=09=09
+ 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;
=20
+ 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->rs=
si_valid);
+ }
+ break;
+=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->inde=
x, rep->val_last, rep->val_tot);
+ }
+ }
+=09=09
+ break;
+=09=09
default:
+ D_ERR("Unknown varid [0x%x]!\n", cmd->var_id);
break;
}
=20
@@ -806,6 +862,7 @@
}
=20
#else
+
/*************************************************************************=
****/
/************************* HW_NOINIT and HW_GENERIC **********************=
****/
/*************************************************************************=
****/
|
|
From: Peter K. <pk...@us...> - 2001-04-26 08:32:39
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.28 1.29=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected retun value from bt_hw_vendor() for USB and noinit.
The diff of the modified file(s):
--- hci_vendor.c 2001/04/25 17:42:10 1.28
+++ hci_vendor.c 2001/04/26 08:32:39 1.29
@@ -742,31 +742,30 @@
case CSR_CH_ID_HQ:
switch (cmd->var_id)=20
{
-=09=09=09
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;
+ }
=20=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->rs=
si_valid);
- }
break;
+ }
=20=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->inde=
x, rep->val_last, rep->val_tot);
+ break;
}
}
-=09=09
break;
=20=09=09
default:
@@ -905,10 +904,12 @@
char*
bt_hw_vendor(void)
{
-#if defined(CONFIG_BLUETOOTH_USB)
+#if defined(CONFIG_BLUETOOTH_USBMODULE)
return "USB";
#elif defined(CONFIG_BLUETOOTH_GENERIC)
return "Generic";
+#elif defined(CONFIG_BLUETOOTH_NOINIT)
+ return "No Init";
#else
return "Unknown";
#endif
|
|
From: Gordon M. <gm...@us...> - 2001-04-27 15:38:34
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.29 1.30=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
--Added the Infineon BlueMoon Chipset support provided by Christian Kranz.
The diff of the modified file(s):
--- hci_vendor.c 2001/04/26 08:32:39 1.29
+++ hci_vendor.c 2001/04/27 15:38:04 1.30
@@ -859,7 +859,178 @@
{
return "CSR";
}
+#elif defined(CONFIG_BLUETOOTH_INFINEON_BMI)
+/*************************************************************************=
****/
+/***************** Functions for Infineon BlueMoon I chips****************=
***/
+/*************************************************************************=
****/
+
+s32
+hci_set_bd_addr(u8 bd[6])
+{
+ D_ERR(__FUNCTION__" not supported.\n");
+ return 0;
+}
+
+
+s32
+hci_read_firmware_rev_info(void)
+{
+ D_CMD(__FUNCTION__"\n");
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(0x0005, 0x3f) ;
+ c_pkt.len =3D 0;
+
+ return send_cmd_block((u8*) &c_pkt ,c_pkt.len + CMD_HDR_LEN +
+HCI_HDR_LEN);
+}
=20
+s32
+hci_set_baudrate(u32 baudrate)
+{
+ u8 pkt[6];
+ s32 tmp;
+
+ D_CMD(__FUNCTION__"(%d baud)\n", baudrate);
+ pkt[0] =3D CMD_PKT;
+ pkt[1] =3D 0x06;
+ pkt[2] =3D 0xfc;
+ pkt[3] =3D 0x02;
+ switch (baudrate) {
+ case 9600:
+ pkt[4]=3D3;
+ pkt[5]=3D168;
+ break;
+ case 19200:
+ pkt[4]=3D2;
+ pkt[5]=3D168;
+ break;
+ case 38400:
+ pkt[4]=3D1;
+ pkt[5]=3D168;
+ break;
+ case 57600:
+ pkt[4]=3D0;
+ pkt[5]=3D225;
+ break;
+ case 115200:
+ pkt[4]=3D0;
+ pkt[5]=3D112;
+ break;
+ case 230400:
+ pkt[4]=3D0;
+ pkt[5]=3D55;
+ break;
+ case 460800:
+ pkt[4]=3D0;
+ pkt[5]=3D27;
+ break;
+ default:
+ D_ERR(__FUNCTION__ ": Baudrate not supported\n");
+ } // end of switch
+ tmp =3D send_cmd(pkt,6);
+
+ /* the chip answers with two command complete events, the first using=20
+ the old baudrate, the second using the new baudrate. The second=20
+ event is send at least 0.125seconds after the first to let the=20
+ host change its baudrate too. */
+
+ start_cmd_timer();
+ interruptible_sleep_on(&hci_wq);
+
+ return tmp;
+}
+
+void
+process_vendor_event(u8 *buf, u32 len, u32 event_code)
+{
+ D_REC(__FUNCTION__" Infineon specific event\n");
+ if (len>=3D1) {
+ switch (buf[0]) {
+ case 0x00:
+ printk("Infineon event: Hardware Startup complete.\n");
+ break;
+ case 0x04:
+ printk("Infineon event: invalid packet length.\n");
+ break;
+ case 0x05:
+ printk("Infineon event: BD-Data invalid (check EEPROM).\n");
+ break;
+ case 0x07:
+ printk("Infineon event: invalid packet type.\n");
+ break;
+ case 0x09:
+ printk("Infineon event: invalid ACL_BC_PB_Flag.\n");
+ break;
+ case 0x0A:
+ printk("Infineon event: invalid ACL_CNC_Handle.\n");
+ break;
+ case 0x0B:
+ printk("Infineon event: invalid SCO_CNC_Handle.\n");
+ break;
+ case 0x0C:
+ printk("Infineon event: low power mode start.\n");
+ break;
+ case 0x0D:
+ printk("Infineon event: low power mode end.\n");
+ break;
+
+ default:
+ D_ERR(__FUNCTION__" Infineon specific unknown event\n");
+ } /* end of switch */
+ } else {
+ D_ERR(__FUNCTION__" Infineon specific invalid event\n");
+ }
+}
+
+
+void
+process_vendor_return_param(u32 ocf, u8* r_val)
+{
+ static int second=3D0;
+ switch (ocf) {
+ case 0x0005: /* read software version */
+ D_CMD(__FUNCTION__" Infineon software version\n");
+ if (r_val[0]!=3D0) {
+ D_ERR(__FUNCTION__" Infineon software version read failure\n");
+ } else {
+ printk("Infineon LM-FW version is: %x.%x%x\n",
+ r_val[2]&0x0F,r_val[1]>>4,r_val[1]&0x0F);
+ printk("Infineon BB-FW version is: %02x%02x\n",r_val[4],r_val[3]);
+ }
+ release_cmd_timer();
+ wake_up_interruptible(&hci_wq);
+ break;
+
+ case 0x0006: /* set baudrate */
+ D_CMD(__FUNCTION__" Infineon baudrate set\n");
+ if ( (r_val[0]=3D=3D0x00) && (second=3D=3D0) ) {
+ printk("Infineon baudrate changes after this message\n");
+ second=3D1;
+ } else if ( (r_val[0]=3D=3D0x00) && second) {
+ printk("Infineon baudrate has changed to new value\n");
+ second=3D0;
+ } else {
+ D_ERR(__FUNCTION__" Infineon baudrate set failure %x\n",r_val[0]);
+ }
+ release_cmd_timer();
+ wake_up_interruptible(&hci_wq);
+ break;
+
+ default:
+ release_cmd_timer();
+ D_ERR(__FUNCTION__" Manufacturer specific : Invalid reply (0x%x)\n",
+ocf);
+ wake_up_interruptible(&hci_wq);
+ break;
+ } /* end of switch */
+}
+
+
+char* get_hw_name(void)
+{
+ return "Chipset: Infineon BlueMoon I";
+}
+
#else
=20
/*************************************************************************=
****/
@@ -910,6 +1081,8 @@
return "Generic";
#elif defined(CONFIG_BLUETOOTH_NOINIT)
return "No Init";
+#elif defined(CONFIG_BLUETOOTH_INFINEON_BMI)
+ return "Infineon";
#else
return "Unknown";
#endif
|
|
From: Peter K. <pk...@us...> - 2001-04-27 16:45:36
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.30 1.31=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected support for Infineon (as far as I could without actually
having access to the hardware).
The diff of the modified file(s):
--- hci_vendor.c 2001/04/27 15:38:04 1.30
+++ hci_vendor.c 2001/04/27 16:45:05 1.31
@@ -859,29 +859,31 @@
{
return "CSR";
}
+
#elif defined(CONFIG_BLUETOOTH_INFINEON_BMI)
/*************************************************************************=
****/
/***************** Functions for Infineon BlueMoon I chips****************=
***/
/*************************************************************************=
****/
=20
+#define VENDOR " [Infineon]"
+
s32
hci_set_bd_addr(u8 bd[6])
{
- D_ERR(__FUNCTION__" not supported.\n");
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
return 0;
}
=20
-
s32
hci_read_firmware_rev_info(void)
{
- D_CMD(__FUNCTION__"\n");
+ D_CMD(__FUNCTION__ VENDOR "\n");
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(0x0005, 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);
}
=20
s32
@@ -890,7 +892,7 @@
u8 pkt[6];
s32 tmp;
=20
- D_CMD(__FUNCTION__"(%d baud)\n", baudrate);
+ D_CMD(__FUNCTION__ VENDOR " (%d baud)\n", baudrate);
pkt[0] =3D CMD_PKT;
pkt[1] =3D 0x06;
pkt[2] =3D 0xfc;
@@ -925,8 +927,8 @@
pkt[5]=3D27;
break;
default:
- D_ERR(__FUNCTION__ ": Baudrate not supported\n");
- } // end of switch
+ D_ERR(__FUNCTION__ VENDOR ": Baudrate not supported\n");
+ }
tmp =3D send_cmd(pkt,6);
=20
/* the chip answers with two command complete events, the first using=20
@@ -943,7 +945,7 @@
void
process_vendor_event(u8 *buf, u32 len, u32 event_code)
{
- D_REC(__FUNCTION__" Infineon specific event\n");
+ D_REC(__FUNCTION__ VENDOR "\n");
if (len>=3D1) {
switch (buf[0]) {
case 0x00:
@@ -975,23 +977,23 @@
break;
=20
default:
- D_ERR(__FUNCTION__" Infineon specific unknown event\n");
+ D_ERR(__FUNCTION__ VENDOR ": Unknown event\n");
} /* end of switch */
} else {
- D_ERR(__FUNCTION__" Infineon specific invalid event\n");
+ D_ERR(__FUNCTION__ VENDOR ": Invalid event\n");
}
}
=20
-
void
process_vendor_return_param(u32 ocf, u8* r_val)
{
static int second=3D0;
+
switch (ocf) {
case 0x0005: /* read software version */
- D_CMD(__FUNCTION__" Infineon software version\n");
+ D_CMD(__FUNCTION__ VENDOR ": Software version\n");
if (r_val[0]!=3D0) {
- D_ERR(__FUNCTION__" Infineon software version read failure\n");
+ D_ERR(__FUNCTION__ VENDOR ": Software version read failure\n");
} else {
printk("Infineon LM-FW version is: %x.%x%x\n",
r_val[2]&0x0F,r_val[1]>>4,r_val[1]&0x0F);
@@ -1002,7 +1004,7 @@
break;
=20
case 0x0006: /* set baudrate */
- D_CMD(__FUNCTION__" Infineon baudrate set\n");
+ D_CMD(__FUNCTION__ VENDOR ": Baudrate set\n");
if ( (r_val[0]=3D=3D0x00) && (second=3D=3D0) ) {
printk("Infineon baudrate changes after this message\n");
second=3D1;
@@ -1010,7 +1012,7 @@
printk("Infineon baudrate has changed to new value\n");
second=3D0;
} else {
- D_ERR(__FUNCTION__" Infineon baudrate set failure %x\n",r_val[0]);
+ D_ERR(__FUNCTION__ VENDOR ": Baudrate set failure %x\n",r_val[0]);
}
release_cmd_timer();
wake_up_interruptible(&hci_wq);
@@ -1018,21 +1020,20 @@
=20
default:
release_cmd_timer();
- D_ERR(__FUNCTION__" Manufacturer specific : Invalid reply (0x%x)\n",
+ D_ERR(__FUNCTION__ VENDOR " Manufacturer specific: Invalid reply (0x%x)\=
n",
ocf);
wake_up_interruptible(&hci_wq);
break;
} /* end of switch */
}
-
=20
-char* get_hw_name(void)
+char*
+bt_hw_vendor(void)
{
- return "Chipset: Infineon BlueMoon I";
+ return "Infineon";
}
=20
#else
-
/*************************************************************************=
****/
/************************* HW_NOINIT and HW_GENERIC **********************=
****/
/*************************************************************************=
****/
@@ -1081,8 +1082,6 @@
return "Generic";
#elif defined(CONFIG_BLUETOOTH_NOINIT)
return "No Init";
-#elif defined(CONFIG_BLUETOOTH_INFINEON_BMI)
- return "Infineon";
#else
return "Unknown";
#endif
|
|
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-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: 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: Peter K. <pk...@us...> - 2001-05-17 14:53:17
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.34 1.35=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Differ the vendor name for CSR depending on whether BCSP is
used or not.
The diff of the modified file(s):
--- hci_vendor.c 2001/05/15 15:19:58 1.34
+++ hci_vendor.c 2001/05/17 14:53:15 1.35
@@ -1037,7 +1037,11 @@
char*
bt_hw_vendor(void)
{
- return "CSR";
+#ifdef CONFIG_BLUETOOTH_USE_BCSP
+ return "CSR (BCSP)";
+#else
+ return "CSR (H4)";
+#endif
}
=20
#elif defined(CONFIG_BLUETOOTH_INFINEON_BMI)
|
|
From: Peter K. <pk...@us...> - 2001-05-17 15:04:40
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.35 1.36=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Turn bt_write_lower_driver() into bcsp_write_top() when BCSP is enabled. The diff of the modified file(s): --- hci_vendor.c 2001/05/17 14:53:15 1.35 +++ hci_vendor.c 2001/05/17 15:04:38 1.36 @@ -85,6 +85,10 @@ =20 #define BT_HW_INFO_MAX 255 =20 +#ifdef CONFIG_BLUETOOTH_USE_BCSP +#define bt_write_lower_driver(data, len) bcsp_write_top(data, len) +#endif + /****************** LOCAL VARIABLE DECLARATION SECTION *******************= ***/ =20 /* These are declared in hci.c */ |
|
From: Mats F. <ma...@us...> - 2001-05-18 07:02:40
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.36 1.37=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Send back a GETRESP if we receive a HQ SETREQ
The diff of the modified file(s):
--- hci_vendor.c 2001/05/17 15:04:38 1.36
+++ hci_vendor.c 2001/05/18 07:02:38 1.37
@@ -521,6 +521,8 @@
=20
static u16 csr_count =3D 0;
=20
+static s32 csr_send_general_hq(csr_bccmd *cmd);
+
#ifdef CONFIG_BLUETOOTH_USE_BCSP
void
hci_receive_bcsp(u8 *data, u32 count)
@@ -565,10 +567,11 @@
break;
}
} else {
- DSYS(__FUNCTION__", Not a GETRESP msg\n");
+ DSYS(__FUNCTION__": Not a GETRESP msg\n");
+ print_data(__FUNCTION__, data, count);
}
} else {
- D_ERR(__FUNCTION__", BCSP status error 0x%x\n", cmd->status);
+ D_ERR(__FUNCTION__": BCSP status error 0x%x\n", cmd->status);
print_data(__FUNCTION__, data, count);
}
=20
@@ -622,17 +625,55 @@
D_ERR("Unknown varid [0x%x]!\n", cmd->var_id);
break;
}
+ } else if (cmd->type =3D=3D CSR_MSGTYPE_SETREQ) {
+ DSYS(__FUNCTION__": Received a SETREQ, sending back GETRESP\n");
+ print_data(__FUNCTION__, data, count);
+ cmd->type =3D CSR_MSGTYPE_GETRESP;
+ cmd->seq =3D csr_count++;
+=09
+ csr_send_general_hq(cmd);
+=09=09=09
+ } else if (cmd->type =3D=3D CSR_MSGTYPE_GETREQ) {
+ DSYS(__FUNCTION__": Received a GETREQ\n");
+ print_data(__FUNCTION__, data, count);
} else {
- DSYS(__FUNCTION__", Not a GETRESP msg\n");
+ DSYS(__FUNCTION__": Unknown message type\n");
+ print_data(__FUNCTION__, data, count);
}
} else {
- D_ERR(__FUNCTION__", HQ status error 0x%x\n", cmd->status);
+ D_ERR(__FUNCTION__": HQ status error 0x%x\n", cmd->status);
print_data(__FUNCTION__, data, count);
}
=20=09
wake_up_interruptible(&hci_wq);=09
}
+
+s32
+csr_send_general_hq(csr_bccmd *cmd)
+{
+ csr_msg *msg;
+
+ /* HCI Manufacturer specific header */
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
+ c_pkt.len =3D 1 + cmd->len * 2;
+=09
+ msg =3D (csr_msg *)c_pkt.data;
+=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;
+
+ memcpy(msg->msg, cmd, cmd->len * 2);
+
+ print_data(__FUNCTION__, (u8*)&c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_L=
EN);
+=09
+ return bcsp_write_top((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
);
+}
#endif
+
+
=20
s32=20
hci_set_bd_addr(u8 bd[6])
|
|
From: Mats F. <ma...@us...> - 2001-05-18 07:13:37
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.37 1.38=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use bt_write_lower_driver instead of bcsp_write_top The diff of the modified file(s): --- hci_vendor.c 2001/05/18 07:02:38 1.37 +++ hci_vendor.c 2001/05/18 07:13:37 1.38 @@ -669,7 +669,7 @@ =20 print_data(__FUNCTION__, (u8*)&c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_L= EN); =20=09 - return bcsp_write_top((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN= ); + return bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_= HDR_LEN); } #endif =20 |
|
From: Mats F. <ma...@us...> - 2001-05-18 13:50:07
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.38 1.39=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Don't disable parity for BCSP
* Corrected length of set baudrate command
The diff of the modified file(s):
--- hci_vendor.c 2001/05/18 07:13:37 1.38
+++ hci_vendor.c 2001/05/18 13:50:07 1.39
@@ -55,6 +55,7 @@
#include <linux/bluetooth/btmem.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
+
#else /* user mode */
#include <stdlib.h>
#include <string.h>
@@ -863,7 +864,7 @@
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
#ifdef SET_BAUD_RATE_TEMPORARILY
- c_pkt.len =3D 1 + 5*sizeof(u16) + 6*sizeof(u16);
+ c_pkt.len =3D 1 + 5*sizeof(u16) + 4*sizeof(u16);
#else
c_pkt.len =3D 1 + 5*sizeof(u16) + 3*sizeof(u16) + 1*sizeof(u16);
#endif
@@ -879,18 +880,22 @@
=20
#ifdef SET_BAUD_RATE_TEMPORARILY
cmd->type =3D CSR_MSGTYPE_SETREQ;
- cmd->len =3D 5 + 6;
+ cmd->len =3D 5 + 4;
cmd->seq =3D csr_count++;
cmd->var_id =3D CSR_CMD_CONFIG_UART;
cmd->status =3D CSR_STATUS_OK; /* always OK in SETREQ */
=20
- memset(cmd->payload, 0, 6*sizeof(u16));
+ memset(cmd->payload, 0, 4*sizeof(u16));
+#ifdef CONFIG_BLUETOOTH_USE_BCSP
+ cmd->payload[0] =3D baud_divider | CSR_UART_EVEN_PARITY | CSR_UART_ONE_ST=
OP_BIT;
+#else
cmd->payload[0] =3D baud_divider | CSR_UART_NO_PARITY | CSR_UART_ONE_STOP=
_BIT;
-
+#endif
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=20
hci_ctrl.hc_buf.cmd_num--;
|
|
From: Peter K. <pk...@us...> - 2001-05-30 15:27:27
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.40 1.41=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Use temporary way of setting speed for CSR.
The diff of the modified file(s):
--- hci_vendor.c 2001/05/22 09:45:53 1.40
+++ hci_vendor.c 2001/05/30 10:34:15 1.41
@@ -814,7 +814,7 @@
}
=20
=20
-//#define SET_BAUD_RATE_TEMPORARILY
+#define SET_BAUD_RATE_TEMPORARILY
s32
hci_set_baudrate(u32 baudrate)
{
|
|
From: Mattias A. <mat...@us...> - 2001-06-06 14:53:42
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.41 1.42=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Added ps key define (0x191)
* Added return buf for copying read ps vals to usermode
* Added csr_pskey used to read/write any ps value
* Always use temp baudrate setting (after fixing rtx problems due to=20
uart deep sleep timout)
* hw_vendor now uses bt_use_bcsp() instead of defines
The diff of the modified file(s):
--- hci_vendor.c 2001/05/30 10:34:15 1.41
+++ hci_vendor.c 2001/06/06 14:53:41 1.42
@@ -442,6 +442,7 @@
#define CSR_PS_BDADDR 0x0001
#define CSR_PS_MAX_ACL_PKT_LEN 0x0011
#define CSR_PS_MAX_ACL_PKTS 0x0013
+#define CSR_PS_UART_CONFIG 0x0191
#define CSR_PS_BAUD_RATE 0x0204
=20
#define CSR_UART_RATE_9K6 0x0027
@@ -520,7 +521,12 @@
=20
static s32 csr_send_general_hq(csr_bccmd *cmd);
=20
-#ifdef CONFIG_BLUETOOTH_USE_BCSP
+#define PSRETBUF_SIZE 10 /* should be enough for what we want to do */
+static u16 ps_retbuf[PSRETBUF_SIZE];
+
+
+#ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP
+
void
hci_receive_bcsp(u8 *data, u32 count)
{
@@ -529,7 +535,6 @@
=20=09
D_REC(__FUNCTION__ "\n");
=20
- /* FIXME -- is there only one cmd buffer available ? */
hci_ctrl.hc_buf.cmd_num =3D 1;=20=20
=20
release_cmd_timer();
@@ -558,6 +563,12 @@
break;
=20=09=09=09=09
case CSR_CMD_PS:
+ printk("ps key[0x%x] ", ps->ps_key);
+ print_data("", (u8*)ps->ps_val, ps->ps_len*sizeof(u16));
+=09=09=09=09
+ /* Now copy this data to return buf */
+ memcpy(ps_retbuf, ps->ps_val,=20
+ ps->ps_len*sizeof(u16));
break;
=20=09=09=09=09
default:
@@ -670,8 +681,62 @@
}
#endif
=20
+s32=20
+csr_pskey(u16 ps_key, u16 rw_mode, u16 *retb, u16 n_pars)
+{
+ s32 tmp;
+ csr_msg *msg;
+ csr_bccmd *cmd;
+ csr_bccmd_ps *ps;
+
+ printk(__FUNCTION__" : ps 0x%x\n", ps_key);=09
+
+ /* 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) + n_pars*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 rw_mode;
+ cmd->len =3D 5 + 3 + n_pars;
+ 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 ps_key;
+ ps->ps_len =3D n_pars; /* x 16 bits */
+ ps->unused =3D 0x0000;
+
+ if (rw_mode =3D=3D CSR_MSGTYPE_GETREQ)
+ memset(ps->ps_val, 0, n_pars*sizeof(u16)); /* zero params in GETREQ */
+ else=20=20
+ memcpy(ps->ps_val, retb, n_pars*sizeof(16)); /* copy params in SETREQ */
+
+ /* Clear return buf */
+ memset(ps_retbuf, 0, PSRETBUF_SIZE*2);
+
+ tmp =3D send_cmd_block((u8*) &c_pkt,=20
+ c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
+=09=20
+ if (rw_mode =3D=3D CSR_MSGTYPE_GETREQ)
+ memcpy(retb, ps_retbuf, n_pars*sizeof(u16));
=20
+ /* Signal status back in SETREQ ? */
=20
+ return tmp;
+}
+
s32=20
hci_set_bd_addr(u8 bd[6])
{
@@ -813,8 +878,6 @@
return tmp;
}
=20
-
-#define SET_BAUD_RATE_TEMPORARILY
s32
hci_set_baudrate(u32 baudrate)
{
@@ -859,12 +922,9 @@
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
-#ifdef SET_BAUD_RATE_TEMPORARILY
c_pkt.len =3D 1 + 5*sizeof(u16) + 4*sizeof(u16);
-#else
- c_pkt.len =3D 1 + 5*sizeof(u16) + 3*sizeof(u16) + 1*sizeof(u16);
-#endif
=20
+
msg =3D (csr_msg *)c_pkt.data;
cmd =3D (csr_bccmd *)msg->msg;
ps =3D (csr_bccmd_ps *)cmd->payload;
@@ -874,7 +934,6 @@
msg->p_descr.first =3D 1;
msg->p_descr.ch_id =3D CSR_CH_ID_BCCMD;
=20
-#ifdef SET_BAUD_RATE_TEMPORARILY
cmd->type =3D CSR_MSGTYPE_SETREQ;
cmd->len =3D 5 + 4;
cmd->seq =3D csr_count++;
@@ -882,11 +941,16 @@
cmd->status =3D CSR_STATUS_OK; /* always OK in SETREQ */
=20
memset(cmd->payload, 0, 4*sizeof(u16));
-#ifdef CONFIG_BLUETOOTH_USE_BCSP
- cmd->payload[0] =3D baud_divider | CSR_UART_EVEN_PARITY | CSR_UART_ONE_ST=
OP_BIT;
-#else
- cmd->payload[0] =3D baud_divider | CSR_UART_NO_PARITY | CSR_UART_ONE_STOP=
_BIT;
-#endif
+
+ if (bt_use_bcsp(-1))
+ {
+ cmd->payload[0] =3D baud_divider | CSR_UART_EVEN_PARITY |=20
+ CSR_UART_ONE_STOP_BIT;
+ } else {
+ cmd->payload[0] =3D baud_divider | CSR_UART_NO_PARITY |=20
+ CSR_UART_ONE_STOP_BIT;
+ }
+
if (hci_ctrl.hc_buf.cmd_num < 1) {
DSYS(__FUNCTION__ VENDOR ": sleeping\n");
interruptible_sleep_on(&set_baudrate_wq);
@@ -895,23 +959,7 @@
tmp =3D bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI=
_HDR_LEN);
=20
hci_ctrl.hc_buf.cmd_num--;
-#else
- 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_BAUD_RATE;
- ps->ps_len =3D 1; /* x 16 bits */
- ps->unused =3D 0x0000;
-
- ps->ps_val[0] =3D baud_divider;
=20
- tmp =3D send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LE=
N);
-#endif
-
return tmp;
}
=20
@@ -957,6 +1005,13 @@
break;
=20
case CSR_CMD_PS:
+ printk("ps key[0x%x] ", ps->ps_key);
+ print_data("", (u8*)ps->ps_val, ps->ps_len*sizeof(u16));
+=09=09=09=09
+ /* Now copy this data to return buf */
+=09=09=09=09
+ memcpy(ps_retbuf, ps->ps_val,=20
+ ps->ps_len*sizeof(u16));
break;
=20
default:
@@ -1083,11 +1138,10 @@
char*
bt_hw_vendor(void)
{
-#ifdef CONFIG_BLUETOOTH_USE_BCSP
+ if (bt_use_bcsp(-1))
return "CSR (BCSP)";
-#else
+ else
return "CSR (H4)";
-#endif
}
=20
#elif defined(CONFIG_BLUETOOTH_INFINEON_BMI)
|
|
From: Mattias A. <mat...@us...> - 2001-06-06 16:28:02
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.42 1.43=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added more debug when setting ps keys
The diff of the modified file(s):
--- hci_vendor.c 2001/06/06 14:53:41 1.42
+++ hci_vendor.c 2001/06/06 16:28:01 1.43
@@ -563,7 +563,7 @@
break;
=20=09=09=09=09
case CSR_CMD_PS:
- printk("ps key[0x%x] ", ps->ps_key);
+ printk(__FUNCTION__": ps key[0x%x] ", ps->ps_key);
print_data("", (u8*)ps->ps_val, ps->ps_len*sizeof(u16));
=20=09=09=09=09
/* Now copy this data to return buf */
@@ -689,7 +689,8 @@
csr_bccmd *cmd;
csr_bccmd_ps *ps;
=20
- printk(__FUNCTION__" : ps 0x%x\n", ps_key);=09
+ printk(__FUNCTION__" : ps_key 0x%x [%d]\n", ps_key, rw_mode);=09
+ print_data("pars : ", (u8*)retb, n_pars*sizeof(u16));
=20
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
@@ -1005,7 +1006,7 @@
break;
=20
case CSR_CMD_PS:
- printk("ps key[0x%x] ", ps->ps_key);
+ printk(__FUNCTION__": ps key[0x%x] ", ps->ps_key);
print_data("", (u8*)ps->ps_val, ps->ps_len*sizeof(u16));
=20=09=09=09=09
/* Now copy this data to return buf */
|
|
From: Mats F. <ma...@us...> - 2001-06-08 12:39:43
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.43 1.44=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: The sequence nbr should not be updated in a GETRESP The diff of the modified file(s): --- hci_vendor.c 2001/06/06 16:28:01 1.43 +++ hci_vendor.c 2001/06/08 12:39:42 1.44 @@ -637,7 +637,6 @@ DSYS(__FUNCTION__": Received a SETREQ, sending back GETRESP\n"); print_data(__FUNCTION__, data, count); cmd->type =3D CSR_MSGTYPE_GETRESP; - cmd->seq =3D csr_count++; =20=09 csr_send_general_hq(cmd); =20=09=09=09 @@ -924,7 +923,6 @@ c_pkt.type =3D CMD_PKT; c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f); c_pkt.len =3D 1 + 5*sizeof(u16) + 4*sizeof(u16); - =20 msg =3D (csr_msg *)c_pkt.data; cmd =3D (csr_bccmd *)msg->msg; |
|
From: Mattias A. <mat...@us...> - 2001-06-13 11:55:17
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.44 1.45=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Added csr_waitcmdnum. After syncronizing BCSP it waits until a command=20
status with cmd_num is received.
* Hide some printouts regarding ps key settings in debug macros
The diff of the modified file(s):
--- hci_vendor.c 2001/06/08 12:39:42 1.44
+++ hci_vendor.c 2001/06/13 11:55:16 1.45
@@ -563,8 +563,10 @@
break;
=20=09=09=09=09
case CSR_CMD_PS:
- printk(__FUNCTION__": ps key[0x%x] ", ps->ps_key);
- print_data("", (u8*)ps->ps_val, ps->ps_len*sizeof(u16));
+ D_CMD(__FUNCTION__": ps key[0x%x]\n",=20
+ ps->ps_key);
+ PRINTPKT("", (u8*)ps->ps_val,=20
+ ps->ps_len*sizeof(u16));
=20=09=09=09=09
/* Now copy this data to return buf */
memcpy(ps_retbuf, ps->ps_val,=20
@@ -680,6 +682,23 @@
}
#endif
=20
+/* When using BCSP this function is used to wait for the
+ COMMAND_STATUS which contains cmd_num */
+
+void csr_waitcmdnum(void)
+{
+ D_CMD(__FUNCTION__"\n");
+ hci_ctrl.hc_buf.cmd_num =3D 0;
+ /* wait for command status */
+ while (hci_ctrl.hc_buf.cmd_num =3D=3D 0)
+ {
+ current->timeout =3D HZ/100;
+ current->state =3D TASK_INTERRUPTIBLE;
+ schedule();
+ current->timeout =3D 0;
+ }
+}
+
s32=20
csr_pskey(u16 ps_key, u16 rw_mode, u16 *retb, u16 n_pars)
{
@@ -688,8 +707,8 @@
csr_bccmd *cmd;
csr_bccmd_ps *ps;
=20
- printk(__FUNCTION__" : ps_key 0x%x [%d]\n", ps_key, rw_mode);=09
- print_data("pars : ", (u8*)retb, n_pars*sizeof(u16));
+ D_CMD(__FUNCTION__" : ps_key 0x%x [%d]\n", ps_key, rw_mode);=09
+ PRINTPKT("pars : ", (u8*)retb, n_pars*sizeof(u16));
=20
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
@@ -836,7 +855,7 @@
csr_msg *msg;
csr_bccmd *cmd;
=20
- D_CMD(__FUNCTION__ VENDOR "\n");
+ D_CMD(__FUNCTION__ VENDOR " BuildID/ChipVer/ChipRev\n");
=20=09
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
@@ -955,8 +974,11 @@
interruptible_sleep_on(&set_baudrate_wq);
}
=20
- tmp =3D bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI=
_HDR_LEN);
+ tmp =3D bt_write_lower_driver((u8*) &c_pkt,=20
+ c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
=20
+ bt_wait_tx(2000); /* wait until DMA empty + 2 ms */
+
hci_ctrl.hc_buf.cmd_num--;
=20
return tmp;
@@ -1004,8 +1026,10 @@
break;
=20
case CSR_CMD_PS:
- printk(__FUNCTION__": ps key[0x%x] ", ps->ps_key);
- print_data("", (u8*)ps->ps_val, ps->ps_len*sizeof(u16));
+ D_CMD(__FUNCTION__": ps key[0x%x]\n",=20
+ ps->ps_key);
+ PRINTPKT("", (u8*)ps->ps_val,=20
+ ps->ps_len*sizeof(u16));
=20=09=09=09=09
/* Now copy this data to return buf */
=20=09=09=09=09
@@ -1104,8 +1128,6 @@
break;
=20
case CSR_CMD_PS:
- if (cmd->len > 2*5)
- printk("ps: key 0x%x, len %d\n", ps->ps_key, ps->ps_len);
break;
=20
default:
|
|
From: Mats F. <ma...@us...> - 2001-06-15 13:39:08
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.45 1.46=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Made userstack compile
The diff of the modified file(s):
--- hci_vendor.c 2001/06/13 11:55:16 1.45
+++ hci_vendor.c 2001/06/15 13:39:08 1.46
@@ -680,7 +680,6 @@
=20=09
return bt_write_lower_driver((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_=
HDR_LEN);
}
-#endif
=20
/* When using BCSP this function is used to wait for the
COMMAND_STATUS which contains cmd_num */
@@ -699,6 +698,8 @@
}
}
=20
+#endif
+
s32=20
csr_pskey(u16 ps_key, u16 rw_mode, u16 *retb, u16 n_pars)
{
@@ -977,8 +978,9 @@
tmp =3D bt_write_lower_driver((u8*) &c_pkt,=20
c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
=20
+#ifdef __KERNEL__
bt_wait_tx(2000); /* wait until DMA empty + 2 ms */
-
+#endif
hci_ctrl.hc_buf.cmd_num--;
=20
return tmp;
|
|
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
|