mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 0ebfa720350a5fde3efb45872f867ac30074a43c Mon Sep 17 00:00:00 2001
|
|
From: Murat Sezgin <msezgin@codeaurora.org>
|
|
Date: Tue, 13 Oct 2015 22:40:25 -0700
|
|
Subject: ppp: Update the last_recv and last_xmit times.
|
|
|
|
These need to be updated for accelerated connections, so that
|
|
on demand mode will recognize the active traffic.
|
|
|
|
Change-Id: I3c0ee4e8f4c3bc4c7ce221e6109bfd82046d11b4
|
|
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
|
|
---
|
|
drivers/net/ppp/ppp_generic.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/drivers/net/ppp/ppp_generic.c
|
|
+++ b/drivers/net/ppp/ppp_generic.c
|
|
@@ -3395,6 +3395,8 @@ void ppp_update_stats(struct net_device *dev, unsigned long rx_packets,
|
|
ppp->stats64.tx_bytes += tx_bytes;
|
|
ppp->dev->stats.tx_errors += tx_errors;
|
|
ppp->dev->stats.tx_dropped += tx_dropped;
|
|
+ if (tx_packets)
|
|
+ ppp->last_xmit = jiffies;
|
|
ppp_xmit_unlock(ppp);
|
|
|
|
ppp_recv_lock(ppp);
|
|
@@ -3402,6 +3404,8 @@ void ppp_update_stats(struct net_device *dev, unsigned long rx_packets,
|
|
ppp->stats64.rx_bytes += rx_bytes;
|
|
ppp->dev->stats.rx_errors += rx_errors;
|
|
ppp->dev->stats.rx_dropped += rx_dropped;
|
|
+ if (rx_packets)
|
|
+ ppp->last_recv = jiffies;
|
|
ppp_recv_unlock(ppp);
|
|
}
|
|
|