aboutsummaryrefslogtreecommitdiff
path: root/driver/gator_events_net.c
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2011-05-23 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:07:51 -0800
commit538231c5bf600e61a4ac4f7a25e6ba2c61ad68ee (patch)
treee8fb7472b0e69acb2ca768c3571bad169c14304b /driver/gator_events_net.c
parenta3a50f5d7331c6294a81039d1eae731ed5682521 (diff)
downloadgator-538231c5bf600e61a4ac4f7a25e6ba2c61ad68ee.tar.gz
gator: Version 5.55.5
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'driver/gator_events_net.c')
-rw-r--r--driver/gator_events_net.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/driver/gator_events_net.c b/driver/gator_events_net.c
index 3ca5911..15a395e 100644
--- a/driver/gator_events_net.c
+++ b/driver/gator_events_net.c
@@ -136,6 +136,7 @@ static void gator_events_net_stop(void)
static int gator_events_net_read(int **buffer)
{
int len, drv_delta, rx_delta, tx_delta;
+ static int last_drv_delta = 0, last_rx_delta = 0, last_tx_delta = 0;
if (raw_smp_processor_id() != 0)
return 0;
@@ -144,17 +145,20 @@ static int gator_events_net_read(int **buffer)
calculate_delta(&drv_delta, &rx_delta, &tx_delta);
len = 0;
- if (netdrv_enabled) {
+ if (netdrv_enabled && last_drv_delta != drv_delta) {
+ last_drv_delta = drv_delta;
netGet[len++] = netdrv_key;
netGet[len++] = drv_delta;
}
- if (netrx_enabled) {
+ if (netrx_enabled && last_rx_delta != rx_delta) {
+ last_rx_delta = rx_delta;
netGet[len++] = netrx_key;
netGet[len++] = rx_delta;
}
- if (nettx_enabled) {
+ if (nettx_enabled && last_tx_delta != tx_delta) {
+ last_tx_delta = tx_delta;
netGet[len++] = nettx_key;
netGet[len++] = tx_delta;
}