|
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 **************************=
****/
|