diff mbox series

[v2,3/3] sim7100: create lte atom in post_sim()

Message ID 20241011101839.3646442-3-sean@geanix.com (mailing list archive)
State Accepted
Headers show
Series [v2,1/3] drivers: simcommodem: create rat to radio_access_mode function | expand

Commit Message

Sean Nyekjaer Oct. 11, 2024, 10:18 a.m. UTC
Enable LTE functionality for SIMCom A7672E-FASE
---
 plugins/sim7100.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/plugins/sim7100.c b/plugins/sim7100.c
index 9413a8af..eb5a4dbe 100644
--- a/plugins/sim7100.c
+++ b/plugins/sim7100.c
@@ -24,6 +24,7 @@ 
 #include <gattty.h>
 
 #define OFONO_API_SUBJECT_TO_CHANGE
+#include <ofono.h>
 #include <ofono/plugin.h>
 #include <ofono/log.h>
 #include <ofono/modem.h>
@@ -104,9 +105,13 @@  static void sim7100_remove(struct ofono_modem *modem)
 static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data)
 {
 	struct ofono_modem *modem = user_data;
+	struct sim7100_data *data = ofono_modem_get_data(modem);
 
 	DBG("");
 
+	if (data->model == SIMCOM_A76XX)
+		ofono_modem_set_capabilities(modem, OFONO_MODEM_CAPABILITY_LTE);
+
 	if (ok)
 		ofono_modem_set_powered(modem, TRUE);
 }
@@ -272,6 +277,7 @@  static void sim7100_post_sim(struct ofono_modem *modem)
 		ofono_radio_settings_create(modem, 0, "simcommodem", data->at);
 		gprs = ofono_gprs_create(modem, OFONO_VENDOR_SIMCOM_A76XX,
 							"atmodem", data->at);
+		ofono_lte_create(modem, OFONO_VENDOR_SIMCOM_A76XX, "atmodem", data->at);
 		break;
 	default:
 		ofono_netreg_create(modem, 0, "atmodem", data->at);