Skip to content

Conversation

@SeppoTakalo
Copy link
Contributor

Pull in changes from zephyrproject-rtos/zephyr#87115

As the RC is approaching and the PR is slow to get in, I'll create a fromlist PR to get these changes into NCS for testing.

If the PR goes int before our RC, I'll refactor this to [fromtree]

Allow configuring MTU for CMUX.
Some AT manual and specification define this as a
frame size. Linux ldattach default to 127 bytes,
3GPP TS 27.010 defaults to 31.

We should limit our CMUX frames to a size that
remote end is capable of handling.
Linux silently drops oversized frames.

Also, remove MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE as
this was only limiting a buffer sizes, and resulted
CMUX frames to be capped to same value.
Use MODEM_CMUX_WORK_BUFFER_SIZE and MODEM_CMUX_MTU instead.

Also rename CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZES to
CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZE as it is now
only used as a Chat module. DLCI pipes use
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE.

Signed-off-by: Seppo Takalo <[email protected]>
(cherry picked from commit c78081e)
If we end up writing zero bytes to cmux output, we can return
zero instead of -ENOMEM as it would break various modules when
using small buffers. For example modem_chat.c does not tolerate
-ENOMEM but handles zero OK.

Signed-off-by: Seppo Takalo <[email protected]>
(cherry picked from commit 15b0f90)
@sonarqubecloud
Copy link

@tomi-font
Copy link
Contributor

Can now be made a fromtree.

@SeppoTakalo
Copy link
Contributor Author

This is already changed to [nrf fromtree]

@SeppoTakalo SeppoTakalo added this to the ncs-3.0.0 milestone Mar 25, 2025
@nordicjm nordicjm merged commit 89fe459 into nrfconnect:main Mar 25, 2025
18 checks passed
@tomi-font
Copy link
Contributor

Ah, nice. 🙂 Somehow didn't get a notification for the force push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants