]> err.no Git - linux-2.6/blobdiff - drivers/net/netconsole.c
[BNX2]: Add function to fetch hardware tx index.
[linux-2.6] / drivers / net / netconsole.c
index 69ef1eb03beab12673479ba483f7c26b2fd0a67a..31e047dd7bb349d7e38d394c02e6a041f6ee29df 100644 (file)
@@ -306,18 +306,18 @@ static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf)
 
 static ssize_t show_local_mac(struct netconsole_target *nt, char *buf)
 {
-       return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n",
-                       nt->np.local_mac[0], nt->np.local_mac[1],
-                       nt->np.local_mac[2], nt->np.local_mac[3],
-                       nt->np.local_mac[4], nt->np.local_mac[5]);
+       struct net_device *dev = nt->np.dev;
+
+       DECLARE_MAC_BUF(mac);
+       return snprintf(buf, PAGE_SIZE, "%s\n",
+                       print_mac(mac, dev->dev_addr));
 }
 
 static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf)
 {
-       return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n",
-                       nt->np.remote_mac[0], nt->np.remote_mac[1],
-                       nt->np.remote_mac[2], nt->np.remote_mac[3],
-                       nt->np.remote_mac[4], nt->np.remote_mac[5]);
+       DECLARE_MAC_BUF(mac);
+       return snprintf(buf, PAGE_SIZE, "%s\n",
+                       print_mac(mac, nt->np.remote_mac));
 }
 
 /*
@@ -669,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);
@@ -677,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;