backfire: generic: rtl8366rb: use correct bitmasks in sanity checks (backport of...
authorGabor Juhos <juhosg@openwrt.org>
Fri, 14 Jan 2011 18:19:18 +0000 (18:19 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Fri, 14 Jan 2011 18:19:18 +0000 (18:19 +0000)
SVN-Revision: 24991

target/linux/generic-2.6/files/drivers/net/phy/rtl8366rb.c

index 55731baf31c6f67eebbafebc692799fd1aa8dce7..c991db8c16c5118e401474a13f7abd876ddf05d5 100644 (file)
@@ -458,8 +458,8 @@ static int rtl8366rb_set_vlan_4k(struct rtl8366_smi *smi,
        int i;
 
        if (vlan4k->vid >= RTL8366RB_NUM_VIDS ||
-           vlan4k->member > RTL8366RB_PORT_ALL ||
-           vlan4k->untag > RTL8366RB_PORT_ALL ||
+           vlan4k->member > RTL8366RB_VLAN_MEMBER_MASK ||
+           vlan4k->untag > RTL8366RB_VLAN_UNTAG_MASK ||
            vlan4k->fid > RTL8366RB_FIDMAX)
                return -EINVAL;
 
@@ -525,8 +525,8 @@ static int rtl8366rb_set_vlan_mc(struct rtl8366_smi *smi, u32 index,
        if (index >= RTL8366RB_NUM_VLANS ||
            vlanmc->vid >= RTL8366RB_NUM_VIDS ||
            vlanmc->priority > RTL8366RB_PRIORITYMAX ||
-           vlanmc->member > RTL8366RB_PORT_ALL ||
-           vlanmc->untag > RTL8366RB_PORT_ALL ||
+           vlanmc->member > RTL8366RB_VLAN_MEMBER_MASK ||
+           vlanmc->untag > RTL8366RB_VLAN_UNTAG_MASK ||
            vlanmc->fid > RTL8366RB_FIDMAX)
                return -EINVAL;