提交 581d6fd6 编写于 作者: M Marcel Holtmann

Bluetooth: Queue diagnostic messages together with HCI packets

Sending diagnostic messages directly to the monitor socket might cause
issues for devices processing their messages in interrupt context. So
instead of trying to directly forward them, queue them up with the other
HCI packets and lets them be processed by the sockets at the same time.
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 bb77543e
......@@ -3555,14 +3555,15 @@ EXPORT_SYMBOL(hci_recv_frame);
/* Receive diagnostic message from HCI drivers */
int hci_recv_diag(struct hci_dev *hdev, struct sk_buff *skb)
{
/* Mark as diagnostic packet */
bt_cb(skb)->pkt_type = HCI_DIAG_PKT;
/* Time stamp */
__net_timestamp(skb);
/* Mark as diagnostic packet and send to monitor */
bt_cb(skb)->pkt_type = HCI_DIAG_PKT;
hci_send_to_monitor(hdev, skb);
skb_queue_tail(&hdev->rx_q, skb);
queue_work(hdev->workqueue, &hdev->rx_work);
kfree_skb(skb);
return 0;
}
EXPORT_SYMBOL(hci_recv_diag);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册