summaryrefslogtreecommitdiff
path: root/drivers/net/wwan/iosm/iosm_ipc_wwan.c
diff options
context:
space:
mode:
authorSergey Ryazanov <ryazanov.s.a@gmail.com>2021-06-22 01:50:58 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-22 10:01:16 -0700
commitca374290aaade741a4781ae5f6e1ba7515e4e5fa (patch)
tree8b83a3501a985d176163fdd750b9eb714515a175 /drivers/net/wwan/iosm/iosm_ipc_wwan.c
parent9f0248ea476ee59d336d7c8bf1a5d0919d93d030 (diff)
downloadlinux-ca374290aaade741a4781ae5f6e1ba7515e4e5fa.tar.gz
linux-ca374290aaade741a4781ae5f6e1ba7515e4e5fa.tar.bz2
linux-ca374290aaade741a4781ae5f6e1ba7515e4e5fa.zip
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 <ryazanov.s.a@gmail.com> CC: M Chetan Kumar <m.chetan.kumar@intel.com> CC: Intel Corporation <linuxwwan@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_wwan.c')
-rw-r--r--drivers/net/wwan/iosm/iosm_ipc_wwan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
index bee9b278223d..adb2bd40a404 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
@@ -317,7 +317,8 @@ struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev)
ipc_wwan->dev = dev;
ipc_wwan->ipc_imem = ipc_imem;
- if (wwan_register_ops(ipc_wwan->dev, &iosm_wwan_ops, ipc_wwan)) {
+ if (wwan_register_ops(ipc_wwan->dev, &iosm_wwan_ops, ipc_wwan,
+ WWAN_NO_DEFAULT_LINK)) {
kfree(ipc_wwan);
return NULL;
}