diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-09-29 02:50:06 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-09-29 02:50:06 +0200 |
commit | 4652763c85dd48bc0607caba75f94e79aab78841 (patch) | |
tree | b3a6c9b9f64a1831b0e32891ff193a857efebbf0 /tools/hciconfig.c | |
parent | 8772b6de43b3b2f43f51953911c9ff42925b58bb (diff) |
Improve reading of local and remote extended features
Diffstat (limited to 'tools/hciconfig.c')
-rw-r--r-- | tools/hciconfig.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c index 2055b2bb..25dda601 100644 --- a/tools/hciconfig.c +++ b/tools/hciconfig.c @@ -358,7 +358,7 @@ static void cmd_scomtu(int ctl, int hdev, char *opt) static void cmd_features(int ctl, int hdev, char *opt) { - uint8_t max_page, features[8]; + uint8_t features[8], max_page = 0; char *tmp; int i, dd; @@ -382,17 +382,19 @@ static void cmd_features(int ctl, int hdev, char *opt) } print_dev_hdr(&di); - tmp = lmp_featurestostr(di.features, "\t\t", 63); printf("\tFeatures%s: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x " "0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n", (max_page > 0) ? " page 0" : "", features[0], features[1], features[2], features[3], features[4], features[5], features[6], features[7]); + + tmp = lmp_featurestostr(di.features, "\t\t", 63); printf("%s\n", tmp); bt_free(tmp); for (i = 1; i <= max_page; i++) { - if (hci_read_local_ext_features(dd, 1, &max_page, features, 1000) < 0) + if (hci_read_local_ext_features(dd, i, NULL, + features, 1000) < 0) continue; printf("\tFeatures page %d: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x " |