From: Matthew Wilcox <willy@debian.org>
To: netdev@oss.sgi.com
Subject: [PATCH] Move eth_mac_addr and eth_change_mtu
Date: Fri, 11 Jul 2003 19:19:46 +0100 [thread overview]
Message-ID: <20030711181946.GG20424@parcelfarce.linux.theplanet.co.uk> (raw)
Move eth_mac_addr() and eth_change_mtu() from drivers/net/net_init.c
to net/ethernet/eth.c
Index: drivers/net/net_init.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/net/net_init.c,v
retrieving revision 1.4
diff -u -p -r1.4 net_init.c
--- drivers/net/net_init.c 14 Jun 2003 22:15:21 -0000 1.4
+++ drivers/net/net_init.c 10 Jul 2003 20:57:55 -0000
@@ -222,23 +222,6 @@ struct net_device *alloc_etherdev(int si
EXPORT_SYMBOL(init_etherdev);
EXPORT_SYMBOL(alloc_etherdev);
-static int eth_mac_addr(struct net_device *dev, void *p)
-{
- struct sockaddr *addr=p;
- if (netif_running(dev))
- return -EBUSY;
- memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
- return 0;
-}
-
-static int eth_change_mtu(struct net_device *dev, int new_mtu)
-{
- if ((new_mtu < 68) || (new_mtu > 1500))
- return -EINVAL;
- dev->mtu = new_mtu;
- return 0;
-}
-
#ifdef CONFIG_FDDI
/**
Index: include/linux/etherdevice.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/linux/etherdevice.h,v
retrieving revision 1.3
diff -u -p -r1.3 etherdevice.h
--- include/linux/etherdevice.h 14 Jun 2003 22:16:01 -0000 1.3
+++ include/linux/etherdevice.h 10 Jul 2003 21:00:23 -0000
@@ -38,6 +38,8 @@ extern int eth_header_cache(struct neig
struct hh_cache *hh);
extern int eth_header_parse(struct sk_buff *skb,
unsigned char *haddr);
+extern int eth_mac_addr(struct net_device *dev, void *p);
+extern int eth_change_mtu(struct net_device *dev, int new_mtu);
extern struct net_device *init_etherdev(struct net_device *dev, int sizeof_priv);
extern struct net_device *alloc_etherdev(int sizeof_priv);
static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base)
Index: net/ethernet/eth.c
===================================================================
RCS file: /var/cvs/linux-2.5/net/ethernet/eth.c,v
retrieving revision 1.4
diff -u -p -r1.4 eth.c
--- net/ethernet/eth.c 23 Jun 2003 03:30:58 -0000 1.4
+++ net/ethernet/eth.c 10 Jul 2003 20:58:54 -0000
@@ -241,3 +241,20 @@ void eth_header_cache_update(struct hh_c
memcpy(((u8*)hh->hh_data) + HH_DATA_OFF(sizeof(struct ethhdr)),
haddr, dev->addr_len);
}
+
+int eth_mac_addr(struct net_device *dev, void *p)
+{
+ struct sockaddr *addr=p;
+ if (netif_running(dev))
+ return -EBUSY;
+ memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+ return 0;
+}
+
+int eth_change_mtu(struct net_device *dev, int new_mtu)
+{
+ if ((new_mtu < 68) || (new_mtu > 1500))
+ return -EINVAL;
+ dev->mtu = new_mtu;
+ return 0;
+}
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
next reply other threads:[~2003-07-11 18:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-11 18:19 Matthew Wilcox [this message]
2003-07-11 18:23 ` [PATCH] Move eth_mac_addr and eth_change_mtu Jeff Garzik
2003-07-11 18:25 ` Matthew Wilcox
2003-07-11 20:57 ` Jeff Garzik
2003-07-11 21:05 ` Matthew Wilcox
2003-07-11 21:17 ` Jeff Garzik
2003-07-11 21:56 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030711181946.GG20424@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).