From: Guillaume Zajac <guillaume.zajac@linux.intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH 2/5] speedup: Check for supported modem capabilities first
Date: Tue, 10 Jan 2012 16:37:29 +0100 [thread overview]
Message-ID: <4F0C5B39.5090107@linux.intel.com> (raw)
In-Reply-To: <4F096BF1.5020406@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]
Hi Denis,
>>>>>> struct speedup_data {
>>>>>> GAtChat *modem;
>>>>>> GAtChat *aux;
>>>>>> gboolean have_sim;
>>>>>> struct at_util_sim_state_query *sim_state_query;
>>>>>> + gboolean have_gsm;
>>>>>> + gboolean have_cdma;
>>>>> It might be a good idea to use a single gboolean, or better yet an enum
>>>>> here instead. There's no point to waste 8 bytes when a single byte
>>>>> can do.
>>>> I did this on purpose for the Huawei driver. We can unify this later on,
>>>> but at this moment I rather see what is actually happening.
>>>>
>>>> Since we keep parsing all capabilities, I wanna avoid that a later one
>>>> overwrites a previous one. That said, just using some flags would be
>>>> better anyway. Especially since we also always have have_sim as well.
>>>>
>>>> However that can be done as a further optimization in the Speedup and
>>>> Huawei drivers.
>>>>
>>> A flagged enum is indeed what I had in mind when I wrote this. But fair
>>> enough on your reasoning
>> As we are starting thinking about tweaking SIM atom to make it work with
>> CDMA modem,
>> maybe having quickly the flagged enum would be helpful to distinguish if
>> it is a CDMA or GSM modem that is asking for the SIM atom creation.
>>
>> Then where should this enum modem_type take place?
>> Should we tweak the already existing one into modem.h in replacing:
>>
>> OFONO_MODEM_TYPE_HARDWARE = 0,
>> OFONO_MODEM_TYPE_HFP,
>> OFONO_MODEM_TYPE_SAP,
>>
>> by
>>
>> OFONO_MODEM_TYPE_UNKNOWN_HARDWARE = 0,
>> OFONO_MODEM_TYPE_GSM_HARDWARE = 1,
>> OFONO_MODEM_TYPE_CDMA_HARDWARE = 2,
>> OFONO_MODEM_TYPE_HFP = 4,
>> OFONO_MODEM_TYPE_SAP = 8,
>>
>> Then we have just to specify the modem_type in creating the SIM atom to
>> use its limited functionnalities when we have CDMA modem
>> e.g. manage only PIN protection.
> No, the type information is a kludge that will hamper us in the end, so
> I am against any such changes. Even the current modem_type enum took
> some convincing and it is meant to be used as a hint for external
> applications, not used internally by oFono core in any way
We can have a private enum modem type into plugin, but we won't be able
to use it into any atoms.
Maybe by deduction we can add an enum sim_type into sim.h store the type
into the plugin data and pass it at SIM atom creation.
What do you think?
Kind regards,
Guillaume
next prev parent reply other threads:[~2012-01-10 15:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 13:10 [PATCH 0/5] Unify SpeedUp plugin Guillaume Zajac
2012-01-09 13:10 ` [PATCH 1/5] udevng: Remove huaweicdma label from driver_list Guillaume Zajac
2012-01-07 18:26 ` Denis Kenzior
2012-01-09 13:10 ` [PATCH 2/5] speedup: Check for supported modem capabilities first Guillaume Zajac
2012-01-07 18:26 ` Denis Kenzior
2012-01-09 19:36 ` Marcel Holtmann
2012-01-07 19:26 ` Denis Kenzior
2012-01-10 13:43 ` Guillaume Zajac
2012-01-08 10:12 ` Denis Kenzior
2012-01-10 15:37 ` Guillaume Zajac [this message]
2012-01-08 14:27 ` Denis Kenzior
2012-01-11 10:48 ` Guillaume Zajac
2012-01-11 11:06 ` Denis Kenzior
2012-01-11 15:12 ` Guillaume Zajac
2012-01-09 13:10 ` [PATCH 3/5] speedup: Create GSM/UMTS atoms only if support has been detected Guillaume Zajac
2012-01-09 13:10 ` [PATCH 4/5] speedup: Create CDMA atoms " Guillaume Zajac
2012-01-09 13:11 ` [PATCH 5/5] udevng: Simplify vendor and driver list for SpeedUp Guillaume Zajac
2012-01-09 13:14 ` [PATCH] speedupcdma: Delete unused plugin Guillaume Zajac
2012-01-12 10:00 ` [PATCH 0/5] Unify SpeedUp plugin Guillaume Zajac
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=4F0C5B39.5090107@linux.intel.com \
--to=guillaume.zajac@linux.intel.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