diff mbox series

[5/7] qmi: wds: Convert defines to enums

Message ID 20240416151448.3359644-5-denkenz@gmail.com (mailing list archive)
State Accepted
Commit ecd6933d5f32d41544e5b272d8db9ec517f79f3d
Headers show
Series [1/7] qmimodem: wds: Introduce qmi_wds_ip_family enum | expand

Commit Message

Denis Kenzior April 16, 2024, 3:14 p.m. UTC
---
 drivers/qmimodem/gprs-context.c |  2 +-
 drivers/qmimodem/wds.h          | 20 ++++++++++++--------
 2 files changed, 13 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/drivers/qmimodem/gprs-context.c b/drivers/qmimodem/gprs-context.c
index e726382a223a..14da16046f2a 100644
--- a/drivers/qmimodem/gprs-context.c
+++ b/drivers/qmimodem/gprs-context.c
@@ -64,7 +64,7 @@  static void pkt_status_notify(struct qmi_result *result, void *user_data)
 		DBG("ip family %d", ip_family);
 
 	switch (status->status) {
-	case QMI_WDS_CONN_STATUS_DISCONNECTED:
+	case QMI_WDS_CONNECTION_STATUS_DISCONNECTED:
 		if (data->pkt_handle) {
 			/* The context has been disconnected by the network */
 			ofono_gprs_context_deactivated(gc, data->active_context);
diff --git a/drivers/qmimodem/wds.h b/drivers/qmimodem/wds.h
index 0e30a0cca8c7..0cfbd9802531 100644
--- a/drivers/qmimodem/wds.h
+++ b/drivers/qmimodem/wds.h
@@ -38,15 +38,19 @@  struct qmi_wds_notify_conn_status {
 	uint8_t reconf;
 } __attribute__((__packed__));
 
-#define QMI_WDS_CONN_STATUS_DISCONNECTED	0x01
-#define QMI_WDS_CONN_STATUS_CONNECTED		0x02
-#define QMI_WDS_CONN_STATUS_SUSPENDED		0x03
-#define QMI_WDS_CONN_STATUS_AUTHENTICATING	0x04
+enum qmi_wds_connection_status {
+	QMI_WDS_CONNECTION_STATUS_DISCONNECTED =	0x01,
+	QMI_WDS_CONNECTION_STATUS_CONNECTED =		0x02,
+	QMI_WDS_CONNECTION_STATUS_SUSPENDED =		0x03,
+	QMI_WDS_CONNECTION_STATUS_AUTHENTICATING =	0x04,
+};
 
-#define QMI_WDS_PDP_TYPE_IPV4			0x00
-#define QMI_WDS_PDP_TYPE_PPP			0x01
-#define QMI_WDS_PDP_TYPE_IPV6			0x02
-#define QMI_WDS_PDP_TYPE_IPV4V6			0x03
+enum qmi_wds_pdp_type {
+	QMI_WDS_PDP_TYPE_IPV4		= 0x00,
+	QMI_WDS_PDP_TYPE_PPP		= 0x01,
+	QMI_WDS_PDP_TYPE_IPV6		= 0x02,
+	QMI_WDS_PDP_TYPE_IPV4V6		= 0x03,
+};
 
 enum qmi_wds_ip_family {
 	QMI_WDS_IP_FAMILY_UNKNOWN = 0,