summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-10-28 03:58:00 +0200
committerMarcel Holtmann <linux-mh.adm@bkbits.net>2004-10-28 03:58:00 +0200
commit6cdccfb0b45e8753b30d350654e620376cbb5f1d (patch)
tree056c693eab9629e8de4cd61522695be48b704d26
parente05082148e011a6aba06edd617dff5c95151e027 (diff)
[Bluetooth] Allow vendor specific packet types
The vendor packet type 0xff is not handled at the moment. This patch corrects this behaviour and also adapts the security filter for this packet type. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--include/net/bluetooth/hci.h2
-rw-r--r--net/bluetooth/hci_sock.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index f6d234a7a43e..c3e965505e99 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -108,7 +108,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_DM1 0x0008
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 4b04e78ffe90..7fabfa13e435 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -111,7 +111,8 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb)
/* Apply filter */
flt = &hci_pi(sk)->filter;
- if (!test_bit((skb->pkt_type & HCI_FLT_TYPE_BITS), &flt->type_mask))
+ if (!test_bit((skb->pkt_type == HCI_VENDOR_PKT) ?
+ 0 : (skb->pkt_type & HCI_FLT_TYPE_BITS), &flt->type_mask))
continue;
if (skb->pkt_type == HCI_EVENT_PKT) {