From: Hsin-chen Chuang <chharry@google.com>
To: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com
Cc: chromeos-bluetooth-upstreaming@chromium.org,
Hsin-chen Chuang <chharry@chromium.org>,
Marcel Holtmann <marcel@holtmann.org>,
Ying Hsu <yinghsu@chromium.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Always allow SCO packets for user channel
Date: Tue, 18 Feb 2025 09:32:29 +0800 [thread overview]
Message-ID: <CADg1FFf8aPk-urK9RUn2pdKQ+=f+9X8K8+nqEA_1g3qUO2ugZQ@mail.gmail.com> (raw)
In-Reply-To: <20250214191709.1.I6e9e94dcded65e4a9ed42ad23ca8a5d81f680382@changeid>
Hi Luiz,
On Fri, Feb 14, 2025 at 7:17 PM Hsin-chen Chuang <chharry@google.com> wrote:
>
> From: Hsin-chen Chuang <chharry@chromium.org>
>
> 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@chromium.org>
> ---
>
> drivers/bluetooth/btusb.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 1caf7a071a73..de3fa725d210 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -2130,7 +2130,8 @@ 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)
> + if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
> + hci_conn_num(hdev, SCO_LINK) < 1)
> return -ENODEV;
>
> urb = alloc_isoc_urb(hdev, skb);
> @@ -2604,7 +2605,8 @@ 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)
> + if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
> + hci_conn_num(hdev, SCO_LINK) < 1)
> return -ENODEV;
>
> urb = alloc_isoc_urb(hdev, skb);
> --
> 2.48.1.601.g30ceb7b040-goog
>
Friendly ping for review, thanks.
--
Best Regards,
Hsin-chen
next prev parent reply other threads:[~2025-02-18 1:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 11:17 Hsin-chen Chuang
2025-02-18 1:32 ` Hsin-chen Chuang [this message]
2025-02-18 15:40 ` patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADg1FFf8aPk-urK9RUn2pdKQ+=f+9X8K8+nqEA_1g3qUO2ugZQ@mail.gmail.com' \
--to=chharry@google.com \
--cc=chharry@chromium.org \
--cc=chromeos-bluetooth-upstreaming@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=yinghsu@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®