aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-plugin-generic.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-09-21 14:56:47 -0500
committerDan Williams <dcbw@redhat.com>2010-09-21 14:56:47 -0500
commit49097b6de5daa63de84f16386825de5b17590fcc (patch)
tree713129648a52ba1ea540e25f9ecac2633536bd86 /plugins/mm-plugin-generic.c
parent674a9412fe634a0417328fd66d0803f80441264b (diff)
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.
Diffstat (limited to 'plugins/mm-plugin-generic.c')
-rw-r--r--plugins/mm-plugin-generic.c12
1 files changed, 6 insertions, 6 deletions
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 <dcbw@redhat.com>
+ * Copyright (C) 2008 - 2010 Dan Williams <dcbw@redhat.com>
*/
#include <string.h>
@@ -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) {