aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/hdlc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan/hdlc.c')
-rw-r--r--drivers/net/wan/hdlc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c
index dbc179887f8b..43da8bd72973 100644
--- a/drivers/net/wan/hdlc.c
+++ b/drivers/net/wan/hdlc.c
@@ -44,7 +44,7 @@ static const char* version = "HDLC support module revision 1.22";
44 44
45static struct hdlc_proto *first_proto; 45static struct hdlc_proto *first_proto;
46 46
47static int hdlc_change_mtu(struct net_device *dev, int new_mtu) 47int hdlc_change_mtu(struct net_device *dev, int new_mtu)
48{ 48{
49 if ((new_mtu < 68) || (new_mtu > HDLC_MAX_MTU)) 49 if ((new_mtu < 68) || (new_mtu > HDLC_MAX_MTU))
50 return -EINVAL; 50 return -EINVAL;
@@ -66,7 +66,15 @@ static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev,
66 return hdlc->proto->netif_rx(skb); 66 return hdlc->proto->netif_rx(skb);
67} 67}
68 68
69int hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev)
70{
71 hdlc_device *hdlc = dev_to_hdlc(dev);
69 72
73 if (hdlc->proto->xmit)
74 return hdlc->proto->xmit(skb, dev);
75
76 return hdlc->xmit(skb, dev); /* call hardware driver directly */
77}
70 78
71static inline void hdlc_proto_start(struct net_device *dev) 79static inline void hdlc_proto_start(struct net_device *dev)
72{ 80{
@@ -231,8 +239,6 @@ static void hdlc_setup_dev(struct net_device *dev)
231 dev->hard_header_len = 16; 239 dev->hard_header_len = 16;
232 dev->addr_len = 0; 240 dev->addr_len = 0;
233 dev->header_ops = &hdlc_null_ops; 241 dev->header_ops = &hdlc_null_ops;
234
235 dev->change_mtu = hdlc_change_mtu;
236} 242}
237 243
238static void hdlc_setup(struct net_device *dev) 244static void hdlc_setup(struct net_device *dev)
@@ -330,6 +336,8 @@ MODULE_AUTHOR("Krzysztof Halasa <khc@pm.waw.pl>");
330MODULE_DESCRIPTION("HDLC support module"); 336MODULE_DESCRIPTION("HDLC support module");
331MODULE_LICENSE("GPL v2"); 337MODULE_LICENSE("GPL v2");
332 338
339EXPORT_SYMBOL(hdlc_change_mtu);
340EXPORT_SYMBOL(hdlc_start_xmit);
333EXPORT_SYMBOL(hdlc_open); 341EXPORT_SYMBOL(hdlc_open);
334EXPORT_SYMBOL(hdlc_close); 342EXPORT_SYMBOL(hdlc_close);
335EXPORT_SYMBOL(hdlc_ioctl); 343EXPORT_SYMBOL(hdlc_ioctl);