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 <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
54fac0323c
commit
24e38e90db
|
@ -258,7 +258,7 @@ static int bt_iso_setup_data_path(struct bt_conn *iso)
|
|||
* in the controller.
|
||||
*/
|
||||
|
||||
if (tx_qos != NULL) {
|
||||
if (tx_qos != NULL && chan->iso->iso.can_send) {
|
||||
if (tx_qos->path != NULL) { /* Use application path */
|
||||
in_path = tx_qos->path;
|
||||
} else { /* else fallback to HCI path */
|
||||
|
@ -266,7 +266,7 @@ static int bt_iso_setup_data_path(struct bt_conn *iso)
|
|||
}
|
||||
}
|
||||
|
||||
if (rx_qos != NULL) {
|
||||
if (rx_qos != NULL && chan->iso->iso.can_recv) {
|
||||
if (rx_qos->path != NULL) { /* Use application path */
|
||||
out_path = rx_qos->path;
|
||||
} else { /* else fallback to HCI path */
|
||||
|
|
Loading…
Reference in a new issue