diff --git a/nimble/host/src/ble_l2cap_sig.c b/nimble/host/src/ble_l2cap_sig.c index 2a3616199..b74f88a4d 100644 --- a/nimble/host/src/ble_l2cap_sig.c +++ b/nimble/host/src/ble_l2cap_sig.c @@ -796,10 +796,6 @@ ble_l2cap_sig_credit_base_reconfig_req_rx(uint16_t conn_handle, if (chan[i]->peer_coc_mps > req->mps) { reduction_mps++; - if (reduction_mps > 1) { - rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_REDUCTION_MPS_NOT_ALLOWED); - goto failed; - } } if (chan[i]->coc_tx.mtu > req->mtu) { @@ -808,6 +804,11 @@ ble_l2cap_sig_credit_base_reconfig_req_rx(uint16_t conn_handle, } } + if (reduction_mps > 0 && cid_cnt > 1) { + rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_REDUCTION_MPS_NOT_ALLOWED); + goto failed; + } + ble_hs_unlock(); for (i = 0; i < cid_cnt; i++) {