multicast.c (2c72d655b04450056566bcbfe89c2427376b60b4) multicast.c (5274cd68d744b4bc59b32d87cbde70803130eb3f)
1/* Copyright (C) 2014-2015 B.A.T.M.A.N. contributors:
2 *
3 * Linus Lüssing
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public
7 * License as published by the Free Software Foundation.
8 *

--- 595 unchanged lines hidden (view full) ---

604 */
605static void batadv_mcast_want_unsnoop_update(struct batadv_priv *bat_priv,
606 struct batadv_orig_node *orig,
607 u8 mcast_flags)
608{
609 struct hlist_node *node = &orig->mcast_want_all_unsnoopables_node;
610 struct hlist_head *head = &bat_priv->mcast.want_all_unsnoopables_list;
611
1/* Copyright (C) 2014-2015 B.A.T.M.A.N. contributors:
2 *
3 * Linus Lüssing
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public
7 * License as published by the Free Software Foundation.
8 *

--- 595 unchanged lines hidden (view full) ---

604 */
605static void batadv_mcast_want_unsnoop_update(struct batadv_priv *bat_priv,
606 struct batadv_orig_node *orig,
607 u8 mcast_flags)
608{
609 struct hlist_node *node = &orig->mcast_want_all_unsnoopables_node;
610 struct hlist_head *head = &bat_priv->mcast.want_all_unsnoopables_list;
611
612 lockdep_assert_held(&orig->mcast_handler_lock);
613
612 /* switched from flag unset to set */
613 if (mcast_flags & BATADV_MCAST_WANT_ALL_UNSNOOPABLES &&
614 !(orig->mcast_flags & BATADV_MCAST_WANT_ALL_UNSNOOPABLES)) {
615 atomic_inc(&bat_priv->mcast.num_want_all_unsnoopables);
616
617 spin_lock_bh(&bat_priv->mcast.want_lists_lock);
618 /* flag checks above + mcast_handler_lock prevents this */
619 WARN_ON(!hlist_unhashed(node));

--- 27 unchanged lines hidden (view full) ---

647 */
648static void batadv_mcast_want_ipv4_update(struct batadv_priv *bat_priv,
649 struct batadv_orig_node *orig,
650 u8 mcast_flags)
651{
652 struct hlist_node *node = &orig->mcast_want_all_ipv4_node;
653 struct hlist_head *head = &bat_priv->mcast.want_all_ipv4_list;
654
614 /* switched from flag unset to set */
615 if (mcast_flags & BATADV_MCAST_WANT_ALL_UNSNOOPABLES &&
616 !(orig->mcast_flags & BATADV_MCAST_WANT_ALL_UNSNOOPABLES)) {
617 atomic_inc(&bat_priv->mcast.num_want_all_unsnoopables);
618
619 spin_lock_bh(&bat_priv->mcast.want_lists_lock);
620 /* flag checks above + mcast_handler_lock prevents this */
621 WARN_ON(!hlist_unhashed(node));

--- 27 unchanged lines hidden (view full) ---

649 */
650static void batadv_mcast_want_ipv4_update(struct batadv_priv *bat_priv,
651 struct batadv_orig_node *orig,
652 u8 mcast_flags)
653{
654 struct hlist_node *node = &orig->mcast_want_all_ipv4_node;
655 struct hlist_head *head = &bat_priv->mcast.want_all_ipv4_list;
656
657 lockdep_assert_held(&orig->mcast_handler_lock);
658
655 /* switched from flag unset to set */
656 if (mcast_flags & BATADV_MCAST_WANT_ALL_IPV4 &&
657 !(orig->mcast_flags & BATADV_MCAST_WANT_ALL_IPV4)) {
658 atomic_inc(&bat_priv->mcast.num_want_all_ipv4);
659
660 spin_lock_bh(&bat_priv->mcast.want_lists_lock);
661 /* flag checks above + mcast_handler_lock prevents this */
662 WARN_ON(!hlist_unhashed(node));

--- 27 unchanged lines hidden (view full) ---

690 */
691static void batadv_mcast_want_ipv6_update(struct batadv_priv *bat_priv,
692 struct batadv_orig_node *orig,
693 u8 mcast_flags)
694{
695 struct hlist_node *node = &orig->mcast_want_all_ipv6_node;
696 struct hlist_head *head = &bat_priv->mcast.want_all_ipv6_list;
697
659 /* switched from flag unset to set */
660 if (mcast_flags & BATADV_MCAST_WANT_ALL_IPV4 &&
661 !(orig->mcast_flags & BATADV_MCAST_WANT_ALL_IPV4)) {
662 atomic_inc(&bat_priv->mcast.num_want_all_ipv4);
663
664 spin_lock_bh(&bat_priv->mcast.want_lists_lock);
665 /* flag checks above + mcast_handler_lock prevents this */
666 WARN_ON(!hlist_unhashed(node));

--- 27 unchanged lines hidden (view full) ---

694 */
695static void batadv_mcast_want_ipv6_update(struct batadv_priv *bat_priv,
696 struct batadv_orig_node *orig,
697 u8 mcast_flags)
698{
699 struct hlist_node *node = &orig->mcast_want_all_ipv6_node;
700 struct hlist_head *head = &bat_priv->mcast.want_all_ipv6_list;
701
702 lockdep_assert_held(&orig->mcast_handler_lock);
703
698 /* switched from flag unset to set */
699 if (mcast_flags & BATADV_MCAST_WANT_ALL_IPV6 &&
700 !(orig->mcast_flags & BATADV_MCAST_WANT_ALL_IPV6)) {
701 atomic_inc(&bat_priv->mcast.num_want_all_ipv6);
702
703 spin_lock_bh(&bat_priv->mcast.want_lists_lock);
704 /* flag checks above + mcast_handler_lock prevents this */
705 WARN_ON(!hlist_unhashed(node));

--- 116 unchanged lines hidden ---
704 /* switched from flag unset to set */
705 if (mcast_flags & BATADV_MCAST_WANT_ALL_IPV6 &&
706 !(orig->mcast_flags & BATADV_MCAST_WANT_ALL_IPV6)) {
707 atomic_inc(&bat_priv->mcast.num_want_all_ipv6);
708
709 spin_lock_bh(&bat_priv->mcast.want_lists_lock);
710 /* flag checks above + mcast_handler_lock prevents this */
711 WARN_ON(!hlist_unhashed(node));

--- 116 unchanged lines hidden ---