mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-10 03:57:17 +08:00
39 lines
1.3 KiB
Diff
39 lines
1.3 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(+)
|
||
|
|
||
|
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
|
||
|
index 9cf7fe3..b7bab8e 100644
|
||
|
--- a/drivers/net/ppp/ppp_generic.c
|
||
|
+++ b/drivers/net/ppp/ppp_generic.c
|
||
|
@@ -3379,6 +3379,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);
|
||
|
@@ -3386,6 +3388,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);
|
||
|
}
|
||
|
|
||
|
--
|
||
|
cgit v1.1
|