]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: iosm: create default link via WWAN core
authorSergey Ryazanov <ryazanov.s.a@gmail.com>
Mon, 21 Jun 2021 22:50:59 +0000 (01:50 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jun 2021 17:01:17 +0000 (10:01 -0700)
Utilize the just introduced WWAN core feature to create a default netdev
for the default data (IP MUX) channel.

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>
drivers/net/wwan/iosm/iosm_ipc_imem_ops.h
drivers/net/wwan/iosm/iosm_ipc_wwan.c

index 84087cf33329483a882bfbd67300af59630b8d11..fd356dafbdd6f0576726b504135d61b9129a142b 100644 (file)
@@ -30,6 +30,9 @@
 #define IP_MUX_SESSION_START 1
 #define IP_MUX_SESSION_END 8
 
+/* Default IP MUX channel */
+#define IP_MUX_SESSION_DEFAULT 1
+
 /**
  * ipc_imem_sys_port_open - Open a port link to CP.
  * @ipc_imem:  Imem instance.
index adb2bd40a4048727cccfa6a1c5aa4d5baf4caad0..d3cb281078366aec2b39e77e84379ada11ff174e 100644 (file)
@@ -317,8 +317,9 @@ struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev)
        ipc_wwan->dev = dev;
        ipc_wwan->ipc_imem = ipc_imem;
 
+       /* WWAN core will create a netdev for the default IP MUX channel */
        if (wwan_register_ops(ipc_wwan->dev, &iosm_wwan_ops, ipc_wwan,
-                             WWAN_NO_DEFAULT_LINK)) {
+                             IP_MUX_SESSION_DEFAULT)) {
                kfree(ipc_wwan);
                return NULL;
        }