Commit Graph

12 Commits

Author SHA1 Message Date
Dan Williams
4dad94d500 core: rework port grabbing and organization
Make port roles more flexible.  We have modems that do PPP
on interfaces other than the primary interface, and that
wasn't possible with the old code.  So clean up all that
logic and move the port organization code into the core
so we can reduce code in the plugins.

In the new world order, the plugins say whether the port
is a QCDM port, an AT port, or ignored.  If it's an AT
port the plugins get to tag it as primary, secondary, or
PPP, or any combination of the 3.  This allows for modems
where PPP should really be done on the secondary port
(Huawei E220, Sierra devices) so that the primary port
stays open for command and status.

Modem subclasses no longer get asked to handle port grabbing
themselves.  Instead, that's now done by the generic classes
(MMGenericCdma and MMGenericGsm) and the plugins are notified
when a port is grabbed so they can add unsolicited response
handlers for it.  After all ports are grabbed by the generic
classes, they get "organized", which assigns various ports
to the roles of PRIMARY, SECONDARY, DATA, and QCDM based
on specific rules and hints that the plugin provided (which
are expressed as MMAtPortFlags).  The plugins then have
a chance to perform fixups on the primary port if they choose.

The plugin code is responsible for determining the port
hints (ie MMAtPortFlags) at probe time, instead of having
a combination of the plugin and the modem class do the
job.  This simplifies things greatly for the plugins at
the expense of more complicated logic in the core.
2012-02-28 10:06:04 -06:00
Thomas Tuttle
5fc4e866c2 time: implement in icera
Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
2012-01-27 15:14:27 -06:00
Eric Shienbrood
a35fc3a583 icera: report connected access technology when connected
The NWSTATE field reports both available access technology and the
actual access technology in-use when a PS connection is active, so
report the actual access tech when it's available.
2011-06-13 10:31:35 -05:00
Eric Shienbrood
509521d180 icera: request specific network error codes on connect errors
For connection failures, get additional error detail. Currently,
the only error codes that are mapped are the 3GPP TS 24.008 codes
for "Unknown or missing access point name" and "Requested service
option not subscribed" (which is sometimes returned for an invalid
APN).

(random fixes and cleanups by dcbw)
2011-06-09 16:45:08 -05:00
Eric Shienbrood
92159d9b0d icera: add more access technology strings 2011-06-09 16:40:11 -05:00
Aleksander Morgado
9323daec01 core, plugins: if modem removed don't process response
We try to avoid a memory leak when info->error is reset, as well as a second
re-schedule of the info.
2011-06-05 17:51:00 +02:00
Dan Williams
76bdc658d3 samsung: use common Icera code
Port the differences over to the common Icera code (there were only
two) and remove the duplicate code from  the Samsung plugin.  The
Icera NWSTATE regex had to be adjusted to capture "-1" in the first
element which wasn't handled before but which I've seen on the
Samsung Y3300 before the card has registered.
2011-04-18 22:48:05 -05:00
Dan Williams
8333fb657a icera: fix abuse of GInterface
The GInterface structure for MMModemIcera isn't instance data, thus we
shouldn't be storing an instance pointer in it.  Instead, make implemtors
store the intstance data in their private structure, and have them
implement an accessor for the Icera-private data.  This makes everone
(especially GObject) happy.  It's a bit of additional indirection, but
we still get to use the MM_MODEM_ICERA_GET_PRIVATE() and we still
get to cast the passed-in GInterface MMModemIcera into the various
GSM MMModem subclasses, which is all we ever wanted anyway.
2011-04-18 22:08:19 -05:00
Dan Williams
d1f4b07e0e icera: fix username and password ordering for authentication 2011-02-01 22:48:55 -06:00
Dan Williams
16039244bb core: rework logging
Make it more flexible, add logging to a file, and absolute and
relative timestamps.
2011-01-23 20:51:48 -06:00
Dan Williams
9733746dc1 icera: add complete support for generic Icera devices
Implement connect, disconnect, and IP4 config stuff.

Also fix handling of Icera private data.  After creation we
need to use MM_MODEM_ICERA_GET_INTERFACE(m)->priv to get the
private data instead of just dereferencing the MMModemIcera,
for reasons that I don't know.  If this isn't done, data
gets silently corrupted because writes to the private data
are going into a random location in the object.  This a
side-effect of the slightly hack-ish way that MMModemIcera
is a GInterface with private data.
2011-01-01 18:11:14 -06:00
Dan Williams
af9adab9cd icera: convert to GInterface
We'll need to store some private data later for authentication, and
this makes it easier and clearer to access that private data.
2011-01-01 14:12:07 -06:00