diff options
Diffstat (limited to 'pfinet/ethernet.c')
-rw-r--r-- | pfinet/ethernet.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c index 940b78c2..dab5c56f 100644 --- a/pfinet/ethernet.c +++ b/pfinet/ethernet.c @@ -1,5 +1,7 @@ /* - Copyright (C) 1995,96,98,99,2000,02 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1998, 1999, 2000, 2002, 2007 + Free Software Foundation, Inc. + Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -119,7 +121,7 @@ ethernet_demuxer (mach_msg_header_t *inp, __mutex_lock (&net_bh_lock); skb = alloc_skb (datalen, GFP_ATOMIC); - skb->len = datalen; + skb_put (skb, datalen); skb->dev = dev; /* Copy the two parts of the frame into the buffer. */ @@ -197,6 +199,22 @@ ethernet_xmit (struct sk_buff *skb, struct device *dev) return 0; } +/* Set device flags (e.g. promiscuous) */ +int +ethernet_change_flags (struct device *dev, short flags) +{ + error_t err = 0; +#ifdef NET_FLAGS + int status = flags; + struct ether_device *edev = (struct ether_device *) dev->priv; + err = device_set_status (edev->ether_port, NET_FLAGS, &status, 1); + if (err == D_INVALID_OPERATION) + /* Not supported, ignore. */ + err = 0; +#endif + return err; +} + void setup_ethernet_device (char *name, struct device **device) { |