From 9106b15399efe092e25e7b61d03ea057284c51e6 Mon Sep 17 00:00:00 2001 From: Bjarki Arge Andreasen Date: Mon, 21 Jul 2025 14:15:32 +0200 Subject: [PATCH] modem: cmux: Decouple modem cmux and cellular driver The modem modules cmux module is currently directly coupled to the presence of specific modems, rather than being selected by drivers for whatever hardware wants to request the default MTU of 127 bytes. This commit the makes the device drivers (for now, modem_cellular) select the symbol, thus decoupling the modem modules from the presence of any specific device. Signed-off-by: Bjarki Arge Andreasen --- drivers/modem/Kconfig.cellular | 7 +++++++ subsys/modem/Kconfig | 9 +-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/modem/Kconfig.cellular b/drivers/modem/Kconfig.cellular index 60528faefdf25..b4be5b69d808e 100644 --- a/drivers/modem/Kconfig.cellular +++ b/drivers/modem/Kconfig.cellular @@ -21,6 +21,13 @@ config MODEM_CELLULAR DT_HAS_QUECTEL_EG25_G_ENABLED || DT_HAS_NORDIC_NRF91_SLM_ENABLED || \ DT_HAS_SQN_GM02S_ENABLED || DT_HAS_U_BLOX_LARA_R6_ENABLED || \ DT_HAS_QUECTEL_EG800Q_ENABLED) + select MODEM_CMUX_DEFAULT_MTU_127 if \ + (DT_HAS_QUECTEL_BG95_ENABLED || DT_HAS_QUECTEL_EG25_G_ENABLED || \ + DT_HAS_SIMCOM_SIM7080_ENABLED || DT_HAS_U_BLOX_SARA_R4_ENABLED || \ + DT_HAS_U_BLOX_SARA_R5_ENABLED || DT_HAS_SWIR_HL7800_ENABLED || \ + DT_HAS_TELIT_ME910G1_ENABLED || DT_HAS_TELIT_ME310G1_ENABLED || \ + DT_HAS_SQN_GM02S_ENABLED || DT_HAS_QUECTEL_EG800Q_ENABLED || \ + DT_HAS_SIMCOM_A76XX_ENABLED) help This driver uses the generic 3gpp AT commands, along with the standard protocols CMUX and PPP, to configure diff --git a/subsys/modem/Kconfig b/subsys/modem/Kconfig index dcbb5bf99a044..c4f4c0cd8982c 100644 --- a/subsys/modem/Kconfig +++ b/subsys/modem/Kconfig @@ -31,15 +31,8 @@ if MODEM_CMUX config MODEM_CMUX_DEFAULT_MTU_127 bool - default y if (DT_HAS_QUECTEL_BG95_ENABLED || DT_HAS_QUECTEL_EG25_G_ENABLED || \ - DT_HAS_SIMCOM_SIM7080_ENABLED || DT_HAS_U_BLOX_SARA_R4_ENABLED || \ - DT_HAS_U_BLOX_SARA_R5_ENABLED || DT_HAS_SWIR_HL7800_ENABLED || \ - DT_HAS_TELIT_ME910G1_ENABLED || DT_HAS_TELIT_ME310G1_ENABLED || \ - DT_HAS_SQN_GM02S_ENABLED || DT_HAS_QUECTEL_EG800Q_ENABLED || \ - DT_HAS_SIMCOM_A76XX_ENABLED) help - Use the default MTU size of 127 bytes for the CMUX module on certain modems. - This must match the AT+CMUX commands in the modem_cellular driver. + Hint that the default MODEM_CMUX_MTU size should be 127 bytes. config MODEM_CMUX_MTU int "CMUX MTU size in bytes"