diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-11-06 06:42:20 (GMT) |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-11-19 16:50:27 (GMT) |
commit | 1982162bbe20672941897566f2f42d51a306a155 (patch) | |
tree | a4a379955f0a8433e94be7f8b5dbf470bd699d9f /net/bluetooth | |
parent | 44d271377479c4d4fe7f2d07d188656684773fbd (diff) | |
download | linux-1982162bbe20672941897566f2f42d51a306a155.tar.xz |
Bluetooth: Add missing hci_skb_opcode for raw socket commands
When HCI commands are injected via the raw socket, the core was not
including the decoded opcode value. So ensure that it is actually set.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_sock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 19b2301..32caa62 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -1242,6 +1242,11 @@ static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg, goto drop; } + /* Since the opcode has already been extracted here, store + * a copy of the value for later use by the drivers. + */ + hci_skb_opcode(skb) = opcode; + if (ogf == 0x3f) { skb_queue_tail(&hdev->raw_q, skb); queue_work(hdev->workqueue, &hdev->tx_work); |