Commit Graph

7 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
Dan Williams
f8934c21ce option/hso: check generic access tech first, then specific tech
During the explicit access technology check, the plugin would request
specific 2G (OCTI) and 3G (OWCTI) technologies explicitly.  Some devices
(like Nozomi) don't support the AT_OWCTI command, which leaves us with
only AT_OSSYS for determining whether the device is registered with
the 3G network or the 2G network.  So like the unsolicited mode change
handling code, when requesting access technology explicitly, ask for
generic 2G/3G tech first, and then get the specific tech.  If the
device doesn't support explicit 3G tech then at least we have the
generic 3G tech from OSSYS to use.
2011-07-25 12:58:05 -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
843a772b4c option/hso: implement solicited access technology request 2010-03-26 00:14:47 -07:00
Dan Williams
9e8a0fda9f option/hso: ensure unsolicited messages get turned off on disable 2010-03-22 15:05:45 -07:00
Dan Williams
7a5ba2e099 option/hso: make use of unsolicited access technology signals 2010-03-22 15:03:58 -07:00
Dan Williams
ad9fe9da28 option: generalize common Option/HSO mode and unsolicited response handling 2010-03-16 15:50:58 -07:00