]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
wwan: core: add print for wwan port attach/disconnect
authorSlark Xiao <slark_xiao@163.com>
Thu, 20 Apr 2023 02:36:17 +0000 (10:36 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Apr 2023 02:57:43 +0000 (19:57 -0700)
Refer to USB serial device or net device, there is a notice to
let end user know the status of device, like attached or
disconnected. Add attach/disconnect print for wwan device as
well.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Link: https://lore.kernel.org/r/20230420023617.3919569-1-slark_xiao@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wwan/wwan_core.c

index 2e1c01cf00a99929fafefea9a0d09813ca34b3c7..aa54fa6d5f90dc8174eef8fff8f32bd85ded9cbb 100644 (file)
@@ -492,6 +492,7 @@ struct wwan_port *wwan_create_port(struct device *parent,
        if (err)
                goto error_put_device;
 
+       dev_info(&wwandev->dev, "port %s attached\n", dev_name(&port->dev));
        return port;
 
 error_put_device:
@@ -517,6 +518,8 @@ void wwan_remove_port(struct wwan_port *port)
 
        skb_queue_purge(&port->rxq);
        dev_set_drvdata(&port->dev, NULL);
+
+       dev_info(&wwandev->dev, "port %s disconnected\n", dev_name(&port->dev));
        device_unregister(&port->dev);
 
        /* Release related wwan device */