From: Kalle Valo <kalle.valo@canonical.com>
To: ofono@ofono.org
Subject: Re: [PATCH v3 2/2] huawei: add gprs context
Date: Thu, 20 May 2010 10:35:13 +0300 [thread overview]
Message-ID: <87mxvvnhzi.fsf@potku.valot.fi> (raw)
In-Reply-To: <201005190844.38234.denkenz@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2160 bytes --]
Denis Kenzior <denkenz@gmail.com> writes:
> Hi Kalle,
Hi again Denis,
>> + ret = at_util_parse_reg_unsolicited(result, "+CGREG:", &status,
>> + NULL, NULL, NULL,
>> + OFONO_VENDOR_HUAWEI);
>
> No mixing of tabs & spaces for indentation
Fixed.
Oh man, I have to fix my emacs settings :/
>> +
>> + if (ret == FALSE)
>> + return;
>> +
>> + ofono_gprs_status_notify(gprs, status);
>> +}
>> +
>> +static inline void report_signal_strength(struct ofono_netreg *netreg,
>> + int strength)
>
> And here
This function is gone now.
>> + DBG("%d", strength);
>> +
>> + if (strength == 99)
>> + strength = -1;
>> + else
>> + strength = (strength * 100) / 31;
>> +
>> + ofono_netreg_strength_notify(netreg, strength);
>> +}
>
> You might really want to make this into an atutil function instead of copy-
> pasting it around.
I created this:
static inline int at_util_convert_signal_strength(int strength)
{
int result;
if (strength == 99)
result = -1;
else
result = (strength * 100) / 31;
return result;
}
>> - ofono_netreg_create(modem, OFONO_VENDOR_HUAWEI, "atmodem", data->chat);
>> + netreg = ofono_netreg_create(modem, OFONO_VENDOR_HUAWEI, "atmodem",
>> + data->chat);
>
> Again with mixed indentation
Fixed.
>> ofono_sms_create(modem, OFONO_VENDOR_QUALCOMM_MSM, "atmodem",
>> data->chat); +
>> + gprs = ofono_gprs_create(modem, OFONO_VENDOR_HUAWEI, "atmodem",
>> + data->chat);
>
> And here
Fixed.
>> + gc = ofono_gprs_context_create(modem, 0, "atmodem", data->chat);
>> +
>> + if (gprs && gc) {
>> + ofono_gprs_add_context(gprs, gc);
>> +
>> + /* huawei has a separate channel for CGREG notifications */
>> + g_at_chat_register(data->event, "+CGREG:",
>> + huawei_cgreg_notify, FALSE, gprs, NULL);
>
> And here
Fixed.
>> +
>> + /* huawei uses non-standard "^RSSI:18" strings */
>> + g_at_chat_register(data->event, "^RSSI:",
>> + huawei_rssi_notify, FALSE, netreg, NULL);
>
> And here
Fixed.
Thank you for the comments. I'll run some tests first and send v4 soon.
--
Kalle Valo
next prev parent reply other threads:[~2010-05-20 7:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 14:06 [PATCH v3 0/2] Huawei GPRS support Kalle Valo
2010-05-19 14:06 ` [PATCH v3 1/2] huawei: detect SecondaryDevice which is used for events Kalle Valo
2010-05-19 13:40 ` Denis Kenzior
2010-05-20 7:15 ` Kalle Valo
2010-05-19 14:06 ` [PATCH v3 2/2] huawei: add gprs context Kalle Valo
2010-05-19 13:44 ` Denis Kenzior
2010-05-20 7:35 ` Kalle Valo [this message]
2010-08-04 19:59 ` Inaky Perez-Gonzalez
2010-08-05 5:54 ` Kalle Valo
2010-08-05 17:29 ` Inaky Perez-Gonzalez
2010-08-06 7:26 ` Kalle Valo
2010-08-11 4:56 ` Inaky Perez-Gonzalez
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=87mxvvnhzi.fsf@potku.valot.fi \
--to=kalle.valo@canonical.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox