diff mbox series

[3/3] atmodem: Support for Quectel EG916Q-GL modem

Message ID 20240910072210.2618396-4-benjamin@geanix.com (mailing list archive)
State Accepted
Commit 87b12433cbcaba35bd2498580e79de14cc7ee574
Headers show
Series add support for Quectel EG916Q-GL | expand

Commit Message

Benjamin B. Frost Sept. 10, 2024, 7:22 a.m. UTC
---
 drivers/atmodem/gprs-context.c         | 3 +++
 drivers/atmodem/gprs.c                 | 1 +
 drivers/atmodem/network-registration.c | 1 +
 drivers/atmodem/sim.c                  | 1 +
 drivers/atmodem/sms.c                  | 2 ++
 drivers/atmodem/vendor.h               | 1 +
 6 files changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index da63fa1c..7d4bd094 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -455,6 +455,9 @@  static int at_gprs_context_probe(struct ofono_gprs_context *gc,
 	case OFONO_VENDOR_SIMCOM_SIM900:
 		gcd->use_atd99 = FALSE;
 		break;
+	case OFONO_VENDOR_QUECTEL_EG91X:
+		gcd->use_atd99 = TRUE;
+		break;
 	default:
 		g_at_chat_send(chat, "AT+CGDATA=?", cgdata_prefix,
 						at_cgdata_test_cb, gc, NULL);
diff --git a/drivers/atmodem/gprs.c b/drivers/atmodem/gprs.c
index fa82878c..37b67405 100644
--- a/drivers/atmodem/gprs.c
+++ b/drivers/atmodem/gprs.c
@@ -668,6 +668,7 @@  static void gprs_initialized(gboolean ok, GAtResult *result, gpointer user_data)
 						NULL, NULL, NULL);
 		break;
 	case OFONO_VENDOR_QUECTEL_EC2X:
+	case OFONO_VENDOR_QUECTEL_EG91X:
 	case OFONO_VENDOR_QUECTEL_SERIAL:
 		break;
 	default:
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index b7a66c4d..46b8512a 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -2103,6 +2103,7 @@  static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
 		/* Signal strength reporting via CIND is not supported */
 		break;
 	case OFONO_VENDOR_QUECTEL_EC2X:
+	case OFONO_VENDOR_QUECTEL_EG91X:
 		g_at_chat_register(nd->chat, "+QIND:",
 				quectel_qind_notify, FALSE, netreg, NULL);
 		/* Register for specific signal strength reports */
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index 9eb29cc0..809d405d 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -1211,6 +1211,7 @@  static void at_pin_retries_query(struct ofono_sim *sim,
 		break;
 	case OFONO_VENDOR_QUECTEL:
 	case OFONO_VENDOR_QUECTEL_EC2X:
+	case OFONO_VENDOR_QUECTEL_EG91X:
 		if (g_at_chat_send(sd->chat, "AT+QPINC?", qpinc_prefix,
 					at_qpinc_cb, cbd, g_free) > 0)
 			return;
diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c
index 34968d9a..d994856b 100644
--- a/drivers/atmodem/sms.c
+++ b/drivers/atmodem/sms.c
@@ -324,6 +324,7 @@  static inline void at_ack_delivery(struct ofono_sms *sms)
 		switch (data->vendor) {
 		case OFONO_VENDOR_GEMALTO:
 		case OFONO_VENDOR_QUECTEL_EC2X:
+		case OFONO_VENDOR_QUECTEL_EG91X:
 			snprintf(buf, sizeof(buf), "AT+CNMA=1");
 			break;
 		case OFONO_VENDOR_QUECTEL_SERIAL:
@@ -835,6 +836,7 @@  static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
 	case OFONO_VENDOR_SIMCOM_A76XX:
 	case OFONO_VENDOR_QUECTEL:
 	case OFONO_VENDOR_QUECTEL_EC2X:
+	case OFONO_VENDOR_QUECTEL_EG91X:
 	case OFONO_VENDOR_DROID:
 		/* MSM devices advertise support for mode 2, but return an
 		 * error if we attempt to actually use it. */
diff --git a/drivers/atmodem/vendor.h b/drivers/atmodem/vendor.h
index 20768832..faceede1 100644
--- a/drivers/atmodem/vendor.h
+++ b/drivers/atmodem/vendor.h
@@ -33,6 +33,7 @@  enum ofono_vendor {
 	OFONO_VENDOR_ALCATEL,
 	OFONO_VENDOR_QUECTEL,
 	OFONO_VENDOR_QUECTEL_EC2X,
+	OFONO_VENDOR_QUECTEL_EG91X,
 	OFONO_VENDOR_QUECTEL_SERIAL,
 	OFONO_VENDOR_UBLOX,
 	OFONO_VENDOR_XMM,