return 0;
}
-static int rtl8380_init_mac(struct rtl838x_eth_priv *priv)
+static int rteth_838x_init_mac(struct rtl838x_eth_priv *priv)
{
pr_info("%s\n", __func__);
/* fix timer for EEE */
return 0;
}
-static int rtl8390_init_mac(struct rtl838x_eth_priv *priv)
+static int rteth_839x_init_mac(struct rtl838x_eth_priv *priv)
{
/* We will need to set-up EEE and the egress-rate limitation */
return 0;
return 0;
}
-static int rtl931x_chip_init(struct rtl838x_eth_priv *priv)
+static int rteth_931x_init_mac(struct rtl838x_eth_priv *priv)
{
pr_info("In %s\n", __func__);
.update_cntr = rtl838x_update_cntr,
.create_tx_header = rtl838x_create_tx_header,
.decode_tag = rtl838x_decode_tag,
+ .init_mac = &rteth_838x_init_mac,
.netdev_ops = &rteth_838x_netdev_ops,
};
.update_cntr = rtl839x_update_cntr,
.create_tx_header = rtl839x_create_tx_header,
.decode_tag = rtl839x_decode_tag,
+ .init_mac = &rteth_839x_init_mac,
.netdev_ops = &rteth_839x_netdev_ops,
};
.update_cntr = rtl930x_update_cntr,
.create_tx_header = rtl930x_create_tx_header,
.decode_tag = rtl930x_decode_tag,
+ .init_mac = &rteth_930x_init_mac,
.netdev_ops = &rteth_930x_netdev_ops,
};
.update_cntr = rtl931x_update_cntr,
.create_tx_header = rtl931x_create_tx_header,
.decode_tag = rtl931x_decode_tag,
+ .init_mac = &rteth_931x_init_mac,
.netdev_ops = &rteth_931x_netdev_ops,
};
return err;
}
- if (priv->r->family_id == RTL8380_FAMILY_ID)
- rtl8380_init_mac(priv);
- else if (priv->r->family_id == RTL8390_FAMILY_ID)
- rtl8390_init_mac(priv);
- else if (priv->r->family_id == RTL9300_FAMILY_ID)
- rteth_930x_init_mac(priv);
- else if (priv->r->family_id == RTL9310_FAMILY_ID)
- rtl931x_chip_init(priv);
+ priv->r->init_mac(priv);
/* Try to get mac address in the following order:
* 1) from device tree data