From 49097b6de5daa63de84f16386825de5b17590fcc Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 21 Sep 2010 14:56:47 -0500 Subject: core: prefer CDMA capabilities over GSM for dual-mode devices (bgo #621815) For devices like the UMW190 that appear to be dual-mode without needing a firmware reload (unlike Gobis, which are dual-mode but require a reboot with different firwmare) prefer CDMA capabilities since that's where these devices will most likely be used more often. In the end we'll need to change MM to advertise a "capabilities" attribute on the modem class and modify devices such that they can implement both GSM and CDMA semantics at the same time. --- plugins/mm-plugin-generic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/mm-plugin-generic.c') diff --git a/plugins/mm-plugin-generic.c b/plugins/mm-plugin-generic.c index cdf2c66e..d6847fd7 100644 --- a/plugins/mm-plugin-generic.c +++ b/plugins/mm-plugin-generic.c @@ -10,7 +10,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * - * Copyright (C) 2008 - 2009 Dan Williams + * Copyright (C) 2008 - 2010 Dan Williams */ #include @@ -136,16 +136,16 @@ grab_port (MMPluginBase *base, caps = mm_plugin_base_supports_task_get_probed_capabilities (task); sysfs_path = mm_plugin_base_supports_task_get_physdev_path (task); if (!existing) { - if (caps & MM_PLUGIN_BASE_PORT_CAP_GSM) { - modem = mm_generic_gsm_new (sysfs_path, - mm_plugin_base_supports_task_get_driver (task), - mm_plugin_get_name (MM_PLUGIN (base))); - } else if (caps & CAP_CDMA) { + if (caps & CAP_CDMA) { modem = mm_generic_cdma_new (sysfs_path, mm_plugin_base_supports_task_get_driver (task), mm_plugin_get_name (MM_PLUGIN (base)), !!(caps & MM_PLUGIN_BASE_PORT_CAP_IS856), !!(caps & MM_PLUGIN_BASE_PORT_CAP_IS856_A)); + } else if (caps & MM_PLUGIN_BASE_PORT_CAP_GSM) { + modem = mm_generic_gsm_new (sysfs_path, + mm_plugin_base_supports_task_get_driver (task), + mm_plugin_get_name (MM_PLUGIN (base))); } if (modem) { -- cgit v1.2.3-70-g09d2