diff --git a/driver/fibocom_QMI_WWAN/src/qmi_wwan_f.c b/driver/fibocom_QMI_WWAN/src/qmi_wwan_f.c index 48efef7..2469ce1 100644 --- a/driver/fibocom_QMI_WWAN/src/qmi_wwan_f.c +++ b/driver/fibocom_QMI_WWAN/src/qmi_wwan_f.c @@ -1760,8 +1760,14 @@ static void ql_net_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *i { /* Inherit standard device info */ usbnet_get_drvinfo(net, info); + /* strlcpy() is deprecated in kernel 6.8.0+, using strscpy instead */ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,8,0)) strlcpy(info->driver, driver_name, sizeof(info->driver)); strlcpy(info->version, VERSION_NUMBER, sizeof(info->version)); +#else + strscpy(info->driver, driver_name, sizeof(info->driver)); + strscpy(info->version, VERSION_NUMBER, sizeof(info->version)); +#endif } static struct ethtool_ops ql_net_ethtool_ops; diff --git a/driver/quectel_QMI_WWAN/src/qmi_wwan_q.c b/driver/quectel_QMI_WWAN/src/qmi_wwan_q.c index 99a9e9f..6a1dd08 100644 --- a/driver/quectel_QMI_WWAN/src/qmi_wwan_q.c +++ b/driver/quectel_QMI_WWAN/src/qmi_wwan_q.c @@ -1949,8 +1949,14 @@ static void ql_net_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *i { /* Inherit standard device info */ usbnet_get_drvinfo(net, info); + /* strlcpy() is deprecated in kernel 6.8.0+, using strscpy instead */ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,8,0)) strlcpy(info->driver, driver_name, sizeof(info->driver)); strlcpy(info->version, VERSION_NUMBER, sizeof(info->version)); +#else + strscpy(info->driver, driver_name, sizeof(info->driver)); + strscpy(info->version, VERSION_NUMBER, sizeof(info->version)); +#endif } static struct ethtool_ops ql_net_ethtool_ops;