aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-01-08 18:04:04 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-01-08 18:04:04 +0000
commit6b0a12420a8cf04eef466a107a0f3f0aaae6b62f (patch)
treed72f15b830635a4b87565a48c10b18f1b7a74c01
parent72097d9b9847105118ef4300144a1ae28c863fc6 (diff)
downloadmaster-187ad058-6b0a12420a8cf04eef466a107a0f3f0aaae6b62f.tar.gz
master-187ad058-6b0a12420a8cf04eef466a107a0f3f0aaae6b62f.tar.bz2
master-187ad058-6b0a12420a8cf04eef466a107a0f3f0aaae6b62f.zip
generic: rtl8366s: use correct bitmasks in sanity checks
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24935 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366s.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366s.c b/target/linux/generic/files/drivers/net/phy/rtl8366s.c
index f0c21f7059..80a546a2d9 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366s.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366s.c
@@ -455,8 +455,8 @@ static int rtl8366s_set_vlan_4k(struct rtl8366_smi *smi,
int i;
if (vlan4k->vid >= RTL8366S_NUM_VIDS ||
- vlan4k->member > RTL8366S_PORT_ALL ||
- vlan4k->untag > RTL8366S_PORT_ALL ||
+ vlan4k->member > RTL8366S_VLAN_MEMBER_MASK ||
+ vlan4k->untag > RTL8366S_VLAN_UNTAG_MASK ||
vlan4k->fid > RTL8366S_FIDMAX)
return -EINVAL;
@@ -524,8 +524,8 @@ static int rtl8366s_set_vlan_mc(struct rtl8366_smi *smi, u32 index,
if (index >= RTL8366S_NUM_VLANS ||
vlanmc->vid >= RTL8366S_NUM_VIDS ||
vlanmc->priority > RTL8366S_PRIORITYMAX ||
- vlanmc->member > RTL8366S_PORT_ALL ||
- vlanmc->untag > RTL8366S_PORT_ALL ||
+ vlanmc->member > RTL8366S_VLAN_MEMBER_MASK ||
+ vlanmc->untag > RTL8366S_VLAN_UNTAG_MASK ||
vlanmc->fid > RTL8366S_FIDMAX)
return -EINVAL;