diff options
author | Drew Richardson <drew.richardson@arm.com> | 2012-12-14 12:00:00 -0800 |
---|---|---|
committer | Drew Richardson <drew.richardson@arm.com> | 2014-12-19 15:33:02 -0800 |
commit | a01058e248133bb7c1ba0238ab380e4fac924e97 (patch) | |
tree | 8fc08c126fcb711fc9a2011eb6314c68d429b800 /driver/gator_events_net.c | |
parent | b04e8aefeed42f23955e88c7aa1611e49bdf5909 (diff) |
gator: Version 5.135.13
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'driver/gator_events_net.c')
-rw-r--r-- | driver/gator_events_net.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/driver/gator_events_net.c b/driver/gator_events_net.c index 31cc3ef..b6ce06a 100644 --- a/driver/gator_events_net.c +++ b/driver/gator_events_net.c @@ -26,7 +26,8 @@ static int netGet[TOTALNET * 4]; static struct timer_list net_wake_up_timer; // Must be run in process context as the kernel function dev_get_stats() can sleep -static void get_network_stats(struct work_struct *wsptr) { +static void get_network_stats(struct work_struct *wsptr) +{ int rx = 0, tx = 0; struct net_device *dev; @@ -43,6 +44,7 @@ static void get_network_stats(struct work_struct *wsptr) { rx_total = rx; tx_total = tx; } + DECLARE_WORK(wq_get_stats, get_network_stats); static void net_wake_up_handler(unsigned long unused_data) @@ -129,7 +131,7 @@ static int gator_events_net_read(int **buffer) if (netrx_enabled && last_rx_delta != rx_delta) { last_rx_delta = rx_delta; netGet[len++] = netrx_key; - netGet[len++] = 0; // indicates to Streamline that rx_delta bytes were transmitted now, not since the last message + netGet[len++] = 0; // indicates to Streamline that rx_delta bytes were transmitted now, not since the last message netGet[len++] = netrx_key; netGet[len++] = rx_delta; } @@ -137,7 +139,7 @@ static int gator_events_net_read(int **buffer) if (nettx_enabled && last_tx_delta != tx_delta) { last_tx_delta = tx_delta; netGet[len++] = nettx_key; - netGet[len++] = 0; // indicates to Streamline that tx_delta bytes were transmitted now, not since the last message + netGet[len++] = 0; // indicates to Streamline that tx_delta bytes were transmitted now, not since the last message netGet[len++] = nettx_key; netGet[len++] = tx_delta; } @@ -165,4 +167,5 @@ int gator_events_net_init(void) return gator_events_install(&gator_events_net_interface); } + gator_events_init(gator_events_net_init); |