summaryrefslogtreecommitdiff
path: root/nuttx/net/netdev/netdev_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/net/netdev/netdev_ioctl.c')
-rw-r--r--nuttx/net/netdev/netdev_ioctl.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/nuttx/net/netdev/netdev_ioctl.c b/nuttx/net/netdev/netdev_ioctl.c
index ea9f59fa4..1af66029b 100644
--- a/nuttx/net/netdev/netdev_ioctl.c
+++ b/nuttx/net/netdev/netdev_ioctl.c
@@ -425,6 +425,19 @@ static int netdev_ifrioctl(FAR struct socket *psock, int cmd,
#endif
#ifdef CONFIG_NETDEV_PHY_IOCTL
+#ifdef CONFIG_ARCH_PHY_INTERRUPT
+ case SIOCMIINOTIFY: /* Set up for PHY event notifications */
+ {
+ dev = netdev_ifrdev(req);
+ if (dev && dev->d_ioctl)
+ {
+ struct mii_iotcl_notify_s *notify = &req->ifr_ifru.ifru_mii_notify;
+ ret = dev->d_ioctl(dev, cmd, ((long)(uintptr_t)notify));
+ }
+ }
+ break;
+#endif
+
case SIOCGMIIPHY: /* Get address of MII PHY in use */
case SIOCGMIIREG: /* Get MII register via MDIO */
case SIOCSMIIREG: /* Set MII register via MDIO */
@@ -433,7 +446,7 @@ static int netdev_ifrioctl(FAR struct socket *psock, int cmd,
if (dev && dev->d_ioctl)
{
struct mii_ioctl_data_s *mii_data = &req->ifr_ifru.ifru_mii_data;
- ret = dev->d_ioctl(dev, cmd, ((long)(uintptr_t)mii_data);
+ ret = dev->d_ioctl(dev, cmd, ((long)(uintptr_t)mii_data));
}
}
break;