Lines Matching refs:ma

72 static void igmp6_join_group(struct ifmcaddr6 *ma);
73 static void igmp6_leave_group(struct ifmcaddr6 *ma);
944 struct ifmcaddr6 *ma, **map;
949 for (map = &idev->mc_list; (ma = *map) != NULL; map = &ma->next) {
950 if (ipv6_addr_equal(&ma->mca_addr, addr)) {
951 if (--ma->mca_users == 0) {
952 *map = ma->next;
955 igmp6_group_dropped(ma);
956 ip6_mc_clear_src(ma);
958 ma_put(ma);
1079 static void igmp6_group_queried(struct ifmcaddr6 *ma, unsigned long resptime)
1084 if (ipv6_addr_is_ll_all_nodes(&ma->mca_addr) ||
1085 IPV6_ADDR_MC_SCOPE(&ma->mca_addr) < IPV6_ADDR_SCOPE_LINKLOCAL)
1088 if (del_timer(&ma->mca_timer)) {
1089 refcount_dec(&ma->mca_refcnt);
1090 delay = ma->mca_timer.expires - jiffies;
1096 ma->mca_timer.expires = jiffies + delay;
1097 if (!mod_timer(&ma->mca_timer, jiffies + delay))
1098 refcount_inc(&ma->mca_refcnt);
1099 ma->mca_flags |= MAF_TIMER_RUNNING;
1336 struct ifmcaddr6 *ma;
1419 for (ma = idev->mc_list; ma; ma = ma->next) {
1420 spin_lock_bh(&ma->mca_lock);
1421 igmp6_group_queried(ma, max_delay);
1422 spin_unlock_bh(&ma->mca_lock);
1425 for (ma = idev->mc_list; ma; ma = ma->next) {
1426 if (!ipv6_addr_equal(group, &ma->mca_addr))
1428 spin_lock_bh(&ma->mca_lock);
1429 if (ma->mca_flags & MAF_TIMER_RUNNING) {
1432 ma->mca_flags &= ~MAF_GSQUERY;
1436 ma->mca_flags |= MAF_GSQUERY;
1438 ma->mca_flags &= ~MAF_GSQUERY;
1440 if (!(ma->mca_flags & MAF_GSQUERY) ||
1441 mld_marksources(ma, ntohs(mlh2->mld2q_nsrcs), mlh2->mld2q_srcs))
1442 igmp6_group_queried(ma, max_delay);
1443 spin_unlock_bh(&ma->mca_lock);
1455 struct ifmcaddr6 *ma;
1489 for (ma = idev->mc_list; ma; ma = ma->next) {
1490 if (ipv6_addr_equal(&ma->mca_addr, &mld->mld_mca)) {
1491 spin_lock(&ma->mca_lock);
1492 if (del_timer(&ma->mca_timer))
1493 refcount_dec(&ma->mca_refcnt);
1494 ma->mca_flags &= ~(MAF_LAST_REPORTER|MAF_TIMER_RUNNING);
1495 spin_unlock(&ma->mca_lock);
2404 static void igmp6_join_group(struct ifmcaddr6 *ma)
2408 if (ma->mca_flags & MAF_NOREPORT)
2411 igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT);
2413 delay = prandom_u32() % unsolicited_report_interval(ma->idev);
2415 spin_lock_bh(&ma->mca_lock);
2416 if (del_timer(&ma->mca_timer)) {
2417 refcount_dec(&ma->mca_refcnt);
2418 delay = ma->mca_timer.expires - jiffies;
2421 if (!mod_timer(&ma->mca_timer, jiffies + delay))
2422 refcount_inc(&ma->mca_refcnt);
2423 ma->mca_flags |= MAF_TIMER_RUNNING | MAF_LAST_REPORTER;
2424 spin_unlock_bh(&ma->mca_lock);
2446 static void igmp6_leave_group(struct ifmcaddr6 *ma)
2448 if (mld_in_v1_mode(ma->idev)) {
2449 if (ma->mca_flags & MAF_LAST_REPORTER)
2450 igmp6_send(&ma->mca_addr, ma->idev->dev,
2453 mld_add_delrec(ma->idev, ma);
2454 mld_ifc_event(ma->idev);
2491 struct ifmcaddr6 *ma = from_timer(ma, t, mca_timer);
2493 if (mld_in_v1_mode(ma->idev))
2494 igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT);
2496 mld_send_report(ma->idev, ma);
2498 spin_lock(&ma->mca_lock);
2499 ma->mca_flags |= MAF_LAST_REPORTER;
2500 ma->mca_flags &= ~MAF_TIMER_RUNNING;
2501 spin_unlock(&ma->mca_lock);
2502 ma_put(ma);