[MM06] [PATCH] sierra: use +CFUN=4 for powering down
- From: Marius Kotsbak <marius kotsbak gmail com>
- To: "networkmanager-list gnome org" <networkmanager-list gnome org>
- Subject: [MM06] [PATCH] sierra: use +CFUN=4 for powering down
- Date: Sun, 09 Sep 2012 17:39:36 +0200
See patch attached.
sierra: use +CFUN=4 for powering down
plugins/mm-modem-sierra-gsm.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
>From f256d6cc79e0c640968105ea4dd7affd231b2f01 Mon Sep 17 00:00:00 2001
From: "Marius B. Kotsbak" <marius kotsbak com>
Date: Sun, 9 Sep 2012 16:17:46 +0200
Subject: [PATCH] sierra: use +CFUN=4 for powering down
---
plugins/mm-modem-sierra-gsm.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/plugins/mm-modem-sierra-gsm.c b/plugins/mm-modem-sierra-gsm.c
index 23ed029..759ab87 100644
--- a/plugins/mm-modem-sierra-gsm.c
+++ b/plugins/mm-modem-sierra-gsm.c
@@ -1062,6 +1062,31 @@ dispose (GObject *object)
}
static void
+set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ /* Do nothing... see set_property() in parent, which also does nothing */
+}
+
+static void
+get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ switch (prop_id) {
+ case MM_GENERIC_GSM_PROP_POWER_DOWN_CMD:
+ /* Use AT+CFUN=4 for power down (low power mode) */
+ g_value_set_string (value, "+CFUN=4");
+ break;
+ default:
+ break;
+ }
+}
+
+static void
mm_modem_sierra_gsm_class_init (MMModemSierraGsmClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -1071,6 +1096,13 @@ mm_modem_sierra_gsm_class_init (MMModemSierraGsmClass *klass)
g_type_class_add_private (object_class, sizeof (MMModemSierraGsmPrivate));
object_class->dispose = dispose;
+ object_class->get_property = get_property;
+ object_class->set_property = set_property;
+
+ g_object_class_override_property (object_class,
+ MM_GENERIC_GSM_PROP_POWER_DOWN_CMD,
+ MM_GENERIC_GSM_POWER_DOWN_CMD);
+
gsm_class->port_grabbed = port_grabbed;
gsm_class->do_enable_power_up_check_needed = do_enable_power_up_check_needed;
gsm_class->do_enable_power_up_done = real_do_enable_power_up_done;
--
1.7.10.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]