diff options
author | Thomas Haller <thaller@redhat.com> | 2023-02-21 17:51:25 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-02-21 18:04:23 +0100 |
commit | a08214f60d2ccac4b2de526d89020eb6b2fcbca3 (patch) | |
tree | dba28b4d5c586e3ae89c3a012023652f633ce940 | |
parent | 6595954f94c846263bc54181d7b4083fc04c34ea (diff) | |
download | NetworkManager-a08214f60d2ccac4b2de526d89020eb6b2fcbca3.tar.gz |
wwan: workaround missing mm_modem_3gpp_set_initial_eps_bearer_settings() API
This was introduced only in MM 1.10. This breaks build on Centos7.
Fixes: c52999ee909a ('wwan: Set initial EPS bearer settings')
-rw-r--r-- | src/core/devices/wwan/nm-modem-broadband.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/devices/wwan/nm-modem-broadband.c b/src/core/devices/wwan/nm-modem-broadband.c index 3f24e27a1c..a150040f3c 100644 --- a/src/core/devices/wwan/nm-modem-broadband.c +++ b/src/core/devices/wwan/nm-modem-broadband.c @@ -20,6 +20,8 @@ #define NM_MODEM_BROADBAND_MODEM "modem" +#define MM_SUPPORTS_INITIAL_EPS_BEARER_SETTINGS MM_CHECK_VERSION(1, 10, 0) + #if !MM_CHECK_VERSION(1, 14, 0) #define MM_MODEM_CAPABILITY_5GNR ((MMModemCapability) (1 << 6)) #endif @@ -561,6 +563,7 @@ out: return TRUE; } +#if MM_SUPPORTS_INITIAL_EPS_BEARER_SETTINGS static void set_initial_eps_bearer_settings_ready(MMModem3gpp *modem_3gpp_iface, GAsyncResult *res, @@ -588,6 +591,7 @@ set_initial_eps_bearer_settings_ready(MMModem3gpp *modem_3gpp_iface, self->_priv.ctx->step++; connect_context_step(self); } +#endif static void connect_context_step(NMModemBroadband *self) @@ -667,6 +671,7 @@ connect_context_step(NMModemBroadband *self) /* assume do_config is true if an APN is set */ if (apn || do_config) { +#if MM_SUPPORTS_INITIAL_EPS_BEARER_SETTINGS gs_unref_object MMBearerProperties *config = NULL; NMModemIPType ip_type = nm_modem_get_initial_eps_bearer_ip_type(ctx->ip_types); @@ -699,6 +704,9 @@ connect_context_step(NMModemBroadband *self) (GAsyncReadyCallback) set_initial_eps_bearer_settings_ready, self); break; +#else + _LOGD("cannot set initial EPS bearer settings due to old ModemManager version"); +#endif } } ctx->step++; |