aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/drivers/tuntap_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux/drivers/tuntap_kern.c')
-rw-r--r--arch/um/os-Linux/drivers/tuntap_kern.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/um/os-Linux/drivers/tuntap_kern.c b/arch/um/os-Linux/drivers/tuntap_kern.c
index 9ade1f892ac8..9d384807b077 100644
--- a/arch/um/os-Linux/drivers/tuntap_kern.c
+++ b/arch/um/os-Linux/drivers/tuntap_kern.c
@@ -35,20 +35,15 @@ static void tuntap_init(struct net_device *dev, void *data)
35 printk("\n"); 35 printk("\n");
36} 36}
37 37
38static int tuntap_read(int fd, struct sk_buff **skb, 38static int tuntap_read(int fd, struct sk_buff *skb, struct uml_net_private *lp)
39 struct uml_net_private *lp)
40{ 39{
41 *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); 40 return net_read(fd, skb_mac_header(skb),
42 if (*skb == NULL) 41 skb->dev->mtu + ETH_HEADER_OTHER);
43 return -ENOMEM;
44 return net_read(fd, skb_mac_header(*skb),
45 (*skb)->dev->mtu + ETH_HEADER_OTHER);
46} 42}
47 43
48static int tuntap_write(int fd, struct sk_buff **skb, 44static int tuntap_write(int fd, struct sk_buff *skb, struct uml_net_private *lp)
49 struct uml_net_private *lp)
50{ 45{
51 return net_write(fd, (*skb)->data, (*skb)->len); 46 return net_write(fd, skb->data, skb->len);
52} 47}
53 48
54const struct net_kern_info tuntap_kern_info = { 49const struct net_kern_info tuntap_kern_info = {