Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205772
b: refs/heads/master
c: 80f6c34
h: refs/heads/master
v: v3
  • Loading branch information
Linus Lüssing authored and Greg Kroah-Hartman committed Jul 8, 2010
1 parent ce65bab commit b394689
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1641862f88367602f8f34a17b21bdf1eee912ee
refs/heads/master: 80f6c34b9a4302edf3f675c25973c51e03b570da
22 changes: 15 additions & 7 deletions trunk/drivers/staging/batman-adv/originator.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
struct orig_node *orig_node;
struct neigh_node *neigh_node;
int batman_count = 0;
int last_seen_secs;
int last_seen_msecs;
unsigned long flags;
char orig_str[ETH_STR_LEN], router_str[ETH_STR_LEN];

Expand All @@ -305,12 +307,13 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
}

rcu_read_lock();
seq_printf(seq, " %-14s (%s/%i) %17s [%10s]: %20s "
"... [B.A.T.M.A.N. adv %s%s, MainIF/MAC: %s/%s (%s)]\n",
"Originator", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF",
"Potential nexthops", SOURCE_VERSION, REVISION_VERSION_STR,
seq_printf(seq, "[B.A.T.M.A.N. adv %s%s, MainIF/MAC: %s/%s (%s)]\n",
SOURCE_VERSION, REVISION_VERSION_STR,
bat_priv->primary_if->dev, bat_priv->primary_if->addr_str,
net_dev->name);
seq_printf(seq, " %-15s %s (%s/%i) %17s [%10s]: %20s ...\n",
"Originator", "last-seen", "#", TQ_MAX_VALUE, "Nexthop",
"outgoingIF", "Potential nexthops");
rcu_read_unlock();

spin_lock_irqsave(&orig_hash_lock, flags);
Expand All @@ -327,9 +330,14 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)

addr_to_string(orig_str, orig_node->orig);
addr_to_string(router_str, orig_node->router->addr);

seq_printf(seq, "%-17s (%3i) %17s [%10s]:",
orig_str, orig_node->router->tq_avg, router_str,
last_seen_secs = jiffies_to_msecs(jiffies -
orig_node->last_valid) / 1000;
last_seen_msecs = jiffies_to_msecs(jiffies -
orig_node->last_valid) % 1000;

seq_printf(seq, "%-17s %4i.%03is (%3i) %17s [%10s]:",
orig_str, last_seen_secs, last_seen_msecs,
orig_node->router->tq_avg, router_str,
orig_node->router->if_incoming->dev);

list_for_each_entry(neigh_node, &orig_node->neigh_list, list) {
Expand Down

0 comments on commit b394689

Please sign in to comment.