Argument of network device IOCTL should be unsigned long, just as will all other IOCTL methods.

This commit is contained in:
Gregory Nutt
2017-04-15 09:33:27 -06:00
parent bdd66ea6c7
commit 78bc1aa6bc
13 changed files with 91 additions and 63 deletions
+3 -3
View File
@@ -385,7 +385,7 @@ static int netdev_wifrioctl(FAR struct socket *psock, int cmd,
{
/* Just forward the IOCTL to the wireless driver */
ret = dev->d_ioctl(dev, cmd, ((long)(uintptr_t)req));
ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)req));
}
}
@@ -827,7 +827,7 @@ static int netdev_ifrioctl(FAR struct socket *psock, int cmd,
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));
ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)notify));
}
}
break;
@@ -841,7 +841,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, ((unsigned long)(uintptr_t)mii_data));
}
}
break;