net: dsa: let drivers state that they need VLAN filtering while standalone
[linux-2.6-microblaze.git] / drivers / net / dsa / hirschmann / hellcreek.c
index 9fdcc4b..3faff95 100644 (file)
@@ -912,6 +912,7 @@ static int hellcreek_fdb_dump(struct dsa_switch *ds, int port,
 {
        struct hellcreek *hellcreek = ds->priv;
        u16 entries;
+       int ret = 0;
        size_t i;
 
        mutex_lock(&hellcreek->reg_lock);
@@ -943,12 +944,14 @@ static int hellcreek_fdb_dump(struct dsa_switch *ds, int port,
                if (!(entry.portmask & BIT(port)))
                        continue;
 
-               cb(entry.mac, 0, entry.is_static, data);
+               ret = cb(entry.mac, 0, entry.is_static, data);
+               if (ret)
+                       break;
        }
 
        mutex_unlock(&hellcreek->reg_lock);
 
-       return 0;
+       return ret;
 }
 
 static int hellcreek_vlan_filtering(struct dsa_switch *ds, int port,
@@ -1342,6 +1345,7 @@ static int hellcreek_setup(struct dsa_switch *ds)
         * filtering setups are not supported.
         */
        ds->vlan_filtering_is_global = true;
+       ds->needs_standalone_vlan_filtering = true;
 
        /* Intercept _all_ PTP multicast traffic */
        ret = hellcreek_setup_fdb(hellcreek);