#define AR8XXX_CAP_GIGE BIT(0)
#define AR8XXX_CAP_MIB_COUNTERS BIT(1)
+#define AR8XXX_NUM_PHYS 5
+
enum {
AR8XXX_VER_AR8216 = 0x01,
AR8XXX_VER_AR8236 = 0x03,
/* Initialize the PHYs */
bus = priv->mii_bus;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < AR8XXX_NUM_PHYS; i++) {
mdiobus_write(bus, i, MII_ADVERTISE,
ADVERTISE_ALL | ADVERTISE_PAUSE_CAP |
ADVERTISE_PAUSE_ASYM);
/* Initialize the ports */
bus = priv->mii_bus;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < AR8XXX_NUM_PHYS; i++) {
/* initialize the port itself */
mdiobus_write(bus, i, MII_ADVERTISE,
ADVERTISE_ALL | ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
ar8327_leds_init(priv);
bus = priv->mii_bus;
- for (i = 0; i < AR8327_NUM_PHYS; i++) {
+ for (i = 0; i < AR8XXX_NUM_PHYS; i++) {
ar8327_phy_fixup(priv, i);
/* start aneg on the PHY */