Skip to content

Commit

Permalink
Bluetooth: Add missing hci_skb_opcode for raw socket commands
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
  • Loading branch information
holtmann committed Nov 19, 2015
1 parent 44d2713 commit 1982162
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/bluetooth/hci_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1982162

Please sign in to comment.