diff mbox series

[3/4] Bluetooth: hci_core: Signal TX failure if sending a frame failed

Message ID 20211109164113.65981-4-benjamin@sipsolutions.net
State New
Headers show
Series [1/4] Bluetooth: Reset more state when cancelling a sync command | expand

Commit Message

Benjamin Berg Nov. 9, 2021, 4:41 p.m. UTC
From: Benjamin Berg <bberg@redhat.com>

Call the hci_tx_error handler in case a frame cannot be send.

Signed-off-by: Benjamin Berg <bberg@redhat.com>
---
 net/bluetooth/hci_core.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index bbb35188e41f..8664c2fbacdb 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -4200,6 +4200,8 @@  static void hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
 	if (err < 0) {
 		bt_dev_err(hdev, "sending frame failed (%d)", err);
 		kfree_skb(skb);
+
+		hci_tx_error(hdev, -err);
 	}
 }