From: Chris Lu <chris.lu@mediatek.com>
To: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
Luiz Von Dentz <luiz.dentz@gmail.com>
Cc: Hao Qin <hao.qin@mediatek.com>,
Wenlong Tian <ot_wenlong.tian@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Will Lee <will-cy.Lee@mediatek.com>, SS Wu <ss.wu@mediatek.com>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mediatek <linux-mediatek@lists.infradead.org>,
Chris Lu <chris.lu@mediatek.com>
Subject: [PATCH v2 0/3] Bluetooth: btmtk: fix ISO data reception
Date: Thu, 15 Oct 2026 16:14:47 +0800 [thread overview]
Message-ID: <20261015081450.1241194-1-chris.lu@mediatek.com> (raw)
Three fixes for ISO data handling in btmtk, found while debugging LE Audio
on MT7925. The code is shared by every MediaTek USB controller that
supports ISO data, so none of this is specific to that part.
Patch 1 drops the zero padding that the ISO interrupt IN endpoint appends
to each transfer instead of parsing it as ISO packets. The driver turns
that padding into handle 0 packets with a Data_Total_Length of zero and
hands them to the stack, which is what fills the HCI log with malformed
ISO frames, and a valid SDU is lost whenever handle 0 belongs to a live
CIS/BIS.
Patch 2 bounds Data_Total_Length by hdev->iso_mtu. The existing
skb_tailroom() test enforces no protocol limit, because the skb head
allocation is rounded up to a kmalloc bucket and skb_tailroom() reports
the bucket size rather than what was requested.
Patch 3 updates the mt79xx ISO data transmission setting.
The three hunks do not overlap, so any prefix of the series applies on its
own.
Changes in v2:
- Patch 2 reworked and retitled. v1 only enlarged the receive skb, which
turned out to be a no-op, and added no bound at all. v2 bounds
Data_Total_Length by hdev->iso_mtu and sizes the skb from the same
value.
- Patch 3 added.
- Patch 1 unchanged.
Based on bluetooth-next.
Chris Lu (3):
Bluetooth: btmtk: drop zero-length ISO packets from endpoint padding
Bluetooth: btmtk: bound the ISO payload length by the controller's MTU
Bluetooth: btmtk: derive the firmware ISO setting from
MTK_ISO_THRESHOLD
drivers/bluetooth/btmtk.c | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
--
2.45.2
next reply other threads:[~2026-10-15 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 8:14 Chris Lu [this message]
2026-10-15 8:14 ` [PATCH v2 1/3] Bluetooth: btmtk: drop zero-length ISO packets from endpoint padding Chris Lu
2026-10-15 8:14 ` [PATCH v2 2/3] Bluetooth: btmtk: bound the ISO payload length by the controller's MTU Chris Lu
2026-10-15 8:14 ` [PATCH v2 3/3] Bluetooth: btmtk: derive the firmware ISO setting from MTK_ISO_THRESHOLD Chris Lu
2026-10-15 13:47 ` [PATCH v2 0/3] Bluetooth: btmtk: fix ISO data reception Luiz Augusto von Dentz
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=20261015081450.1241194-1-chris.lu@mediatek.com \
--to=chris.lu@mediatek.com \
--cc=hao.qin@mediatek.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=ot_wenlong.tian@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=ss.wu@mediatek.com \
--cc=will-cy.Lee@mediatek.com \
/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®