mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-30 18:49:23 +02:00
backfire: generic: rtl8366rb: use correct bitmasks in sanity checks (backport of r24930)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@24991 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
c1d2e98adb
commit
663164bc40
@ -458,8 +458,8 @@ static int rtl8366rb_set_vlan_4k(struct rtl8366_smi *smi,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (vlan4k->vid >= RTL8366RB_NUM_VIDS ||
|
if (vlan4k->vid >= RTL8366RB_NUM_VIDS ||
|
||||||
vlan4k->member > RTL8366RB_PORT_ALL ||
|
vlan4k->member > RTL8366RB_VLAN_MEMBER_MASK ||
|
||||||
vlan4k->untag > RTL8366RB_PORT_ALL ||
|
vlan4k->untag > RTL8366RB_VLAN_UNTAG_MASK ||
|
||||||
vlan4k->fid > RTL8366RB_FIDMAX)
|
vlan4k->fid > RTL8366RB_FIDMAX)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -525,8 +525,8 @@ static int rtl8366rb_set_vlan_mc(struct rtl8366_smi *smi, u32 index,
|
|||||||
if (index >= RTL8366RB_NUM_VLANS ||
|
if (index >= RTL8366RB_NUM_VLANS ||
|
||||||
vlanmc->vid >= RTL8366RB_NUM_VIDS ||
|
vlanmc->vid >= RTL8366RB_NUM_VIDS ||
|
||||||
vlanmc->priority > RTL8366RB_PRIORITYMAX ||
|
vlanmc->priority > RTL8366RB_PRIORITYMAX ||
|
||||||
vlanmc->member > RTL8366RB_PORT_ALL ||
|
vlanmc->member > RTL8366RB_VLAN_MEMBER_MASK ||
|
||||||
vlanmc->untag > RTL8366RB_PORT_ALL ||
|
vlanmc->untag > RTL8366RB_VLAN_UNTAG_MASK ||
|
||||||
vlanmc->fid > RTL8366RB_FIDMAX)
|
vlanmc->fid > RTL8366RB_FIDMAX)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user