More of the PHY event notification logic change: Fix some compile errors when full feature is enabled; Add some missing ioctol logic

This commit is contained in:
Gregory Nutt
2014-08-16 15:04:09 -06:00
parent 928952bec6
commit 057af36c1d
16 changed files with 112 additions and 87 deletions
+14 -1
View File
@@ -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;