summaryrefslogtreecommitdiffstats
path: root/include/hci_lib.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-10-23 17:51:55 +0000
committerMarcel Holtmann <marcel@holtmann.org>2004-10-23 17:51:55 +0000
commit81c45f31a8b4897e0a6267fb3a84b3f6b73557b7 (patch)
treef234ed5ced5a4ce30883d096dff1fae2bb0b4b53 /include/hci_lib.h
parent735e59b37803748fea1077de064b285f78de1c10 (diff)
For vendor packets set bit 0 in the packet type bitmask of the filter
Diffstat (limited to 'include/hci_lib.h')
-rw-r--r--include/hci_lib.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/hci_lib.h b/include/hci_lib.h
index 70d39264..49857768 100644
--- a/include/hci_lib.h
+++ b/include/hci_lib.h
@@ -132,19 +132,19 @@ static inline void hci_filter_clear(struct hci_filter *f)
}
static inline void hci_filter_set_ptype(int t, struct hci_filter *f)
{
- hci_set_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask);
+ hci_set_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask);
}
static inline void hci_filter_clear_ptype(int t, struct hci_filter *f)
{
- hci_clear_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask);
+ hci_clear_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask);
}
static inline int hci_filter_test_ptype(int t, struct hci_filter *f)
{
- return hci_test_bit((t & HCI_FLT_TYPE_BITS), &f->type_mask);
+ return hci_test_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask);
}
static inline void hci_filter_all_ptypes(struct hci_filter *f)
{
- memset((void *)&f->type_mask, 0xff, sizeof(f->type_mask));
+ memset((void *) &f->type_mask, 0xff, sizeof(f->type_mask));
}
static inline void hci_filter_set_event(int e, struct hci_filter *f)
{
@@ -160,7 +160,7 @@ static inline int hci_filter_test_event(int e, struct hci_filter *f)
}
static inline void hci_filter_all_events(struct hci_filter *f)
{
- memset((void *)f->event_mask, 0xff, sizeof(f->event_mask));
+ memset((void *) f->event_mask, 0xff, sizeof(f->event_mask));
}
static inline void hci_filter_set_opcode(int opcode, struct hci_filter *f)
{