Skip to content

Commit 24e38e9

Browse files
Thalleycarlescufi
authored andcommitted
Bluetooth: ISO: Use can_send, can_recv when setting up data paths
Besides checking for the rx/tx pointer, we now also validate the can_send and can_recv values to ensure that we do not setup a useless data path. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 54fac03 commit 24e38e9

File tree

1 file changed

+2
-2
lines changed
  • subsys/bluetooth/host

1 file changed

+2
-2
lines changed

subsys/bluetooth/host/iso.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,15 @@ static int bt_iso_setup_data_path(struct bt_conn *iso)
258258
* in the controller.
259259
*/
260260

261-
if (tx_qos != NULL) {
261+
if (tx_qos != NULL && chan->iso->iso.can_send) {
262262
if (tx_qos->path != NULL) { /* Use application path */
263263
in_path = tx_qos->path;
264264
} else { /* else fallback to HCI path */
265265
in_path = &default_hci_path;
266266
}
267267
}
268268

269-
if (rx_qos != NULL) {
269+
if (rx_qos != NULL && chan->iso->iso.can_recv) {
270270
if (rx_qos->path != NULL) { /* Use application path */
271271
out_path = rx_qos->path;
272272
} else { /* else fallback to HCI path */

0 commit comments

Comments
 (0)