mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 10:14:41 +00:00
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: c52999ee90
('wwan: Set initial EPS bearer settings')
This commit is contained in:
parent
6595954f94
commit
a08214f60d
|
@ -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++;
|
||||
|
|
Loading…
Reference in a new issue