aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
authorPrakash Pabba <quic_ppabba@quicinc.com>2021-12-14 14:25:45 +0530
committerAleksander Morgado <aleksander@aleksander.es>2022-01-30 15:37:05 +0000
commit38f067c4e44d7f994c3fd75e29d36ee199002ff4 (patch)
tree0f7e381ba41751cef8c4dde3fb718b5ac681aa9e /src/mm-modem-helpers.c
parentf05258e757558b93559b4d36087e89ec926c5423 (diff)
mm-shared-qmi,mm-modem-helpers: Fix supported capabilities and modes for multimode device
We use capability switching logic exclusively for configuring GSM/UMTS+CDMA/EVDO devices (regardless of whether it has LTE/5GNR or not) to add or remove the GSM/UMTS and CDMA/EVDO capabilities. Based on the same logic, we will allow 4 combinations for GSM/UMTS+CDMA/EVDO+LTE+5GNR device: "GSM/UMTS+CDMA/EVDO+LTE+5GNR", "GSM/UMTS+LTE+5GNR", "CDMA/EVDO+LTE+5GNR" and "LTE+5GNR" Similarly, we will allow 4 combinations for GSM/UMTS+CDMA/EVDO+LTE device: "GSM/UMTS+CDMA/EVDO+LTE", "GSM/UMTS+LTE", "CDMA/EVDO+LTE" and "LTE" And, we will allow 3 combinations for GSM/UMTS+CDMA/EVDO device: "GSM/UMTS+CDMA/EVDO", "GSM/UMTS" and "CDMA/EVDO" Also, supported combination modes should be based on current capabilities and not entirely upon supported radio interfaces. 1) If current capability has "gsm-umts" or "cdma-evdo" or both, do not support 4G only, 5G only, or 4G+5G combination modes 2) If current capability neither has "gsm-umts" nor "cdma-evdo", only support combination modes involving 4G and 5G.
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r--src/mm-modem-helpers.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 3e22262c..c969b665 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -13,6 +13,7 @@
* Copyright (C) 2008 - 2009 Novell, Inc.
* Copyright (C) 2009 - 2012 Red Hat, Inc.
* Copyright (C) 2012 Google, Inc.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <config.h>
@@ -393,7 +394,6 @@ mm_filter_supported_modes (const GArray *all,
MMModemModeCombination all_item;
guint i;
GArray *filtered_combinations;
- gboolean all_item_added = FALSE;
g_return_val_if_fail (all != NULL, NULL);
g_return_val_if_fail (all->len == 1, NULL);
@@ -416,8 +416,6 @@ mm_filter_supported_modes (const GArray *all,
* containing all supported modes, we're already good to go. This allows us to have a
* default with preferred != NONE (e.g. Wavecom 2G modem with allowed=CS+2G and
* preferred=2G */
- if (all_item.allowed == mode->allowed)
- all_item_added = TRUE;
g_array_append_val (filtered_combinations, *mode);
}
}
@@ -425,12 +423,6 @@ mm_filter_supported_modes (const GArray *all,
if (filtered_combinations->len == 0)
mm_obj_warn (log_object, "all supported mode combinations were filtered out");
- /* Add default entry with the generic mask including all items */
- if (!all_item_added) {
- mm_obj_dbg (log_object, "adding an explicit item with all supported modes allowed");
- g_array_append_val (filtered_combinations, all_item);
- }
-
mm_obj_dbg (log_object, "device supports %u different mode combinations",
filtered_combinations->len);