summaryrefslogtreecommitdiff
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-05-27 17:09:41 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-05-27 17:09:41 +0000
commit466ef3017307579de1bb529097427a009d562623 (patch)
tree6400708508e97f2697894fcccf8a463e46f48f07 /target/linux/generic/files
parentf567980d3863407ee97b686920c23135a182f6f3 (diff)
downloadmtk-20170518-466ef3017307579de1bb529097427a009d562623.zip
mtk-20170518-466ef3017307579de1bb529097427a009d562623.tar.gz
mtk-20170518-466ef3017307579de1bb529097427a009d562623.tar.bz2
generic: rtl8367: allow to use VLANs > 31
SVN-Revision: 31914
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8367.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8367.c b/target/linux/generic/files/drivers/net/phy/rtl8367.c
index d60af02..f4ef0c1 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8367.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8367.c
@@ -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;