From ae79b0ae8d1dfdc4d90dedb10851c8d4fef187c1 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 30 Apr 2020 14:45:25 -0700 Subject: [PATCH] monitor: Fix Set Host Feature print_bitfield expects the actual value not the bit position: < HCI Command: LE Set Host Feature (0x08|0x0074) plen 2 Bit Number: 32 Isochronous Channels (Host Support) Bit Value: 1 --- monitor/packet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monitor/packet.c b/monitor/packet.c index 5d8709c42..dc5903b16 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -8133,9 +8133,10 @@ static void le_set_host_feature_cmd(const void *data, uint8_t size) const struct bt_hci_cmd_le_set_host_feature *cmd = data; uint64_t mask; - print_field("Bit Number:"); + print_field("Bit Number: %u", cmd->bit_number); - mask = print_bitfield(2, cmd->bit_number, features_le); + mask = print_bitfield(2, (((uint64_t) 1) << cmd->bit_number), + features_le); if (mask) print_text(COLOR_UNKNOWN_FEATURE_BIT, " Unknown features " "(0x%16.16" PRIx64 ")", mask); -- 2.47.3