• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/bonding/

Lines Matching refs:slave

132 	if (port->slave == NULL) {
136 return bond_get_bond_by_slave(port->slave);
143 * Return the port of the first slave in @bond, or %NULL if it can't be found.
158 * Return the port of the slave that is next in line of @port's slave in the
164 struct slave *slave = port->slave;
166 // If there's no bond for this port, or this is the last slave
167 if ((bond == NULL) || (slave->next == bond->first_slave)) {
171 return &(SLAVE_AD_INFO(slave->next).port);
178 * Return the aggregator of the first slave in @bond, or %NULL if it can't be
197 * Return the aggregator of the slave that is next in line of @aggregator's
198 * slave in the bond, or %NULL if it can't be found.
202 struct slave *slave = aggregator->slave;
203 struct bonding *bond = bond_get_bond_by_slave(slave);
205 // If there's no bond for this aggregator, or this is the last slave
206 if ((bond == NULL) || (slave->next == bond->first_slave)) {
210 return &(SLAVE_AD_INFO(slave->next).aggregator);
225 * __disable_port - disable the port's slave
231 bond_set_slave_inactive_flags(port->slave);
235 * __enable_port - enable the port's slave, if it's up
241 struct slave *slave = port->slave;
243 if ((slave->link == BOND_LINK_UP) && IS_UP(slave->dev)) {
244 bond_set_slave_active_flags(slave);
249 * __port_is_enabled - check if the port's slave is in active state
255 return(port->slave->state == BOND_STATE_ACTIVE);
298 spin_lock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
308 spin_unlock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
324 struct slave *slave = port->slave;
331 if (slave->link != BOND_LINK_UP) {
334 switch (slave->speed) {
372 struct slave *slave = port->slave;
378 if (slave->link != BOND_LINK_UP) {
381 switch (slave->duplex) {
406 spin_lock_init(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
832 struct slave *slave = port->slave;
842 skb->dev = slave->dev;
853 memcpy(lacpdu_header->hdr.h_source, slave->perm_hwaddr, ETH_ALEN);
873 struct slave *slave = port->slave;
885 skb->dev = slave->dev;
895 memcpy(marker_header->hdr.h_source, slave->perm_hwaddr, ETH_ALEN);
1140 port->slave->dev->master->name, port->slave->dev->name);
1324 port->slave->dev->master->name,
1326 port->slave->dev->name,
1401 port->slave->dev->master->name,
1402 port->actor_port_number, port->slave->dev->name);
1478 curr->slave->dev->master->name,
1488 return (netif_running(agg->slave->dev) &&
1489 netif_carrier_ok(agg->slave->dev));
1541 pr_debug("best ports %p slave %p %s\n",
1542 best->lag_ports, best->slave,
1543 best->slave ? best->slave->dev->name : "NULL");
1558 best->slave ? best->slave->dev->master->name : "NULL");
1594 if (origin->slave) {
1597 bond = bond_get_bond_by_slave(origin->slave);
1639 aggregator->slave = NULL;
1700 port->slave = NULL;
1834 * bond_3ad_bind_slave - initialize a slave's port
1835 * @slave: slave struct to work on
1840 int bond_3ad_bind_slave(struct slave *slave)
1842 struct bonding *bond = bond_get_bond_by_slave(slave);
1847 pr_err("%s: The slave %s is not attached to its bond\n",
1848 slave->dev->master->name, slave->dev->name);
1852 //check that the slave has not been intialized yet.
1853 if (SLAVE_AD_INFO(slave).port.slave != slave) {
1856 port = &(SLAVE_AD_INFO(slave).port);
1860 port->slave = slave;
1861 port->actor_port_number = SLAVE_AD_INFO(slave).id;
1887 aggregator = &(SLAVE_AD_INFO(slave).aggregator);
1893 aggregator->slave = slave;
1902 * bond_3ad_unbind_slave - deinitialize a slave's port
1903 * @slave: slave struct to work on
1909 void bond_3ad_unbind_slave(struct slave *slave)
1915 // find the aggregator related to this slave
1916 aggregator = &(SLAVE_AD_INFO(slave).aggregator);
1918 // find the port related to this slave
1919 port = &(SLAVE_AD_INFO(slave).port);
1921 // if slave is null, the whole port is not initialized
1922 if (!port->slave) {
1924 slave->dev->master->name, slave->dev->name);
1939 // the port related to this slave(thats ensure us that there is a
1959 aggregator->slave->dev->master->name);
1990 slave->dev->master->name);
1998 slave->dev->master->name);
2025 slave->dev->master->name);
2034 port->slave=NULL;
2072 if (!port->slave) {
2086 if (!port->slave) {
2113 * @slave: slave struct to work on
2120 static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u16 length)
2126 port = &(SLAVE_AD_INFO(slave).port);
2128 if (!port->slave) {
2129 pr_warning("%s: Warning: port of slave %s is uninitialized\n",
2130 slave->dev->name, slave->dev->master->name);
2166 * bond_3ad_adapter_speed_changed - handle a slave's speed change indication
2167 * @slave: slave struct to work on
2171 void bond_3ad_adapter_speed_changed(struct slave *slave)
2175 port = &(SLAVE_AD_INFO(slave).port);
2177 // if slave is null, the whole port is not initialized
2178 if (!port->slave) {
2180 slave->dev->master->name, slave->dev->name);
2193 * bond_3ad_adapter_duplex_changed - handle a slave's duplex change indication
2194 * @slave: slave struct to work on
2198 void bond_3ad_adapter_duplex_changed(struct slave *slave)
2202 port=&(SLAVE_AD_INFO(slave).port);
2204 // if slave is null, the whole port is not initialized
2205 if (!port->slave) {
2207 slave->dev->master->name, slave->dev->name);
2220 * bond_3ad_handle_link_change - handle a slave's link status change indication
2221 * @slave: slave struct to work on
2226 void bond_3ad_handle_link_change(struct slave *slave, char link)
2230 port = &(SLAVE_AD_INFO(slave).port);
2232 // if slave is null, the whole port is not initialized
2233 if (!port->slave) {
2235 slave->dev->master->name, slave->dev->name);
2320 struct slave *slave, *start_at;
2355 bond_for_each_slave(bond, slave, i) {
2356 struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator;
2367 pr_err("%s: Error: Couldn't find a slave to tx on for aggregator ID %d\n",
2372 start_at = slave;
2374 bond_for_each_slave_from(bond, slave, i, start_at) {
2376 struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator;
2382 if (SLAVE_IS_OK(slave) && agg && (slave_agg_id == agg_id)) {
2383 res = bond_dev_queue_xmit(bond, skb, slave->dev);
2400 struct slave *slave = NULL;
2410 slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev),
2412 if (!slave)
2415 bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len);