[MM] [PATCH] novatel-lte: use +CFUN=4 for power down
- From: Ben Chan <benchan chromium org>
- To: networkmanager-list gnome org
- Cc: Aleksander Morgado <aleksander lanedo com>
- Subject: [MM] [PATCH] novatel-lte: use +CFUN=4 for power down
- Date: Wed, 30 Jan 2013 12:21:42 -0800
---
plugins/novatel/mm-broadband-modem-novatel-lte.c | 26 ++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/plugins/novatel/mm-broadband-modem-novatel-lte.c b/plugins/novatel/mm-broadband-modem-novatel-lte.c
index d32c397..9a21c4b 100644
--- a/plugins/novatel/mm-broadband-modem-novatel-lte.c
+++ b/plugins/novatel/mm-broadband-modem-novatel-lte.c
@@ -149,6 +149,30 @@ modem_init (MMIfaceModem *self,
}
/*****************************************************************************/
+/* Modem power down (Modem interface) */
+
+static gboolean
+modem_power_down_finish (MMIfaceModem *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ return !!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
+}
+
+static void
+modem_power_down (MMIfaceModem *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ mm_base_modem_at_command (MM_BASE_MODEM (self),
+ "+CFUN=4",
+ 6,
+ FALSE,
+ callback,
+ user_data);
+}
+
+/*****************************************************************************/
/* Create Bearer (Modem interface) */
static MMBearer *
@@ -745,6 +769,8 @@ iface_modem_init (MMIfaceModem *iface)
{
iface->modem_init = modem_init;
iface->modem_init_finish = modem_init_finish;
+ iface->modem_power_down = modem_power_down;
+ iface->modem_power_down_finish = modem_power_down_finish;
iface->create_bearer = modem_create_bearer;
iface->create_bearer_finish = modem_create_bearer_finish;
iface->create_sim = modem_create_sim;
--
1.8.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]