include/net/if.h: Fix some macro definitions overlooked in commit d105dc9b5e82a3b8710b44a81f05660410e1f22d. Also corrects the name of a structure: mii_ioctl_notify_s vs mii_iotcl_notify_s.
This commit is contained in:
parent
4b9abfa3c2
commit
732bef73a7
@ -1750,7 +1750,7 @@ static int imxrt_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -2761,7 +2761,7 @@ static int lpc43_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -2326,7 +2326,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -2362,7 +2362,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -2729,7 +2729,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -2317,7 +2317,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -3213,7 +3213,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -2873,7 +2873,7 @@ static int stm32_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -2975,7 +2975,7 @@ static int stm32_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -2874,7 +2874,7 @@ static int tiva_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
|||||||
#ifdef CONFIG_TIVA_PHY_INTERRUPTS
|
#ifdef CONFIG_TIVA_PHY_INTERRUPTS
|
||||||
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
case SIOCMIINOTIFY: /* Set up for PHY event notifications */
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *req = (struct mii_iotcl_notify_s *)((uintptr_t)arg);
|
struct mii_ioctl_notify_s *req = (struct mii_ioctl_notify_s *)((uintptr_t)arg);
|
||||||
|
|
||||||
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
ret = phy_notify_subscribe(dev->d_ifname, req->pid, &req->event);
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
@ -118,7 +118,7 @@
|
|||||||
* of PHY state changes.
|
* of PHY state changes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct mii_iotcl_notify_s
|
struct mii_ioctl_notify_s
|
||||||
{
|
{
|
||||||
pid_t pid; /* PID of the task to receive the signal. Zero means "this task" */
|
pid_t pid; /* PID of the task to receive the signal. Zero means "this task" */
|
||||||
struct sigevent event; /* Describe the way a task is to be notified */
|
struct sigevent event; /* Describe the way a task is to be notified */
|
||||||
@ -156,7 +156,7 @@ struct lifreq
|
|||||||
int lifru_count; /* Number of devices */
|
int lifru_count; /* Number of devices */
|
||||||
int lifru_mtu; /* MTU size */
|
int lifru_mtu; /* MTU size */
|
||||||
uint8_t lifru_flags; /* Interface flags */
|
uint8_t lifru_flags; /* Interface flags */
|
||||||
struct mii_iotcl_notify_s llfru_mii_notify; /* PHY event notification */
|
struct mii_ioctl_notify_s llfru_mii_notify; /* PHY event notification */
|
||||||
struct mii_ioctl_data_s lifru_mii_data; /* MII request data */
|
struct mii_ioctl_data_s lifru_mii_data; /* MII request data */
|
||||||
} lifr_ifru;
|
} lifr_ifru;
|
||||||
};
|
};
|
||||||
@ -170,8 +170,7 @@ struct lifreq
|
|||||||
#define lifr_count lifr_ifru.lifru_count /* Number of devices */
|
#define lifr_count lifr_ifru.lifru_count /* Number of devices */
|
||||||
#define lifr_flags lifr_ifru.lifru_flags /* interface flags */
|
#define lifr_flags lifr_ifru.lifru_flags /* interface flags */
|
||||||
#define lifr_mii_notify_pid lifr_ifru.llfru_mii_notify.pid /* PID to be notified */
|
#define lifr_mii_notify_pid lifr_ifru.llfru_mii_notify.pid /* PID to be notified */
|
||||||
#define lifr_mii_notify_signo lifr_ifru.llfru_mii_notify.signo /* Signal to notify with */
|
#define lifr_mii_notify_event lifr_ifru.llfru_mii_notify.event /* Describes notification */
|
||||||
#define lifr_mii_notify_arg lifr_ifru.llfru_mii_notify.arg /* sigval argument */
|
|
||||||
#define lifr_mii_phy_id lifr_ifru.lifru_mii_data.phy_id /* PHY device address */
|
#define lifr_mii_phy_id lifr_ifru.lifru_mii_data.phy_id /* PHY device address */
|
||||||
#define lifr_mii_reg_num lifr_ifru.lifru_mii_data.reg_num /* PHY register address */
|
#define lifr_mii_reg_num lifr_ifru.lifru_mii_data.reg_num /* PHY register address */
|
||||||
#define lifr_mii_val_in lifr_ifru.lifru_mii_data.val_in /* PHY input data */
|
#define lifr_mii_val_in lifr_ifru.lifru_mii_data.val_in /* PHY input data */
|
||||||
@ -207,7 +206,7 @@ struct ifreq
|
|||||||
int ifru_count; /* Number of devices */
|
int ifru_count; /* Number of devices */
|
||||||
int ifru_mtu; /* MTU size */
|
int ifru_mtu; /* MTU size */
|
||||||
uint8_t ifru_flags; /* Interface flags */
|
uint8_t ifru_flags; /* Interface flags */
|
||||||
struct mii_iotcl_notify_s ifru_mii_notify; /* PHY event notification */
|
struct mii_ioctl_notify_s ifru_mii_notify; /* PHY event notification */
|
||||||
struct mii_ioctl_data_s ifru_mii_data; /* MII request data */
|
struct mii_ioctl_data_s ifru_mii_data; /* MII request data */
|
||||||
} ifr_ifru;
|
} ifr_ifru;
|
||||||
};
|
};
|
||||||
@ -221,7 +220,7 @@ struct ifreq
|
|||||||
#define ifr_count ifr_ifru.ifru_count /* Number of devices */
|
#define ifr_count ifr_ifru.ifru_count /* Number of devices */
|
||||||
#define ifr_flags ifr_ifru.ifru_flags /* interface flags */
|
#define ifr_flags ifr_ifru.ifru_flags /* interface flags */
|
||||||
#define ifr_mii_notify_pid ifr_ifru.ifru_mii_notify.pid /* PID to be notified */
|
#define ifr_mii_notify_pid ifr_ifru.ifru_mii_notify.pid /* PID to be notified */
|
||||||
#define ifr_mii_notify_signo ifr_ifru.ifru_mii_notify.signo /* Signal to notify with */
|
#define ifr_mii_notify_event ifr_ifru.ifru_mii_notify.event /* Describes notification */
|
||||||
#define ifr_mii_notify_arg ifr_ifru.ifru_mii_notify.arg /* sigval argument */
|
#define ifr_mii_notify_arg ifr_ifru.ifru_mii_notify.arg /* sigval argument */
|
||||||
#define ifr_mii_phy_id ifr_ifru.ifru_mii_data.phy_id /* PHY device address */
|
#define ifr_mii_phy_id ifr_ifru.ifru_mii_data.phy_id /* PHY device address */
|
||||||
#define ifr_mii_reg_num ifr_ifru.ifru_mii_data.reg_num /* PHY register address */
|
#define ifr_mii_reg_num ifr_ifru.ifru_mii_data.reg_num /* PHY register address */
|
||||||
|
@ -1077,7 +1077,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
|
|||||||
dev = netdev_ifr_dev(req);
|
dev = netdev_ifr_dev(req);
|
||||||
if (dev && dev->d_ioctl)
|
if (dev && dev->d_ioctl)
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *notify = &req->ifr_ifru.ifru_mii_notify;
|
struct mii_ioctl_notify_s *notify = &req->ifr_ifru.ifru_mii_notify;
|
||||||
ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)notify));
|
ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)notify));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1540,7 +1540,7 @@ ssize_t net_ioctl_arglen(int cmd)
|
|||||||
return sizeof(struct rtentry);
|
return sizeof(struct rtentry);
|
||||||
|
|
||||||
case SIOCMIINOTIFY:
|
case SIOCMIINOTIFY:
|
||||||
return sizeof(struct mii_iotcl_notify_s);
|
return sizeof(struct mii_ioctl_notify_s);
|
||||||
|
|
||||||
case SIOCGMIIPHY:
|
case SIOCGMIIPHY:
|
||||||
case SIOCGMIIREG:
|
case SIOCGMIIREG:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user