public inbox for ofono@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1/7] qmimodem: wds: Introduce qmi_wds_ip_family enum
@ 2024-04-16 15:14 Denis Kenzior
  2024-04-16 15:14 ` [PATCH 2/7] qmi: gprs-context: Do not free/alloc unnecessarily Denis Kenzior
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Denis Kenzior @ 2024-04-16 15:14 UTC (permalink / raw)
  To: ofono; +Cc: Denis Kenzior

---
 drivers/qmimodem/gprs-context.c | 4 ++--
 drivers/qmimodem/wds.h          | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/qmimodem/gprs-context.c b/drivers/qmimodem/gprs-context.c
index 33565252028c..cbe33861968b 100644
--- a/drivers/qmimodem/gprs-context.c
+++ b/drivers/qmimodem/gprs-context.c
@@ -247,10 +247,10 @@ static void qmi_activate_primary(struct ofono_gprs_context *gc,
 
 	switch (ctx->proto) {
 	case OFONO_GPRS_PROTO_IP:
-		ip_family = 4;
+		ip_family = QMI_WDS_IP_FAMILY_IPV4;
 		break;
 	case OFONO_GPRS_PROTO_IPV6:
-		ip_family = 6;
+		ip_family = QMI_WDS_IP_FAMILY_IPV6;
 		break;
 	default:
 		goto error;
diff --git a/drivers/qmimodem/wds.h b/drivers/qmimodem/wds.h
index ffbebaffe32d..6213f75231db 100644
--- a/drivers/qmimodem/wds.h
+++ b/drivers/qmimodem/wds.h
@@ -63,6 +63,13 @@ struct qmi_wds_notify_conn_status {
 #define QMI_WDS_PDP_TYPE_IPV6			0x02
 #define QMI_WDS_PDP_TYPE_IPV4V6			0x03
 
+enum qmi_wds_ip_family {
+	QMI_WDS_IP_FAMILY_UNKNOWN = 0,
+	QMI_WDS_IP_FAMILY_IPV4 = 4,
+	QMI_WDS_IP_FAMILY_IPV6 = 6,
+	QMI_WDS_IP_FAMILY_UNSPECIFIED = 8,
+};
+
 enum qmi_wds_client_type {
 	QMI_WDS_CLIENT_TYPE_TETHERED = 0x01,
 };
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-16 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-16 15:14 [PATCH 1/7] qmimodem: wds: Introduce qmi_wds_ip_family enum Denis Kenzior
2024-04-16 15:14 ` [PATCH 2/7] qmi: gprs-context: Do not free/alloc unnecessarily Denis Kenzior
2024-04-16 15:14 ` [PATCH 3/7] qmi: gprs-context: Move singleton defines to call site Denis Kenzior
2024-04-16 15:14 ` [PATCH 4/7] qmi: gprs-context: Convert QMI_WDS_AUTHENTICATION to an enum Denis Kenzior
2024-04-16 15:14 ` [PATCH 5/7] qmi: wds: Convert defines to enums Denis Kenzior
2024-04-16 15:14 ` [PATCH 6/7] qmi: gprs-context: Remove single-use structure definition Denis Kenzior
2024-04-16 15:14 ` [PATCH 7/7] qmi: gprs-context: Request certain TLVs to be included Denis Kenzior
2024-04-16 21:50 ` [PATCH 1/7] qmimodem: wds: Introduce qmi_wds_ip_family enum patchwork-bot+ofono

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox