* [PATCH 3/3] Bluetooth: Queue diagnostic messages together with HCI packets
@ 2015-10-09 12:09 Marcel Holtmann
2015-10-09 14:29 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2015-10-09 12:09 UTC (permalink / raw)
To: linux-bluetooth
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: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/hci_core.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index d2b3dd32d6cf..fd91649ae7ee 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3562,14 +3562,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);
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 3/3] Bluetooth: Queue diagnostic messages together with HCI packets
2015-10-09 12:09 [PATCH 3/3] Bluetooth: Queue diagnostic messages together with HCI packets Marcel Holtmann
@ 2015-10-09 14:29 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2015-10-09 14:29 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi Marcel,
On Fri, Oct 09, 2015, Marcel Holtmann wrote:
> 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: Marcel Holtmann <marcel@holtmann.org>
> ---
> net/bluetooth/hci_core.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
All three patches have been applied to bluetooth-next. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-09 14:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-09 12:09 [PATCH 3/3] Bluetooth: Queue diagnostic messages together with HCI packets Marcel Holtmann
2015-10-09 14:29 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox