aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin.c
AgeCommit message (Collapse)Author
2013-04-17plugin: allow plugins to require MBIM probing of cdc-wdm portsAleksander Morgado
2013-03-28serial: add support to optionally send line-feed at the end of AT commands.ori inbar
2013-03-28plugin: explicitly request QMI probingAleksander Morgado
Plugins which may support QMI ports need to explicitly request QMI probing in cdc-wdm devices. This should also avoid probing cdc-wdm ports when we know that the plugin doesn't support them (e.g. with Ericsson MBM devices). https://bugzilla.gnome.org/show_bug.cgi?id=696701
2013-02-21plugin: avoid using uninitialized variableAleksander Morgado
Reported by: Jose Maria Gonzalez <jmgonzalezc@indra.es>
2013-02-20plugin: plug memleakAleksander Morgado
A new reference to probe was acquired through mm_device_get_probe(), just unref it when no longer needed. Note that mm_port_probe_run() will take its own reference for as long as required to complete the operation.
2013-02-20plugin: plug memleaksAleksander Morgado
This is really just to have a nice valgrind/memcheck output report, no big deal if they were never freed.
2013-02-20plugin: plug memleaksAleksander Morgado
2013-01-18core: add 'hotplugged' flag to indicate if modem is newly plugged inBen Chan
This patch adds a 'hotplugged' flag to MMBaseModem to indicate if a modem is newly plugged in. A plugin can use this information to determine if, for example, the modem needs to be soft reset using the ATZ command. Dan Williams <dcbw@redhat.com> contributed the idea of implementation.
2012-12-27plugin: avoid QMI-managed net ports when compiling without QMI supportAleksander Morgado
2012-12-27plugin: re-run subsystems filter before grabbing the portsAleksander Morgado
Every port probing will have the Generic plugin as fallback, and due to some other issues in other plugins (see ee099fcd), we need to allow overwriting the suggested plugin from the Generic to a more specific one. One of the drawbacks of this is that we're actually allowing the Generic plugin to probe and accept the port, which means that the generic plugin may accept a specific port type (e.g. QMI) while the specific plugin wouldn't. So, we will now also run the subsystems filter before grabbing the specific port, in order to really filter out those cases. We still keep the subsystems filter in pre-probing, so that we build a better initial plugin list to probe.
2012-10-30plugin-manager,plugin: run pre-probing filters earlyAleksander Morgado
For each port, we will construct the list of plugins to test with. In that list we will include those plugins which are likely to handle a given port, so we will skip all those which aren't. To see if a plugin is likely or not, we will run the pre-probing filters before adding them to the list, with the new `mm_plugin_discard_port_early()'. This method will return one of these hints: * UNSUPPORTED: The plugin will not be able to handle this port. * MAYBE: The plugin may handle this port. * LIKELY: The plugin may (very likely) handle this port. * SUPPORTED: If any plugin should support the port, this is it. Plugins reported to be 'likely' supporting the port will be probed before the ones reported just as 'maybe'. If a plugin reports 'supported' only that one and the fallback generic ones will be tried.
2012-10-30plugin: avoid unneeded vendor/product AT probing if already passed USB ID filterAleksander Morgado
Don't require vendor/product string probing if the plugin already had vendor/product ID filters and we actually passed those.
2012-10-30plugin-manager,plugin: improve loggingAleksander Morgado
Logging which are the reasons for a plugin to filter a given port really help when trying to debug user issues. Some other general logging improvements also done.
2012-09-04plugin: defer task if supports check tells us to retryAleksander Morgado
Huawei modems will probe interface 0 always first; if we try to probe another interface meanwhile the supports check will give us a MM_CORE_ERROR_RETRY error, indicating that we need to defer the probing of the port.
2012-08-31plugin: let plugins decide if they want echo removal during AT probingAleksander Morgado
This is the port to git master of the following patch: commit 21e66dfa1774ac2ee037ac8b6e8bb4d71a6f7931 Author: Dan Williams <dcbw@redhat.com> Date: Thu Aug 23 21:13:35 2012 -0500 core: add function to open probe ports without removing echo Some devices (Sierra GSM ones) return stuff we need but don't bother to prefix it with <CR><LF>, so we need to optionally turn off the echo removal at probe time.
2012-08-29core: handle the 'usb'->'usbmisc' subsystem rename in the kernelAleksander Morgado
We'll try to cope with getting devices being reported in either 'usb' or 'usbmisc', trying to avoid the need of checking kernel version during runtime.
2012-08-29port-probe: launch QMI probing on cdc-wdm portsAleksander Morgado
Some devices may export cdc-wdm ports talking AT. We need to explicitly check for QMI protocol support on the cdc-wdm ports before assuming they are QMI.
2012-08-29core: allow grabbing QMI portsAleksander Morgado
2012-08-24api,introspection: report list of drivers, not just oneAleksander Morgado
Different ports of the same modem may get handled by different drivers. We therefore need to provide a list of drivers (new `Modem.Drivers' property with signature 'as') instead of just one (removed `Modem.Driver' property with signature 's'). $ sudo mmcli -m 0 | grep drivers | drivers: 'qcserial, qmi_wwan'
2012-08-20plugin: new filters for forbidden product IDs/stringsAleksander Morgado
Plugins may specify that specific vendor & product IDs or strings are not supported. This is useful when plugins need to specify that they support all devices of a given vendor except for some specific ones.
2012-08-20plugin: fix icera filters when using the allowed product string filterAleksander Morgado
2012-08-20plugin: don't apply product ID filters if no vendor ID was retrievedAleksander Morgado
2012-08-06plugin: check if the current probe is the one with AT support before ↵Aleksander Morgado
assuming it's not
2012-08-06plugin: let plugins request Icera support checks and Icera based filtersAleksander Morgado
2012-08-06plugin: abort probing when the port has been released from the deviceAleksander Morgado
2012-08-06port-probe: let us peek the `MMDevice' owning the probe from the probe itselfAleksander Morgado
2012-08-06plugin: if no grab_port() method given, use the default oneAleksander Morgado
2012-08-06device,plugin: let the `MMPlugin' API know about `MMDevice'Aleksander Morgado
2012-08-06plugin: new method to compare pluginsAleksander Morgado
Instead of providing a method to get if a plugin is requesting to get sorted last, we provide a way to comparing two plugins, compatible with the GCompareFunc required in g_list_sort().
2012-08-06plugin: remove obsolete commentAleksander Morgado
2012-08-06plugin: new `MM_PLUGIN_CUSTOM_INIT' propertyAleksander Morgado
We let plugins execute some custom initialization in the ports, specified by a `MMAsyncMethod'.
2012-08-06plugin: new `MM_PLUGIN_FORBIDDEN_DRIVERS' propertyAleksander Morgado
It allows plugins to specify whether they cannot support ports handled by specific drivers.
2012-08-06plugin: renamed `custom-init' property to `custom-at-probe'Aleksander Morgado
The `custom-at-probe' property is just to modify the way we check for AT port support.
2012-08-06plugin: setup a `priv' opaque pointer for the internal dataAleksander Morgado
G_TYPE_INSTANCE_GET_PRIVATE() is really slow, so try to call it as less as possible.
2012-08-06plugin: no need to have our own `GUdevClient'Aleksander Morgado
2012-08-06plugin: no need to take care of probing tasks ourselvesAleksander Morgado
2012-08-06plugin: don't provide an additional method to cancel the probingAleksander Morgado
We'll do it with a GCancellable.
2012-08-06plugin: don't use internal task list to cancel AT probing in other probesAleksander Morgado
2012-08-06port-probe-cache: removed, no longer neededAleksander Morgado
The `MMDevice' acts as port probe cache for us now, directly storing all port probes of the same device.
2012-08-06device: get vendor/product IDsAleksander Morgado
And don't do it in MMPlugin.
2012-08-06plugin: simplify interface by passing around the device and/or port objectsAleksander Morgado
2012-08-06device: keep a list of port probes instead of just portsAleksander Morgado
2012-08-06core: merge `MMPluginBase' and `MMPlugin'Aleksander Morgado
There's no real point in maintaining a separate `MMPlugin' interface, as all the plugins will inherit from `MMPluginBase', so just merge them and simplify everything.
2012-08-06core: compile all ports before creating the modem objectAleksander Morgado
Before this, we only exported the modem to DBus when all ports were organized, in order to make sure that we select as primary port the one we really want and not the first AT port grabbed. Given that to get all the ports organized we also needed to wait to get all the ports grabbed, we can now also defer the creation of the modem object until all the ports get grabbed. This allows us to create different types of objects based on the ports available (e.g. we can now create QMI-supported modem objects if we see a QMI port around).
2012-03-15core: start using MMBroadbandModem objectsAleksander Morgado
We chain up the Generic plugin created MMBroadbandModem objects within the GDBusObjectManagerServer in MMManager, so that they get properly exported in DBus.
2012-03-15plugin-base: don't report numeric support level in the [0-100] rangeAleksander Morgado
There is no single case where more than one plugin may end up wanting to support a given port, and therefore there is no need to report the numeric support level when reporting SUPPORTED.
2012-03-15plugin-base: rename 'cancel_supports_port' to 'supports_port_cancel'Aleksander Morgado
We now have 'supports_port' (async method) and 'supports_port_finish' (to get the result of the async method), so it makes sense to rename the method to 'supports_port_cancel'.
2012-03-15plugin-base: rewrite port supports check as fully asynchronousAleksander Morgado
Before this change, supports check was either synchronous (e.g. in some UNSUPPORTED cases) or asynchronous (when IN_PROGRESS was returned). With this fix, the supports check requested to the plugin will always be completed asynchronously; either directly in an idle before launching any real probing operation, or once the probing operation is finished. Therefore, it is not expected to get a IN_PROGRESS reply in mm_plugin_supports_port_finish(), only UNSUPPORTED|SUPPORTED|DEFERRED.
2011-06-06plugin base: let plugins decide if they should be sorted lastAleksander Morgado
Note that even if a plugin says it wants to be sorted last, the generic plugin will always be the last one. Also, there is no order guaranteed between two plugins that request to be sorted last.
2010-03-30core: find the existing modem for a port in the managerDan Williams