Lines Matching full:ma

72 static void igmp6_join_group(struct ifmcaddr6 *ma);
73 static void igmp6_leave_group(struct ifmcaddr6 *ma);
944 struct ifmcaddr6 *ma, **map; in __ipv6_dev_mc_dec() local
949 for (map = &idev->mc_list; (ma = *map) != NULL; map = &ma->next) { in __ipv6_dev_mc_dec()
950 if (ipv6_addr_equal(&ma->mca_addr, addr)) { in __ipv6_dev_mc_dec()
951 if (--ma->mca_users == 0) { in __ipv6_dev_mc_dec()
952 *map = ma->next; in __ipv6_dev_mc_dec()
955 igmp6_group_dropped(ma); in __ipv6_dev_mc_dec()
956 ip6_mc_clear_src(ma); in __ipv6_dev_mc_dec()
958 ma_put(ma); in __ipv6_dev_mc_dec()
1079 static void igmp6_group_queried(struct ifmcaddr6 *ma, unsigned long resptime) in igmp6_group_queried() argument
1084 if (ipv6_addr_is_ll_all_nodes(&ma->mca_addr) || in igmp6_group_queried()
1085 IPV6_ADDR_MC_SCOPE(&ma->mca_addr) < IPV6_ADDR_SCOPE_LINKLOCAL) in igmp6_group_queried()
1088 if (del_timer(&ma->mca_timer)) { in igmp6_group_queried()
1089 refcount_dec(&ma->mca_refcnt); in igmp6_group_queried()
1090 delay = ma->mca_timer.expires - jiffies; in igmp6_group_queried()
1096 ma->mca_timer.expires = jiffies + delay; in igmp6_group_queried()
1097 if (!mod_timer(&ma->mca_timer, jiffies + delay)) in igmp6_group_queried()
1098 refcount_inc(&ma->mca_refcnt); in igmp6_group_queried()
1099 ma->mca_flags |= MAF_TIMER_RUNNING; in igmp6_group_queried()
1336 struct ifmcaddr6 *ma; in igmp6_event_query() local
1419 for (ma = idev->mc_list; ma; ma = ma->next) { in igmp6_event_query()
1420 spin_lock_bh(&ma->mca_lock); in igmp6_event_query()
1421 igmp6_group_queried(ma, max_delay); in igmp6_event_query()
1422 spin_unlock_bh(&ma->mca_lock); in igmp6_event_query()
1425 for (ma = idev->mc_list; ma; ma = ma->next) { in igmp6_event_query()
1426 if (!ipv6_addr_equal(group, &ma->mca_addr)) in igmp6_event_query()
1428 spin_lock_bh(&ma->mca_lock); in igmp6_event_query()
1429 if (ma->mca_flags & MAF_TIMER_RUNNING) { in igmp6_event_query()
1432 ma->mca_flags &= ~MAF_GSQUERY; in igmp6_event_query()
1436 ma->mca_flags |= MAF_GSQUERY; in igmp6_event_query()
1438 ma->mca_flags &= ~MAF_GSQUERY; in igmp6_event_query()
1440 if (!(ma->mca_flags & MAF_GSQUERY) || in igmp6_event_query()
1441 mld_marksources(ma, ntohs(mlh2->mld2q_nsrcs), mlh2->mld2q_srcs)) in igmp6_event_query()
1442 igmp6_group_queried(ma, max_delay); in igmp6_event_query()
1443 spin_unlock_bh(&ma->mca_lock); in igmp6_event_query()
1455 struct ifmcaddr6 *ma; in igmp6_event_report() local
1489 for (ma = idev->mc_list; ma; ma = ma->next) { in igmp6_event_report()
1490 if (ipv6_addr_equal(&ma->mca_addr, &mld->mld_mca)) { in igmp6_event_report()
1491 spin_lock(&ma->mca_lock); in igmp6_event_report()
1492 if (del_timer(&ma->mca_timer)) in igmp6_event_report()
1493 refcount_dec(&ma->mca_refcnt); in igmp6_event_report()
1494 ma->mca_flags &= ~(MAF_LAST_REPORTER|MAF_TIMER_RUNNING); in igmp6_event_report()
1495 spin_unlock(&ma->mca_lock); in igmp6_event_report()
2407 static void igmp6_join_group(struct ifmcaddr6 *ma) in igmp6_join_group() argument
2411 if (ma->mca_flags & MAF_NOREPORT) in igmp6_join_group()
2414 igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); in igmp6_join_group()
2416 delay = prandom_u32() % unsolicited_report_interval(ma->idev); in igmp6_join_group()
2418 spin_lock_bh(&ma->mca_lock); in igmp6_join_group()
2419 if (del_timer(&ma->mca_timer)) { in igmp6_join_group()
2420 refcount_dec(&ma->mca_refcnt); in igmp6_join_group()
2421 delay = ma->mca_timer.expires - jiffies; in igmp6_join_group()
2424 if (!mod_timer(&ma->mca_timer, jiffies + delay)) in igmp6_join_group()
2425 refcount_inc(&ma->mca_refcnt); in igmp6_join_group()
2426 ma->mca_flags |= MAF_TIMER_RUNNING | MAF_LAST_REPORTER; in igmp6_join_group()
2427 spin_unlock_bh(&ma->mca_lock); in igmp6_join_group()
2449 static void igmp6_leave_group(struct ifmcaddr6 *ma) in igmp6_leave_group() argument
2451 if (mld_in_v1_mode(ma->idev)) { in igmp6_leave_group()
2452 if (ma->mca_flags & MAF_LAST_REPORTER) in igmp6_leave_group()
2453 igmp6_send(&ma->mca_addr, ma->idev->dev, in igmp6_leave_group()
2456 mld_add_delrec(ma->idev, ma); in igmp6_leave_group()
2457 mld_ifc_event(ma->idev); in igmp6_leave_group()
2494 struct ifmcaddr6 *ma = from_timer(ma, t, mca_timer); in igmp6_timer_handler() local
2496 if (mld_in_v1_mode(ma->idev)) in igmp6_timer_handler()
2497 igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); in igmp6_timer_handler()
2499 mld_send_report(ma->idev, ma); in igmp6_timer_handler()
2501 spin_lock(&ma->mca_lock); in igmp6_timer_handler()
2502 ma->mca_flags |= MAF_LAST_REPORTER; in igmp6_timer_handler()
2503 ma->mca_flags &= ~MAF_TIMER_RUNNING; in igmp6_timer_handler()
2504 spin_unlock(&ma->mca_lock); in igmp6_timer_handler()
2505 ma_put(ma); in igmp6_timer_handler()