diff options
Diffstat (limited to 'net/batman-adv/vis.c')
-rw-r--r-- | net/batman-adv/vis.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 60eb9b7ca8d1..51e2bf01c919 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -31,8 +31,6 @@ | |||
31 | /* hash class keys */ | 31 | /* hash class keys */ |
32 | static struct lock_class_key batadv_vis_hash_lock_class_key; | 32 | static struct lock_class_key batadv_vis_hash_lock_class_key; |
33 | 33 | ||
34 | static void batadv_start_vis_timer(struct batadv_priv *bat_priv); | ||
35 | |||
36 | /* free the info */ | 34 | /* free the info */ |
37 | static void batadv_free_info(struct kref *ref) | 35 | static void batadv_free_info(struct kref *ref) |
38 | { | 36 | { |
@@ -830,7 +828,9 @@ static void batadv_send_vis_packets(struct work_struct *work) | |||
830 | kref_put(&info->refcount, batadv_free_info); | 828 | kref_put(&info->refcount, batadv_free_info); |
831 | } | 829 | } |
832 | spin_unlock_bh(&bat_priv->vis.hash_lock); | 830 | spin_unlock_bh(&bat_priv->vis.hash_lock); |
833 | batadv_start_vis_timer(bat_priv); | 831 | |
832 | queue_delayed_work(batadv_event_workqueue, &bat_priv->vis.work, | ||
833 | msecs_to_jiffies(BATADV_VIS_INTERVAL)); | ||
834 | } | 834 | } |
835 | 835 | ||
836 | /* init the vis server. this may only be called when if_list is already | 836 | /* init the vis server. this may only be called when if_list is already |
@@ -900,7 +900,11 @@ int batadv_vis_init(struct batadv_priv *bat_priv) | |||
900 | } | 900 | } |
901 | 901 | ||
902 | spin_unlock_bh(&bat_priv->vis.hash_lock); | 902 | spin_unlock_bh(&bat_priv->vis.hash_lock); |
903 | batadv_start_vis_timer(bat_priv); | 903 | |
904 | INIT_DELAYED_WORK(&bat_priv->vis.work, batadv_send_vis_packets); | ||
905 | queue_delayed_work(batadv_event_workqueue, &bat_priv->vis.work, | ||
906 | msecs_to_jiffies(BATADV_VIS_INTERVAL)); | ||
907 | |||
904 | return 0; | 908 | return 0; |
905 | 909 | ||
906 | free_info: | 910 | free_info: |
@@ -937,11 +941,3 @@ void batadv_vis_quit(struct batadv_priv *bat_priv) | |||
937 | bat_priv->vis.my_info = NULL; | 941 | bat_priv->vis.my_info = NULL; |
938 | spin_unlock_bh(&bat_priv->vis.hash_lock); | 942 | spin_unlock_bh(&bat_priv->vis.hash_lock); |
939 | } | 943 | } |
940 | |||
941 | /* schedule packets for (re)transmission */ | ||
942 | static void batadv_start_vis_timer(struct batadv_priv *bat_priv) | ||
943 | { | ||
944 | INIT_DELAYED_WORK(&bat_priv->vis.work, batadv_send_vis_packets); | ||
945 | queue_delayed_work(batadv_event_workqueue, &bat_priv->vis.work, | ||
946 | msecs_to_jiffies(BATADV_VIS_INTERVAL)); | ||
947 | } | ||