diff options
Diffstat (limited to 'drivers/staging/batman-adv/vis.c')
-rw-r--r-- | drivers/staging/batman-adv/vis.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index 57d69d70671e..b6ff031a34d0 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -173,13 +173,10 @@ ssize_t vis_fill_buffer_text(struct net_device *net_dev, char *buff, unsigned long flags; int vis_server = atomic_read(&bat_priv->vis_mode); - rcu_read_lock(); - if (list_empty(&if_list) || (vis_server == VIS_TYPE_CLIENT_UPDATE)) { - rcu_read_unlock(); + if ((!bat_priv->primary_if) || + (vis_server == VIS_TYPE_CLIENT_UPDATE)) return 0; - } - rcu_read_unlock(); hdr_len = 0; spin_lock_irqsave(&vis_hash_lock, flags); @@ -498,7 +495,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv) if (orig_node->router != NULL && compare_orig(orig_node->router->addr, orig_node->orig) - && (orig_node->router->if_incoming->if_active == + && (orig_node->router->if_incoming->if_status == IF_ACTIVE) && orig_node->router->tq_avg > 0) { |