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:
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#define NM_MODEM_BROADBAND_MODEM "modem"
|
#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)
|
#if !MM_CHECK_VERSION(1, 14, 0)
|
||||||
#define MM_MODEM_CAPABILITY_5GNR ((MMModemCapability) (1 << 6))
|
#define MM_MODEM_CAPABILITY_5GNR ((MMModemCapability) (1 << 6))
|
||||||
#endif
|
#endif
|
||||||
@@ -561,6 +563,7 @@ out:
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MM_SUPPORTS_INITIAL_EPS_BEARER_SETTINGS
|
||||||
static void
|
static void
|
||||||
set_initial_eps_bearer_settings_ready(MMModem3gpp *modem_3gpp_iface,
|
set_initial_eps_bearer_settings_ready(MMModem3gpp *modem_3gpp_iface,
|
||||||
GAsyncResult *res,
|
GAsyncResult *res,
|
||||||
@@ -588,6 +591,7 @@ set_initial_eps_bearer_settings_ready(MMModem3gpp *modem_3gpp_iface,
|
|||||||
self->_priv.ctx->step++;
|
self->_priv.ctx->step++;
|
||||||
connect_context_step(self);
|
connect_context_step(self);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
connect_context_step(NMModemBroadband *self)
|
connect_context_step(NMModemBroadband *self)
|
||||||
@@ -667,6 +671,7 @@ connect_context_step(NMModemBroadband *self)
|
|||||||
|
|
||||||
/* assume do_config is true if an APN is set */
|
/* assume do_config is true if an APN is set */
|
||||||
if (apn || do_config) {
|
if (apn || do_config) {
|
||||||
|
#if MM_SUPPORTS_INITIAL_EPS_BEARER_SETTINGS
|
||||||
gs_unref_object MMBearerProperties *config = NULL;
|
gs_unref_object MMBearerProperties *config = NULL;
|
||||||
NMModemIPType ip_type = nm_modem_get_initial_eps_bearer_ip_type(ctx->ip_types);
|
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,
|
(GAsyncReadyCallback) set_initial_eps_bearer_settings_ready,
|
||||||
self);
|
self);
|
||||||
break;
|
break;
|
||||||
|
#else
|
||||||
|
_LOGD("cannot set initial EPS bearer settings due to old ModemManager version");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx->step++;
|
ctx->step++;
|
||||||
|
Reference in New Issue
Block a user