From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCHv4 1/2] Add plugin for Cinterion TC65 modem
Date: Mon, 10 Jan 2011 15:17:59 -0600 [thread overview]
Message-ID: <4D2B7787.3030609@gmail.com> (raw)
In-Reply-To: <1294616688-17246-2-git-send-email-oskari.timperi@ixonos.com>
[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]
Hi Oskari,
On 01/09/2011 05:44 PM, oskari.timperi(a)ixonos.com wrote:
> From: Oskari Timperi <oskari.timperi@iki.fi>
>
> ---
> Makefile.am | 3 +
> plugins/tc65.c | 265 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 268 insertions(+), 0 deletions(-)
> create mode 100644 plugins/tc65.c
>
So I applied this patch since it seemed a good enough start to me.
However, I did make some additional fixes afterward. Can you please
check them and make sure you agree with these?
Also, one other thing for you to fix:
> +static int tc65_disable(struct ofono_modem *modem)
> +{
> + GAtChat *chat = ofono_modem_get_data(modem);
> +
> + DBG("%p", modem);
> +
> + ofono_modem_set_data(modem, NULL);
> +
> + g_at_chat_send(chat, "AT+CFUN=7", NULL, NULL, NULL, NULL);
> +
> + g_at_chat_unref(chat);
> +
> + return 0;
> +}
The g_at_chat_send above has no effect since you unref the channel right
afterward. GAtChat uses non-blocking reads / writes and poll / select.
This means that the even loop must be entered before any read / write
happens. If you truly wish to send the CFUN=7 on disable, then you
should add a callback that calls ofono_modem_set_powered(modem, FALSE).
I leave this up to you to add as a separate patch.
Regards,
-Denis
next prev parent reply other threads:[~2011-01-10 21:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-09 23:44 [PATCHv4 0/2] Support for Cinterion TC65 oskari.timperi
2011-01-09 23:44 ` [PATCHv4 1/2] Add plugin for Cinterion TC65 modem oskari.timperi
2011-01-10 21:17 ` Denis Kenzior [this message]
2011-01-09 23:44 ` [PATCHv4 2/2] udev: Handle " oskari.timperi
2011-01-10 21:18 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D2B7787.3030609@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.