generic: rtl8367: allow to use VLANs > 31
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 27 May 2012 17:09:41 +0000 (17:09 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 27 May 2012 17:09:41 +0000 (17:09 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31914 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/generic/files/drivers/net/phy/rtl8367.c

index d60af02..f4ef0c1 100644 (file)
@@ -1350,6 +1350,9 @@ static int rtl8367_is_vlan_valid(struct rtl8366_smi *smi, unsigned vlan)
 {
        unsigned max = RTL8367_NUM_VLANS;
 
+       if (smi->vlan4k_enabled)
+               max = RTL8367_NUM_VIDS - 1;
+
        if (vlan == 0 || vlan >= max)
                return 0;