瀏覽代碼

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>
Marcel Holtmann 9 年之前
父節點
當前提交
1982162bbe
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      net/bluetooth/hci_sock.c

+ 5 - 0
net/bluetooth/hci_sock.c

@@ -1242,6 +1242,11 @@ static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg,
 			goto drop;
 			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) {
 		if (ogf == 0x3f) {
 			skb_queue_tail(&hdev->raw_q, skb);
 			skb_queue_tail(&hdev->raw_q, skb);
 			queue_work(hdev->workqueue, &hdev->tx_work);
 			queue_work(hdev->workqueue, &hdev->tx_work);