diff options
Diffstat (limited to 'arch/um/drivers/pcap_kern.c')
-rw-r--r-- | arch/um/drivers/pcap_kern.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c index da0403efbc0d..3a750dd39be1 100644 --- a/arch/um/drivers/pcap_kern.c +++ b/arch/um/drivers/pcap_kern.c | |||
@@ -31,19 +31,14 @@ void pcap_init(struct net_device *dev, void *data) | |||
31 | printk("pcap backend, host interface %s\n", ppri->host_if); | 31 | printk("pcap backend, host interface %s\n", ppri->host_if); |
32 | } | 32 | } |
33 | 33 | ||
34 | static int pcap_read(int fd, struct sk_buff **skb, | 34 | static int pcap_read(int fd, struct sk_buff *skb, struct uml_net_private *lp) |
35 | struct uml_net_private *lp) | ||
36 | { | 35 | { |
37 | *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); | 36 | return pcap_user_read(fd, skb_mac_header(skb), |
38 | if (*skb == NULL) | 37 | skb->dev->mtu + ETH_HEADER_OTHER, |
39 | return -ENOMEM; | ||
40 | |||
41 | return pcap_user_read(fd, skb_mac_header(*skb), | ||
42 | (*skb)->dev->mtu + ETH_HEADER_OTHER, | ||
43 | (struct pcap_data *) &lp->user); | 38 | (struct pcap_data *) &lp->user); |
44 | } | 39 | } |
45 | 40 | ||
46 | static int pcap_write(int fd, struct sk_buff **skb, struct uml_net_private *lp) | 41 | static int pcap_write(int fd, struct sk_buff *skb, struct uml_net_private *lp) |
47 | { | 42 | { |
48 | return -EPERM; | 43 | return -EPERM; |
49 | } | 44 | } |