diff options
Diffstat (limited to 'drivers/net/netconsole.c')
-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 5ffbb8891647..31e047dd7bb3 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) | |||
306 | 306 | ||
307 | static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) | 307 | static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) |
308 | { | 308 | { |
309 | struct net_device *dev = nt->np.dev; | ||
310 | |||
309 | DECLARE_MAC_BUF(mac); | 311 | DECLARE_MAC_BUF(mac); |
310 | return snprintf(buf, PAGE_SIZE, "%s\n", | 312 | return snprintf(buf, PAGE_SIZE, "%s\n", |
311 | print_mac(mac, nt->np.local_mac)); | 313 | print_mac(mac, dev->dev_addr)); |
312 | } | 314 | } |
313 | 315 | ||
314 | static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf) | 316 | 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, | |||
667 | struct netconsole_target *nt; | 669 | struct netconsole_target *nt; |
668 | struct net_device *dev = ptr; | 670 | struct net_device *dev = ptr; |
669 | 671 | ||
670 | if (!(event == NETDEV_CHANGEADDR || event == NETDEV_CHANGENAME)) | 672 | if (!(event == NETDEV_CHANGENAME)) |
671 | goto done; | 673 | goto done; |
672 | 674 | ||
673 | spin_lock_irqsave(&target_list_lock, flags); | 675 | spin_lock_irqsave(&target_list_lock, flags); |
@@ -675,10 +677,6 @@ static int netconsole_netdev_event(struct notifier_block *this, | |||
675 | netconsole_target_get(nt); | 677 | netconsole_target_get(nt); |
676 | if (nt->np.dev == dev) { | 678 | if (nt->np.dev == dev) { |
677 | switch (event) { | 679 | switch (event) { |
678 | case NETDEV_CHANGEADDR: | ||
679 | memcpy(nt->np.local_mac, dev->dev_addr, ETH_ALEN); | ||
680 | break; | ||
681 | |||
682 | case NETDEV_CHANGENAME: | 680 | case NETDEV_CHANGENAME: |
683 | strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ); | 681 | strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ); |
684 | break; | 682 | break; |