lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <PVOKPS.9BTDD92U5KK72@unrealasia.net>
Date: Sun, 05 Jan 2025 00:38:13 +0800
From: Muhammad Nuzaihan <zaihan@...ealasia.net>
To: Sergey Ryazanov <ryazanov.s.a@...il.com>
Cc: Johannes Berg <johannes@...solutions.net>, Loic Poulain
	<loic.poulain@...aro.org>, netdev@...r.kernel.org
Subject: [PATCH net-next v3] dev: Add NMEA port for MHI WWAN device.
 (mhi0_NMEA)

Based on the earlier v2 and v1 patches. This patch is a cleanup from v2.

Removed unnecessary code added to "iosm" and "AT IOCTL" which is not 
relevant.

Tested this change on a new kernel and module built and now device NMEA 
(mhi0_NMEA) statements are available through /dev/wwan0nmea0 port on 
bootup.

Signed-off-by: Muhammad Nuzaihan Bin Kamal Luddin 
<zaihan@...ealasia.net>
---
v3:
- Rebased to net-next main branch
- Removed earlier patches that added unnecessary iosm (unrelated) and 
AT IOCTL code.
v2: https://lore.kernel.org/netdev/5LHFPS.G3DNPFBCDKCL2@unrealasia.net/
v1: https://lore.kernel.org/netdev/R8AFPS.THYVK2DKSEE83@unrealasia.net/
---

 drivers/net/wwan/mhi_wwan_ctrl.c | 1 +
 drivers/net/wwan/wwan_core.c | 4 ++++
 include/linux/wwan.h | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/drivers/net/wwan/mhi_wwan_ctrl.c 
b/drivers/net/wwan/mhi_wwan_ctrl.c
index e9f979d2d851..e13c0b078175 100644
--- a/drivers/net/wwan/mhi_wwan_ctrl.c
+++ b/drivers/net/wwan/mhi_wwan_ctrl.c
@@ -263,6 +263,7 @@ static const struct mhi_device_id 
mhi_wwan_ctrl_match_table[] = {
        { .chan = "QMI", .driver_data = WWAN_PORT_QMI },
        { .chan = "DIAG", .driver_data = WWAN_PORT_QCDM },
        { .chan = "FIREHOSE", .driver_data = WWAN_PORT_FIREHOSE },
+	{ .chan = "NMEA", .driver_data = WWAN_PORT_NMEA },
        {},
 };
 MODULE_DEVICE_TABLE(mhi, mhi_wwan_ctrl_match_table);
diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c
index a51e2755991a..ebf574f2b126 100644
--- a/drivers/net/wwan/wwan_core.c
+++ b/drivers/net/wwan/wwan_core.c
@@ -342,6 +342,10 @@ static const struct {
                .name = "MIPC",
                .devsuf = "mipc",
        },
+	[WWAN_PORT_NMEA] = {
+		.name = "NMEA",
+		.devsuf = "nmea",
+	},
 };

 static ssize_t type_show(struct device *dev, struct device_attribute 
*attr,
diff --git a/include/linux/wwan.h b/include/linux/wwan.h
index a4d6cc0c9f68..ca38a2fe0987 100644
--- a/include/linux/wwan.h
+++ b/include/linux/wwan.h
@@ -19,6 +19,7 @@
  * @WWAN_PORT_FASTBOOT: Fastboot protocol control
  * @WWAN_PORT_ADB: ADB protocol control
  * @WWAN_PORT_MIPC: MTK MIPC diagnostic interface
+ * @WWAN_PORT_NMEA: NMEA GPS statements interface
  *
  * @WWAN_PORT_MAX: Highest supported port types
  * @WWAN_PORT_UNKNOWN: Special value to indicate an unknown port type
@@ -34,6 +35,7 @@ enum wwan_port_type {
        WWAN_PORT_FASTBOOT,
        WWAN_PORT_ADB,
        WWAN_PORT_MIPC,
+	WWAN_PORT_NMEA,

        /* Add new port types above this line */
--

2.34.1




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ