From: Luiz Augusto von Dentz Date: Wed, 9 Jul 2025 19:02:56 +0000 (-0400) Subject: Bluetooth: btintel: Check if controller is ISO capable on btintel_classify_pkt_type X-Git-Tag: v6.12.40~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e11e0db4e27c9690958ad65526c123ff20f3b1a;p=thirdparty%2Fkernel%2Fstable.git Bluetooth: btintel: Check if controller is ISO capable on btintel_classify_pkt_type commit 6ec3185fbc3528f2284c347fb9bd8be6fa672ed4 upstream. Due to what seem to be a bug with variant version returned by some firmwares the code may set hdev->classify_pkt_type with btintel_classify_pkt_type when in fact the controller doesn't even support ISO channels feature but may use the handle range expected from a controllers that does causing the packets to be reclassified as ISO causing several bugs. To fix the above btintel_classify_pkt_type will attempt to check if the controller really supports ISO channels and in case it doesn't don't reclassify even if the handle range is considered to be ISO, this is considered safer than trying to fix the specific controller/firmware version as that could change over time and causing similar problems in the future. Link: https://bugzilla.kernel.org/show_bug.cgi?id=219553 Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2100565 Link: https://github.com/StarLabsLtd/firmware/issues/180 Fixes: f25b7fd36cc3 ("Bluetooth: Add vendor-specific packet classification for ISO data") Cc: stable@vger.kernel.org Signed-off-by: Luiz Augusto von Dentz Tested-by: Sean Rhodes Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 51d6d91ed4041..85df941afb6cf 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -2656,7 +2656,7 @@ static u8 btintel_classify_pkt_type(struct hci_dev *hdev, struct sk_buff *skb) * Distinguish ISO data packets form ACL data packets * based on their connection handle value range. */ - if (hci_skb_pkt_type(skb) == HCI_ACLDATA_PKT) { + if (iso_capable(hdev) && hci_skb_pkt_type(skb) == HCI_ACLDATA_PKT) { __u16 handle = __le16_to_cpu(hci_acl_hdr(skb)->handle); if (hci_handle(handle) >= BTINTEL_ISODATA_HANDLE_BASE)