anydata: support QMI-based devices
Some devices (like the ADU960S) support QMI, so if the modem has a QMI port, use it.
This commit is contained in:
@@ -25,6 +25,10 @@
|
|||||||
#include "mm-plugin-anydata.h"
|
#include "mm-plugin-anydata.h"
|
||||||
#include "mm-broadband-modem-anydata.h"
|
#include "mm-broadband-modem-anydata.h"
|
||||||
|
|
||||||
|
#if defined WITH_QMI
|
||||||
|
#include "mm-broadband-modem-qmi.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
G_DEFINE_TYPE (MMPluginAnydata, mm_plugin_anydata, MM_TYPE_PLUGIN)
|
G_DEFINE_TYPE (MMPluginAnydata, mm_plugin_anydata, MM_TYPE_PLUGIN)
|
||||||
|
|
||||||
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
|
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
|
||||||
@@ -41,6 +45,17 @@ create_modem (MMPlugin *self,
|
|||||||
GList *probes,
|
GList *probes,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
#if defined WITH_QMI
|
||||||
|
if (mm_port_probe_list_has_qmi_port (probes)) {
|
||||||
|
mm_dbg ("QMI-powered AnyDATA modem found...");
|
||||||
|
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path,
|
||||||
|
drivers,
|
||||||
|
mm_plugin_get_name (self),
|
||||||
|
vendor,
|
||||||
|
product));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return MM_BASE_MODEM (mm_broadband_modem_anydata_new (sysfs_path,
|
return MM_BASE_MODEM (mm_broadband_modem_anydata_new (sysfs_path,
|
||||||
drivers,
|
drivers,
|
||||||
mm_plugin_get_name (self),
|
mm_plugin_get_name (self),
|
||||||
@@ -53,7 +68,7 @@ create_modem (MMPlugin *self,
|
|||||||
G_MODULE_EXPORT MMPlugin *
|
G_MODULE_EXPORT MMPlugin *
|
||||||
mm_plugin_create (void)
|
mm_plugin_create (void)
|
||||||
{
|
{
|
||||||
static const gchar *subsystems[] = { "tty", NULL };
|
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||||
static const guint16 vendor_ids[] = { 0x16d5, 0 };
|
static const guint16 vendor_ids[] = { 0x16d5, 0 };
|
||||||
|
|
||||||
return MM_PLUGIN (
|
return MM_PLUGIN (
|
||||||
|
Reference in New Issue
Block a user