int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
 {
        struct b53_device *dev = ds->priv;
-       u16 pvid, new_pvid;
-
-       b53_read16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), &pvid);
-       if (!vlan_filtering) {
-               /* Filtering is currently enabled, use the default PVID since
-                * the bridge does not expect tagging anymore
-                */
-               dev->ports[port].pvid = pvid;
-               new_pvid = b53_default_pvid(dev);
-       } else {
-               /* Filtering is currently disabled, restore the previous PVID */
-               new_pvid = dev->ports[port].pvid;
-       }
-
-       if (pvid != new_pvid)
-               b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port),
-                           new_pvid);
 
        b53_enable_vlan(dev, dev->vlan_enabled, vlan_filtering);
 
        dev->priv = priv;
        dev->ops = ops;
        ds->ops = &b53_switch_ops;
+       ds->configure_vlan_while_not_filtering = true;
+       dev->vlan_enabled = ds->configure_vlan_while_not_filtering;
        mutex_init(&dev->reg_mutex);
        mutex_init(&dev->stats_mutex);
 
 
        /* Remove Broadcom tag and update checksum */
        skb_pull_rcsum(skb, BRCM_TAG_LEN);
 
+       /* Set the MAC header to where it should point for
+        * dsa_untag_bridge_pvid() to parse the correct VLAN header.
+        */
+       skb_set_mac_header(skb, -ETH_HLEN);
+
        skb->offload_fwd_mark = 1;
 
        return skb;
                nskb->data - ETH_HLEN - BRCM_TAG_LEN,
                2 * ETH_ALEN);
 
-       return nskb;
+       return dsa_untag_bridge_pvid(nskb);
 }
 
 static const struct dsa_device_ops brcm_netdev_ops = {
                                            struct net_device *dev,
                                            struct packet_type *pt)
 {
+       struct sk_buff *nskb;
+
        /* tag is prepended to the packet */
-       return brcm_tag_rcv_ll(skb, dev, pt, ETH_HLEN);
+       nskb = brcm_tag_rcv_ll(skb, dev, pt, ETH_HLEN);
+       if (!nskb)
+               return nskb;
+
+       return dsa_untag_bridge_pvid(nskb);
 }
 
 static const struct dsa_device_ops brcm_prepend_netdev_ops = {