aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-07-02 09:55:57 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-07-02 09:55:57 +0000
commitd4a858f5a66cc66ab268139f4f2eb24011c77210 (patch)
treef84b75bd7e2bfb705dc66e0b77ed371e0b450009 /target/linux/generic/files/drivers/net/phy/rtl8366rb.c
parentb81b30cef718ce12ae193b0cf7b33ebfddb23e0d (diff)
downloadmaster-187ad058-d4a858f5a66cc66ab268139f4f2eb24011c77210.tar.gz
master-187ad058-d4a858f5a66cc66ab268139f4f2eb24011c77210.tar.bz2
master-187ad058-d4a858f5a66cc66ab268139f4f2eb24011c77210.zip
generic: rtl8366: enable VLAN ingress filtering
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22044 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/rtl8366rb.c')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366rb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
index c006f73def..420a5523cf 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
@@ -70,6 +70,8 @@
#define RTL8366RB_PHY_NO_OFFSET 9
#define RTL8366RB_PHY_NO_MASK (0x1f << 9)
+#define RTL8366RB_VLAN_INGRESS_CTRL2_REG 0x037f
+
/* LED control registers */
#define RTL8366RB_LED_BLINKRATE_REG 0x0430
#define RTL8366RB_LED_BLINKRATE_BIT 0
@@ -288,6 +290,12 @@ static int rtl8366rb_hw_init(struct rtl8366_smi *smi)
/* disable auto ageing for all ports */
REG_WR(smi, RTL8366RB_SSCR1, RTL8366RB_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, RTL8366RB_VLAN_INGRESS_CTRL2_REG, RTL8366RB_PORT_ALL);
+
/* don't drop packets whose DA has not been learned */
REG_RMW(smi, RTL8366RB_SSCR2, RTL8366RB_SSCR2_DROP_UNKNOWN_DA, 0);