#define AR8X16_MAX_VLANS 128
#define AR8X16_PROBE_RETRIES 10
#define AR8X16_MAX_VLANS 128
#define AR8X16_PROBE_RETRIES 10
+ int (*hw_init)(struct ar8216_priv *priv);
}
static const struct ar8xxx_chip ar8216_chip = {
}
static const struct ar8xxx_chip ar8216_chip = {
+ .hw_init = ar8216_hw_init,
};
static const struct ar8xxx_chip ar8236_chip = {
};
static const struct ar8xxx_chip ar8236_chip = {
+ .hw_init = ar8236_hw_init,
};
static const struct ar8xxx_chip ar8316_chip = {
};
static const struct ar8xxx_chip ar8316_chip = {
+ .hw_init = ar8316_hw_init,
- ret = 0;
- if (priv->chip_type == AR8216)
- ret = ar8216_hw_init(priv);
- else if (priv->chip_type == AR8236)
- ret = ar8236_hw_init(priv);
- else if (priv->chip_type == AR8316)
- ret = ar8316_hw_init(priv);
-
+ ret = priv->chip->hw_init(priv);
if (ret)
goto err_free_priv;
if (ret)
goto err_free_priv;