Skip to content

Commit

Permalink
net: iosm: create default link via WWAN core
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergey Ryazanov authored and David S. Miller committed Jun 22, 2021
1 parent ca37429 commit 8306839
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/net/wwan/iosm/iosm_ipc_imem_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wwan/iosm/iosm_ipc_wwan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8306839

Please sign in to comment.