Bluetooth: ISO: Fix conn_mtu for BT_CONN_TYPE_ISO

If the bt_dev.le.iso_mtu was 0, then we would report
bt_dev.le.acl_mtu if CONFIG_BT_CONN=y (which is often true when
CONFIG_BT_ISO=y). Thus if the ISO MTU is 0, we would often
return a non-0 value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2022-12-16 18:37:15 +01:00 committed by Carles Cufí
commit ba0bb89a70

View file

@ -512,7 +512,7 @@ static inline uint16_t conn_mtu(struct bt_conn *conn)
}
#endif /* CONFIG_BT_BREDR */
#if defined(CONFIG_BT_ISO)
if (conn->type == BT_CONN_TYPE_ISO && bt_dev.le.iso_mtu) {
if (conn->type == BT_CONN_TYPE_ISO) {
return bt_dev.le.iso_mtu;
}
#endif /* CONFIG_BT_ISO */