Skip to content

Commit

Permalink
Bluetooth: iso: Fix data path configuration
Browse files Browse the repository at this point in the history
This fixes data path configuration that was done for both directions
even if CIS was unidirectional. To ensure the data path shall be
configured, the QoS SDU is checked.

Fixes: zephyrproject-rtos#43190
Signed-off-by: Mariusz Skamra <[email protected]>
  • Loading branch information
MariuszSkamra authored and nashif committed Mar 15, 2022
1 parent bd941bc commit 0481b69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subsys/bluetooth/host/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static int bt_iso_setup_data_path(struct bt_conn *iso)
return hci_le_setup_iso_data_path(iso, dir, out_path);
} else if (IS_ENABLED(CONFIG_BT_ISO_UNICAST) &&
iso->iso.type == BT_ISO_CHAN_TYPE_CONNECTED) {
if (in_path != NULL) {
if (in_path != NULL && tx_qos->sdu > 0) {
/* Enable TX */
dir = BT_HCI_DATAPATH_DIR_HOST_TO_CTLR;
err = hci_le_setup_iso_data_path(iso, dir, in_path);
Expand All @@ -319,7 +319,7 @@ static int bt_iso_setup_data_path(struct bt_conn *iso)
}
}

if (out_path != NULL) {
if (out_path != NULL && rx_qos->sdu > 0) {
/* Enable RX */
dir = BT_HCI_DATAPATH_DIR_CTLR_TO_HOST;
err = hci_le_setup_iso_data_path(iso, dir, out_path);
Expand Down

0 comments on commit 0481b69

Please sign in to comment.