summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-01-08 11:28:35 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-01-08 11:28:35 +0000
commita4472870bdc31a2bfd326ecf70199b3e19c20a3d (patch)
treee4dd3a5616c9a444b8d055416fdbff3af9f4a62b /target
parent0de8689b7093ff40983f48a433efe93074741013 (diff)
downloadmtk-20170518-a4472870bdc31a2bfd326ecf70199b3e19c20a3d.zip
mtk-20170518-a4472870bdc31a2bfd326ecf70199b3e19c20a3d.tar.gz
mtk-20170518-a4472870bdc31a2bfd326ecf70199b3e19c20a3d.tar.bz2
generic: rtl8366rb: use correct bitmasks in sanity checks
SVN-Revision: 24930
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366rb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
index 55731ba..c991db8 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
@@ -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;