Lines Matching defs:vid
99 static int ksz9477_get_vlan_table(struct ksz_device *dev, u16 vid,
106 ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & VLAN_INDEX_M);
128 static int ksz9477_set_vlan_table(struct ksz_device *dev, u16 vid,
139 ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & VLAN_INDEX_M);
152 dev->vlan_cache[vid].table[0] = vlan_table[0];
153 dev->vlan_cache[vid].table[1] = vlan_table[1];
154 dev->vlan_cache[vid].table[2] = vlan_table[2];
522 u16 vid;
525 for (vid = vlan->vid_begin; vid <= vlan->vid_end; vid++) {
526 if (ksz9477_get_vlan_table(dev, vid, vlan_table)) {
531 vlan_table[0] = VLAN_VALID | (vid & VLAN_FID_M);
540 if (ksz9477_set_vlan_table(dev, vid, vlan_table)) {
547 ksz_pwrite16(dev, port, REG_PORT_DEFAULT_VID, vid);
557 u16 vid;
563 for (vid = vlan->vid_begin; vid <= vlan->vid_end; vid++) {
564 if (ksz9477_get_vlan_table(dev, vid, vlan_table)) {
571 if (pvid == vid)
577 if (ksz9477_set_vlan_table(dev, vid, vlan_table)) {
589 const unsigned char *addr, u16 vid)
598 /* find any entry with mac & vid */
599 data = vid << ALU_FID_INDEX_S;
623 if (vid)
625 alu_table[2] = (vid << ALU_V_FID_S);
646 const unsigned char *addr, u16 vid)
655 /* read any entry with mac & vid */
656 data = vid << ALU_FID_INDEX_S;
821 /* check this has same vid & mac address */
822 if (((static_table[2] >> ALU_V_FID_S) == mdb->vid) &&
841 if (mdb->vid)
843 static_table[2] = (mdb->vid << ALU_V_FID_S);
893 /* check this has same vid & mac address */
895 if (((static_table[2] >> ALU_V_FID_S) == mdb->vid) &&