aboutsummaryrefslogtreecommitdiff
path: root/src/mm-port.c
AgeCommit message (Collapse)Author
2022-12-18port: define new generic 'removed' signalAleksander Morgado
This signal indicates that the port is no longer accessible. Unlike a udev port removal event, this indication may happen even if the port is still exposed by the system. It is designed to detect protocol proxy crashes, and so when such event is detected by the modem, a full reprobe of the device will be done to start from scratch the protocol management operations.
2022-06-30port: make 'timed-out' a signal for all port types, not just serialAleksander Morgado
2020-05-10port: use correct enum to string conversion when loggingAleksander Morgado
CC mm-port.lo mm-port.c: In function 'log_object_build_id': mm-port.c:117:60: error: implicit conversion from 'MMPortType' to 'MMModemPortType' [-Werror=enum-conversion] 117 | mm_modem_port_type_get_string (mm_port_get_port_type (self))); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
2020-04-08ports: port to object loggingAleksander Morgado
2016-09-29core: use the kernel device object in the port object and the plugin interfaceAleksander Morgado
The mm_base_modem_grab_port() now receives a MMKernelDevice directly from the plugin, which is then stored in the MMPort corresponding to the port. This means that we have direct access to e.g. all properties set by udev rules everywhere, and we don't need additional GUdevClient objects (e.g. like the one used in the Huawei plugin to detect NDISDUP support during runtime). For virtual ports (e.g. generated during unit tests), we have a new 'generic' kernel device object which just provides the values from the kernel device properties given during its creation.
2014-06-23port: store parent sysfs path in each MMPortAleksander Morgado
2014-02-13port: remove 'constructor' checking for property validityAleksander Morgado
A constructor cannot return NULL, specially when there are subclasses, as it would segfault. Just remove it, as it doesn't really do anything useful.
2014-02-13port: use a 'priv' pointer to handle the private infoAleksander Morgado
2013-11-15port: remove 'carrier-detect' propertyAleksander Morgado
It is no longer used since commit 736aa0d2d.
2012-03-15port: no need for custom enum to string convertersAleksander Morgado
2012-02-28core: rework port grabbing and organizationDan Williams
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.
2011-03-27samsung: drop PORT_TYPE_ECMDan Williams
Isn't really needed since it's just the same as any other net device port type.
2011-03-11modemmanager: Add support for Samsung Y3300 modemJun Woo Lee
BUG=chrome-os-partner:2394 TEST=gmerge modemmanager, watch logs, see detected as Samsung modem, connect to AT&T network Review URL: http://codereview.chromium.org/6614026 Patch from Jun Woo Lee <jw86.lee@samsung.com>. Change-Id: I913628ff4a1cd16c8180e3c808644b0134e69e31
2011-01-24core: add mm_port_subsys_to_name()Dan Williams
2011-01-23core: rework loggingDan Williams
Make it more flexible, add logging to a file, and absolute and relative timestamps.
2010-05-04core: add port type -> string conversion helper for debuggin messagesDan Williams
2010-04-29core: timestamp debug statementsDan Williams
2009-07-06serial: rework 'connected' logicDan Williams
So many modems just don't implement carrier detect that it makes the previous 'connected' logic useless, so base it off connect/disconnect and fix up a few places that didn't check connect status before trying to send commands. Also ensure the serial port is unlocked for PPP to use when connected.
2009-06-20udev: modem port refactor; convert 'hso' to udevDan Williams
Create a base MMPort class to handle both tty and net ports generically, and move plugins over to that. Also port the 'hso' plugin to udev.