Bluetooth: hci_event: Fix not marking Broadcast Sink BIS as connected
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 27 Jun 2025 15:19:02 +0000 (11:19 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 3 Jul 2025 15:37:43 +0000 (11:37 -0400)
Upon receiving HCI_EVT_LE_BIG_SYNC_ESTABLISHED with status 0x00
(success) the corresponding BIS hci_conn state shall be set to
BT_CONNECTED otherwise they will be left with BT_OPEN which is invalid
at that point, also create the debugfs and sysfs entries following the
same logic as the likes of Broadcast Source BIS and CIS connections.

Fixes: f777d8827817 ("Bluetooth: ISO: Notify user space about failed bis connections")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_event.c

index 4d5ace9d245d9c987120dc4afa04b7d3f85fb315..992131f88a45687debbafd95b1354cf5f56996c9 100644 (file)
@@ -6966,7 +6966,10 @@ static void hci_le_big_sync_established_evt(struct hci_dev *hdev, void *data,
                bis->iso_qos.bcast.in.sdu = le16_to_cpu(ev->max_pdu);
 
                if (!ev->status) {
+                       bis->state = BT_CONNECTED;
                        set_bit(HCI_CONN_BIG_SYNC, &bis->flags);
+                       hci_debugfs_create_conn(bis);
+                       hci_conn_add_sysfs(bis);
                        hci_iso_setup_path(bis);
                }
        }