From 190eb73bf969e3c1bd4e3dc101b538e810739664 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 27 Mar 2013 15:02:40 -0500 Subject: [PATCH] broadband-modem: prefer specific access tech checks over generic +CGREG access tech (bgo #696705) If the modem has specific access technology checks, don't override them with the generic access technology from +CGREG responses, since that doesn't have the granularity that specific checks do. For example, the +CGREG response only indicates UMTS, and cannot indicate HSDPA, HSUPA, HSPA, HSPA+, DC-HSPA, etc. --- src/mm-broadband-modem.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 06024eea..978e6e14 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -3201,7 +3201,14 @@ registration_state_changed (MMAtSerialPort *port, else mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), state); - mm_iface_modem_3gpp_update_access_technologies (MM_IFACE_MODEM_3GPP (self), act); + /* Only update access technologies from CREG/CGREG response if the modem + * doesn't have custom commands for access technology loading, otherwise + * we fight with the custom commands. Plus CREG/CGREG access technologies + * don't have fine-grained distinction between HSxPA or GPRS/EDGE, etc. + */ + if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_access_technologies == modem_load_access_technologies) + mm_iface_modem_3gpp_update_access_technologies (MM_IFACE_MODEM_3GPP (self), act); + mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, cell_id); }