summaryrefslogtreecommitdiff
path: root/net/batman-adv/main.c
diff options
context:
space:
mode:
authorMartin Hundebøll <martin@hundeboll.net>2012-04-20 17:02:45 +0200
committerAntonio Quartulli <ordex@autistici.org>2012-06-18 18:00:58 +0200
commitf8214865a55f805e65c33350bc0f1eb46dd8433d (patch)
tree0fb4582b2ec3b045a094acd6063f5559e6d4dcb5 /net/batman-adv/main.c
parent66a1b2bcb34b0c74a3422968b15a7ea853ea5a2d (diff)
batman-adv: Add get_ethtool_stats() support
Added additional counters in a bat_stats structure, which are exported through the ethtool api. The counters are specific to batman-adv and includes: forwarded packets and bytes management packets and bytes (aggregated OGMs at this point) translation table packets New counters are added by extending "enum bat_counters" in types.h and adding corresponding descriptive string(s) to bat_counters_strings in soft-iface.c. Counters are increased by calling batadv_add_counter() and incremented by one by calling batadv_inc_counter(). Signed-off-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r--net/batman-adv/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 083a2993efe4..bd83aa4e7c87 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -153,6 +153,8 @@ void mesh_free(struct net_device *soft_iface)
bla_free(bat_priv);
+ free_percpu(bat_priv->bat_counters);
+
atomic_set(&bat_priv->mesh_state, MESH_INACTIVE);
}