]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
bonding: Fix another case of LACPDU not sent on slave
authorMahesh Bandewar <maheshb@google.com>
Mon, 30 Mar 2015 21:31:16 +0000 (14:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Mar 2015 21:14:26 +0000 (17:14 -0400)
When mii-mon discovers that the link is up, it will call
bond_3ad_handle_link_change() but we forget to add the LACP_ENABLED
flag when we discover the speed and duplex for the slave link are
normal.

Change-Id: Ie8b268ecfeea0f99bf9fdcd72706c0653f9d9e49
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_3ad.c

index 963d4de5b791b4f4b2b66cce975e6cb20a6f35d2..374696de796cd707c99cf150ec12349335d5f958 100644 (file)
@@ -2415,12 +2415,15 @@ void bond_3ad_handle_link_change(struct slave *slave, char link)
                port->actor_admin_port_key &= ~AD_SPEED_KEY_MASKS;
                port->actor_oper_port_key = port->actor_admin_port_key |=
                        (__get_link_speed(port) << 1);
+               if (port->actor_oper_port_key & AD_DUPLEX_KEY_MASKS)
+                       port->sm_vars |= AD_PORT_LACP_ENABLED;
        } else {
                /* link has failed */
                port->is_enabled = false;
                port->actor_admin_port_key &= ~AD_DUPLEX_KEY_MASKS;
                port->actor_oper_port_key = (port->actor_admin_port_key &=
                                             ~AD_SPEED_KEY_MASKS);
+               port->sm_vars &= ~AD_PORT_LACP_ENABLED;
        }
        netdev_dbg(slave->bond->dev, "Port %d changed link status to %s\n",
                   port->actor_port_number,