summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2021-01-22 16:15:54 +0100
committerLoic Poulain <loic.poulain@linaro.org>2021-02-02 17:54:36 +0100
commitd9814040ab057213d4929ed4607820bb783c5779 (patch)
tree144b2f0f84c787c2e6bc9946d1d510bc26489f8d
parent80dbd91a41ae3f25dffd7c3c1990470f86e40c35 (diff)
net: mhi: Set wwan device type
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> Link: https://lore.kernel.org/r/1611328554-1414-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/mhi_net.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c
index bfa874f4a489..f98109889740 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);