|
From: Peter K. <pk...@us...> - 2001-08-16 13:05:56
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
hci_vendor.c 1.49 1.50=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Rewrote the Eicsson version of hci_set_bd_addr() to create the
hci packet just like all the other functions do.
* Use defines instead of hardcoded values.
The diff of the modified file(s):
--- hci_vendor.c 2001/07/05 21:45:08 1.49
+++ hci_vendor.c 2001/08/16 13:05:55 1.50
@@ -71,9 +71,9 @@
=20
#ifdef CONFIG_BLUETOOTH_ERICSSON
/* Ericsson defines */
-#define ERICSSON_SET_UART_BAUD_RATE 0x9
-#define ERICSSON_WRITE_BD_ADDR 0xd
-#define ERICSSON_READ_REVISION_INFORMATION 0xF
+#define ERICSSON_SET_UART_BAUD_RATE 0x09
+#define ERICSSON_WRITE_BD_ADDR 0x0D
+#define ERICSSON_READ_REVISION_INFORMATION 0x0F
=20
#define ERICSSON_ENTER_TEST_MODE 0x11
#define ERICSSON_TEST_CONTROL 0x12
@@ -115,7 +115,6 @@
s32=20
hci_set_bd_addr(u8 bd[6])
{
- u8 pkt[10];
u8 tmp_bd[6];
s32 i;
=20=20=20
@@ -126,13 +125,12 @@
}
=20=20=20
PRINTPKT(__FUNCTION__ VENDOR ":", bd, 6);
- pkt[0] =3D CMD_PKT;
- pkt[1] =3D 0x0d;
- pkt[2] =3D 0xfc;
- pkt[3] =3D 0x06;
- memcpy(pkt + 4, tmp_bd, 6);
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(ERICSSON_WRITE_BD_ADDR, MANUFACTURER_SPEC=
);
+ c_pkt.len =3D 6;
+ memcpy(c_pkt.data, tmp_bd, 6);
=20=20=20
- return send_cmd_block(pkt, 10, DEFAULT_TIMEOUT);
+ return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20=20
s32
@@ -140,7 +138,7 @@
{
D_CMD(__FUNCTION__ VENDOR "\n");
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(0xf, 0x3f) ;
+ c_pkt.opcode =3D hci_put_opcode(ERICSSON_READ_REVISION_INFORMATION, MANUF=
ACTURER_SPEC);
c_pkt.len =3D 0;
=20
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
@@ -155,7 +153,7 @@
=20
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.opcode =3D hci_put_opcode(ERICSSON_SET_UART_BAUD_RATE, MANUFACTURER=
_SPEC);
c_pkt.len =3D 1;
switch (baudrate) {
case 57600:
@@ -664,7 +662,7 @@
=20
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
+ c_pkt.opcode =3D hci_put_opcode(0x00, MANUFACTURER_SPEC);
c_pkt.len =3D 1 + cmd->len * 2;
=20=09
msg =3D (csr_msg *)c_pkt.data;
@@ -717,7 +715,7 @@
=20
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
+ c_pkt.opcode =3D hci_put_opcode(0x00, MANUFACTURER_SPEC);
c_pkt.len =3D 1 + 5*sizeof(u16) + 3*sizeof(u16) + n_pars*sizeof(u16);
=20
msg =3D (csr_msg *)c_pkt.data;
@@ -772,7 +770,7 @@
=20
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
+ c_pkt.opcode =3D hci_put_opcode(0x00, MANUFACTURER_SPEC);
c_pkt.len =3D 1 + 5*sizeof(u16) + 3*sizeof(u16) + 4*sizeof(u16);
=20
msg =3D (csr_msg *)c_pkt.data;
@@ -816,7 +814,7 @@
=20
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
+ c_pkt.opcode =3D hci_put_opcode(0x00, MANUFACTURER_SPEC);
c_pkt.len =3D 1 + 5*sizeof(u16) + 3*sizeof(u16) + 1*sizeof(u16);
=20
msg =3D (csr_msg *)c_pkt.data;
@@ -864,7 +862,7 @@
=20=09
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
+ c_pkt.opcode =3D hci_put_opcode(0x00, MANUFACTURER_SPEC);
c_pkt.len =3D 1 + 5*sizeof(u16) + 6*sizeof(u16);
=20
msg =3D (csr_msg *)c_pkt.data;
@@ -945,7 +943,7 @@
=20
/* HCI Manufacturer specific header */
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(0x00, 0x3f);
+ c_pkt.opcode =3D hci_put_opcode(0x00, MANUFACTURER_SPEC);
c_pkt.len =3D 1 + 5*sizeof(u16) + 4*sizeof(u16);
=20
msg =3D (csr_msg *)c_pkt.data;
@@ -1190,7 +1188,7 @@
{
D_CMD(__FUNCTION__ VENDOR "\n");
c_pkt.type =3D CMD_PKT;
- c_pkt.opcode =3D hci_put_opcode(0x0005, 0x3f);
+ c_pkt.opcode =3D hci_put_opcode(0x05, MANUFACTURER_SPEC);
c_pkt.len =3D 0;
=20
return send_cmd_block((u8*) &c_pkt,
|