HI Hsin-chen, On Tue, Jan 21, 2025 at 2:17 AM Hsin-chen Chuang <chharry@xxxxxxxxxx> wrote: > > From: Hsin-chen Chuang <chharry@xxxxxxxxxxxx> > > The SCO packets from Bluetooth raw socket are now rejected because > hci_conn_num is left 0. This patch allows such the usecase to enable > the userspace SCO support. > > Fixes: b16b327edb4d ("Bluetooth: btusb: add sysfs attribute to control USB alt setting") > Signed-off-by: Hsin-chen Chuang <chharry@xxxxxxxxxxxx> > --- > > drivers/bluetooth/btusb.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index f419d0827ee4..3e2d7ea6de5c 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -2107,9 +2107,6 @@ static int btusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb) > return submit_or_queue_tx_urb(hdev, urb); > > case HCI_SCODATA_PKT: > - if (hci_conn_num(hdev, SCO_LINK) < 1) > - return -ENODEV; Hmm, we probably need to check if USER_CHANNEL has been opened instead of simply removing the check. > - > urb = alloc_isoc_urb(hdev, skb); > if (IS_ERR(urb)) > return PTR_ERR(urb); > @@ -2588,9 +2585,6 @@ static int btusb_send_frame_intel(struct hci_dev *hdev, struct sk_buff *skb) > return submit_or_queue_tx_urb(hdev, urb); > > case HCI_SCODATA_PKT: > - if (hci_conn_num(hdev, SCO_LINK) < 1) > - return -ENODEV; > - > urb = alloc_isoc_urb(hdev, skb); > if (IS_ERR(urb)) > return PTR_ERR(urb); > -- > 2.48.0.rc2.279.g1de40edade-goog > -- Luiz Augusto von Dentz