1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

backfire: generic: rtl8366: enable VLAN ingress filtering (backport of r22044)

git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@22049 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg
2010-07-03 07:29:27 +00:00
parent be1b70d4b6
commit c56ed47f65
2 changed files with 15 additions and 0 deletions

View File

@@ -112,6 +112,7 @@
#define RTL8366S_VLAN_MEMCONF_BASE 0x0016
#define RTL8366S_VLAN_MEMBERINGRESS_REG 0x0379
#define RTL8366S_PORT_LINK_STATUS_BASE 0x0060
#define RTL8366S_PORT_STATUS_SPEED_MASK 0x0003
@@ -299,6 +300,12 @@ static int rtl8366s_hw_init(struct rtl8366_smi *smi)
/* disable auto ageing for all ports */
REG_WR(smi, RTL8366S_SSCR1, RTL8366S_PORT_ALL);
/*
* discard VLAN tagged packets if the port is not a member of
* the VLAN with which the packets is associated.
*/
REG_WR(smi, RTL8366S_VLAN_MEMBERINGRESS_REG, RTL8366S_PORT_ALL);
/* don't drop packets whose DA has not been learned */
REG_RMW(smi, RTL8366S_SSCR2, RTL8366S_SSCR2_DROP_UNKNOWN_DA, 0);