diff options
Diffstat (limited to 'drivers/net/wan/n2.c')
-rw-r--r-- | drivers/net/wan/n2.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index 4122ca2cd07d..f3e80722ba1d 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c @@ -239,21 +239,18 @@ static int n2_siocdevprivate(struct net_device *dev, struct ifreq *ifr, return -EOPNOTSUPP; } -static int n2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +static int n2_ioctl(struct net_device *dev, struct if_settings *ifs) { const size_t size = sizeof(sync_serial_settings); sync_serial_settings new_line; - sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync; + sync_serial_settings __user *line = ifs->ifs_ifsu.sync; port_t *port = dev_to_port(dev); - if (cmd != SIOCWANDEV) - return hdlc_ioctl(dev, ifr, cmd); - - switch (ifr->ifr_settings.type) { + switch (ifs->type) { case IF_GET_IFACE: - ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL; - if (ifr->ifr_settings.size < size) { - ifr->ifr_settings.size = size; /* data size wanted */ + ifs->type = IF_IFACE_SYNC_SERIAL; + if (ifs->size < size) { + ifs->size = size; /* data size wanted */ return -ENOBUFS; } if (copy_to_user(line, &port->settings, size)) @@ -281,7 +278,7 @@ static int n2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) return 0; default: - return hdlc_ioctl(dev, ifr, cmd); + return hdlc_ioctl(dev, ifs); } } @@ -317,7 +314,7 @@ static const struct net_device_ops n2_ops = { .ndo_open = n2_open, .ndo_stop = n2_close, .ndo_start_xmit = hdlc_start_xmit, - .ndo_do_ioctl = n2_ioctl, + .ndo_siocwandev = n2_ioctl, .ndo_siocdevprivate = n2_siocdevprivate, }; |