diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-03-03 12:23:51 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-03-04 19:37:20 +0100 |
commit | 83ddc3bfc2c1fc35f838bfe97a57b8f545ad98c1 (patch) | |
tree | 025bb28cb0cb1ba57264e395e5dfa1cb0340d99d /target | |
parent | f62d2b954970d40c577b70c22f522af046f26475 (diff) | |
download | upstream-83ddc3bfc2c1fc35f838bfe97a57b8f545ad98c1.tar.gz upstream-83ddc3bfc2c1fc35f838bfe97a57b8f545ad98c1.tar.bz2 upstream-83ddc3bfc2c1fc35f838bfe97a57b8f545ad98c1.zip |
ar71xx: fix mii bus irq assignment
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h | 2 | ||||
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h index 35318fb713..77ee5b36ec 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h @@ -116,7 +116,9 @@ struct ag71xx_ring { struct ag71xx_mdio { struct mii_bus *mii_bus; +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0) int mii_irq[PHY_MAX_ADDR]; +#endif void __iomem *mdio_base; struct ag71xx_mdio_platform_data *pdata; }; diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c index 2915476569..cf41aa8a3f 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c @@ -256,8 +256,6 @@ static int ag71xx_mdio_probe(struct platform_device *pdev) am->mii_bus->reset = ag71xx_mdio_reset; #if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0) am->mii_bus->irq = am->mii_irq; -#else - memcpy(am->mii_bus->irq, am->mii_irq, sizeof(am->mii_bus->irq)); #endif am->mii_bus->priv = am; am->mii_bus->parent = &pdev->dev; @@ -265,7 +263,7 @@ static int ag71xx_mdio_probe(struct platform_device *pdev) am->mii_bus->phy_mask = pdata->phy_mask; for (i = 0; i < PHY_MAX_ADDR; i++) - am->mii_irq[i] = PHY_POLL; + am->mii_bus->irq[i] = PHY_POLL; ag71xx_mdio_wr(am, AG71XX_REG_MAC_CFG1, 0); |