mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 01:30:16 +01:00
modem-manager: read 'SupportedCapabilities' instead of 'ModemCapabilities' (bgo #701668)
There is no longer a 'ModemCapabilities' uint32 property; instead we have 'SupportedCapabilities' giving a list of uint32 values. Just read the list and merge the values into a single mask; NM doesn't care about the exact combinations supported. https://bugzilla.gnome.org/show_bug.cgi?id=701668
This commit is contained in:
parent
b0863cbc4d
commit
c3706810ef
2 changed files with 17 additions and 4 deletions
|
|
@ -463,7 +463,7 @@ AC_SUBST(PPPD_PLUGIN_DIR)
|
|||
AC_ARG_WITH(modem-manager-1, AS_HELP_STRING([--with-modem-manager-1], [Enable new ModemManager1 interface support]),,[with_modem_manager_1=auto])
|
||||
if (test "${with_modem_manager_1}" != "no"); then
|
||||
PKG_CHECK_MODULES(MM_GLIB,
|
||||
[mm-glib],
|
||||
[mm-glib >= 0.7.991],
|
||||
[have_libmm_glib=yes],
|
||||
[have_libmm_glib=no])
|
||||
AC_SUBST(MM_GLIB_CFLAGS)
|
||||
|
|
@ -775,4 +775,3 @@ echo " tests: $enable_tests"
|
|||
echo " valgrind: $with_valgrind"
|
||||
echo " code coverage: $enable_code_coverage"
|
||||
echo
|
||||
|
||||
|
|
|
|||
|
|
@ -106,9 +106,23 @@ get_capabilities (NMModem *_self,
|
|||
NMDeviceModemCapabilities *current_caps)
|
||||
{
|
||||
NMModemBroadband *self = NM_MODEM_BROADBAND (_self);
|
||||
MMModemCapability all_supported = MM_MODEM_CAPABILITY_NONE;
|
||||
MMModemCapability *supported;
|
||||
guint n_supported;
|
||||
|
||||
*modem_caps = (NMDeviceModemCapabilities)mm_modem_get_modem_capabilities (self->priv->modem_iface);
|
||||
*current_caps = (NMDeviceModemCapabilities)mm_modem_get_current_capabilities (self->priv->modem_iface);
|
||||
/* For now, we don't care about the capability combinations, just merge all
|
||||
* combinations in a single mask */
|
||||
if (mm_modem_get_supported_capabilities (self->priv->modem_iface, &supported, &n_supported)) {
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < n_supported; i++)
|
||||
all_supported |= supported[i];
|
||||
|
||||
g_free (supported);
|
||||
}
|
||||
|
||||
*modem_caps = (NMDeviceModemCapabilities) all_supported;
|
||||
*current_caps = (NMDeviceModemCapabilities) mm_modem_get_current_capabilities (self->priv->modem_iface);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue