summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/asix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/asix.c')
-rw-r--r--drivers/net/usb/asix.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index ca71b34e1..d148925b0 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1,7 +1,7 @@
#include <common.h>
#include <init.h>
#include <net.h>
-#include <miiphy.h>
+#include <miidev.h>
#include <usb/usb.h>
#include <usb/usbnet.h>
#include <errno.h>
@@ -231,8 +231,7 @@ static inline int asix_set_hw_mii(struct usbnet *dev)
return ret;
}
-static int asix_mdio_read(struct miiphy_device *mdev, uint8_t phy_id,
- uint8_t loc, uint16_t *val)
+static int asix_mdio_read(struct mii_device *mdev, int phy_id, int loc)
{
struct eth_device *eth = mdev->edev;
struct usbnet *dev = eth->priv;
@@ -246,13 +245,10 @@ static int asix_mdio_read(struct miiphy_device *mdev, uint8_t phy_id,
dev_dbg(&dev->edev.dev, "asix_mdio_read() phy_id=0x%02x, loc=0x%02x, returns=0x%04x",
phy_id, loc, le16_to_cpu(res));
- *val = le16_to_cpu(res);
-
- return 0;
+ return le16_to_cpu(res);
}
-static int asix_mdio_write(struct miiphy_device *mdev, uint8_t phy_id,
- uint8_t loc, uint16_t val)
+static int asix_mdio_write(struct mii_device *mdev, int phy_id, int loc, int val)
{
struct eth_device *eth = mdev->edev;
struct usbnet *dev = eth->priv;
@@ -473,13 +469,13 @@ static int asix_tx_fixup(struct usbnet *dev,
static int asix_init_mii(struct usbnet *dev)
{
- dev->miiphy.read = asix_mdio_read;
- dev->miiphy.write = asix_mdio_write;
- dev->miiphy.address = asix_get_phy_addr(dev);
- dev->miiphy.flags = 0;
- dev->miiphy.edev = &dev->edev;
+ dev->miidev.read = asix_mdio_read;
+ dev->miidev.write = asix_mdio_write;
+ dev->miidev.address = asix_get_phy_addr(dev);
+ dev->miidev.flags = 0;
+ dev->miidev.edev = &dev->edev;
- return miiphy_register(&dev->miiphy);
+ return mii_register(&dev->miidev);
}
static int ax88172_link_reset(struct usbnet *dev)
@@ -634,7 +630,7 @@ out:
static void asix_unbind(struct usbnet *dev)
{
- miiphy_unregister(&dev->miiphy);
+ mii_unregister(&dev->miidev);
}
static struct driver_info ax8817x_info = {