aboutsummaryrefslogtreecommitdiff
path: root/plugins/mbm
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-08-23 17:27:03 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-08-23 18:56:23 +0200
commit1fa82ebd403c6b696b607046ad370726a3db7272 (patch)
tree4c6858405c9aea64153475a7e727de90b068dfd0 /plugins/mbm
parentef300a69b6b859f071849bd7a39653cf03a0e305 (diff)
mbm: implement custom modem reset
Diffstat (limited to 'plugins/mbm')
-rw-r--r--plugins/mbm/mm-broadband-modem-mbm.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/mbm/mm-broadband-modem-mbm.c b/plugins/mbm/mm-broadband-modem-mbm.c
index 47eac771..5094b943 100644
--- a/plugins/mbm/mm-broadband-modem-mbm.c
+++ b/plugins/mbm/mm-broadband-modem-mbm.c
@@ -392,6 +392,32 @@ modem_power_up (MMIfaceModem *_self,
}
/*****************************************************************************/
+/* Reset (Modem interface) */
+
+static gboolean
+reset_finish (MMIfaceModem *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ /* Ignore errors */
+ mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, NULL);
+ return TRUE;
+}
+
+static void
+reset (MMIfaceModem *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ mm_base_modem_at_command (MM_BASE_MODEM (self),
+ "*E2RESET",
+ 3,
+ FALSE,
+ callback,
+ user_data);
+}
+
+/*****************************************************************************/
/* Setup/Cleanup unsolicited events (3GPP interface) */
static void
@@ -839,6 +865,8 @@ iface_modem_init (MMIfaceModem *iface)
iface->modem_init_finish = modem_init_finish;
iface->modem_power_up = modem_power_up;
iface->modem_power_up_finish = modem_power_up_finish;
+ iface->reset = reset;
+ iface->reset_finish = reset_finish;
}
static void