From dfb3103e2ae7179c4239e9d02d8c2bfcf33a51a8 Mon Sep 17 00:00:00 2001 From: juhosg Date: Fri, 14 Jan 2011 18:19:33 +0000 Subject: [PATCH] backfire: generic: rtl8366s: use correct bitmasks in sanity checks (backport of r24935) git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@24995 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/generic-2.6/files/drivers/net/phy/rtl8366s.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/generic-2.6/files/drivers/net/phy/rtl8366s.c b/target/linux/generic-2.6/files/drivers/net/phy/rtl8366s.c index f0c21f705..80a546a2d 100644 --- a/target/linux/generic-2.6/files/drivers/net/phy/rtl8366s.c +++ b/target/linux/generic-2.6/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;