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