void (*setup_port)(struct ar8216_priv *priv, int port, u32 egress,
u32 ingress, u32 members, u32 pvid);
int (*atu_flush)(struct ar8216_priv *priv);
void (*setup_port)(struct ar8216_priv *priv, int port, u32 egress,
u32 ingress, u32 members, u32 pvid);
int (*atu_flush)(struct ar8216_priv *priv);
+ void (*vtu_flush)(struct ar8216_priv *priv);
priv->write(priv, AR8216_REG_VTU, op);
}
priv->write(priv, AR8216_REG_VTU, op);
}
+static void
+ar8216_vtu_flush(struct ar8216_priv *priv)
+{
+ ar8216_vtu_op(priv, AR8216_VTU_OP_FLUSH, 0);
+}
+
static int
ar8216_atu_flush(struct ar8216_priv *priv)
{
static int
ar8216_atu_flush(struct ar8216_priv *priv)
{
mutex_lock(&priv->reg_mutex);
/* flush all vlan translation unit entries */
mutex_lock(&priv->reg_mutex);
/* flush all vlan translation unit entries */
- ar8216_vtu_op(priv, AR8216_VTU_OP_FLUSH, 0);
+ priv->chip->vtu_flush(priv);
memset(portmask, 0, sizeof(portmask));
if (!priv->init) {
memset(portmask, 0, sizeof(portmask));
if (!priv->init) {
.init_port = ar8216_init_port,
.setup_port = ar8216_setup_port,
.atu_flush = ar8216_atu_flush,
.init_port = ar8216_init_port,
.setup_port = ar8216_setup_port,
.atu_flush = ar8216_atu_flush,
+ .vtu_flush = ar8216_vtu_flush,
};
static const struct ar8xxx_chip ar8236_chip = {
};
static const struct ar8xxx_chip ar8236_chip = {
.init_port = ar8216_init_port,
.setup_port = ar8236_setup_port,
.atu_flush = ar8216_atu_flush,
.init_port = ar8216_init_port,
.setup_port = ar8236_setup_port,
.atu_flush = ar8216_atu_flush,
+ .vtu_flush = ar8216_vtu_flush,
};
static const struct ar8xxx_chip ar8316_chip = {
};
static const struct ar8xxx_chip ar8316_chip = {
.init_port = ar8216_init_port,
.setup_port = ar8216_setup_port,
.atu_flush = ar8216_atu_flush,
.init_port = ar8216_init_port,
.setup_port = ar8216_setup_port,
.atu_flush = ar8216_atu_flush,
+ .vtu_flush = ar8216_vtu_flush,