> > > > Unfortunately I don't have any modemmanager experience or time to > > implement the quirk "the right way", so if someone can start from > > the previous attached patch and fix the problem correctly, it would be > > great :) > > > > Attached a patch which should do AT+CFUN=1 only if product ID is not > 0x6832. Can you guys test it? >
Minor fix in the previous patch, please use the one here instead. Cheers, -- Aleksander
>From d76e86d336f090a45a66159944e49dddd93c1269 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado <aleksan...@lanedo.com> Date: Fri, 20 May 2011 11:46:32 +0200 Subject: [PATCH] sierra: avoid sending power-up command to MC8780 Fixes LP#459052 Based on a patch developed by Alexander Sack --- plugins/mm-modem-sierra-gsm.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/plugins/mm-modem-sierra-gsm.c b/plugins/mm-modem-sierra-gsm.c index d4636d7..6e4f318 100644 --- a/plugins/mm-modem-sierra-gsm.c +++ b/plugins/mm-modem-sierra-gsm.c @@ -609,6 +609,44 @@ simple_connect (MMModemSimple *simple, /*****************************************************************************/ 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_UP_CMD: { + guint product_id = 0; + + g_object_get (object, + MM_MODEM_HW_PID, &product_id, + NULL); + + /* Some Sierra modems do a full software reset (including + * USB stack) with AT+CFUN=1, so try to avoid that. + * - MC8780 (0x6832) + * */ + if (product_id == 0x6832) + g_value_set_string (value, ""); + else + g_value_set_string (value, "+CFUN=1"); + break; + } + default: + break; + } +} + +static void modem_init (MMModem *modem_class) { modem_class->grab_port = grab_port; @@ -646,6 +684,9 @@ mm_modem_sierra_gsm_class_init (MMModemSierraGsmClass *klass) mm_modem_sierra_gsm_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (object_class, sizeof (MMModemSierraGsmPrivate)); + object_class->get_property = get_property; + object_class->set_property = set_property; + object_class->dispose = dispose; gsm_class->do_enable_power_up_done = real_do_enable_power_up_done; gsm_class->set_allowed_mode = set_allowed_mode; -- 1.7.4.1
_______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list