Skip to content

Commit

Permalink
net: mhi: Set wwan device type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Loic Poulain authored and Jakub Kicinski committed Jan 24, 2021
1 parent acb4151 commit b80b5db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/mhi_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,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)
{
Expand All @@ -267,6 +271,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);

/* All MHI net channels have 128 ring elements (at least for now) */
mhi_netdev->rx_queue_sz = 128;
Expand Down

0 comments on commit b80b5db

Please sign in to comment.