• Home
  • Raw
  • Download

Lines Matching refs:new_active

840 static void bond_mc_swap(struct bonding *bond, struct slave *new_active,  in bond_mc_swap()  argument
864 if (new_active) { in bond_mc_swap()
867 dev_set_promiscuity(new_active->dev, 1); in bond_mc_swap()
870 dev_set_allmulti(new_active->dev, 1); in bond_mc_swap()
874 dev_mc_add(new_active->dev, ha->addr); in bond_mc_swap()
887 struct slave *new_active, in bond_do_fail_over_mac() argument
900 if (new_active) { in bond_do_fail_over_mac()
901 memcpy(bond->dev->dev_addr, new_active->dev->dev_addr, in bond_do_fail_over_mac()
902 new_active->dev->addr_len); in bond_do_fail_over_mac()
916 if (!new_active) in bond_do_fail_over_mac()
923 memcpy(tmp_mac, new_active->dev->dev_addr, ETH_ALEN); in bond_do_fail_over_mac()
926 saddr.sa_family = new_active->dev->type; in bond_do_fail_over_mac()
932 rv = dev_set_mac_address(new_active->dev, &saddr); in bond_do_fail_over_mac()
935 bond->dev->name, -rv, new_active->dev->name); in bond_do_fail_over_mac()
948 bond->dev->name, -rv, new_active->dev->name); in bond_do_fail_over_mac()
989 struct slave *new_active, *old_active; in bond_find_best_slave() local
994 new_active = bond->curr_active_slave; in bond_find_best_slave()
996 if (!new_active) { /* there were no active slaves left */ in bond_find_best_slave()
998 new_active = bond->first_slave; in bond_find_best_slave()
1006 new_active = bond->primary_slave; in bond_find_best_slave()
1010 old_active = new_active; in bond_find_best_slave()
1012 bond_for_each_slave_from(bond, new_active, i, old_active) { in bond_find_best_slave()
1013 if (new_active->link == BOND_LINK_UP) { in bond_find_best_slave()
1014 return new_active; in bond_find_best_slave()
1015 } else if (new_active->link == BOND_LINK_BACK && in bond_find_best_slave()
1016 IS_UP(new_active->dev)) { in bond_find_best_slave()
1018 if (new_active->delay < mintime) { in bond_find_best_slave()
1019 mintime = new_active->delay; in bond_find_best_slave()
1020 bestslave = new_active; in bond_find_best_slave()
1059 void bond_change_active_slave(struct bonding *bond, struct slave *new_active) in bond_change_active_slave() argument
1063 if (old_active == new_active) in bond_change_active_slave()
1066 if (new_active) { in bond_change_active_slave()
1067 new_active->jiffies = jiffies; in bond_change_active_slave()
1069 if (new_active->link == BOND_LINK_BACK) { in bond_change_active_slave()
1072 bond->dev->name, new_active->dev->name, in bond_change_active_slave()
1073 (bond->params.updelay - new_active->delay) * bond->params.miimon); in bond_change_active_slave()
1076 new_active->delay = 0; in bond_change_active_slave()
1077 new_active->link = BOND_LINK_UP; in bond_change_active_slave()
1080 bond_3ad_handle_link_change(new_active, BOND_LINK_UP); in bond_change_active_slave()
1083 bond_alb_handle_link_change(bond, new_active, BOND_LINK_UP); in bond_change_active_slave()
1087 bond->dev->name, new_active->dev->name); in bond_change_active_slave()
1093 bond_mc_swap(bond, new_active, old_active); in bond_change_active_slave()
1096 bond_alb_handle_active_change(bond, new_active); in bond_change_active_slave()
1099 if (new_active) in bond_change_active_slave()
1100 bond_set_slave_active_flags(new_active); in bond_change_active_slave()
1102 bond->curr_active_slave = new_active; in bond_change_active_slave()
1109 if (new_active) { in bond_change_active_slave()
1112 bond_set_slave_active_flags(new_active); in bond_change_active_slave()
1115 bond_do_fail_over_mac(bond, new_active, in bond_change_active_slave()
1143 ((USES_PRIMARY(bond->params.mode) && new_active) || in bond_change_active_slave()
2204 struct slave *new_active = NULL; in bond_ioctl_change_active() local
2221 new_active = bond_get_slave_by_dev(bond, slave_dev); in bond_ioctl_change_active()
2226 if (new_active && (new_active == old_active)) { in bond_ioctl_change_active()
2231 if ((new_active) && in bond_ioctl_change_active()
2233 (new_active->link == BOND_LINK_UP) && in bond_ioctl_change_active()
2234 IS_UP(new_active->dev)) { in bond_ioctl_change_active()
2237 bond_change_active_slave(bond, new_active); in bond_ioctl_change_active()