diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-11-19 19:23:29 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 14:54:17 -0800 |
commit | 0953864160bdd28dfe45fd46fa462b4d2d53cb96 (patch) | |
tree | fcc3be7c24858b4606d6eeafee2292a58d84c6a4 /drivers | |
parent | 5106930bd6b57402205e3de54dae9476e215b622 (diff) |
[NETPOLL]: no need to store local_mac
The local_mac is managed by the network device, no need to keep a
spare copy and all the management problems that could cause.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/netconsole.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 5ffbb889164..31e047dd7bb 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -306,9 +306,11 @@ static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf) static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) { + struct net_device *dev = nt->np.dev; + DECLARE_MAC_BUF(mac); return snprintf(buf, PAGE_SIZE, "%s\n", - print_mac(mac, nt->np.local_mac)); + print_mac(mac, dev->dev_addr)); } static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf) @@ -667,7 +669,7 @@ static int netconsole_netdev_event(struct notifier_block *this, struct netconsole_target *nt; struct net_device *dev = ptr; - if (!(event == NETDEV_CHANGEADDR || event == NETDEV_CHANGENAME)) + if (!(event == NETDEV_CHANGENAME)) goto done; spin_lock_irqsave(&target_list_lock, flags); @@ -675,10 +677,6 @@ static int netconsole_netdev_event(struct notifier_block *this, netconsole_target_get(nt); if (nt->np.dev == dev) { switch (event) { - case NETDEV_CHANGEADDR: - memcpy(nt->np.local_mac, dev->dev_addr, ETH_ALEN); - break; - case NETDEV_CHANGENAME: strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ); break; |