/* Purge the ATU entry only if no port is using it anymore */
if (state == GLOBAL_ATU_DATA_STATE_UNUSED) {
- entry.portv_trunkid &= ~BIT(port);
- if (!entry.portv_trunkid)
+ entry.portvec &= ~BIT(port);
+ if (!entry.portvec)
entry.state = GLOBAL_ATU_DATA_STATE_UNUSED;
} else {
- entry.portv_trunkid |= BIT(port);
+ entry.portvec |= BIT(port);
entry.state = state;
}
if (addr.state == GLOBAL_ATU_DATA_STATE_UNUSED)
break;
- if (addr.trunk || (addr.portv_trunkid & BIT(port)) == 0)
+ if (addr.trunk || (addr.portvec & BIT(port)) == 0)
continue;
if (obj->id == SWITCHDEV_OBJ_ID_PORT_FDB) {
if (val & GLOBAL_ATU_DATA_TRUNK)
entry->trunk = true;
- entry->portv_trunkid = (val >> 4) & mv88e6xxx_port_mask(chip);
+ entry->portvec = (val >> 4) & mv88e6xxx_port_mask(chip);
}
return 0;
if (entry->trunk)
data |= GLOBAL_ATU_DATA_TRUNK;
- data |= (entry->portv_trunkid & mv88e6xxx_port_mask(chip)) << 4;
+ data |= (entry->portvec & mv88e6xxx_port_mask(chip)) << 4;
}
return mv88e6xxx_g1_write(chip, GLOBAL_ATU_DATA, data);
shift = bitmap_weight(&mask, 16);
entry.state = 0xf, /* Full EntryState means Move */
- entry.portv_trunkid = from_port & mask;
- entry.portv_trunkid |= (to_port & mask) << shift;
+ entry.portvec = from_port & mask;
+ entry.portvec |= (to_port & mask) << shift;
return mv88e6xxx_g1_atu_flushmove(chip, fid, &entry, all);
}