aboutsummaryrefslogtreecommitdiff
path: root/src/mm-port.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-02-01 01:43:54 -0600
committerDan Williams <dcbw@redhat.com>2012-02-28 10:06:04 -0600
commit4dad94d5004f325e25dc3b09d87585eab38d4c3f (patch)
tree38a5bb148952c333e18bfbd959e27573ab3364d9 /src/mm-port.h
parent36ee1b9c76a681b44516852372944b82c7616892 (diff)
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.
Diffstat (limited to 'src/mm-port.h')
-rw-r--r--src/mm-port.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mm-port.h b/src/mm-port.h
index df935db2..21e2f605 100644
--- a/src/mm-port.h
+++ b/src/mm-port.h
@@ -29,8 +29,7 @@ typedef enum {
typedef enum {
MM_PORT_TYPE_UNKNOWN = 0x0,
- MM_PORT_TYPE_PRIMARY,
- MM_PORT_TYPE_SECONDARY,
+ MM_PORT_TYPE_AT,
MM_PORT_TYPE_IGNORED,
MM_PORT_TYPE_QCDM,