1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

- Use official version strings for LMP and HCI version reporting and add

version strings up to Bluetooth 2.0
- Update manufacturer list

Approved by:	emax
MFC after:	3 days
This commit is contained in:
Markus Brueffer 2006-02-23 23:19:12 +00:00
parent aa8eff60a3
commit adcddbf0b1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155964
4 changed files with 42 additions and 7 deletions

View File

@ -65,6 +65,7 @@ char const * const hci_coding2str (int);
char const * const hci_vdata2str (int);
char const * const hci_hmode2str (int, char *, int);
char const * const hci_ver2str (int);
char const * const hci_lmpver2str (int);
char const * const hci_manufacturer2str(int);
char const * const hci_features2str (uint8_t *, char *, int);
char const * const hci_cc2str (int);

View File

@ -59,7 +59,8 @@ hci_read_local_version_information(int s, int argc, char **argv)
hci_ver2str(rp.hci_version), rp.hci_version);
fprintf(stdout, "HCI revision: %#04x\n",
le16toh(rp.hci_revision));
fprintf(stdout, "LMP version: %#02x\n", rp.lmp_version);
fprintf(stdout, "LMP version: %s [%#02x]\n",
hci_lmpver2str(rp.lmp_version), rp.lmp_version);
fprintf(stdout, "LMP sub-version: %#04x\n",
le16toh(rp.lmp_subversion));
fprintf(stdout, "Manufacturer: %s [%#04x]\n",

View File

@ -729,7 +729,8 @@ hci_read_remote_version_information(int s, int argc, char **argv)
fprintf(stdout, "Connection handle: %d\n",
le16toh(ep->con_handle));
fprintf(stdout, "LMP version: %#02x\n", ep->lmp_version);
fprintf(stdout, "LMP version: %s [%#02x]\n",
hci_lmpver2str(ep->lmp_version), ep->lmp_version);
fprintf(stdout, "LMP sub-version: %#04x\n",
le16toh(ep->lmp_subversion));
fprintf(stdout, "Manufacturer: %s [%#04x]\n",

View File

@ -148,18 +148,33 @@ char const * const
hci_ver2str(int ver)
{
static char const * const t[] = {
/* 0x00 */ "v1.0B",
/* 0x01 */ "v1.1"
/* 0x00 */ "Bluetooth HCI Specification 1.0B",
/* 0x01 */ "Bluetooth HCI Specification 1.1",
/* 0x02 */ "Bluetooth HCI Specification 1.2",
/* 0x03 */ "Bluetooth HCI Specification 2.0"
};
return (ver >= SIZE(t)? "?" : t[ver]);
} /* hci_ver2str */
char const * const
hci_lmpver2str(int ver)
{
static char const * const t[] = {
/* 0x00 */ "Bluetooth LMP 1.0",
/* 0x01 */ "Bluetooth LMP 1.1",
/* 0x02 */ "Bluetooth LMP 1.2",
/* 0x03 */ "Bluetooth LMP 2.0"
};
return (ver >= SIZE(t)? "?" : t[ver]);
} /* hci_lmpver2str */
char const * const
hci_manufacturer2str(int m)
{
static char const * const t[] = {
/* 0000 */ "Ericsson Mobile Communications",
/* 0000 */ "Ericsson Technology Licensing",
/* 0001 */ "Nokia Mobile Phones",
/* 0002 */ "Intel Corp.",
/* 0003 */ "IBM Corp.",
@ -177,7 +192,7 @@ hci_manufacturer2str(int m)
/* 0015 */ "Broadcom Corporation",
/* 0016 */ "Mitel Semiconductor",
/* 0017 */ "Widcomm, Inc.",
/* 0018 */ "Telencomm Inc.",
/* 0018 */ "Zeevo, Inc.",
/* 0019 */ "Atmel Corporation",
/* 0020 */ "Mitsubishi Electric Corporation",
/* 0021 */ "RTX Telecom A/S",
@ -206,7 +221,24 @@ hci_manufacturer2str(int m)
/* 0044 */ "Macronix International Co. Ltd.",
/* 0045 */ "GCT Semiconductor",
/* 0046 */ "Norwood Systems",
/* 0047 */ "MewTel Technology Inc."
/* 0047 */ "MewTel Technology Inc.",
/* 0048 */ "ST Microelectronics",
/* 0049 */ "Synopsys",
/* 0050 */ "Red-M (Communications) Ltd",
/* 0051 */ "Commil Ltd",
/* 0052 */ "Computer Access Technology Corporation (CATC)",
/* 0053 */ "Eclipse (HQ Espana) S.L.",
/* 0054 */ "Renesas Technology Corp.",
/* 0055 */ "Mobilian Corporation",
/* 0056 */ "Terax",
/* 0057 */ "Integrated System Solution Corp.",
/* 0058 */ "Matsushita Electric Industrial Co., Ltd.",
/* 0059 */ "Gennum Corporation",
/* 0060 */ "Research In Motion",
/* 0061 */ "IPextreme, Inc.",
/* 0062 */ "Systems and Chips, Inc",
/* 0063 */ "Bluetooth SIG, Inc",
/* 0064 */ "Seiko Epson Corporation"
};
return (m >= SIZE(t)? "?" : t[m]);