Commit Graph

12 Commits

Author SHA1 Message Date
Aleksander Morgado
88cc35b850 cinterion: ignore non-AT ports 2012-03-15 14:14:33 +01:00
Aleksander Morgado
c345f5fe63 cinterion: re-enabled Cinterion plugin
Just dummy plugin for now.
2012-03-15 14:14:31 +01:00
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
c70d6d565d Revert "cinterion: bail earlier if the plugin doesn't support the port"
This reverts commit 1e1bfbf1d8.

Aleksander says this might break RS232<->USB converter connected
Cinterion modems, so we'll need to handle this issue another way.
2011-07-07 10:28:41 -05:00
Dan Williams
1e1bfbf1d8 cinterion: bail earlier if the plugin doesn't support the port
Caused a crash with the Sierra plugin due to an assertion failure;
the Cinterion plugin shouldn't claim to possibly support ports
it knows it won't support.  In this case, it claimed to support
Sierra modems, so it would try to run probing after Sierra had
done so.  Ideally this should work, but for now just make sure
the Cinterion plugin doesn't claim to support these ports when
it knows it doesn't.
2011-07-06 15:50:08 -05:00
Aleksander Morgado
50e9d6fc54 cinterion, wavecom: update copyright info 2011-07-06 09:37:47 +02:00
Aleksander Morgado
abcffd1753 cinterion: check probed caps from supports task 2011-06-14 12:40:36 +02:00
Aleksander Morgado
f9f6d1dfdb plugins: propagate cached probing result to supports task
We need to ensure that the supports task always has the results of the probing,
no matter if the probing was just launched by the plugin grabbing the port, or
by a previous plugin. We do this during supports_port(), by propagating to the
supports task any possible previously cached probing results.
2011-06-06 17:21:47 +02:00
Aleksander Morgado
a2ba5c5e99 cinterion: enable reprobing on ports without cached capabilities 2011-06-06 17:20:17 +02:00
Aleksander Morgado
4cb039e34a cinterion: always sort last the plugin
This is because the cinterion plugin can handle RS232 modes, and checking
support for them needs to have the vendor ID probed with AT commands, so
probing is almost always issued in this plugin. By sorting last, we let
other plugins check support first.
2011-06-06 17:20:17 +02:00
Aleksander Morgado
a9c93ec3ad cinterion: handle RS232 modems 2011-06-06 17:20:17 +02:00
Aleksander Morgado
c6060e8c0f cinterion: add initial dummy plugin 2011-06-06 17:20:16 +02:00