($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 1/7] qmimodem: wds: Introduce qmi_wds_ip_family enum
Date: Tue, 16 Apr 2024 10:14:28 -0500	[thread overview]
Message-ID: <20240416151448.3359644-1-denkenz@gmail.com> (raw)

---
 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


             reply	other threads:[~2024-04-16 15:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 15:14 Denis Kenzior [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240416151448.3359644-1-denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).