From d393673986f27c5c335255352e9fc058c40fd96f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 28 Sep 2013 21:00:02 -0700 Subject: [PATCH] tools: Limit controller type to two bits of device info type --- tools/hciconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hciconfig.c b/tools/hciconfig.c index 6b18c4f2f..cee163f53 100644 --- a/tools/hciconfig.c +++ b/tools/hciconfig.c @@ -1844,7 +1844,7 @@ static void print_dev_hdr(struct hci_dev_info *di) ba2str(&di->bdaddr, addr); printf("%s:\tType: %s Bus: %s\n", di->name, - hci_typetostr(di->type >> 4), + hci_typetostr((di->type & 0x30) >> 4), hci_bustostr(di->type & 0x0f)); printf("\tBD Address: %s ACL MTU: %d:%d SCO MTU: %d:%d\n", addr, di->acl_mtu, di->acl_pkts, @@ -1869,7 +1869,7 @@ static void print_dev_info(int ctl, struct hci_dev_info *di) st->byte_tx, st->acl_tx, st->sco_tx, st->cmd_tx, st->err_tx); if (all && !hci_test_bit(HCI_RAW, &di->flags) && - (bacmp(&di->bdaddr, BDADDR_ANY) || (di->type >> 4))) { + (bacmp(&di->bdaddr, BDADDR_ANY) || (di->type & 0x30))) { print_dev_features(di, 0); print_pkt_type(di); print_link_policy(di); -- 2.47.3