X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=blobdiff_plain;f=target%2Flinux%2Fgeneric-2.6%2Ffiles%2Fdrivers%2Fnet%2Fphy%2Frtl8366rb.c;h=420a5523cfbdbeee187c104f746c125f4f7059f9;hp=c006f73defd82780d8873d02c85e2799bef236af;hb=c56ed47f65d15e972d7c75ba4633984bb669ad3e;hpb=be1b70d4b621506bee4cf7a1ab07ce9716716812 diff --git a/target/linux/generic-2.6/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic-2.6/files/drivers/net/phy/rtl8366rb.c index c006f73de..420a5523c 100644 --- a/target/linux/generic-2.6/files/drivers/net/phy/rtl8366rb.c +++ b/target/linux/generic-2.6/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);