aboutsummaryrefslogtreecommitdiffstats
path: root/net/econet/af_econet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/econet/af_econet.c')
-rw-r--r--net/econet/af_econet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 1c1f26c5d672..7e717cb35ad1 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -322,6 +322,7 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
322 /* Real hardware Econet. We're not worthy etc. */ 322 /* Real hardware Econet. We're not worthy etc. */
323#ifdef CONFIG_ECONET_NATIVE 323#ifdef CONFIG_ECONET_NATIVE
324 unsigned short proto = 0; 324 unsigned short proto = 0;
325 int hlen, tlen;
325 int res; 326 int res;
326 327
327 if (len + 15 > dev->mtu) { 328 if (len + 15 > dev->mtu) {
@@ -331,12 +332,14 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
331 332
332 dev_hold(dev); 333 dev_hold(dev);
333 334
334 skb = sock_alloc_send_skb(sk, len + LL_ALLOCATED_SPACE(dev), 335 hlen = LL_RESERVED_SPACE(dev);
336 tlen = dev->needed_tailroom;
337 skb = sock_alloc_send_skb(sk, len + hlen + tlen,
335 msg->msg_flags & MSG_DONTWAIT, &err); 338 msg->msg_flags & MSG_DONTWAIT, &err);
336 if (skb == NULL) 339 if (skb == NULL)
337 goto out_unlock; 340 goto out_unlock;
338 341
339 skb_reserve(skb, LL_RESERVED_SPACE(dev)); 342 skb_reserve(skb, hlen);
340 skb_reset_network_header(skb); 343 skb_reset_network_header(skb);
341 344
342 eb = (struct ec_cb *)&skb->cb; 345 eb = (struct ec_cb *)&skb->cb;