Bluetooth: Fix stand-alone HCI command handling
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / bluetooth / hci_sock.c
index ec044d31f79cdad9e300a8f555377e7d3acf41d8..aa4354fca77c76b2282f81d86114c2698088d273 100644 (file)
@@ -854,6 +854,11 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
                        skb_queue_tail(&hdev->raw_q, skb);
                        queue_work(hdev->workqueue, &hdev->tx_work);
                } else {
+                       /* Stand-alone HCI commands must be flaged as
+                        * single-command requests.
+                        */
+                       bt_cb(skb)->req.start = true;
+
                        skb_queue_tail(&hdev->cmd_q, skb);
                        queue_work(hdev->workqueue, &hdev->cmd_work);
                }