static unsigned long filter_mask = 0;
static bool index_filter = false;
static uint16_t index_number = 0;
+static uint16_t index_current = 0;
#define MAX_CONN 16
sublabel, subversion, subversion);
}
-static void print_hci_version(uint8_t hci_ver, uint16_t hci_rev)
+static void print_hci_version(uint8_t version, uint16_t revision)
{
- packet_print_version("HCI version", hci_ver,
- "Revision", btohs(hci_rev));
+ packet_print_version("HCI version", version,
+ "Revision", btohs(revision));
}
-static void print_lmp_version(uint8_t lmp_ver, uint16_t lmp_subver)
+static void print_lmp_version(uint8_t version, uint16_t subversion)
{
- packet_print_version("LMP version", lmp_ver,
- "Subversion", btohs(lmp_subver));
+ packet_print_version("LMP version", version,
+ "Subversion", btohs(subversion));
+}
+
+static void print_pal_version(uint8_t version, uint16_t subversion)
+{
+ const char *str;
+
+ switch (version) {
+ case 0x01:
+ str = "Bluetooth 3.0";
+ break;
+ default:
+ str = "Reserved";
+ break;
+ }
+
+ print_field("PAL version: %s (0x%2.2x) - Subversion %d (0x%4.4x)",
+ str, version, btohs(subversion), btohs(subversion));
}
void packet_print_company(const char *label, uint16_t company)
#define MAX_INDEX 16
struct index_data {
+ uint8_t type;
bdaddr_t bdaddr;
};
if (index_filter && index_number != index)
return;
+ index_current = index;
+
if (tv && time_offset == ((time_t) -1))
time_offset = tv->tv_sec;
ni = data;
if (index < MAX_INDEX) {
+ index_list[index].type = ni->type;
bacpy(&index_list[index].bdaddr, &ni->bdaddr);
}
print_status(rsp->status);
print_hci_version(rsp->hci_ver, rsp->hci_rev);
- print_lmp_version(rsp->lmp_ver, rsp->lmp_subver);
+
+ switch (index_list[index_current].type) {
+ case HCI_BREDR:
+ print_lmp_version(rsp->lmp_ver, rsp->lmp_subver);
+ break;
+ case HCI_AMP:
+ print_pal_version(rsp->lmp_ver, rsp->lmp_subver);
+ break;
+ }
+
print_manufacturer(rsp->manufacturer);
}