diff --git a/package/wwan/driver/quectel_QMI_WWAN/Makefile b/package/wwan/driver/quectel_QMI_WWAN/Makefile index 45452109e..b27dfad76 100755 --- a/package/wwan/driver/quectel_QMI_WWAN/Makefile +++ b/package/wwan/driver/quectel_QMI_WWAN/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qmi_wwan_q PKG_VERSION:=3.0 -PKG_RELEASE:=3 +PKG_RELEASE:=2 include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/wwan/driver/quectel_QMI_WWAN/src/qmi_wwan_q.c b/package/wwan/driver/quectel_QMI_WWAN/src/qmi_wwan_q.c index 4f1a468ed..acde9d15b 100644 --- a/package/wwan/driver/quectel_QMI_WWAN/src/qmi_wwan_q.c +++ b/package/wwan/driver/quectel_QMI_WWAN/src/qmi_wwan_q.c @@ -1,3 +1,4 @@ + /* * Copyright (c) 2012 Bjørn Mork * @@ -828,26 +829,26 @@ static struct rtnl_link_stats64 *_rmnet_vnd_get_stats64(struct net_device *net, stats64 = per_cpu_ptr(dev->stats64, cpu); do { -#if (LINUX_VERSION_CODE < KERNEL_VERSION( 6,6,0 )) start = u64_stats_fetch_begin_irq(&stats64->syncp); -#else - start = u64_stats_fetch_begin(&stats64->syncp); -#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0) rx_packets = stats64->rx_packets; rx_bytes = stats64->rx_bytes; tx_packets = stats64->tx_packets; tx_bytes = stats64->tx_bytes; -#if (LINUX_VERSION_CODE < KERNEL_VERSION( 6,6,0 )) - } while (u64_stats_fetch_retry_irq(&stats64->syncp, start)); #else - } while (u64_stats_fetch_retry(&stats64->syncp, start)); + rx_packets = u64_stats_read(&stats64->rx_packets); + rx_bytes = u64_stats_read(&stats64->rx_bytes); + tx_packets = u64_stats_read(&stats64->tx_packets); + tx_bytes = u64_stats_read(&stats64->tx_bytes); #endif + } while (u64_stats_fetch_retry_irq(&stats64->syncp, start)); + + + stats->rx_packets += rx_packets; + stats->rx_bytes += rx_bytes; + stats->tx_packets += tx_packets; + stats->tx_bytes += tx_bytes; - stats->rx_packets += u64_stats_read(&rx_packets); - stats->rx_bytes += u64_stats_read(&rx_bytes); - stats->tx_packets += u64_stats_read(&tx_packets); - stats->tx_bytes += u64_stats_read(&tx_bytes); -#endif } return stats; diff --git a/package/wwan/driver/quectel_QMI_WWAN/src/rmnet_nss.c b/package/wwan/driver/quectel_QMI_WWAN/src/rmnet_nss.c index e6e841468..e63fa9f32 100644 --- a/package/wwan/driver/quectel_QMI_WWAN/src/rmnet_nss.c +++ b/package/wwan/driver/quectel_QMI_WWAN/src/rmnet_nss.c @@ -1,3 +1,4 @@ + /* Copyright (c) 2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify