mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 10:29:52 +00:00
Bluetooth: ISO: Don't initiate CIS connections if there are no buffers
If the controller has no buffers left return -ENOBUFF to indicate that iso_cnt might be out of sync. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
@@ -458,6 +458,13 @@ static int iso_connect_cis(struct sock *sk)
|
|||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if there are available buffers for output/TX. */
|
||||||
|
if (iso_pi(sk)->qos.ucast.out.sdu && !hci_iso_count(hdev) &&
|
||||||
|
(hdev->iso_pkts && !hdev->iso_cnt)) {
|
||||||
|
err = -ENOBUFS;
|
||||||
|
goto unlock;
|
||||||
|
}
|
||||||
|
|
||||||
/* Just bind if DEFER_SETUP has been set */
|
/* Just bind if DEFER_SETUP has been set */
|
||||||
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
|
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
|
||||||
hcon = hci_bind_cis(hdev, &iso_pi(sk)->dst,
|
hcon = hci_bind_cis(hdev, &iso_pi(sk)->dst,
|
||||||
|
|||||||
Reference in New Issue
Block a user