szymon-czapracki commented on code in PR #2022: URL: https://github.com/apache/mynewt-nimble/pull/2022#discussion_r2102510937
########## nimble/host/src/ble_l2cap.c: ########## @@ -233,212 +231,168 @@ ble_l2cap_recv_ready(struct ble_l2cap_chan *chan, struct os_mbuf *sdu_rx) return ble_l2cap_coc_recv_ready(chan, sdu_rx); } -void -ble_l2cap_remove_rx(struct ble_hs_conn *conn, struct ble_l2cap_chan *chan) +static uint16_t +ble_l2cap_get_mtu(struct ble_l2cap_chan *chan) { - conn->bhc_rx_chan = NULL; - os_mbuf_free_chain(chan->rx_buf); - chan->rx_buf = NULL; - chan->rx_len = 0; + if (chan->scid == BLE_L2CAP_CID_ATT) { + /* In case of ATT chan->my_mtu keeps preferred MTU which is later + * used during exchange MTU procedure. Helper below will gives us actual Review Comment: ```suggestion * used during exchange MTU procedure. Helper below gives us actual ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@mynewt.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org