Skip to content
/ linux Public

Commit f678ea4

Browse files
Vudentzgregkh
authored andcommitted
Bluetooth: ISO: Fix defer tests being unstable
[ Upstream commit 62bcaa6 ] iso-tester defer tests seem to fail with hci_conn_hash_lookup_cig being unable to resolve a cig in set_cig_params_sync due a race where it is run immediatelly before hci_bind_cis is able to set the QoS settings into the hci_conn object. So this moves the assigning of the QoS settings to be done directly by hci_le_set_cig_params to prevent that from happening again. Fixes: 26afbd8 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c53c855 commit f678ea4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/bluetooth/hci_conn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,8 @@ static bool hci_le_set_cig_params(struct hci_conn *conn, struct bt_iso_qos *qos)
18681868
return false;
18691869

18701870
done:
1871+
conn->iso_qos = *qos;
1872+
18711873
if (hci_cmd_sync_queue(hdev, set_cig_params_sync,
18721874
UINT_PTR(qos->ucast.cig), NULL) < 0)
18731875
return false;
@@ -1934,8 +1936,6 @@ struct hci_conn *hci_bind_cis(struct hci_dev *hdev, bdaddr_t *dst,
19341936
}
19351937

19361938
hci_conn_hold(cis);
1937-
1938-
cis->iso_qos = *qos;
19391939
cis->state = BT_BOUND;
19401940

19411941
return cis;

0 commit comments

Comments
 (0)