summaryrefslogtreecommitdiff
path: root/extra/networkmanager/modem-manager-0.7.991-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/networkmanager/modem-manager-0.7.991-2.patch')
-rw-r--r--extra/networkmanager/modem-manager-0.7.991-2.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/extra/networkmanager/modem-manager-0.7.991-2.patch b/extra/networkmanager/modem-manager-0.7.991-2.patch
new file mode 100644
index 000000000..f1ca11784
--- /dev/null
+++ b/extra/networkmanager/modem-manager-0.7.991-2.patch
@@ -0,0 +1,62 @@
+From c126d97cb6666c714d75dc68d808b34c77a99398 Mon Sep 17 00:00:00 2001
+From: Aleksander Morgado <aleksander@lanedo.com>
+Date: Wed, 05 Jun 2013 14:34:10 +0000
+Subject: 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
+---
+diff --git a/configure.ac b/configure.ac
+index d0ee1bd..e2e3862 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -464,7 +464,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)
+@@ -782,4 +782,3 @@ echo " documentation: $enable_gtk_doc"
+ echo " tests: $enable_tests"
+ echo " code coverage: $enable_code_coverage"
+ echo
+-
+diff --git a/src/modem-manager/nm-modem-broadband.c b/src/modem-manager/nm-modem-broadband.c
+index 53839df..febab8a 100644
+--- a/src/modem-manager/nm-modem-broadband.c
++++ b/src/modem-manager/nm-modem-broadband.c
+@@ -116,8 +116,23 @@ nm_modem_broadband_get_capabilities (NMModemBroadband *self,
+ NMDeviceModemCapabilities *modem_caps,
+ NMDeviceModemCapabilities *current_caps)
+ {
+- *modem_caps = (NMDeviceModemCapabilities)mm_modem_get_modem_capabilities (self->priv->modem_iface);
+- *current_caps = (NMDeviceModemCapabilities)mm_modem_get_current_capabilities (self->priv->modem_iface);
++ MMModemCapability all_supported = MM_MODEM_CAPABILITY_NONE;
++ MMModemCapability *supported;
++ guint n_supported;
++
++ /* 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);
+ }
+
+ /*****************************************************************************/
+--
+cgit v0.9.0.2-2-gbebe