aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/hdlc_raw_eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan/hdlc_raw_eth.c')
-rw-r--r--drivers/net/wan/hdlc_raw_eth.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wan/hdlc_raw_eth.c b/drivers/net/wan/hdlc_raw_eth.c
index a13fc3207520..49e68f5ca5f2 100644
--- a/drivers/net/wan/hdlc_raw_eth.c
+++ b/drivers/net/wan/hdlc_raw_eth.c
@@ -45,6 +45,7 @@ static int eth_tx(struct sk_buff *skb, struct net_device *dev)
45 45
46static struct hdlc_proto proto = { 46static struct hdlc_proto proto = {
47 .type_trans = eth_type_trans, 47 .type_trans = eth_type_trans,
48 .xmit = eth_tx,
48 .ioctl = raw_eth_ioctl, 49 .ioctl = raw_eth_ioctl,
49 .module = THIS_MODULE, 50 .module = THIS_MODULE,
50}; 51};
@@ -56,9 +57,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
56 const size_t size = sizeof(raw_hdlc_proto); 57 const size_t size = sizeof(raw_hdlc_proto);
57 raw_hdlc_proto new_settings; 58 raw_hdlc_proto new_settings;
58 hdlc_device *hdlc = dev_to_hdlc(dev); 59 hdlc_device *hdlc = dev_to_hdlc(dev);
59 int result; 60 int result, old_qlen;
60 int (*old_ch_mtu)(struct net_device *, int);
61 int old_qlen;
62 61
63 switch (ifr->ifr_settings.type) { 62 switch (ifr->ifr_settings.type) {
64 case IF_GET_PROTO: 63 case IF_GET_PROTO:
@@ -99,11 +98,8 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
99 if (result) 98 if (result)
100 return result; 99 return result;
101 memcpy(hdlc->state, &new_settings, size); 100 memcpy(hdlc->state, &new_settings, size);
102 dev->hard_start_xmit = eth_tx;
103 old_ch_mtu = dev->change_mtu;
104 old_qlen = dev->tx_queue_len; 101 old_qlen = dev->tx_queue_len;
105 ether_setup(dev); 102 ether_setup(dev);
106 dev->change_mtu = old_ch_mtu;
107 dev->tx_queue_len = old_qlen; 103 dev->tx_queue_len = old_qlen;
108 random_ether_addr(dev->dev_addr); 104 random_ether_addr(dev->dev_addr);
109 netif_dormant_off(dev); 105 netif_dormant_off(dev);