diff mbox series

[07/11] gemalto: Set modem lte capable

Message ID 20240322140942.2703042-7-denkenz@gmail.com (mailing list archive)
State Superseded
Headers show
Series [01/11] phonesim: Allow phonesim to work with Multiplexer=internal | expand

Commit Message

Denis Kenzior March 22, 2024, 2:09 p.m. UTC
---
 plugins/gemalto.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/plugins/gemalto.c b/plugins/gemalto.c
index 358d56a7aaf1..219354f7300e 100644
--- a/plugins/gemalto.c
+++ b/plugins/gemalto.c
@@ -217,11 +217,17 @@  static void sim_state_cb(gboolean present, gpointer user_data)
 {
 	struct ofono_modem *modem = user_data;
 	struct gemalto_data *data = ofono_modem_get_data(modem);
+	const char *model = ofono_modem_get_string(modem, "Model");
 
 	at_util_sim_state_query_free(data->sim_state_query);
 	data->sim_state_query = NULL;
 
 	data->have_sim = present;
+
+	if (!g_strcmp0(model, GEMALTO_MODEL_ALS3_PLS8x) ||
+			!g_strcmp0(model, GEMALTO_MODEL_ELS81x))
+		ofono_modem_set_capabilities(modem, OFONO_MODEM_CAPABILITY_LTE);
+
 	ofono_modem_set_powered(modem, TRUE);
 
 	/* Register for specific sim status reports */
@@ -609,7 +615,7 @@  static void gemalto_post_sim(struct ofono_modem *modem)
 		ofono_gprs_add_context(gprs, gc);
 
 	if (!g_strcmp0(model, GEMALTO_MODEL_ALS3_PLS8x) ||
-	    !g_strcmp0(model, GEMALTO_MODEL_ELS81x))
+			!g_strcmp0(model, GEMALTO_MODEL_ELS81x))
 		ofono_lte_create(modem, OFONO_VENDOR_GEMALTO,
 						"atmodem", data->app);
 }