* [PATCH net-next] net: mhi: Set wwan device type
@ 2021-01-20 13:53 Loic Poulain
2021-01-21 5:30 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Loic Poulain @ 2021-01-20 13:53 UTC (permalink / raw)
To: davem, kuba; +Cc: netdev, Loic Poulain
The 'wwan' devtype is meant for devices that require additional
configuration to be used, like WWAN specific APN setup over AT/QMI
commands, rmnet link creation, etc. This is the case for MHI (Modem
host Interface) netdev which targets modem/WWAN endpoints.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/mhi_net.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c
index f83562d..e3f9c0d 100644
--- a/drivers/net/mhi_net.c
+++ b/drivers/net/mhi_net.c
@@ -234,6 +234,10 @@ static void mhi_net_rx_refill_work(struct work_struct *work)
schedule_delayed_work(&mhi_netdev->rx_refill, HZ / 2);
}
+static struct device_type wwan_type = {
+ .name = "wwan",
+};
+
static int mhi_net_probe(struct mhi_device *mhi_dev,
const struct mhi_device_id *id)
{
@@ -253,6 +257,7 @@ static int mhi_net_probe(struct mhi_device *mhi_dev,
mhi_netdev->ndev = ndev;
mhi_netdev->mdev = mhi_dev;
SET_NETDEV_DEV(ndev, &mhi_dev->dev);
+ SET_NETDEV_DEVTYPE(ndev, &wwan_type);
INIT_DELAYED_WORK(&mhi_netdev->rx_refill, mhi_net_rx_refill_work);
u64_stats_init(&mhi_netdev->stats.rx_syncp);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: mhi: Set wwan device type
2021-01-20 13:53 [PATCH net-next] net: mhi: Set wwan device type Loic Poulain
@ 2021-01-21 5:30 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2021-01-21 5:30 UTC (permalink / raw)
To: Loic Poulain; +Cc: davem, netdev
On Wed, 20 Jan 2021 14:53:41 +0100 Loic Poulain wrote:
> The 'wwan' devtype is meant for devices that require additional
> configuration to be used, like WWAN specific APN setup over AT/QMI
> commands, rmnet link creation, etc. This is the case for MHI (Modem
> host Interface) netdev which targets modem/WWAN endpoints.
>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Patchwork says this does not apply to net-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-21 5:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 13:53 [PATCH net-next] net: mhi: Set wwan device type Loic Poulain
2021-01-21 5:30 ` Jakub Kicinski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.