]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/net.h
net: Provide a function to get the current MAC address
[karo-tx-uboot.git] / include / net.h
index e9515c80328eac4fcffd0fe5df599818fdaa68f0..cd3f6f0ae9cf3a4b7524e055bb0beabd63c8e6fe 100644 (file)
@@ -111,6 +111,14 @@ struct eth_device *eth_get_dev(void)
 {
        return eth_current;
 }
+
+static inline unsigned char *eth_get_ethaddr(void)
+{
+       if (eth_current)
+               return eth_current->enetaddr;
+       return NULL;
+}
+
 extern struct eth_device *eth_get_dev_by_name(const char *devname);
 extern struct eth_device *eth_get_dev_by_index(int index); /* get dev @ index */
 extern int eth_get_dev_index(void);            /* get the device index */