Commit 61fd4dc7 authored by Alexander Viro's avatar Alexander Viro Committed by Stephen Hemminger

[wan hdlc] switch internal ioctl dispatch to net_device

Switched remaining ioctls to net_device, killed a bunch of hdlc_to_dev()
and killed hdlc_to_name().
parent b9c58884
...@@ -169,15 +169,15 @@ void hdlc_close(struct net_device *dev) ...@@ -169,15 +169,15 @@ void hdlc_close(struct net_device *dev)
#ifndef CONFIG_HDLC_RAW #ifndef CONFIG_HDLC_RAW
#define hdlc_raw_ioctl(hdlc, ifr) -ENOSYS #define hdlc_raw_ioctl(dev, ifr) -ENOSYS
#endif #endif
#ifndef CONFIG_HDLC_RAW_ETH #ifndef CONFIG_HDLC_RAW_ETH
#define hdlc_raw_eth_ioctl(hdlc, ifr) -ENOSYS #define hdlc_raw_eth_ioctl(dev, ifr) -ENOSYS
#endif #endif
#ifndef CONFIG_HDLC_PPP #ifndef CONFIG_HDLC_PPP
#define hdlc_ppp_ioctl(hdlc, ifr) -ENOSYS #define hdlc_ppp_ioctl(dev, ifr) -ENOSYS
#endif #endif
#ifndef CONFIG_HDLC_CISCO #ifndef CONFIG_HDLC_CISCO
...@@ -216,9 +216,9 @@ int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -216,9 +216,9 @@ int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
} }
switch(proto) { switch(proto) {
case IF_PROTO_HDLC: return hdlc_raw_ioctl(hdlc, ifr); case IF_PROTO_HDLC: return hdlc_raw_ioctl(dev, ifr);
case IF_PROTO_HDLC_ETH: return hdlc_raw_eth_ioctl(hdlc, ifr); case IF_PROTO_HDLC_ETH: return hdlc_raw_eth_ioctl(dev, ifr);
case IF_PROTO_PPP: return hdlc_ppp_ioctl(hdlc, ifr); case IF_PROTO_PPP: return hdlc_ppp_ioctl(dev, ifr);
case IF_PROTO_CISCO: return hdlc_cisco_ioctl(dev, ifr); case IF_PROTO_CISCO: return hdlc_cisco_ioctl(dev, ifr);
case IF_PROTO_FR: return hdlc_fr_ioctl(dev, ifr); case IF_PROTO_FR: return hdlc_fr_ioctl(dev, ifr);
case IF_PROTO_X25: return hdlc_x25_ioctl(dev, ifr); case IF_PROTO_X25: return hdlc_x25_ioctl(dev, ifr);
......
...@@ -74,9 +74,9 @@ static unsigned short ppp_type_trans(struct sk_buff *skb, ...@@ -74,9 +74,9 @@ static unsigned short ppp_type_trans(struct sk_buff *skb,
int hdlc_ppp_ioctl(hdlc_device *hdlc, struct ifreq *ifr) int hdlc_ppp_ioctl(struct net_device *dev, struct ifreq *ifr)
{ {
struct net_device *dev = hdlc_to_dev(hdlc); hdlc_device *hdlc = dev_to_hdlc(dev);
int result; int result;
switch (ifr->ifr_settings.type) { switch (ifr->ifr_settings.type) {
......
...@@ -32,12 +32,12 @@ static unsigned short raw_type_trans(struct sk_buff *skb, ...@@ -32,12 +32,12 @@ static unsigned short raw_type_trans(struct sk_buff *skb,
int hdlc_raw_ioctl(hdlc_device *hdlc, struct ifreq *ifr) int hdlc_raw_ioctl(struct net_device *dev, struct ifreq *ifr)
{ {
raw_hdlc_proto *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc; raw_hdlc_proto *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc;
const size_t size = sizeof(raw_hdlc_proto); const size_t size = sizeof(raw_hdlc_proto);
raw_hdlc_proto new_settings; raw_hdlc_proto new_settings;
struct net_device *dev = hdlc_to_dev(hdlc); hdlc_device *hdlc = dev_to_hdlc(dev);
int result; int result;
switch (ifr->ifr_settings.type) { switch (ifr->ifr_settings.type) {
......
...@@ -44,12 +44,12 @@ static int eth_tx(struct sk_buff *skb, struct net_device *dev) ...@@ -44,12 +44,12 @@ static int eth_tx(struct sk_buff *skb, struct net_device *dev)
} }
int hdlc_raw_eth_ioctl(hdlc_device *hdlc, struct ifreq *ifr) int hdlc_raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
{ {
raw_hdlc_proto *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc; raw_hdlc_proto *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc;
const size_t size = sizeof(raw_hdlc_proto); const size_t size = sizeof(raw_hdlc_proto);
raw_hdlc_proto new_settings; raw_hdlc_proto new_settings;
struct net_device *dev = hdlc_to_dev(hdlc); hdlc_device *hdlc = dev_to_hdlc(dev);
int result; int result;
void *old_ch_mtu; void *old_ch_mtu;
int old_qlen; int old_qlen;
......
...@@ -171,10 +171,10 @@ typedef struct hdlc_device_struct { ...@@ -171,10 +171,10 @@ typedef struct hdlc_device_struct {
int hdlc_raw_ioctl(hdlc_device *hdlc, struct ifreq *ifr); int hdlc_raw_ioctl(struct net_device *dev, struct ifreq *ifr);
int hdlc_raw_eth_ioctl(hdlc_device *hdlc, struct ifreq *ifr); int hdlc_raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr);
int hdlc_cisco_ioctl(struct net_device *dev, struct ifreq *ifr); int hdlc_cisco_ioctl(struct net_device *dev, struct ifreq *ifr);
int hdlc_ppp_ioctl(hdlc_device *hdlc, struct ifreq *ifr); int hdlc_ppp_ioctl(struct net_device *dev, struct ifreq *ifr);
int hdlc_fr_ioctl(struct net_device *dev, struct ifreq *ifr); int hdlc_fr_ioctl(struct net_device *dev, struct ifreq *ifr);
int hdlc_x25_ioctl(struct net_device *dev, struct ifreq *ifr); int hdlc_x25_ioctl(struct net_device *dev, struct ifreq *ifr);
...@@ -207,12 +207,6 @@ static __inline__ pvc_device* dev_to_pvc(struct net_device *dev) ...@@ -207,12 +207,6 @@ static __inline__ pvc_device* dev_to_pvc(struct net_device *dev)
} }
static __inline__ const char *hdlc_to_name(hdlc_device *hdlc)
{
return hdlc_to_dev(hdlc)->name;
}
static __inline__ void debug_frame(const struct sk_buff *skb) static __inline__ void debug_frame(const struct sk_buff *skb)
{ {
int i; int i;
......
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