summaryrefslogtreecommitdiff
path: root/src/devices/wwan/nm-modem.c
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2016-06-10 17:56:25 -0400
committerThomas Haller <thaller@redhat.com>2016-06-28 17:34:42 +0200
commita6e81af87f181d405f1c4334b66aceafd01ec676 (patch)
treecfdf8c191283e408ae56f11298c267dbaf395f07 /src/devices/wwan/nm-modem.c
parent13b2253df64f13bde5064294c6c3e729e285886c (diff)
downloadNetworkManager-a6e81af87f181d405f1c4334b66aceafd01ec676.tar.gz
wwan: add support for using oFono as a modem manager
This patch adds core wwan support for ofono, as used by Ubuntu Touch. Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> https://mail.gnome.org/archives/networkmanager-list/2016-June/msg00089.html
Diffstat (limited to 'src/devices/wwan/nm-modem.c')
-rw-r--r--src/devices/wwan/nm-modem.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c
index a6c770072c..2e3d63bb83 100644
--- a/src/devices/wwan/nm-modem.c
+++ b/src/devices/wwan/nm-modem.c
@@ -202,7 +202,9 @@ nm_modem_set_mm_enabled (NMModem *self,
return;
}
- NM_MODEM_GET_CLASS (self)->set_mm_enabled (self, enabled);
+ /* Not all modem classes support set_mm_enabled */
+ if (NM_MODEM_GET_CLASS (self)->set_mm_enabled)
+ NM_MODEM_GET_CLASS (self)->set_mm_enabled (self, enabled);
/* Pre-empt the state change signal */
nm_modem_set_state (self,
@@ -573,6 +575,8 @@ nm_modem_stage3_ip4_config_start (NMModem *self,
const char *method;
NMActStageReturn ret;
+ nm_log_dbg (LOGD_MB, "ip4_config_start");
+
g_return_val_if_fail (NM_IS_MODEM (self), NM_ACT_STAGE_RETURN_FAILURE);
g_return_val_if_fail (NM_IS_DEVICE (device), NM_ACT_STAGE_RETURN_FAILURE);
g_return_val_if_fail (NM_IS_DEVICE_CLASS (device_class), NM_ACT_STAGE_RETURN_FAILURE);
@@ -602,9 +606,11 @@ nm_modem_stage3_ip4_config_start (NMModem *self,
ret = ppp_stage3_ip_config_start (self, req, reason);
break;
case NM_MODEM_IP_METHOD_STATIC:
+ nm_log_dbg (LOGD_MB, "MODEM_IP_METHOD_STATIC");
ret = NM_MODEM_GET_CLASS (self)->static_stage3_ip4_config_start (self, req, reason);
break;
case NM_MODEM_IP_METHOD_AUTO:
+ nm_log_dbg (LOGD_MB, "MODEM_IP_METHOD_AUTO");
ret = device_class->act_stage3_ip4_config_start (device, NULL, reason);
break;
default: