net: dsa: mv88e6xxx: remove all MACs when disabling a port
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 4 Sep 2015 18:34:16 +0000 (14:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Sep 2015 19:04:22 +0000 (12:04 -0700)
When we're moving a port from Learning or Forwarding state to Disabled
or Blocking or Listening state, remove all non-static MAC addresses
mapped to this port in the entire set of databases, not only one.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx.c

index 63407a1bf81ee29cbde346482941e9715e18cb28..30227ca2d5dbb79d92dcdc3a5c0abd3e0bad38d4 100644 (file)
@@ -1163,7 +1163,7 @@ static int mv88e6xxx_set_port_state(struct dsa_switch *ds, int port, u8 state)
                 */
                if (oldstate >= PORT_CONTROL_STATE_LEARNING &&
                    state <= PORT_CONTROL_STATE_BLOCKING) {
-                       ret = _mv88e6xxx_flush_fid(ds, ps->fid[port]);
+                       ret = _mv88e6xxx_atu_remove(ds, 0, port, false);
                        if (ret)
                                goto abort;
                }