diff --git a/tools/hcidump.c b/tools/hcidump.c
index eb41b7b..b9bd4c0 100644
--- a/tools/hcidump.c
+++ b/tools/hcidump.c
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/l2cap.h>
+#include <bluetooth/hci_lib.h>
#include <pwd.h>
#include <argp.h>
}
/* Setup filter */
- flt.type_mask = ~0; // All packet types
- flt.event_mask[0] = ~0L; // All events
- flt.event_mask[1] = ~0L;
+ hci_filter_clear(&flt);
+ hci_filter_all_ptypes(&flt);
+ hci_filter_all_events(&flt);
if (setsockopt(s, SOL_HCI, HCI_FILTER, &flt, sizeof(flt)) < 0) {
perror("Can't set HCI filter");
exit(1);