Bluetooth: btusb: Add recv_intr() hook to btusb_data

To allow a vendor driver to assemble and handle its non-BT frames
from the interrupt endpoint.

Used by Qualcomm QCC2072 support.

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Zijun Hu 2026-09-13 19:46:43 -07:00 committed by Luiz Augusto von Dentz
parent 3fe48c863a
commit 179950cdcb

View File

@ -1072,6 +1072,7 @@ struct btusb_data {
int (*recv_event)(struct hci_dev *hdev, struct sk_buff *skb);
int (*recv_acl)(struct hci_dev *hdev, struct sk_buff *skb);
int (*recv_intr)(struct btusb_data *data, void *buffer, int count);
int (*recv_bulk)(struct btusb_data *data, void *buffer, int count);
int (*setup_on_usb)(struct hci_dev *hdev);
@ -1582,7 +1583,7 @@ static void btusb_intr_complete(struct urb *urb)
if (urb->status == 0) {
hdev->stat.byte_rx += urb->actual_length;
if (btusb_recv_intr(data, urb->transfer_buffer,
if (data->recv_intr(data, urb->transfer_buffer,
urb->actual_length) < 0) {
bt_dev_err(hdev, "corrupted event packet");
hdev->stat.err_rx++;
@ -2851,7 +2852,7 @@ static int btusb_recv_bulk_intel(struct btusb_data *data, void *buffer,
*/
if (data->proto == BTUSB_PROTO_LEGACY &&
btintel_test_flag(hdev, INTEL_BOOTLOADER))
return btusb_recv_intr(data, buffer, count);
return data->recv_intr(data, buffer, count);
return btusb_recv_bulk(data, buffer, count);
}
@ -4392,6 +4393,7 @@ static int btusb_probe(struct usb_interface *intf,
spin_lock_init(&data->rxlock);
data->recv_event = hci_recv_frame;
data->recv_intr = btusb_recv_intr;
data->recv_bulk = btusb_recv_bulk;
if (id->driver_info & BTUSB_INTEL_COMBINED) {