Skip to content

Bluetooth: btmtk: fix ISO data reception

Chris Lu linux-bluetooth linux-mediatek lkml 5 versions – Applied

Status from this message: This series was applied to bluetooth/bluetooth-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 1 replyApplied 3/3
  2. v3 posting 2/23 patches 3 repliesSuperseded
  3. v3 posting 1/23 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches3 repliesSuperseded
v12 patches1 replySuperseded

Changes in v4 from the cover letter

- Patch 1: check for the endpoint's zero-filled padding before starting to parse a new frame, rather than after assembling a 4-byte header. Otherwise a zero-filled remainder shorter than an ISO header (1-3 bytes) would be held across calls as a partial header and corrupt the next transfer's framing. This also avoids allocating and immediately freeing an skb for a fully zero-filled remainder.
- Patch 2, 3: unchanged.

Patches in v4 All 3 applied

#Subject and filesSizeRepliesApplied
1/3Bluetooth: btmtk: drop zero-length ISO packets from endpoint paddingdrivers/bluetooth/btmtk.c+20 -01 replyApplied
2/3Bluetooth: btmtk: bound the ISO payload length by the controller's MTUdrivers/bluetooth/btmtk.c+16 -20 repliesApplied
3/3Bluetooth: btmtk: derive the firmware ISO setting from MTK_ISO_THRESHOLDdrivers/bluetooth/btmtk.c+3 -30 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] Bluetooth: btmtk: fix ISO data reception

Two fixes for btmtk_recv_isopkt(), found while debugging LE Audio on MT7925, plus an update to the ISO data transmission setting. The function 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.

Patch 2 bounds Data_Total_Length by hdev->iso_mtu.

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 v4:
- Patch 1: check for the endpoint's zero-filled padding before starting to parse a new frame, rather than after assembling a 4-byte header. Otherwise a zero-filled remainder shorter than an ISO header (1-3 bytes) would be held across calls as a partial header and corrupt the next transfer's framing. This also avoids allocating and immediately freeing an skb for a fully zero-filled remainder.
- Patch 2, 3: unchanged.

Changes in v3:
- Patch 1: instead of dropping a packet solely because Data_Total_Length is zero, also confirm that the rest of the transfer is zero-filled before treating it as padding.
- Patch 2, 3: unchanged.

Changes in v2:
- Patch 2 reworked and retitled.
- Patch 3 added.

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 | 44 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 39 insertions(+), 5 deletions(-)
Signature · 1 line
2.45.2