Commit 10e9aaa7 authored by François Romieu's avatar François Romieu Committed by Jeff Garzik

WAN drivers update 2/5:

s/SIOCDEVICE/SIOCWANDEV/
parent a36167db
......@@ -189,7 +189,7 @@ static int c101_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return 0;
}
#endif
if (cmd != SIOCDEVICE)
if (cmd != SIOCWANDEV)
return hdlc_ioctl(dev, ifr, cmd);
switch(ifr->ifr_settings.type) {
......
......@@ -1073,7 +1073,7 @@ static int dscc4_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
if (dev->flags & IFF_UP)
return -EBUSY;
if (cmd != SIOCDEVICE)
if (cmd != SIOCWANDEV)
return -EOPNOTSUPP;
switch(ifr->ifr_settings.type) {
......
......@@ -1240,7 +1240,7 @@ fst_ioctl ( struct net_device *dev, struct ifreq *ifr, int cmd )
return set_conf_from_info ( card, port, &info );
case SIOCDEVICE:
case SIOCWANDEV:
switch ( ifr->ifr_settings.type )
{
case IF_GET_IFACE:
......
......@@ -72,7 +72,7 @@ int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
hdlc_device *hdlc = dev_to_hdlc(dev);
unsigned int proto;
if (cmd != SIOCDEVICE)
if (cmd != SIOCWANDEV)
return -EINVAL;
switch(ifr->ifr_settings.type) {
......
......@@ -49,7 +49,7 @@ int hdlc_raw_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
if (ifr->ifr_settings.data_length < size)
return -ENOMEM; /* buffer too small */
if (copy_to_user(ifr->ifr_settings.data,
&hdlc->state.hdlc.settings, size))
&hdlc->state.raw_hdlc.settings, size))
return -EFAULT;
ifr->ifr_settings.data_length = size;
return 0;
......@@ -64,15 +64,15 @@ int hdlc_raw_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
if (ifr->ifr_settings.data_length != size)
return -ENOMEM; /* incorrect data length */
if (copy_from_user(&hdlc->state.hdlc.settings,
if (copy_from_user(&hdlc->state.raw_hdlc.settings,
ifr->ifr_settings.data, size))
return -EFAULT;
/* FIXME - put sanity checks here */
hdlc_detach(hdlc);
result=hdlc->attach(hdlc, hdlc->state.hdlc.settings.encoding,
hdlc->state.hdlc.settings.parity);
result=hdlc->attach(hdlc, hdlc->state.raw_hdlc.settings.encoding,
hdlc->state.raw_hdlc.settings.parity);
if (result) {
hdlc->proto = -1;
return result;
......
......@@ -260,7 +260,7 @@ static int n2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return 0;
}
#endif
if (cmd != SIOCDEVICE)
if (cmd != SIOCWANDEV)
return hdlc_ioctl(dev, ifr, cmd);
switch(ifr->ifr_settings.type) {
......
......@@ -53,7 +53,7 @@ typedef struct {
typedef struct {
unsigned short encoding;
unsigned short parity;
}hdlc_proto;
}raw_hdlc_proto;
#define LMI_DEFAULT 0 /* Default (current) setting */
......@@ -251,8 +251,8 @@ typedef struct hdlc_device_struct {
}cisco;
struct {
hdlc_proto settings;
}hdlc;
raw_hdlc_proto settings;
}raw_hdlc;
struct {
struct ppp_device pppdev;
......
......@@ -81,7 +81,7 @@
#define SIOCGMIIREG 0x8948 /* Read MII PHY register. */
#define SIOCSMIIREG 0x8949 /* Write MII PHY register. */
#define SIOCDEVICE 0x894A /* get/set netdev parameters */
#define SIOCWANDEV 0x894A /* get/set netdev parameters */
/* ARP cache control calls. */
/* 0x8950 - 0x8952 * obsolete calls, don't re-use */
......
......@@ -2111,7 +2111,7 @@ static int dev_ifsioc(struct ifreq *ifr, unsigned int cmd)
cmd == SIOCGMIIPHY ||
cmd == SIOCGMIIREG ||
cmd == SIOCSMIIREG ||
cmd == SIOCDEVICE) {
cmd == SIOCWANDEV) {
if (dev->do_ioctl) {
if (!netif_device_present(dev))
return -ENODEV;
......@@ -2277,7 +2277,7 @@ int dev_ioctl(unsigned int cmd, void *arg)
*/
default:
if (cmd == SIOCDEVICE ||
if (cmd == SIOCWANDEV ||
(cmd >= SIOCDEVPRIVATE &&
cmd <= SIOCDEVPRIVATE + 15)) {
dev_load(ifr.ifr_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment