From ca374290aaade741a4781ae5f6e1ba7515e4e5fa Mon Sep 17 00:00:00 2001 From: Sergey Ryazanov Date: Tue, 22 Jun 2021 01:50:58 +0300 Subject: wwan: core: support default netdev creation Most, if not each WWAN device driver will create a netdev for the default data channel. Therefore, add an option for the WWAN netdev ops registration function to create a default netdev for the WWAN device. A WWAN device driver should pass a default data channel link id to the ops registering function to request the creation of a default netdev, or a special value WWAN_NO_DEFAULT_LINK to inform the WWAN core that the default netdev should not be created. For now, only wwan_hwsim utilize the default link creation option. Other drivers will be reworked next. Signed-off-by: Sergey Ryazanov CC: M Chetan Kumar CC: Intel Corporation Signed-off-by: David S. Miller --- drivers/net/mhi/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/mhi/net.c') diff --git a/drivers/net/mhi/net.c b/drivers/net/mhi/net.c index ffd1c01b3f35..f36ca5c0dfe9 100644 --- a/drivers/net/mhi/net.c +++ b/drivers/net/mhi/net.c @@ -397,7 +397,8 @@ static int mhi_net_probe(struct mhi_device *mhi_dev, struct net_device *ndev; int err; - err = wwan_register_ops(&cntrl->mhi_dev->dev, &mhi_wwan_ops, mhi_dev); + err = wwan_register_ops(&cntrl->mhi_dev->dev, &mhi_wwan_ops, mhi_dev, + WWAN_NO_DEFAULT_LINK); if (err) return err; -- cgit v1.2.3