Skip to content

Commit c5eb497

Browse files
committed
Bluetooth: hci_conn: Fix running bis_cleanup for hci_conn->type PA_LINK
JIRA: https://issues.redhat.com/browse/RHEL-107922 commit d36349e Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Date: Mon Jul 28 13:51:01 2025 -0400 Bluetooth: hci_conn: Fix running bis_cleanup for hci_conn->type PA_LINK Connections with type of PA_LINK shall be considered temporary just to track the lifetime of PA Sync setup, once the BIG Sync is established and connection are created with BIS_LINK the existing PA_LINK connection shall not longer use bis_cleanup otherwise it terminates the PA Sync when that shall be left to BIS_LINK connection to do it. Fixes: a7bcffc ("Bluetooth: Add PA_LINK to distinguish BIG sync and PA sync connections") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: David Marlin <dmarlin@redhat.com>
1 parent 0d831e1 commit c5eb497

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

net/bluetooth/hci_conn.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,17 @@ static void bis_cleanup(struct hci_conn *conn)
830830
/* Check if ISO connection is a BIS and terminate advertising
831831
* set and BIG if there are no other connections using it.
832832
*/
833-
bis = hci_conn_hash_lookup_big(hdev, conn->iso_qos.bcast.big);
833+
bis = hci_conn_hash_lookup_big_state(hdev,
834+
conn->iso_qos.bcast.big,
835+
BT_CONNECTED,
836+
HCI_ROLE_MASTER);
837+
if (bis)
838+
return;
839+
840+
bis = hci_conn_hash_lookup_big_state(hdev,
841+
conn->iso_qos.bcast.big,
842+
BT_CONNECT,
843+
HCI_ROLE_MASTER);
834844
if (bis)
835845
return;
836846

net/bluetooth/hci_event.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6952,9 +6952,14 @@ static void hci_le_big_sync_established_evt(struct hci_dev *hdev, void *data,
69526952
continue;
69536953
}
69546954

6955-
if (ev->status != 0x42)
6955+
if (ev->status != 0x42) {
69566956
/* Mark PA sync as established */
69576957
set_bit(HCI_CONN_PA_SYNC, &bis->flags);
6958+
/* Reset cleanup callback of PA Sync so it doesn't
6959+
* terminate the sync when deleting the connection.
6960+
*/
6961+
conn->cleanup = NULL;
6962+
}
69586963

69596964
bis->sync_handle = conn->sync_handle;
69606965
bis->iso_qos.bcast.big = ev->handle;

0 commit comments

Comments
 (0)