From: Sergey Ryazanov Date: Mon, 21 Jun 2021 22:50:59 +0000 (+0300) Subject: net: iosm: create default link via WWAN core X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=83068395bbfcd96db74af75c6dc3a87a4f952220;p=linux.git net: iosm: create default link via WWAN core Utilize the just introduced WWAN core feature to create a default netdev for the default data (IP MUX) channel. Signed-off-by: Sergey Ryazanov CC: M Chetan Kumar CC: Intel Corporation Signed-off-by: David S. Miller --- diff --git a/drivers/net/wwan/iosm/iosm_ipc_imem_ops.h b/drivers/net/wwan/iosm/iosm_ipc_imem_ops.h index 84087cf333294..fd356dafbdd6f 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_imem_ops.h +++ b/drivers/net/wwan/iosm/iosm_ipc_imem_ops.h @@ -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. diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c b/drivers/net/wwan/iosm/iosm_ipc_wwan.c index adb2bd40a4048..d3cb281078366 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c +++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c @@ -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; }