diff options
Diffstat (limited to 'drivers/net/wan/hdlc.c')
-rw-r--r-- | drivers/net/wan/hdlc.c | 14 |
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 | ||
45 | static struct hdlc_proto *first_proto; | 45 | static struct hdlc_proto *first_proto; |
46 | 46 | ||
47 | static int hdlc_change_mtu(struct net_device *dev, int new_mtu) | 47 | int 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 | ||
69 | int 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 | ||
71 | static inline void hdlc_proto_start(struct net_device *dev) | 79 | static 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 | ||
238 | static void hdlc_setup(struct net_device *dev) | 244 | static void hdlc_setup(struct net_device *dev) |
@@ -330,6 +336,8 @@ MODULE_AUTHOR("Krzysztof Halasa <khc@pm.waw.pl>"); | |||
330 | MODULE_DESCRIPTION("HDLC support module"); | 336 | MODULE_DESCRIPTION("HDLC support module"); |
331 | MODULE_LICENSE("GPL v2"); | 337 | MODULE_LICENSE("GPL v2"); |
332 | 338 | ||
339 | EXPORT_SYMBOL(hdlc_change_mtu); | ||
340 | EXPORT_SYMBOL(hdlc_start_xmit); | ||
333 | EXPORT_SYMBOL(hdlc_open); | 341 | EXPORT_SYMBOL(hdlc_open); |
334 | EXPORT_SYMBOL(hdlc_close); | 342 | EXPORT_SYMBOL(hdlc_close); |
335 | EXPORT_SYMBOL(hdlc_ioctl); | 343 | EXPORT_SYMBOL(hdlc_ioctl); |