|
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
|