[PATCH 2/2] broadband-modem: fix QCDM access tech reporting for WCDMA system modes

Dan Williams dcbw at redhat.com
Tue Feb 28 19:47:00 UTC 2017


Two issues here:

1) PCH_SLEEP wasn't considered a "wcdma_open" state, but it should be
since the modem is still registered and can be attached in this state

2) If the system mode is WCDMA (eg, not GSM and not GSM/WCDMA) then
MM shouldn't assume GPRS if WCDMA isn't "open", since GPRS isn't
enabled in WCDMA-only mode

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100000
---
 src/mm-broadband-modem.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 3d7f09f..17b3253 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -2193,7 +2193,6 @@ access_tech_context_complete_and_free (AccessTechContext *ctx,
             mask = MM_IFACE_MODEM_CDMA_ALL_ACCESS_TECHNOLOGIES_MASK;
             break;
         case QCDM_CMD_CM_SUBSYS_STATE_INFO_SYSTEM_MODE_GSM:
-        case QCDM_CMD_CM_SUBSYS_STATE_INFO_SYSTEM_MODE_WCDMA:
         case QCDM_CMD_CM_SUBSYS_STATE_INFO_SYSTEM_MODE_GW:
             if (ctx->wcdma_open) {
                 /* Assume UMTS; can't yet determine UMTS/HSxPA/HSPA+ with QCDM */
@@ -2204,6 +2203,13 @@ access_tech_context_complete_and_free (AccessTechContext *ctx,
             }
             mask = MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK;
             break;
+        case QCDM_CMD_CM_SUBSYS_STATE_INFO_SYSTEM_MODE_WCDMA:
+            if (ctx->wcdma_open) {
+                /* Assume UMTS; can't yet determine UMTS/HSxPA/HSPA+ with QCDM */
+                act = MM_MODEM_ACCESS_TECHNOLOGY_UMTS;
+            }
+            mask = MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK;
+            break;
         case QCDM_CMD_CM_SUBSYS_STATE_INFO_SYSTEM_MODE_LTE:
             act = MM_MODEM_ACCESS_TECHNOLOGY_LTE;
             mask = MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK;
@@ -2259,7 +2265,8 @@ access_tech_qcdm_wcdma_ready (MMPortSerialQcdm *port,
 
         if (l1 == QCDM_WCDMA_L1_STATE_PCH ||
             l1 == QCDM_WCDMA_L1_STATE_FACH ||
-            l1 == QCDM_WCDMA_L1_STATE_DCH)
+            l1 == QCDM_WCDMA_L1_STATE_DCH ||
+            l1 == QCDM_WCDMA_L1_STATE_PCH_SLEEP)
             ctx->wcdma_open = TRUE;
     }
 
-- 
2.9.3


More information about the ModemManager-devel mailing list