generic: rtl8366s: use correct bitmasks in sanity checks
authorGabor Juhos <juhosg@openwrt.org>
Sat, 8 Jan 2011 18:04:04 +0000 (18:04 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 8 Jan 2011 18:04:04 +0000 (18:04 +0000)
SVN-Revision: 24935

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

index f0c21f70592ca0762359843315879f442b50e9cd..80a546a2d96bc48b9a63e015dd0381b745b030d2 100644 (file)
@@ -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;