upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / net / bluetooth / hci_sock.c
index 348a82f..7fabfa1 100644 (file)
@@ -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) {
@@ -185,6 +186,17 @@ static inline int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd, unsign
 
                return 0;
 
+       case HCISETSECMGR:
+               if (!capable(CAP_NET_ADMIN))
+                       return -EACCES;
+
+               if (arg)
+                       set_bit(HCI_SECMGR, &hdev->flags);
+               else
+                       clear_bit(HCI_SECMGR, &hdev->flags);
+
+               return 0;
+
        case HCIGETCONNINFO:
                return hci_get_conn_info(hdev, (void __user *)arg);