summaryrefslogtreecommitdiff
path: root/drivers/net/wwan/wwan_hwsim.c
diff options
context:
space:
mode:
authorhaozhe chang <haozhe.chang@mediatek.com>2023-03-16 17:58:20 +0800
committerJakub Kicinski <kuba@kernel.org>2023-03-17 22:38:31 -0700
commit36bd28c1cb0dbf48645cfe43159907fb3253b33a (patch)
treee03798a8e0af020702b53da1da3d52ed6621fb22 /drivers/net/wwan/wwan_hwsim.c
parented0578a46c5f08647f5ecb0e3c735a53267426f7 (diff)
wwan: core: Support slicing in port TX flow of WWAN subsystem
wwan_port_fops_write inputs the SKB parameter to the TX callback of the WWAN device driver. However, the WWAN device (e.g., t7xx) may have an MTU less than the size of SKB, causing the TX buffer to be sliced and copied once more in the WWAN device driver. This patch implements the slicing in the WWAN subsystem and gives the WWAN devices driver the option to slice(by frag_len) or not. By doing so, the additional memory copy is reduced. Meanwhile, this patch gives WWAN devices driver the option to reserve headroom in fragments for the device-specific metadata. Signed-off-by: haozhe chang <haozhe.chang@mediatek.com> Reviewed-by: Loic Poulain <loic.poulain@linaro.org> Link: https://lore.kernel.org/r/20230316095826.181904-1-haozhe.chang@mediatek.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/wwan/wwan_hwsim.c')
-rw-r--r--drivers/net/wwan/wwan_hwsim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wwan/wwan_hwsim.c b/drivers/net/wwan/wwan_hwsim.c
index 2397a903d8f5..dfbdaa259a3f 100644
--- a/drivers/net/wwan/wwan_hwsim.c
+++ b/drivers/net/wwan/wwan_hwsim.c
@@ -205,7 +205,7 @@ static struct wwan_hwsim_port *wwan_hwsim_port_new(struct wwan_hwsim_dev *dev)
port->wwan = wwan_create_port(&dev->dev, WWAN_PORT_AT,
&wwan_hwsim_port_ops,
- port);
+ NULL, port);
if (IS_ERR(port->wwan)) {
err = PTR_ERR(port->wwan);
goto err_free_port;