diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index ebf574f2b126..abd76ef097bc 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -342,10 +343,6 @@ 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, @@ -460,6 +457,14 @@ struct wwan_port *wwan_create_port(struct device *parent, if (type > WWAN_PORT_MAX || !ops) return ERR_PTR(-EINVAL); + /* NMEA check to attach GNSS port */ + if (type == WWAN_PORT_NMEA) { + struct gnss_device *gdev = gnss_allocate_device(parent); + + if (gdev) + gnss_register_device(gdev); + } + /* A port is always a child of a WWAN device, retrieve (allocate or * pick) the WWAN device based on the provided parent device. */