hci_sock.c (2fc2991175bf77395e6b15fe6b2304d3bf72da40) | hci_sock.c (1ebb92521d0bc2d4ef772730d29333c06b807191) |
---|---|
1/* 2 BlueZ - Bluetooth protocol stack for Linux 3 Copyright (C) 2000-2001 Qualcomm Incorporated 4 5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License version 2 as --- 402 unchanged lines hidden (view full) --- 411 goto drop; 412 } 413 414 bt_cb(skb)->pkt_type = *((unsigned char *) skb->data); 415 skb_pull(skb, 1); 416 skb->dev = (void *) hdev; 417 418 if (bt_cb(skb)->pkt_type == HCI_COMMAND_PKT) { | 1/* 2 BlueZ - Bluetooth protocol stack for Linux 3 Copyright (C) 2000-2001 Qualcomm Incorporated 4 5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License version 2 as --- 402 unchanged lines hidden (view full) --- 411 goto drop; 412 } 413 414 bt_cb(skb)->pkt_type = *((unsigned char *) skb->data); 415 skb_pull(skb, 1); 416 skb->dev = (void *) hdev; 417 418 if (bt_cb(skb)->pkt_type == HCI_COMMAND_PKT) { |
419 u16 opcode = __le16_to_cpu(get_unaligned((u16 *)skb->data)); | 419 u16 opcode = __le16_to_cpu(get_unaligned((__le16 *) skb->data)); |
420 u16 ogf = hci_opcode_ogf(opcode); 421 u16 ocf = hci_opcode_ocf(opcode); 422 423 if (((ogf > HCI_SFLT_MAX_OGF) || 424 !hci_test_bit(ocf & HCI_FLT_OCF_BITS, &hci_sec_filter.ocf_mask[ogf])) && 425 !capable(CAP_NET_RAW)) { 426 err = -EPERM; 427 goto drop; --- 285 unchanged lines hidden --- | 420 u16 ogf = hci_opcode_ogf(opcode); 421 u16 ocf = hci_opcode_ocf(opcode); 422 423 if (((ogf > HCI_SFLT_MAX_OGF) || 424 !hci_test_bit(ocf & HCI_FLT_OCF_BITS, &hci_sec_filter.ocf_mask[ogf])) && 425 !capable(CAP_NET_RAW)) { 426 err = -EPERM; 427 goto drop; --- 285 unchanged lines hidden --- |