diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index c9d733f..a4d5088 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
print("hci%u removed (unconfigured)", index);
}
+static void ext_index_added(uint16_t index, uint16_t len,
+ const void *param, void *user_data)
+{
+ const struct mgmt_ev_ext_index_added *ev = param;
+
+ print("hci%u added (type %u bus %u)", index, ev->type, ev->bus);
+}
+
+static void ext_index_removed(uint16_t index, uint16_t len,
+ const void *param, void *user_data)
+{
+ const struct mgmt_ev_ext_index_removed *ev = param;
+
+ print("hci%u removed (type %u bus %u)", index, ev->type, ev->bus);
+}
+
static const char *options_str[] = {
"external",
"public-address",
pending_index++;
break;
case 0x02:
- print("hci%u:\tAMP controller", index);
+ print("hci%u:\tAMP controller (%u)", index,
+ rp->entry[i].bus);
break;
default:
- print("hci%u:\t0x%02x", index, rp->entry[i].type);
+ print("hci%u:\tType %u controller (%u)", index,
+ rp->entry[i].type, rp->entry[i].bus);
break;
}
}
unconf_index_removed, NULL, NULL);
mgmt_register(mgmt, MGMT_EV_NEW_CONFIG_OPTIONS, index,
new_config_options, NULL, NULL);
-
+ mgmt_register(mgmt, MGMT_EV_EXT_INDEX_ADDED, index,
+ ext_index_added, NULL, NULL);
+ mgmt_register(mgmt, MGMT_EV_EXT_INDEX_REMOVED, index,
+ ext_index_removed, NULL, NULL);
}
static void cmd_select(struct mgmt *mgmt, uint16_t index,