summaryrefslogtreecommitdiffstats
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
parent735e59b37803748fea1077de064b285f78de1c10 (diff)
For vendor packets set bit 0 in the packet type bitmask of the filter
-rw-r--r--include/hci.h2
-rw-r--r--include/hci_lib.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/include/hci.h b/include/hci.h
index 6cabc0b4..00f2d21a 100644
--- a/include/hci.h
+++ b/include/hci.h
@@ -113,7 +113,7 @@ enum {
#define HCI_ACLDATA_PKT 0x02
#define HCI_SCODATA_PKT 0x03
#define HCI_EVENT_PKT 0x04
-#define HCI_UNKNOWN_PKT 0xff
+#define HCI_VENDOR_PKT 0xff
/* HCI Packet types */
#define HCI_2DH1 0x0002
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)
{