diff --git a/nimble/host/src/ble_att.c b/nimble/host/src/ble_att.c index 3c5eaf75e1..5e221824c3 100644 --- a/nimble/host/src/ble_att.c +++ b/nimble/host/src/ble_att.c @@ -463,9 +463,12 @@ ble_att_chan_mtu(const struct ble_l2cap_chan *chan) uint16_t mtu; #if MYNEWT_VAL(BLE_EATT_CHAN_NUM) > 0 - if (chan->scid != BLE_L2CAP_CID_ATT) { - /* EATT case */ - return chan->coc_tx.mtu; + if (chan->psm == BLE_EATT_PSM) { + /* The ATT_MTU for the Enhanced ATT bearer shall be set to the minimum of the + * MTU field values of the two devices. Reference: + * Core v5.0, Vol 6, Part B, section 1.3.2.1 + */ + return min(chan->coc_tx.mtu, chan->coc_rx.mtu); } #endif