aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_bcsp.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-10-20 07:33:56 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-22 05:59:40 -0400
commita9de9248064bfc8eb0a183a6a951a4e7b5ca10a4 (patch)
tree4934b99543a9ae0f0282a7f366a8b765c6fb1a08 /drivers/bluetooth/hci_bcsp.c
parent55b70a0300b873c0ec7ea6e33752af56f41250ce (diff)
[Bluetooth] Switch from OGF+OCF to using only opcodes
The Bluetooth HCI commands are divided into logical OGF groups for easier identification of their purposes. While this still makes sense for the written specification, its makes the code only more complex and harder to read. So instead of using separate OGF and OCF values to identify the commands, use a common 16-bit opcode that combines both values. As a side effect this also reduces the complexity of OGF and OCF calculations during command header parsing. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_bcsp.c')
-rw-r--r--drivers/bluetooth/hci_bcsp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
index d66064ccb31c..696f7528f022 100644
--- a/drivers/bluetooth/hci_bcsp.c
+++ b/drivers/bluetooth/hci_bcsp.c
@@ -237,7 +237,8 @@ static struct sk_buff *bcsp_prepare_pkt(struct bcsp_struct *bcsp, u8 *data,
237 if (hciextn && chan == 5) { 237 if (hciextn && chan == 5) {
238 struct hci_command_hdr *hdr = (struct hci_command_hdr *) data; 238 struct hci_command_hdr *hdr = (struct hci_command_hdr *) data;
239 239
240 if (hci_opcode_ogf(__le16_to_cpu(hdr->opcode)) == OGF_VENDOR_CMD) { 240 /* Vendor specific commands */
241 if (hci_opcode_ogf(__le16_to_cpu(hdr->opcode)) == 0x3f) {
241 u8 desc = *(data + HCI_COMMAND_HDR_SIZE); 242 u8 desc = *(data + HCI_COMMAND_HDR_SIZE);
242 if ((desc & 0xf0) == 0xc0) { 243 if ((desc & 0xf0) == 0xc0) {
243 data += HCI_COMMAND_HDR_SIZE + 1; 244 data += HCI_COMMAND_HDR_SIZE + 1;