Lines Matching refs:ma
73 static void igmp6_join_group(struct ifmcaddr6 *ma);
74 static void igmp6_leave_group(struct ifmcaddr6 *ma);
966 struct ifmcaddr6 *ma, __rcu **map; in __ipv6_dev_mc_dec() local
972 (ma = mc_dereference(*map, idev)); in __ipv6_dev_mc_dec()
973 map = &ma->next) { in __ipv6_dev_mc_dec()
974 if (ipv6_addr_equal(&ma->mca_addr, addr)) { in __ipv6_dev_mc_dec()
975 if (--ma->mca_users == 0) { in __ipv6_dev_mc_dec()
976 *map = ma->next; in __ipv6_dev_mc_dec()
978 igmp6_group_dropped(ma); in __ipv6_dev_mc_dec()
979 ip6_mc_clear_src(ma); in __ipv6_dev_mc_dec()
982 ma_put(ma); in __ipv6_dev_mc_dec()
1118 static void igmp6_group_queried(struct ifmcaddr6 *ma, unsigned long resptime) in igmp6_group_queried() argument
1123 if (ipv6_addr_is_ll_all_nodes(&ma->mca_addr) || in igmp6_group_queried()
1124 IPV6_ADDR_MC_SCOPE(&ma->mca_addr) < IPV6_ADDR_SCOPE_LINKLOCAL) in igmp6_group_queried()
1127 if (cancel_delayed_work(&ma->mca_work)) { in igmp6_group_queried()
1128 refcount_dec(&ma->mca_refcnt); in igmp6_group_queried()
1129 delay = ma->mca_work.timer.expires - jiffies; in igmp6_group_queried()
1135 if (!mod_delayed_work(mld_wq, &ma->mca_work, delay)) in igmp6_group_queried()
1136 refcount_inc(&ma->mca_refcnt); in igmp6_group_queried()
1137 ma->mca_flags |= MAF_TIMER_RUNNING; in igmp6_group_queried()
1399 struct ifmcaddr6 *ma; in __mld_query_work() local
1476 for_each_mc_mclock(idev, ma) { in __mld_query_work()
1477 igmp6_group_queried(ma, max_delay); in __mld_query_work()
1480 for_each_mc_mclock(idev, ma) { in __mld_query_work()
1481 if (!ipv6_addr_equal(group, &ma->mca_addr)) in __mld_query_work()
1483 if (ma->mca_flags & MAF_TIMER_RUNNING) { in __mld_query_work()
1486 ma->mca_flags &= ~MAF_GSQUERY; in __mld_query_work()
1490 ma->mca_flags |= MAF_GSQUERY; in __mld_query_work()
1492 ma->mca_flags &= ~MAF_GSQUERY; in __mld_query_work()
1494 if (!(ma->mca_flags & MAF_GSQUERY) || in __mld_query_work()
1495 mld_marksources(ma, ntohs(mlh2->mld2q_nsrcs), mlh2->mld2q_srcs)) in __mld_query_work()
1496 igmp6_group_queried(ma, max_delay); in __mld_query_work()
1564 struct ifmcaddr6 *ma; in __mld_report_work() local
1596 for_each_mc_mclock(idev, ma) { in __mld_report_work()
1597 if (ipv6_addr_equal(&ma->mca_addr, &mld->mld_mca)) { in __mld_report_work()
1598 if (cancel_delayed_work(&ma->mca_work)) in __mld_report_work()
1599 refcount_dec(&ma->mca_refcnt); in __mld_report_work()
1600 ma->mca_flags &= ~(MAF_LAST_REPORTER | in __mld_report_work()
2568 static void igmp6_join_group(struct ifmcaddr6 *ma) in igmp6_join_group() argument
2572 if (ma->mca_flags & MAF_NOREPORT) in igmp6_join_group()
2575 igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); in igmp6_join_group()
2577 delay = prandom_u32_max(unsolicited_report_interval(ma->idev)); in igmp6_join_group()
2579 if (cancel_delayed_work(&ma->mca_work)) { in igmp6_join_group()
2580 refcount_dec(&ma->mca_refcnt); in igmp6_join_group()
2581 delay = ma->mca_work.timer.expires - jiffies; in igmp6_join_group()
2584 if (!mod_delayed_work(mld_wq, &ma->mca_work, delay)) in igmp6_join_group()
2585 refcount_inc(&ma->mca_refcnt); in igmp6_join_group()
2586 ma->mca_flags |= MAF_TIMER_RUNNING | MAF_LAST_REPORTER; in igmp6_join_group()
2619 static void igmp6_leave_group(struct ifmcaddr6 *ma) in igmp6_leave_group() argument
2621 if (mld_in_v1_mode(ma->idev)) { in igmp6_leave_group()
2622 if (ma->mca_flags & MAF_LAST_REPORTER) { in igmp6_leave_group()
2623 igmp6_send(&ma->mca_addr, ma->idev->dev, in igmp6_leave_group()
2627 mld_add_delrec(ma->idev, ma); in igmp6_leave_group()
2628 mld_ifc_event(ma->idev); in igmp6_leave_group()
2677 struct ifmcaddr6 *ma = container_of(to_delayed_work(work), in mld_mca_work() local
2680 mutex_lock(&ma->idev->mc_lock); in mld_mca_work()
2681 if (mld_in_v1_mode(ma->idev)) in mld_mca_work()
2682 igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); in mld_mca_work()
2684 mld_send_report(ma->idev, ma); in mld_mca_work()
2685 ma->mca_flags |= MAF_LAST_REPORTER; in mld_mca_work()
2686 ma->mca_flags &= ~MAF_TIMER_RUNNING; in mld_mca_work()
2687 mutex_unlock(&ma->idev->mc_lock); in mld_mca_work()
2689 ma_put(ma); in mld_mca_work()