Skip to content

Commit

Permalink
net: wwan: t7xx: Add WWAN network interface
Browse files Browse the repository at this point in the history
Creates the Cross Core Modem Network Interface (CCMNI) which implements
the wwan_ops for registration with the WWAN framework, CCMNI also
implements the net_device_ops functions used by the network device.
Network device operations include open, close, start transmission, TX
timeout and change MTU.

Signed-off-by: Haijun Liu <haijun.liu@mediatek.com>
Co-developed-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
Co-developed-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Haijun Liu authored and David S. Miller committed May 9, 2022
1 parent d642b01 commit 05d19bf
Show file tree
Hide file tree
Showing 4 changed files with 489 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/net/wwan/t7xx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ mtk_t7xx-y:= t7xx_pci.o \
t7xx_hif_dpmaif_tx.o \
t7xx_hif_dpmaif_rx.o \
t7xx_dpmaif.o \
t7xx_netdev.o
11 changes: 10 additions & 1 deletion drivers/net/wwan/t7xx/t7xx_modem_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "t7xx_hif_cldma.h"
#include "t7xx_mhccif.h"
#include "t7xx_modem_ops.h"
#include "t7xx_netdev.h"
#include "t7xx_pci.h"
#include "t7xx_pcie_mac.h"
#include "t7xx_port.h"
Expand Down Expand Up @@ -670,10 +671,14 @@ int t7xx_md_init(struct t7xx_pci_dev *t7xx_dev)
if (ret)
goto err_destroy_hswq;

ret = t7xx_cldma_init(md->md_ctrl[CLDMA_ID_MD]);
ret = t7xx_ccmni_init(t7xx_dev);
if (ret)
goto err_uninit_fsm;

ret = t7xx_cldma_init(md->md_ctrl[CLDMA_ID_MD]);
if (ret)
goto err_uninit_ccmni;

ret = t7xx_port_proxy_init(md);
if (ret)
goto err_uninit_md_cldma;
Expand All @@ -692,6 +697,9 @@ int t7xx_md_init(struct t7xx_pci_dev *t7xx_dev)
err_uninit_md_cldma:
t7xx_cldma_exit(md->md_ctrl[CLDMA_ID_MD]);

err_uninit_ccmni:
t7xx_ccmni_exit(t7xx_dev);

err_uninit_fsm:
t7xx_fsm_uninit(md);

Expand All @@ -713,6 +721,7 @@ void t7xx_md_exit(struct t7xx_pci_dev *t7xx_dev)
t7xx_fsm_append_cmd(md->fsm_ctl, FSM_CMD_PRE_STOP, FSM_CMD_FLAG_WAIT_FOR_COMPLETION);
t7xx_port_proxy_uninit(md->port_prox);
t7xx_cldma_exit(md->md_ctrl[CLDMA_ID_MD]);
t7xx_ccmni_exit(t7xx_dev);
t7xx_fsm_uninit(md);
destroy_workqueue(md->handshake_wq);
}
Loading

0 comments on commit 05d19bf

Please sign in to comment.