Changeset 22044


Ignore:
Timestamp:
2010-07-02T11:55:57+02:00 (8 years ago)
Author:
juhosg
Message:

generic: rtl8366: enable VLAN ingress filtering

Location:
trunk/target/linux/generic/files/drivers/net/phy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/drivers/net/phy/rtl8366rb.c

    r21985 r22044  
    7070#define RTL8366RB_PHY_NO_OFFSET                 9 
    7171#define RTL8366RB_PHY_NO_MASK                   (0x1f << 9) 
     72 
     73#define RTL8366RB_VLAN_INGRESS_CTRL2_REG        0x037f 
    7274 
    7375/* LED control registers */ 
     
    289291        REG_WR(smi, RTL8366RB_SSCR1, RTL8366RB_PORT_ALL); 
    290292 
     293        /* 
     294         * discard VLAN tagged packets if the port is not a member of 
     295         * the VLAN with which the packets is associated. 
     296         */ 
     297        REG_WR(smi, RTL8366RB_VLAN_INGRESS_CTRL2_REG, RTL8366RB_PORT_ALL); 
     298 
    291299        /* don't drop packets whose DA has not been learned */ 
    292300        REG_RMW(smi, RTL8366RB_SSCR2, RTL8366RB_SSCR2_DROP_UNKNOWN_DA, 0); 
  • trunk/target/linux/generic/files/drivers/net/phy/rtl8366s.c

    r21985 r22044  
    113113#define RTL8366S_VLAN_MEMCONF_BASE              0x0016 
    114114 
     115#define RTL8366S_VLAN_MEMBERINGRESS_REG         0x0379 
    115116 
    116117#define RTL8366S_PORT_LINK_STATUS_BASE          0x0060 
     
    299300        /* disable auto ageing for all ports */ 
    300301        REG_WR(smi, RTL8366S_SSCR1, RTL8366S_PORT_ALL); 
     302 
     303        /* 
     304         * discard VLAN tagged packets if the port is not a member of 
     305         * the VLAN with which the packets is associated. 
     306         */ 
     307        REG_WR(smi, RTL8366S_VLAN_MEMBERINGRESS_REG, RTL8366S_PORT_ALL); 
    301308 
    302309        /* don't drop packets whose DA has not been learned */ 
Note: See TracChangeset for help on using the changeset viewer.